From 6de1957d835530e07736eeb430744b551aafc504 Mon Sep 17 00:00:00 2001 From: MayaDevops Date: Mon, 30 Jan 2023 23:23:15 +0530 Subject: [PATCH 001/420] marriage project added --- .../common/Idgen/IdGenerationRequest.java | 22 - .../common/Idgen/IdGenerationResponse.java | 21 - .../ksmart/birth/common/Idgen/IdRequest.java | 28 - .../ksmart/birth/common/Idgen/IdResponse.java | 15 - .../birth/common/calculation/Category.java | 45 - .../calculation/FeeAndBillingSlabIds.java | 25 - .../common/calculation/TaxHeadEstimate.java | 26 - .../calculation/collections/models/Bill.java | 191 ---- .../collections/models/BillAccountDetail.java | 83 -- .../collections/models/BillDetail.java | 178 ---- .../collections/models/Payment.java | 142 --- .../collections/models/PaymentDetail.java | 91 -- .../collections/models/PaymentRequest.java | 30 - .../collections/models/PaymentResponse.java | 27 - .../models/PaymentSearchCriteria.java | 48 - .../calculation/demand/models/Demand.java | 125 --- .../demand/models/DemandDetail.java | 62 -- .../demand/models/DemandRequest.java | 69 -- .../demand/models/DemandResponse.java | 67 -- .../common/consumer/ReceiptConsumer.java | 197 ---- .../contract/BirthPdfApplicationRequest.java | 30 - .../birth/common/contract/BirthResponse.java | 37 - .../contract/DeathPdfApplicationRequest.java | 30 - .../birth/common/contract/DeathResponse.java | 37 - .../birth/common/contract/EgovPdfResp.java | 12 - .../contract/EncryptionDecryptionUtil.java | 135 --- .../common/contract/HospitalResponse.java | 33 - .../common/contract/RequestInfoWrapper.java | 17 - .../common/controller/CommonController.java | 76 -- .../org/ksmart/birth/common/model/Amount.java | 37 - .../birth/common/model/AuditDetails.java | 39 - .../ksmart/birth/common/model/Document.java | 62 -- .../birth/common/model/EgHospitalDtl.java | 24 - .../birth/common/producer/BndProducer.java | 16 - .../common/repository/CommonRepository.java | 994 ------------------ .../common/repository/DemandRepository.java | 55 - .../common/repository/IdGenRepository.java | 89 -- .../repository/ServiceRequestRepository.java | 43 - .../builder/CommonQueryBuilder.java | 36 - .../repository/rowmapper/CommonRowMapper.java | 42 - .../birth/common/services/CommonService.java | 77 -- .../birth/config/BirthConfiguration.java | 153 --- .../controller/AdoptionController.java | 49 - .../MultipleBirthApplicationController.java | 41 - .../enrichment/BaseEnrichment.java | 25 - .../adoption/AdoptionEnrichment.java | 148 --- .../model/AdoptionDetail.java | 235 ----- .../model/adoption/AdoptionFatherInfo.java | 68 -- .../model/adoption/AdoptionMotherInfo.java | 67 -- .../adoption/AdoptionPermanentAddress.java | 126 --- .../adoption/AdoptionPresentAddress.java | 124 --- .../model/adoption/AdoptionRequest.java | 31 - .../model/adoption/AdoptionResponse.java | 4 - .../birth/BirthApplicationSearchCriteria.java | 56 - .../model/birth/BirthDetailsRequest.java | 33 - .../repository/AdoptionRepository.java | 50 - .../querybuilder/BaseBirthQuery.java | 73 -- .../BirthApplicationQueryBuilder.java | 100 -- .../repository/rowmapper/BaseRowMapper.java | 19 - .../rowmapper/BirthApplicationRowMapper.java | 70 -- .../rowmapper/BirthFatherInfoRowMapper.java | 26 - .../rowmapper/BirthMotherInfoRowMapper.java | 25 - .../BirthPermanentAddressRowMapper.java | 35 - .../rowmapper/BirthPlaceRowMapper.java | 57 - .../BirthPresentAddressRowMapper.java | 34 - .../rowmapper/BirthStatInfoRowMapper.java | 52 - .../service/AdoptionService.java | 28 - .../MultipleBirthApplicationService.java | 49 - .../service/RegistryRequestService.java | 226 ---- .../validator/AdoptionValidator.java | 4 - .../validator/MdmsValidator.java | 512 --------- .../MultipleBirthApplicationValidator.java | 50 - .../controller/BirthCorrectionController.java | 57 - .../enrichment/BaseEnrichment.java | 25 - .../BirthDetailsCorrectionEnrichment.java | 144 --- .../model/BirthApplicationResponse.java | 39 - .../marriagecorrection/model/BirthDetail.java | 189 ---- .../model/BirthDetailsRequest.java | 32 - .../model/BirthFatherInfo.java | 63 -- .../model/BirthMotherInfo.java | 63 -- .../model/BirthPermanentAddress.java | 120 --- .../marriagecorrection/model/BirthPlace.java | 205 ---- .../model/BirthPresentAddress.java | 117 --- .../repository/BirthCorrectionRepository.java | 61 -- .../querybuilder/BaseCorrectionQuery.java | 73 -- .../BirthCorrectionQueryBuilder.java | 79 -- .../repository/rowmapper/BaseRowMapper.java | 19 - .../rowmapper/BirthCorrectionRowMapper.java | 65 -- .../rowmapper/BirthFatherInfoRowMapper.java | 26 - .../rowmapper/BirthMotherInfoRowMapper.java | 25 - .../BirthPermanentAddressRowMapper.java | 35 - .../rowmapper/BirthPlaceRowMapper.java | 57 - .../BirthPresentAddressRowMapper.java | 34 - .../rowmapper/BirthStatInfoRowMapper.java | 52 - .../service/BirthCorrectionService.java | 38 - .../validator/BirthDetailsValidator.java | 35 - .../calculation/Calculation.java | 45 - .../calculation/CalculationReq.java | 25 - .../calculation/CalculationRes.java | 26 - .../calculation/CalulationCriteria.java | 41 - .../controller/RegistryBirthController.java | 68 -- .../enrichment/RegisterBirthEnrichment.java | 50 - .../model/BirthCertRequest.java | 33 - .../model/BirthCertResponse.java | 39 - .../model/BirthCertificate.java | 136 --- .../model/BirthPdfRegisterRequest.java | 22 - .../model/RegisterBirthDetail.java | 163 --- .../model/RegisterBirthDetailsRequest.java | 34 - .../model/RegisterBirthFatherInfo.java | 73 -- .../model/RegisterBirthMotherInfo.java | 75 -- .../model/RegisterBirthPermanentAddress.java | 148 --- .../model/RegisterBirthPlace.java | 210 ---- .../model/RegisterBirthPresentAddress.java | 133 --- .../model/RegisterBirthResponse.java | 36 - .../model/RegisterBirthSearchCriteria.java | 46 - .../RegisterBirthStatiticalInformation.java | 170 --- .../repository/RegisterBirthRepository.java | 138 --- .../querybuilder/BaseRegBuilder.java | 72 -- .../querybuilder/RegisterQueryBuilder.java | 76 -- .../rowmapper/BaseRegRowMapper.java | 17 - .../BirthRegFatherInfoRowMapper.java | 43 - .../BirthRegMotherInfoRowMapper.java | 37 - .../rowmapper/BirthRegPerAddRowMapper.java | 57 - .../rowmapper/BirthRegPlaceRowMapper.java | 57 - .../rowmapper/BirthRegPreAddRowMapper.java | 55 - .../rowmapper/BirthRegStatInfoRowMapper.java | 52 - .../rowmapper/BirthRegisterRowMapper.java | 71 -- .../service/EnrichmentService.java | 120 --- .../service/MdmsDataService.java | 40 - .../service/RegisterBirthService.java | 82 -- .../ksmart/birth/utils/BirthConstants.java | 84 -- .../birth/utils/BirthDeathConstants.java | 208 ---- .../org/ksmart/birth/utils/BirthUtils.java | 61 -- .../org/ksmart/birth/utils/CommonUtils.java | 110 -- .../java/org/ksmart/birth/utils/MdmsUtil.java | 223 ---- .../birth/utils/ResponseInfoFactory.java | 25 - .../ksmart/birth/utils/enums/ErrorCodes.java | 23 - .../birth/workflow/WorkflowIntegrator.java | 158 --- .../MarriageApplication.java | 4 +- .../MarriageApplicationController.java} | 26 +- .../marriage/MarriageDetailsEnrichment.java} | 36 +- .../model/MarriageApplicationDetail.java} | 8 +- .../MarriageApplicationResponse.java} | 10 +- .../MarriageApplicationSearchCriteria.java} | 2 +- .../model/marriage/MarriageFatherInfo.java} | 2 +- .../model/marriage/MarriageMotherInfo.java} | 2 +- .../marriage/MarriagePermanentAddress.java} | 2 +- .../model/marriage/MarriagePlace.java} | 2 +- .../marriage/MarriagePresentAddress.java} | 2 +- .../MarriageStatisticalInformation.java} | 2 +- .../MarriageApplicationRepository.java} | 34 +- .../service/MarriageApplicationService.java} | 32 +- .../MarriageApplicationValidator.java} | 22 +- 153 files changed, 93 insertions(+), 11111 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdGenerationRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdGenerationResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/Category.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/FeeAndBillingSlabIds.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/TaxHeadEstimate.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/Bill.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/BillAccountDetail.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/BillDetail.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/Payment.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentDetail.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentSearchCriteria.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/Demand.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandDetail.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/consumer/ReceiptConsumer.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/BirthPdfApplicationRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/BirthResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/DeathPdfApplicationRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/DeathResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/EgovPdfResp.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/EncryptionDecryptionUtil.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/HospitalResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/RequestInfoWrapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/controller/CommonController.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/Amount.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/AuditDetails.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/Document.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/EgHospitalDtl.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/producer/BndProducer.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/CommonRepository.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/DemandRepository.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/IdGenRepository.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/ServiceRequestRepository.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/builder/CommonQueryBuilder.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/rowmapper/CommonRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/services/CommonService.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/config/BirthConfiguration.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/AdoptionController.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/MultipleBirthApplicationController.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/BaseEnrichment.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/adoption/AdoptionEnrichment.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/AdoptionDetail.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionFatherInfo.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionMotherInfo.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionPermanentAddress.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionPresentAddress.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthApplicationSearchCriteria.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthDetailsRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/AdoptionRepository.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/querybuilder/BaseBirthQuery.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/querybuilder/BirthApplicationQueryBuilder.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BaseRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthApplicationRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthFatherInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthMotherInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPermanentAddressRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPlaceRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPresentAddressRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthStatInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/AdoptionService.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/MultipleBirthApplicationService.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/RegistryRequestService.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/AdoptionValidator.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/MdmsValidator.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/MultipleBirthApplicationValidator.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/controller/BirthCorrectionController.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/enrichment/BaseEnrichment.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/enrichment/birth/BirthDetailsCorrectionEnrichment.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthApplicationResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthDetail.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthDetailsRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthFatherInfo.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthMotherInfo.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPermanentAddress.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPlace.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPresentAddress.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/BirthCorrectionRepository.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/querybuilder/BaseCorrectionQuery.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/querybuilder/BirthCorrectionQueryBuilder.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BaseRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthCorrectionRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthFatherInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthMotherInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPermanentAddressRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPlaceRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPresentAddressRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthStatInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/service/BirthCorrectionService.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/validator/BirthDetailsValidator.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/Calculation.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalculationReq.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalculationRes.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalulationCriteria.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/controller/RegistryBirthController.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/enrichment/RegisterBirthEnrichment.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertificate.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthPdfRegisterRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthDetail.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthDetailsRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthFatherInfo.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthMotherInfo.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPermanentAddress.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPlace.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPresentAddress.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthResponse.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthSearchCriteria.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthStatiticalInformation.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/RegisterBirthRepository.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/querybuilder/BaseRegBuilder.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/querybuilder/RegisterQueryBuilder.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BaseRegRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegFatherInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegMotherInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPerAddRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPlaceRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPreAddRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegStatInfoRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegisterRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/EnrichmentService.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/MdmsDataService.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/RegisterBirthService.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthConstants.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthDeathConstants.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthUtils.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/CommonUtils.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/MdmsUtil.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/ResponseInfoFactory.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/enums/ErrorCodes.java delete mode 100755 municipal-services/marriage-services/src/main/java/org/ksmart/birth/workflow/WorkflowIntegrator.java rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth => marriage}/MarriageApplication.java (96%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/controller/BirthApplicationController.java => marriage/marriageapplication/controller/MarriageApplicationController.java} (85%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/enrichment/birth/BirthDetailsEnrichment.java => marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java} (79%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/model/BirthApplicationDetail.java => marriage/marriageapplication/model/MarriageApplicationDetail.java} (94%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/model/birth/BirthApplicationResponse.java => marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java} (69%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriagecorrection/model/BirthApplicationSearchCriteria.java => marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java} (94%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/model/birth/BirthFatherInfo.java => marriage/marriageapplication/model/marriage/MarriageFatherInfo.java} (95%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/model/birth/BirthMotherInfo.java => marriage/marriageapplication/model/marriage/MarriageMotherInfo.java} (95%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/model/birth/BirthPermanentAddress.java => marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java} (97%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/model/birth/BirthPlace.java => marriage/marriageapplication/model/marriage/MarriagePlace.java} (98%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/model/birth/BirthPresentAddress.java => marriage/marriageapplication/model/marriage/MarriagePresentAddress.java} (97%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/model/birth/BirthStatisticalInformation.java => marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java} (98%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/repository/BirthApplicationRepository.java => marriage/marriageapplication/repository/MarriageApplicationRepository.java} (53%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/service/BirthApplicationService.java => marriage/marriageapplication/service/MarriageApplicationService.java} (53%) rename municipal-services/marriage-services/src/main/java/org/ksmart/{birth/marriageapplication/validator/BirthApplicationValidator.java => marriage/marriageapplication/validator/MarriageApplicationValidator.java} (56%) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdGenerationRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdGenerationRequest.java deleted file mode 100644 index 4937378e6d7..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdGenerationRequest.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.ksmart.birth.common.Idgen; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.egov.common.contract.request.RequestInfo; - -import java.util.List; -@Data -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class IdGenerationRequest { - - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; - - private List idRequests; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdGenerationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdGenerationResponse.java deleted file mode 100644 index 7e8775a4fc4..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdGenerationResponse.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.ksmart.birth.common.Idgen; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.egov.common.contract.response.ResponseInfo; - -import java.util.List; - -@Data -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class IdGenerationResponse { - - private ResponseInfo responseInfo; - - private List idResponses; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdRequest.java deleted file mode 100644 index bdcfff05b0a..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdRequest.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.ksmart.birth.common.Idgen; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.constraints.NotNull; - -@Data -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class IdRequest { - - @JsonProperty("idName") - @NotNull - private String idName; - - @NotNull - @JsonProperty("tenantId") - private String tenantId; - - @JsonProperty("format") - private String format; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdResponse.java deleted file mode 100644 index 3e652ea57a9..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/Idgen/IdResponse.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.ksmart.birth.common.Idgen; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -@Data -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class IdResponse { - - private String id; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/Category.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/Category.java deleted file mode 100644 index 493bf6c397e..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/Category.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.ksmart.birth.common.calculation; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -public enum Category { - - TAX("TAX"), - - FEE("FEE"), - - REBATE("REBATE"), - - EXEMPTION("EXEMPTION"), - - ADVANCE_COLLECTION("ADVANCE_COLLECTION"), - - PENALTY("PENALTY"), - - FINES("FINES"), - - CHARGES("CHARGES"); - - private String value; - - Category(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static Category fromValue(String text) { - for (Category b : Category.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/FeeAndBillingSlabIds.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/FeeAndBillingSlabIds.java deleted file mode 100644 index a853a3327ab..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/FeeAndBillingSlabIds.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.ksmart.birth.common.calculation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Data; - -import javax.validation.Valid; -import java.math.BigDecimal; -import java.util.List; - -@Data -public class FeeAndBillingSlabIds { - - @JsonProperty("id") - @Valid - private String id; - - @JsonProperty("fee") - @Valid - private BigDecimal fee; - - @JsonProperty("billingSlabIds") - @Valid - private List billingSlabIds; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/TaxHeadEstimate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/TaxHeadEstimate.java deleted file mode 100644 index fc0f2b7343f..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/TaxHeadEstimate.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.ksmart.birth.common.calculation; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -import java.math.BigDecimal; - - -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder -@Getter -@Setter -public class TaxHeadEstimate { - - private String taxHeadCode; - - private BigDecimal estimateAmount; - - private Category category; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/Bill.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/Bill.java deleted file mode 100644 index 751108e34a4..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/Bill.java +++ /dev/null @@ -1,191 +0,0 @@ -package org.ksmart.birth.common.calculation.collections.models; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -import javax.validation.Valid; - -import org.ksmart.birth.common.model.AuditDetails; -import org.springframework.util.CollectionUtils; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.JsonNode; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -@Getter -@Setter -@ToString -@Builder -@NoArgsConstructor -@AllArgsConstructor -@EqualsAndHashCode -public class Bill { - - @JsonProperty("id") - @Valid - private String id = null; - - @JsonProperty("mobileNumber") - @Valid - private String mobileNumber = null; - - @JsonProperty("paidBy") - @Valid - private String paidBy = null; - - @JsonProperty("payerName") - @Valid - private String payerName = null; - - @JsonProperty("payerAddress") - @Valid - private String payerAddress = null; - - @JsonProperty("payerEmail") - @Valid - private String payerEmail = null; - - @JsonProperty("payerId") - @Valid - private String payerId = null; - - @JsonProperty("status") - @Valid - private StatusEnum status = null; - - @JsonProperty("reasonForCancellation") - @Valid - private String reasonForCancellation = null; - - @JsonProperty("isCancelled") - @Valid - private Boolean isCancelled = null; - - @JsonProperty("additionalDetails") - @Valid - private JsonNode additionalDetails = null; - - @JsonProperty("billDetails") - @Valid - private List billDetails = null; - - @JsonProperty("tenantId") - @Valid - private String tenantId = null; - - @JsonProperty("auditDetails") - @Valid - private AuditDetails auditDetails = null; - - @JsonProperty("collectionModesNotAllowed") - @Valid - private List collectionModesNotAllowed = null; - - @JsonProperty("partPaymentAllowed") - @Valid - private Boolean partPaymentAllowed = null; - - @JsonProperty("isAdvanceAllowed") - @Valid - private Boolean isAdvanceAllowed; - - @JsonProperty("minimumAmountToBePaid") - @Valid - private BigDecimal minimumAmountToBePaid = null; - - @JsonProperty("businessService") - @Valid - private String businessService = null; - - @JsonProperty("totalAmount") - @Valid - private BigDecimal totalAmount = null; - - @JsonProperty("consumerCode") - @Valid - private String consumerCode = null; - - @JsonProperty("billNumber") - @Valid - private String billNumber = null; - - @JsonProperty("billDate") - @Valid - private Long billDate = null; - - @JsonProperty("amountPaid") - @Valid - private BigDecimal amountPaid; - - - - public enum StatusEnum { - ACTIVE("ACTIVE"), - - CANCELLED("CANCELLED"), - - PAID("PAID"), - - EXPIRED("EXPIRED"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - public static boolean contains(String test) { - for (StatusEnum val : StatusEnum.values()) { - if (val.name().equalsIgnoreCase(test)) { - return true; - } - } - return false; - } - - @JsonCreator - public static StatusEnum fromValue(String text) { - for (StatusEnum b : StatusEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - - } - - public Boolean addBillDetail(BillDetail billDetail) { - - if (CollectionUtils.isEmpty(billDetails)) { - - billDetails = new ArrayList<>(); - return billDetails.add(billDetail); - } else { - - if (!billDetails.contains(billDetail)) - return billDetails.add(billDetail); - else - return false; - } - } - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/BillAccountDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/BillAccountDetail.java deleted file mode 100644 index 7587f92ff14..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/BillAccountDetail.java +++ /dev/null @@ -1,83 +0,0 @@ -package org.ksmart.birth.common.calculation.collections.models; - -import java.math.BigDecimal; - -import javax.validation.Valid; -import javax.validation.constraints.Size; -import javax.xml.crypto.KeySelector.Purpose; - -import org.ksmart.birth.common.model.AuditDetails; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -@Setter -@Getter -@ToString -@Builder -@NoArgsConstructor -@AllArgsConstructor -@EqualsAndHashCode -public class BillAccountDetail { - - @Size(max=64) - @JsonProperty("id") - @Valid - private String id = null; - - @Size(max=64) - @JsonProperty("tenantId") - @Valid - private String tenantId = null; - - @Size(max=64) - @JsonProperty("billDetailId") - @Valid - private String billDetailId = null; - - @Size(max=64) - @JsonProperty("demandDetailId") - @Valid - private String demandDetailId = null; - - @JsonProperty("order") - @Valid - private Integer order = null; - - @JsonProperty("amount") - @Valid - private BigDecimal amount = null; - - @JsonProperty("adjustedAmount") - @Valid - private BigDecimal adjustedAmount = null; - - @JsonProperty("isActualDemand") - @Valid - private Boolean isActualDemand = null; - - @Size(max=64) - @JsonProperty("taxHeadCode") - @Valid - private String taxHeadCode = null; - - @JsonProperty("additionalDetails") - @Valid - private JsonNode additionalDetails = null; - - @JsonProperty("purpose") - @Valid - private Purpose purpose = null; - - @JsonProperty("auditDetails") - @Valid - private AuditDetails auditDetails; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/BillDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/BillDetail.java deleted file mode 100644 index 17f798d64a6..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/BillDetail.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * eGov suite of products aim to improve the internal efficiency,transparency, - * accountability and the service delivery of the government organizations. - * - * Copyright (C) 2016 eGovernments Foundation - * - * The updated version of eGov suite of products as by eGovernments Foundation - * is available at http://www.egovernments.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/ or - * http://www.gnu.org/licenses/gpl.html . - * - * In addition to the terms of the GPL license to be adhered to in using this - * program, the following additional terms are to be complied with: - * - * 1) All versions of this program, verbatim or modified must carry this - * Legal Notice. - * - * 2) Any misrepresentation of the origin of the material is prohibited. It - * is required that all modified versions of this material be marked in - * reasonable ways as different from the original version. - * - * 3) This license does not grant any rights to any user of the program - * with regards to rights under trademark law for use of the trade names - * or trademarks of eGovernments Foundation. - * - * In case of any queries, you can reach eGovernments Foundation at contact@egovernments.org. - */ -package org.ksmart.birth.common.calculation.collections.models; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import org.ksmart.birth.common.model.AuditDetails; -import org.springframework.util.CollectionUtils; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -@Setter -@Getter -@ToString -@Builder -@NoArgsConstructor -@AllArgsConstructor -@EqualsAndHashCode(of = {"id"}) -public class BillDetail { - - @JsonProperty("id") - @Valid - private String id = null; - - @JsonProperty("tenantId") - @Valid - private String tenantId = null; - - @JsonProperty("demandId") - @Valid - private String demandId = null; - - @JsonProperty("billId") - @Valid - private String billId = null; - - @JsonProperty("amount") - @NotNull - @Valid - private BigDecimal amount = null; - - @JsonProperty("amountPaid") - @Valid - private BigDecimal amountPaid = null; - - @NotNull - @JsonProperty("fromPeriod") - @Valid - private Long fromPeriod = null; - - @NotNull - @JsonProperty("toPeriod") - @Valid - private Long toPeriod = null; - - @JsonProperty("additionalDetails") - @Valid - private JsonNode additionalDetails = null; - - @JsonProperty("channel") - @Valid - private String channel = null; - - @JsonProperty("voucherHeader") - @Valid - private String voucherHeader = null; - - @JsonProperty("boundary") - @Valid - private String boundary = null; - - @JsonProperty("manualReceiptNumber") - @Valid - private String manualReceiptNumber = null; - - @JsonProperty("manualReceiptDate") - @Valid - private Long manualReceiptDate = null; - - - @JsonProperty("billAccountDetails") - @Valid - private List billAccountDetails = null; - - @NotNull - @JsonProperty("collectionType") - @Valid - private String collectionType = null; - - @JsonProperty("auditDetails") - @Valid - private AuditDetails auditDetails = null; - - - @Valid - private String billDescription; - - @NotNull - @JsonProperty("expiryDate") - @Valid - private Long expiryDate; - - @Valid - private String displayMessage; - - @Valid - private Boolean callBackForApportioning; - - @Valid - private String cancellationRemarks; - - public Boolean addBillAccountDetail(BillAccountDetail billAccountDetail) { - - if (CollectionUtils.isEmpty(billAccountDetails)) { - - billAccountDetails = new ArrayList<>(); - return billAccountDetails.add(billAccountDetail); - } else { - - if (!billAccountDetails.contains(billAccountDetail)) - return billAccountDetails.add(billAccountDetail); - else - return false; - } - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/Payment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/Payment.java deleted file mode 100644 index 6251bf469a9..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/Payment.java +++ /dev/null @@ -1,142 +0,0 @@ -package org.ksmart.birth.common.calculation.collections.models; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -import org.ksmart.birth.common.model.AuditDetails; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder -@EqualsAndHashCode -public class Payment { - - @Size(max=64) - @JsonProperty("id") - @Valid - private String id; - - @NotNull - @Size(max=64) - @JsonProperty("tenantId") - @Valid - private String tenantId; - - @JsonProperty("totalDue") - @Valid - private BigDecimal totalDue; - - @NotNull - @JsonProperty("totalAmountPaid") - @Valid - private BigDecimal totalAmountPaid; - - @Size(max=128) - @JsonProperty("transactionNumber") - @Valid - private String transactionNumber; - - @JsonProperty("transactionDate") - @Valid - private Long transactionDate; - - @NotNull - @JsonProperty("paymentMode") - @Valid - private String paymentMode; - - - @JsonProperty("instrumentDate") - @Valid - private Long instrumentDate; - - @Size(max=128) - @JsonProperty("instrumentNumber") - @Valid - private String instrumentNumber; - - @JsonProperty("instrumentStatus") - @Valid - private String instrumentStatus; - - @Size(max=64) - @JsonProperty("ifscCode") - @Valid - private String ifscCode; - - @JsonProperty("auditDetails") - @Valid - private AuditDetails auditDetails; - - @JsonProperty("additionalDetails") - @Valid - private JsonNode additionalDetails; - - @JsonProperty("paymentDetails") - @Valid - private List paymentDetails; - - @Size(max=128) - @NotNull - @JsonProperty("paidBy") - @Valid - private String paidBy = null; - - @Size(max=64) - @NotNull - @JsonProperty("mobileNumber") - @Valid - private String mobileNumber = null; - - @Size(max=128) - @JsonProperty("payerName") - @Valid - private String payerName = null; - - @Size(max=1024) - @JsonProperty("payerAddress") - @Valid - private String payerAddress = null; - - @Size(max=64) - @JsonProperty("payerEmail") - @Valid - private String payerEmail = null; - - @Size(max=64) - @JsonProperty("payerId") - @Valid - private String payerId = null; - - @JsonProperty("paymentStatus") - @Valid - private String paymentStatus; - - - public Payment addpaymentDetailsItem(PaymentDetail paymentDetail) { - if (this.paymentDetails == null) { - this.paymentDetails = new ArrayList<>(); - } - this.paymentDetails.add(paymentDetail); - return this; - } - - - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentDetail.java deleted file mode 100644 index e187ebbc112..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentDetail.java +++ /dev/null @@ -1,91 +0,0 @@ -package org.ksmart.birth.common.calculation.collections.models; - -import java.math.BigDecimal; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -import org.ksmart.birth.common.model.AuditDetails; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.JsonNode; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; - - -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder -@EqualsAndHashCode -public class PaymentDetail { - - @Size(max=64) - @JsonProperty("id") - @Valid - private String id; - - @Size(max=64) - @JsonProperty("tenantId") - @Valid - private String tenantId; - - @JsonProperty("totalDue") - @Valid - private BigDecimal totalDue; - - @NotNull - @JsonProperty("totalAmountPaid") - @Valid - private BigDecimal totalAmountPaid; - - @Size(max=64) - @JsonProperty("receiptNumber") - @Valid - private String receiptNumber; - - @Size(max=64) - @JsonProperty("manualReceiptNumber") - @Valid - private String manualReceiptNumber; - - @JsonProperty("manualReceiptDate") - @Valid - private Long manualReceiptDate; - - @JsonProperty("receiptDate") - @Valid - private Long receiptDate = null; - - @JsonProperty("receiptType") - @Valid - private String receiptType = null; - - @JsonProperty("businessService") - @Valid - private String businessService; - - @NotNull - @Size(max=64) - @JsonProperty("billId") - @Valid - private String billId; - - @JsonProperty("bill") - @Valid - private Bill bill; - - @JsonProperty("additionalDetails") - @Valid - private JsonNode additionalDetails; - - @JsonProperty("auditDetails") - @Valid - private AuditDetails auditDetails; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentRequest.java deleted file mode 100644 index 5d3f4df2ab5..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentRequest.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.ksmart.birth.common.calculation.collections.models; - - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import org.egov.common.contract.request.RequestInfo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@NoArgsConstructor -@AllArgsConstructor -public class PaymentRequest { - - @NotNull - @Valid - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; - - @NotNull - @Valid - @JsonProperty("Payment") - private Payment payment; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentResponse.java deleted file mode 100644 index faa4b0bef80..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentResponse.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.ksmart.birth.common.calculation.collections.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.egov.common.contract.response.ResponseInfo; - -import javax.validation.Valid; -import java.util.List; - -@Builder -@Data -@AllArgsConstructor -@NoArgsConstructor -public class PaymentResponse { - - @JsonProperty("ResponseInfo") - @Valid - private ResponseInfo responseInfo; - - @JsonProperty("Payments") - @Valid - private List payments; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentSearchCriteria.java deleted file mode 100644 index 89e406f7ddd..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/collections/models/PaymentSearchCriteria.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.ksmart.birth.common.calculation.collections.models; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.util.List; -import java.util.Set; - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class PaymentSearchCriteria { - - - private Set ids; - - private Set billIds; - - private String tenantId; - - private Set receiptNumbers; - - private Set status; - - private Set instrumentStatus; - - private Set paymentModes; - - private List payerIds; - - private Set consumerCodes; - - private String transactionNumber; - - private String mobileNumber; - - private Long fromDate; - - private Long toDate; - - private Integer offset; - - private Integer limit; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/Demand.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/Demand.java deleted file mode 100644 index b99b4d265e8..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/Demand.java +++ /dev/null @@ -1,125 +0,0 @@ -package org.ksmart.birth.common.calculation.demand.models; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -import javax.validation.Valid; - -import org.ksmart.birth.common.model.AuditDetails; -import org.egov.common.contract.request.User; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * A Object which holds the basic info about the revenue assessment for which the org.bel.birthdeath.common.calculation.demand.models is generated like module name, consumercode, owner, etc. - */ - -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder -public class Demand { - - @JsonProperty("id") - @Valid - private String id; - - @JsonProperty("tenantId") - @Valid - private String tenantId; - - @JsonProperty("consumerCode") - @Valid - private String consumerCode; - - @JsonProperty("consumerType") - @Valid - private String consumerType; - - @JsonProperty("businessService") - @Valid - private String businessService; - - @Valid - @JsonProperty("payer") - private User payer; - - @JsonProperty("taxPeriodFrom") - @Valid - private Long taxPeriodFrom; - - @JsonProperty("taxPeriodTo") - @Valid - private Long taxPeriodTo; - - @Builder.Default - @JsonProperty("demandDetails") - @Valid - private List demandDetails = new ArrayList<>(); - - @JsonProperty("auditDetails") - @Valid - private AuditDetails auditDetails; - - @JsonProperty("additionalDetails") - @Valid - private Object additionalDetails; - - @Builder.Default - @JsonProperty("minimumAmountPayable") - @Valid - private BigDecimal minimumAmountPayable = BigDecimal.ZERO; - - /** - * Gets or Sets status - */ - public enum StatusEnum { - - ACTIVE("ACTIVE"), - - CANCELLED("CANCELLED"), - - ADJUSTED("ADJUSTED"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String text) { - for (StatusEnum b : StatusEnum.values()) { - if (String.valueOf(b.value).equalsIgnoreCase(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("status") - @Valid - private StatusEnum status; - - - public Demand addDemandDetailsItem(DemandDetail demandDetailsItem) { - this.demandDetails.add(demandDetailsItem); - return this; - } - -} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandDetail.java deleted file mode 100644 index c4a2d0e2cbd..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandDetail.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.ksmart.birth.common.calculation.demand.models; - -import java.math.BigDecimal; - -import org.ksmart.birth.common.model.AuditDetails; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Builder.Default; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.Valid; - -/** - * A object holds a org.bel.birthdeath.common.calculation.demand.models and collection values for a tax head and period. - */ - -@Data -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class DemandDetail { - - @JsonProperty("id") - @Valid - private String id; - - @JsonProperty("demandId") - @Valid - private String demandId; - - @JsonProperty("taxHeadMasterCode") - @Valid - private String taxHeadMasterCode; - - @JsonProperty("taxAmount") - @Valid - private BigDecimal taxAmount; - - @Default - @JsonProperty("collectionAmount") - @Valid - private BigDecimal collectionAmount = BigDecimal.ZERO; - - @JsonProperty("additionalDetails") - @Valid - private Object additionalDetails; - - @JsonProperty("auditDetails") - @Valid - private AuditDetails auditDetails; - - @JsonProperty("tenantId") - @Valid - private String tenantId; - - -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandRequest.java deleted file mode 100644 index 00c493c778c..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandRequest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * eGov suite of products aim to improve the internal efficiency,transparency, - * accountability and the service delivery of the government organizations. - * - * Copyright (C) <2015> eGovernments Foundation - * - * The updated version of eGov suite of products as by eGovernments Foundation - * is available at http://www.egovernments.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/ or - * http://www.gnu.org/licenses/gpl.html . - * - * In addition to the terms of the GPL license to be adhered to in using this - * program, the following additional terms are to be complied with: - * - * 1) All versions of this program, verbatim or modified must carry this - * Legal Notice. - * - * 2) Any misrepresentation of the origin of the material is prohibited. It - * is required that all modified versions of this material be marked in - * reasonable ways as different from the original version. - * - * 3) This license does not grant any rights to any user of the program - * with regards to rights under trademark law for use of the trade names - * or trademarks of eGovernments Foundation. - * - * In case of any queries, you can reach eGovernments Foundation at contact@egovernments.org. - */ -package org.ksmart.birth.common.calculation.demand.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.egov.common.contract.request.RequestInfo; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import java.util.ArrayList; -import java.util.List; - -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder -public class DemandRequest { - - @NotNull - @JsonProperty("RequestInfo") - @Valid - private RequestInfo requestInfo; - - @Valid - @NotNull - @JsonProperty("Demands") - private List demands = new ArrayList<>(); -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandResponse.java deleted file mode 100644 index a19a951f261..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/calculation/demand/models/DemandResponse.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * eGov suite of products aim to improve the internal efficiency,transparency, - * accountability and the service delivery of the government organizations. - * - * Copyright (C) <2015> eGovernments Foundation - * - * The updated version of eGov suite of products as by eGovernments Foundation - * is available at http://www.egovernments.org - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/ or - * http://www.gnu.org/licenses/gpl.html . - * - * In addition to the terms of the GPL license to be adhered to in using this - * program, the following additional terms are to be complied with: - * - * 1) All versions of this program, verbatim or modified must carry this - * Legal Notice. - * - * 2) Any misrepresentation of the origin of the material is prohibited. It - * is required that all modified versions of this material be marked in - * reasonable ways as different from the original version. - * - * 3) This license does not grant any rights to any user of the program - * with regards to rights under trademark law for use of the trade names - * or trademarks of eGovernments Foundation. - * - * In case of any queries, you can reach eGovernments Foundation at contact@egovernments.org. - */ -package org.ksmart.birth.common.calculation.demand.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.egov.common.contract.response.ResponseInfo; - -import javax.validation.Valid; -import java.util.ArrayList; -import java.util.List; - -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder -public class DemandResponse { - - @JsonProperty("ResponseInfo") - @Valid - private ResponseInfo responseInfo; - - @JsonProperty("Demands") - @Valid - private List demands = new ArrayList<>(); - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/consumer/ReceiptConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/consumer/ReceiptConsumer.java deleted file mode 100644 index 14e7d3054f7..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/consumer/ReceiptConsumer.java +++ /dev/null @@ -1,197 +0,0 @@ -//package org.ksmart.birth.common.consumer; -// -//import static org.ksmart.birth.utils.BirthDeathConstants.BIRTH_CERT; -//import static org.ksmart.birth.utils.BirthDeathConstants.DEATH_CERT; -// -//import java.util.HashMap; -//import java.util.List; -// -//import org.ksmart.birth.birth.certmodel.BirthCertRequest; -//import org.ksmart.birth.birth.certmodel.BirthCertificate; -//import org.ksmart.birth.birth.certmodel.BirthCertificate.StatusEnum; -//import org.ksmart.birth.birth.model.EgBirthDtl; -//import org.ksmart.birth.birth.model.SearchCriteria; -//import org.ksmart.birth.birth.repository.BirthRepository; -//import org.ksmart.birth.common.calculation.collections.models.PaymentDetail; -//import org.ksmart.birth.common.calculation.collections.models.PaymentRequest; -//import org.ksmart.birth.common.contract.BirthPdfApplicationRequest; -//import org.ksmart.birth.common.contract.DeathPdfApplicationRequest; -//import org.ksmart.birth.common.contract.EgovPdfResp; -//import org.ksmart.birth.common.model.AuditDetails; -//import org.ksmart.birth.common.producer.BndProducer; -//import org.ksmart.birth.config.BirthDeathConfiguration; -//import org.ksmart.birth.death.certmodel.DeathCertRequest; -//import org.ksmart.birth.death.certmodel.DeathCertificate; -//import org.ksmart.birth.death.model.EgDeathDtl; -//import org.ksmart.birth.death.repository.DeathRepository; -//import org.ksmart.birth.utils.BirthDeathConstants; -//import org.ksmart.birth.utils.CommonUtils; -//import org.egov.common.contract.request.RequestInfo; -//import org.egov.tracer.model.CustomException; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.beans.factory.annotation.Qualifier; -//import org.springframework.kafka.annotation.KafkaListener; -//import org.springframework.kafka.support.KafkaHeaders; -//import org.springframework.messaging.handler.annotation.Header; -//import org.springframework.stereotype.Component; -// -//import com.fasterxml.jackson.databind.ObjectMapper; -// -//import lombok.extern.slf4j.Slf4j; -// -// -// -//@Slf4j -//@Component -//public class ReceiptConsumer { -// -// @Autowired -// @Qualifier("objectMapperBnd") -// private ObjectMapper mapper; -// -// @Autowired -// private CommonUtils commUtils; -// -// @Autowired -// private BirthDeathConfiguration config ; -// -// @Autowired -// private BndProducer bndProducer; -// -// @Autowired -// private BirthRepository repository; -// -// @Autowired -// private DeathRepository repositoryDeath; -// -// @KafkaListener(topics = {"${kafka.topics.receipt.create}"}) -// public void listen(final HashMap record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) { -// try { -// process(record); -// } catch (final Exception e) { -// log.error("Error while listening to value: " + record + " on topic: " + topic + ": ", e.getMessage()); -// } -// } -// -// public void process(HashMap record) { -// -// try { -// log.info("Process for object"+ record); -// PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); -// RequestInfo requestInfo = paymentRequest.getRequestInfo(); -// if( paymentRequest.getPayment().getTotalAmountPaid().compareTo(paymentRequest.getPayment().getTotalDue())!=0) -// return; -// List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); -// for (PaymentDetail paymentDetail : paymentDetails) { -// if(paymentDetail.getBusinessService().equalsIgnoreCase(BIRTH_CERT)) { -// BirthCertificate birthCertificate = updateBirthPAID(requestInfo, paymentDetail); -// updateBirthPDFGEN(requestInfo, birthCertificate); -// } -// if(paymentDetail.getBusinessService().equalsIgnoreCase(DEATH_CERT)) { -// DeathCertificate deathCertificate = updateDeathPAID(requestInfo, paymentDetail); -// updateDeathPDFGEN(requestInfo, deathCertificate); -// } -// } -// } catch (Exception e) { -// log.error("Exception while processing payment update: ",e); -// } -// -// } -// -// public DeathCertificate updateDeathPAID(RequestInfo requestInfo, PaymentDetail paymentDetail) { -// try { -// DeathCertificate deathCertificate = repositoryDeath.getDeathCertReqByConsumerCode(paymentDetail.getBill().getConsumerCode(),requestInfo); -// if(deathCertificate.getApplicationStatus().equals(DeathCertificate.StatusEnum.ACTIVE)) { -// String uuid = requestInfo.getUserInfo().getUuid(); -// AuditDetails auditDetails = commUtils.getAuditDetails(uuid, false); -// deathCertificate.getAuditDetails().setLastModifiedBy(auditDetails.getLastModifiedBy()); -// deathCertificate.getAuditDetails().setLastModifiedTime(auditDetails.getLastModifiedTime()); -// deathCertificate.setApplicationStatus(DeathCertificate.StatusEnum.PAID); -// deathCertificate.setDeathCertificateNo(paymentDetail.getBill().getConsumerCode()); -// DeathCertRequest request = DeathCertRequest.builder().requestInfo(requestInfo).deathCertificate(deathCertificate).build(); -// bndProducer.push(config.getUpdateDeathTopic(), request); -// } -// return deathCertificate; -// } -// catch (Exception e) { -// throw new CustomException(BirthDeathConstants.UPDATE_ERROR_MESSAGE, BirthDeathConstants.PAYMENT_ERROR_MESSAGE); -// } -// } -// -// public DeathCertificate updateDeathPDFGEN(RequestInfo requestInfo, DeathCertificate deathCertificate) { -// try { -// if(deathCertificate.getApplicationStatus().equals(DeathCertificate.StatusEnum.PAID)) { -// org.ksmart.birth.death.model.SearchCriteria criteria=new org.ksmart.birth.death.model.SearchCriteria(); -// criteria.setId(deathCertificate.getDeathDtlId()); -// List deathDtls = repositoryDeath.getDeathDtlsAll(criteria,requestInfo); -// if(deathDtls.size()>1) -// throw new CustomException("Invalid_Input","Error in processing data"); -// deathDtls.get(0).setDeathcertificateno(deathCertificate.getDeathCertificateNo()); -// DeathPdfApplicationRequest applicationRequest = DeathPdfApplicationRequest.builder().requestInfo(requestInfo).deathCertificate(deathDtls).build(); -// EgovPdfResp pdfResp = repositoryDeath.saveDeathCertPdf(applicationRequest); -// if(null!=pdfResp) { -// deathCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); -// deathCertificate.setEmbeddedUrl(applicationRequest.getDeathCertificate().get(0).getEmbeddedUrl()); -// deathCertificate.setDateofissue(applicationRequest.getDeathCertificate().get(0).getDateofissue()); -// } -// deathCertificate.setApplicationStatus(DeathCertificate.StatusEnum.PAID_PDF_GENERATED); -// DeathCertRequest requestNew = DeathCertRequest.builder().requestInfo(requestInfo).deathCertificate(deathCertificate).build(); -// bndProducer.push(config.getUpdateDeathTopic(), requestNew); -// repositoryDeath.updateCounter(deathCertificate.getDeathDtlId()); -// } -// return deathCertificate; -// } -// catch (Exception e) { -// throw new CustomException(BirthDeathConstants.PAYMENT_ERROR_MESSAGE, e.getMessage()); -// } -// } -// -// public BirthCertificate updateBirthPAID(RequestInfo requestInfo, PaymentDetail paymentDetail) { -// try { -// -// BirthCertificate birthCertificate = repository.getBirthCertReqByConsumerCode(paymentDetail.getBill().getConsumerCode(),requestInfo); -// if(birthCertificate.getApplicationStatus().equals(StatusEnum.ACTIVE)) { -// String uuid = requestInfo.getUserInfo().getUuid(); -// AuditDetails auditDetails = commUtils.getAuditDetails(uuid, false); -// birthCertificate.getAuditDetails().setLastModifiedBy(auditDetails.getLastModifiedBy()); -// birthCertificate.getAuditDetails().setLastModifiedTime(auditDetails.getLastModifiedTime()); -// birthCertificate.setApplicationStatus(StatusEnum.PAID); -// birthCertificate.setBirthCertificateNo(paymentDetail.getBill().getConsumerCode()); -// BirthCertRequest request = BirthCertRequest.builder().requestInfo(requestInfo).birthCertificate(birthCertificate).build(); -// bndProducer.push(config.getUpdateBirthTopic(), request); -// } -// return birthCertificate; -// } -// catch (Exception e) { -// throw new CustomException(BirthDeathConstants.PAYMENT_ERROR_MESSAGE,e.getMessage()); -// } -// } -// -// public BirthCertificate updateBirthPDFGEN(RequestInfo requestInfo, BirthCertificate birthCertificate) { -// try{ -// if(birthCertificate.getApplicationStatus().equals(StatusEnum.PAID)) { -// SearchCriteria criteria=new SearchCriteria(); -// criteria.setId(birthCertificate.getBirthDtlId()); -// List birtDtls = repository.getBirthDtlsAll(criteria,requestInfo); -// if(birtDtls.size()>1) -// throw new CustomException("Invalid_Input","Error in processing data"); -// birtDtls.get(0).setBirthcertificateno(birthCertificate.getBirthCertificateNo()); -// BirthPdfApplicationRequest applicationRequest = BirthPdfApplicationRequest.builder().requestInfo(requestInfo).birthCertificate(birtDtls).build(); -// EgovPdfResp pdfResp = repository.saveBirthCertPdf(applicationRequest); -// if(null!=pdfResp) { -// birthCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); -// birthCertificate.setEmbeddedUrl(applicationRequest.getBirthCertificate().get(0).getEmbeddedUrl()); -// birthCertificate.setDateofissue(applicationRequest.getBirthCertificate().get(0).getDateofissue()); -// } -// birthCertificate.setApplicationStatus(StatusEnum.PAID_PDF_GENERATED); -// BirthCertRequest requestNew = BirthCertRequest.builder().requestInfo(requestInfo).birthCertificate(birthCertificate).build(); -// bndProducer.push(config.getUpdateBirthTopic(), requestNew); -// repository.updateCounter(birthCertificate.getBirthDtlId()); -// } -// return birthCertificate; -// } -// catch (Exception e) { -// throw new CustomException(BirthDeathConstants.PAYMENT_ERROR_MESSAGE, e.getMessage()); -// } -// } -//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/BirthPdfApplicationRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/BirthPdfApplicationRequest.java deleted file mode 100644 index 55e4b33b98d..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/BirthPdfApplicationRequest.java +++ /dev/null @@ -1,30 +0,0 @@ -//package org.ksmart.birth.common.contract; -// -//import java.util.List; -// -//import org.ksmart.birth.birth.model.EgBirthDtl; -//import org.egov.common.contract.request.RequestInfo; -// -//import com.fasterxml.jackson.annotation.JsonProperty; -// -//import lombok.AllArgsConstructor; -//import lombok.Builder; -//import lombok.Data; -//import lombok.Getter; -//import lombok.NoArgsConstructor; -//import lombok.Setter; -// -//@Data -//@Getter -//@Setter -//@AllArgsConstructor -//@NoArgsConstructor -//@Builder -//public class BirthPdfApplicationRequest { -// -// @JsonProperty("RequestInfo") -// private RequestInfo requestInfo = null; -// -// @JsonProperty("BirthCertificate") -// private List birthCertificate; -//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/BirthResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/BirthResponse.java deleted file mode 100644 index c423fef02a3..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/BirthResponse.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.ksmart.birth.common.contract; - -import java.util.List; - -import javax.validation.Valid; - -import org.egov.common.contract.request.RequestInfo; -import org.egov.common.contract.response.ResponseInfo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; - - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthResponse { - - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; - @JsonProperty("ResponseInfo") - private ResponseInfo responseInfo = null; - - @JsonProperty("birthDetails") - @Valid - private List birthDetails = null; - -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/DeathPdfApplicationRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/DeathPdfApplicationRequest.java deleted file mode 100644 index 1f0847235df..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/DeathPdfApplicationRequest.java +++ /dev/null @@ -1,30 +0,0 @@ -//package org.ksmart.birth.common.contract; -// -//import java.util.List; -// -//import org.ksmart.birth.death.model.EgDeathDtl; -//import org.egov.common.contract.request.RequestInfo; -// -//import com.fasterxml.jackson.annotation.JsonProperty; -// -//import lombok.AllArgsConstructor; -//import lombok.Builder; -//import lombok.Data; -//import lombok.Getter; -//import lombok.NoArgsConstructor; -//import lombok.Setter; -// -//@Data -//@Getter -//@Setter -//@AllArgsConstructor -//@NoArgsConstructor -//@Builder -//public class DeathPdfApplicationRequest { -// -// @JsonProperty("RequestInfo") -// private RequestInfo requestInfo = null; -// -// @JsonProperty("DeathCertificate") -// private List deathCertificate; -//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/DeathResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/DeathResponse.java deleted file mode 100644 index e9ae6e4c247..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/DeathResponse.java +++ /dev/null @@ -1,37 +0,0 @@ -//package org.ksmart.birth.common.contract; -// -//import java.util.List; -// -//import javax.validation.Valid; -// -//import org.ksmart.birth.death.model.EgDeathDtl; -//import org.egov.common.contract.request.RequestInfo; -//import org.egov.common.contract.response.ResponseInfo; -// -//import com.fasterxml.jackson.annotation.JsonProperty; -// -//import lombok.AllArgsConstructor; -//import lombok.Builder; -//import lombok.Getter; -//import lombok.NoArgsConstructor; -//import lombok.Setter; -// -// -//@Getter -//@Setter -//@AllArgsConstructor -//@NoArgsConstructor -//@Builder -//public class DeathResponse { -// -// @JsonProperty("RequestInfo") -// private RequestInfo requestInfo; -// @JsonProperty("ResponseInfo") -// private ResponseInfo responseInfo = null; -// -// @JsonProperty("deathCerts") -// @Valid -// private List deathCerts = null; -// -//} -// diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/EgovPdfResp.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/EgovPdfResp.java deleted file mode 100644 index 8f950d5f222..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/EgovPdfResp.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.ksmart.birth.common.contract; - -import java.util.List; - -import lombok.Getter; -import lombok.Setter; - -@Getter -@Setter -public class EgovPdfResp { - List filestoreIds; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/EncryptionDecryptionUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/EncryptionDecryptionUtil.java deleted file mode 100644 index 5897d0ce267..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/EncryptionDecryptionUtil.java +++ /dev/null @@ -1,135 +0,0 @@ -package org.ksmart.birth.common.contract; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -import org.egov.common.contract.request.RequestInfo; -import org.egov.common.contract.request.Role; -import org.egov.common.contract.request.User; -import org.egov.encryption.EncryptionService; -import org.egov.encryption.audit.AuditService; -import org.egov.tracer.model.CustomException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.HttpServerErrorException; -import org.springframework.web.client.ResourceAccessException; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.fasterxml.jackson.databind.node.TextNode; - -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@Component -public class EncryptionDecryptionUtil { - private EncryptionService encryptionService; - @Autowired - private AuditService auditService; - - @Autowired - @Qualifier("objectMapperBnd") - private ObjectMapper objectMapper; - - @Value(("${egov.state.level.tenant.id}")) - private String stateLevelTenantId; - - @Value(("${decryption.abac.enabled}")) - private boolean abacEnabled; - - public EncryptionDecryptionUtil(EncryptionService encryptionService) { - this.encryptionService = encryptionService; - } - - public T encryptObject(Object objectToEncrypt, String key, Class classType) { - try { - if (objectToEncrypt == null) { - return null; - } - T encryptedObject = encryptionService.encryptJson(objectToEncrypt, key, stateLevelTenantId, classType); - if (encryptedObject == null) { - throw new CustomException("ENCRYPTION_NULL_ERROR", "Null object found on performing encryption"); - } - return encryptedObject; - } catch (IOException | HttpClientErrorException | HttpServerErrorException | ResourceAccessException e) { - log.error("Error occurred while encrypting", e); - throw new CustomException("ENCRYPTION_ERROR", "Error occurred in encryption process"); - } catch (Exception e) { - log.error("Unknown Error occurred while encrypting", e); - throw new CustomException("UNKNOWN_ERROR", "Unknown error occurred in encryption process"); - } - } - - public P decryptObject(Object objectToDecrypt, String key, Class classType, RequestInfo requestInfo) { - - try { - boolean objectToDecryptNotList = false; - if (objectToDecrypt == null) { - return null; - } else if (requestInfo == null || requestInfo.getUserInfo() == null) { - User userInfo = User.builder().uuid("no uuid").type("EMPLOYEE").build(); - requestInfo = RequestInfo.builder().userInfo(userInfo).build(); - } - if (!(objectToDecrypt instanceof List)) { - objectToDecryptNotList = true; - objectToDecrypt = Collections.singletonList(objectToDecrypt); - } - final User encrichedUserInfo = getEncrichedandCopiedUserInfo(requestInfo.getUserInfo()); - P decryptedObject = (P) encryptionService.decryptJson(objectToDecrypt, key, encrichedUserInfo, classType); - if (decryptedObject == null) { - throw new CustomException("DECRYPTION_NULL_ERROR", "Null object found on performing decryption"); - } - auditTheDecryptRequest(key, encrichedUserInfo); - if (objectToDecryptNotList) { - decryptedObject = (P) ((List) decryptedObject).get(0); - } - return decryptedObject; - } catch (IOException | HttpClientErrorException | HttpServerErrorException | ResourceAccessException e) { - log.error("Error occurred while decrypting", e); - throw new CustomException("DECRYPTION_SERVICE_ERROR", "Error occurred in decryption process"); - } catch (Exception e) { - log.error("Unknown Error occurred while decrypting", e); - throw new CustomException("UNKNOWN_ERROR", "Unknown error occurred in decryption process"); - } - } - - - public void auditTheDecryptRequest(String key, User userInfo) { - String purpose= "BndDetail"; - - ObjectNode abacParams = objectMapper.createObjectNode(); - abacParams.set("key", TextNode.valueOf(key)); - - List decryptedUserUuid = Arrays.asList(userInfo.getUuid()); - - ObjectNode auditData = objectMapper.createObjectNode(); - auditData.set("entityType", TextNode.valueOf(User.class.getName())); - auditData.set("decryptedEntityIds", objectMapper.valueToTree(decryptedUserUuid)); - auditService.audit(userInfo.getUuid(), System.currentTimeMillis(), purpose, abacParams, auditData); - } - - private User getEncrichedandCopiedUserInfo(User userInfo) { - List newRoleList = new ArrayList<>(); - if (userInfo.getRoles() != null) { - for (Role role : userInfo.getRoles()) { - Role newRole = Role.builder().code(role.getCode()).name(role.getName()).id(role.getId()).build(); - newRoleList.add(newRole); - } - } - - if (newRoleList.stream().filter(role -> (role.getCode() != null) && (userInfo.getType() != null) && role.getCode().equalsIgnoreCase(userInfo.getType())).count() == 0) { - Role roleFromtype = Role.builder().code(userInfo.getType()).name(userInfo.getType()).build(); - newRoleList.add(roleFromtype); - } - return User.builder().id(userInfo.getId()).userName(userInfo.getUserName()).name(userInfo.getName()) - .type(userInfo.getType()).mobileNumber(userInfo.getMobileNumber()).emailId(userInfo.getEmailId()) - .roles(newRoleList).tenantId(userInfo.getTenantId()).uuid(userInfo.getUuid()).build(); - } - } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/HospitalResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/HospitalResponse.java deleted file mode 100644 index 3a6e21c981f..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/HospitalResponse.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.ksmart.birth.common.contract; - -import java.util.List; - -import javax.validation.Valid; - -import org.ksmart.birth.common.model.EgHospitalDtl; -import org.egov.common.contract.response.ResponseInfo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class HospitalResponse { - @JsonProperty("ResponseInfo") - private ResponseInfo responseInfo = null; - - @JsonProperty("hospitalDtls") - @Valid - private List hospitalDtls = null; - -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/RequestInfoWrapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/RequestInfoWrapper.java deleted file mode 100644 index c3ecfe4ee96..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/contract/RequestInfoWrapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.ksmart.birth.common.contract; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.request.RequestInfo; - - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class RequestInfoWrapper { - - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/controller/CommonController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/controller/CommonController.java deleted file mode 100644 index a0c9fe407c4..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/controller/CommonController.java +++ /dev/null @@ -1,76 +0,0 @@ -//package org.ksmart.birth.common.controller; -// -//import java.util.List; -// -//import javax.validation.Valid; -// -////import org.ksmart.birth.birth.model.ImportBirthWrapper; -////import org.ksmart.birth.birth.model.SearchCriteria; -//import org.ksmart.birth.common.contract.BirthResponse; -//import org.ksmart.birth.common.contract.DeathResponse; -//import org.ksmart.birth.common.contract.HospitalResponse; -//import org.ksmart.birth.common.contract.RequestInfoWrapper; -//import org.ksmart.birth.common.model.EgHospitalDtl; -//import org.ksmart.birth.common.services.CommonService; -////import org.ksmart.birth.death.model.ImportDeathWrapper; -//import org.ksmart.birth.utils.ResponseInfoFactory; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.http.HttpStatus; -//import org.springframework.http.ResponseEntity; -//import org.springframework.web.bind.annotation.*; -// -// -//@RestController -//@RequestMapping("/common") -//public class CommonController { -// -// @Autowired -// CommonService commonService; -// -// @Autowired -// private ResponseInfoFactory responseInfoFactory; -// -//// -//// @PostMapping(value = { "/gethospitals"}) -//// public ResponseEntity search(@RequestBody RequestInfoWrapper requestInfoWrapper, -//// @Valid @ModelAttribute SearchCriteria criteria) { -//// List hospitalDtls = commonService.search(criteria.getTenantId()); -//// HospitalResponse response = HospitalResponse.builder().hospitalDtls(hospitalDtls).responseInfo( -//// responseInfoFactory.createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(), true)) -//// .build(); -//// return new ResponseEntity<>(response, HttpStatus.OK); -//// } -//// -//// -//// @PostMapping(value = { "/savebirthimport"}) -//// public ResponseEntity saveBirthImport( -//// @RequestBody BirthResponse importJSon) { -//// ImportBirthWrapper importBirthWrapper = commonService.saveBirthImport(importJSon,importJSon.getRequestInfo()); -//// importBirthWrapper.setResponseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(importJSon.getRequestInfo(), true)); -//// return new ResponseEntity<>(importBirthWrapper, HttpStatus.OK); -//// } -//// -//// @PostMapping(value = { "/savedeathimport"}) -//// public ResponseEntity saveDeathImport( @RequestBody DeathResponse importJSon) { -//// ImportDeathWrapper importDeathWrapper = commonService.saveDeathImport(importJSon,importJSon.getRequestInfo()); -//// importDeathWrapper.setResponseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(importJSon.getRequestInfo(), true)); -//// return new ResponseEntity<>(importDeathWrapper, HttpStatus.OK); -//// } -//// -//// @PostMapping(value = { "/updatebirthimport"}) -//// public ResponseEntity updateBirthImport( -//// @RequestBody BirthResponse importJSon) { -//// ImportBirthWrapper importBirthWrapper = commonService.updateBirthImport(importJSon,importJSon.getRequestInfo()); -//// importBirthWrapper.setResponseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(importJSon.getRequestInfo(), true)); -//// return new ResponseEntity<>(importBirthWrapper, HttpStatus.OK); -//// } -//// -//// @PostMapping(value = { "/updatedeathimport"}) -//// public ResponseEntity updateDeathImport( -//// @RequestBody DeathResponse importJSon) { -//// ImportDeathWrapper importDeathWrapper = commonService.updateDeathImport(importJSon,importJSon.getRequestInfo()); -//// importDeathWrapper.setResponseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(importJSon.getRequestInfo(), true)); -//// return new ResponseEntity<>(importDeathWrapper, HttpStatus.OK); -//// } -// -//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/Amount.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/Amount.java deleted file mode 100644 index b8894677c38..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/Amount.java +++ /dev/null @@ -1,37 +0,0 @@ - -package org.ksmart.birth.common.model; - -import java.math.BigDecimal; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -import javax.validation.Valid; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class Amount { - - @JsonProperty("taxHeadCode") - @Valid - private String taxHeadCode = null; - - @JsonProperty("amount") - @Valid - private BigDecimal amount = null; - public Amount taxHeadCode(String taxHeadCode) { - this.taxHeadCode = taxHeadCode; - return this; - } - - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/AuditDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/AuditDetails.java deleted file mode 100644 index 1f1e21f304a..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/AuditDetails.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.ksmart.birth.common.model; -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -import javax.validation.Valid; - -/** - * Collection of audit related fields used by most models - */ -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class AuditDetails { - - @JsonProperty("createdBy") - @Valid - private String createdBy = null; - - @JsonProperty("lastModifiedBy") - @Valid - private String lastModifiedBy = null; - - @JsonProperty("createdTime") - @Valid - private Long createdTime = null; - - @JsonProperty("lastModifiedTime") - @Valid - private Long lastModifiedTime = null; - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/Document.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/Document.java deleted file mode 100644 index 368429be0a8..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/Document.java +++ /dev/null @@ -1,62 +0,0 @@ -package org.ksmart.birth.common.model; - -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import org.hibernate.validator.constraints.SafeHtml; -import org.ksmart.birth.common.model.AuditDetails; -import org.springframework.validation.annotation.Validated; -import javax.validation.Valid; -import javax.validation.constraints.*; - -/** - * A Object holds the basic data for a Trade License - */ -@ApiModel(description = "A Object holds the basic data for a Trade License") -@Validated -@javax.annotation.Generated(value = "org.egov.codegen.SpringBootCodegen", date = "2018-09-18T17:06:11.263+05:30") - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -@EqualsAndHashCode -public class Document { - - @Size(max=64) - @SafeHtml - @JsonProperty("id") - private String id; - - @JsonProperty("active") - private Boolean active; - - @Size(max=64) - @SafeHtml - @JsonProperty("tenantId") - private String tenantId = null; - - @Size(max=64) - @SafeHtml - @JsonProperty("documentType") - private String documentType = null; - - @Size(max=64) - @SafeHtml - @JsonProperty("fileStoreId") - private String fileStoreId = null; - - @Size(max=64) - @SafeHtml - @JsonProperty("documentUid") - private String documentUid; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails = null; - -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/EgHospitalDtl.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/EgHospitalDtl.java deleted file mode 100644 index ca66593b646..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/model/EgHospitalDtl.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.ksmart.birth.common.model; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - -@Getter -@Setter -@ToString -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class EgHospitalDtl{ - - private String id; - - private String name; - - private String tenantid; - -} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/producer/BndProducer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/producer/BndProducer.java deleted file mode 100644 index 78cdef20778..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/producer/BndProducer.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.ksmart.birth.common.producer; - -import org.egov.tracer.kafka.CustomKafkaTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class BndProducer { - - @Autowired - private CustomKafkaTemplate kafkaTemplate; - - public void push(String topic, Object value) { - kafkaTemplate.send(topic, value); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/CommonRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/CommonRepository.java deleted file mode 100644 index 4af41814aca..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/CommonRepository.java +++ /dev/null @@ -1,994 +0,0 @@ -//package org.ksmart.birth.common.repository; -// -// -//import java.util.ArrayList; -//import java.util.HashMap; -//import java.util.HashSet; -//import java.util.List; -//import java.util.Map; -//import java.util.Map.Entry; -//import java.util.Set; -//import java.util.UUID; -// -//import org.ksmart.birth.birth.model.EgBirthDtl; -//import org.ksmart.birth.birth.model.EgBirthFatherInfo; -//import org.ksmart.birth.birth.model.EgBirthMotherInfo; -//import org.ksmart.birth.birth.model.EgBirthPermaddr; -//import org.ksmart.birth.birth.model.EgBirthPresentaddr; -//import org.ksmart.birth.birth.model.ImportBirthWrapper; -//import org.ksmart.birth.birth.validator.BirthValidator; -//import org.ksmart.birth.common.contract.BirthResponse; -//import org.ksmart.birth.common.contract.DeathResponse; -//import org.ksmart.birth.common.contract.EncryptionDecryptionUtil; -//import org.ksmart.birth.common.model.AuditDetails; -//import org.ksmart.birth.common.model.EgHospitalDtl; -//import org.ksmart.birth.common.repository.builder.CommonQueryBuilder; -//import org.ksmart.birth.common.repository.rowmapper.CommonRowMapper; -//import org.ksmart.birth.common.services.CommonService; -//import org.ksmart.birth.death.model.EgDeathDtl; -//import org.ksmart.birth.death.model.EgDeathFatherInfo; -//import org.ksmart.birth.death.model.EgDeathMotherInfo; -//import org.ksmart.birth.death.model.EgDeathPermaddr; -//import org.ksmart.birth.death.model.EgDeathPresentaddr; -//import org.ksmart.birth.death.model.EgDeathSpouseInfo; -//import org.ksmart.birth.death.model.ImportDeathWrapper; -//import org.ksmart.birth.death.validator.DeathValidator; -//import org.ksmart.birth.utils.BirthDeathConstants; -//import org.ksmart.birth.utils.CommonUtils; -//import org.egov.common.contract.request.RequestInfo; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.context.annotation.Lazy; -//import org.springframework.jdbc.core.JdbcTemplate; -//import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; -//import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; -//import org.springframework.stereotype.Repository; -// -//import lombok.extern.slf4j.Slf4j; -// -//@Slf4j -//@Repository -//public class CommonRepository { -// -// @Autowired -// private JdbcTemplate jdbcTemplate; -// -// @Autowired -// private CommonQueryBuilder queryBuilder; -// -// @Autowired -// private CommonRowMapper rowMapper; -// -// @Autowired -// private NamedParameterJdbcTemplate namedParameterJdbcTemplate; -// -// @Autowired -// private CommonUtils commUtils; -// -// @Autowired -// BirthValidator birthValidator; -// -// @Autowired -// DeathValidator deathValidator; -// -// private CommonService commonService; -// -// @Autowired -// EncryptionDecryptionUtil encryptionDecryptionUtil; -// -// @Autowired -// @Lazy -// public CommonRepository(CommonService commonService) { -// this.commonService = commonService; -// } -// -// private static final String BIRTHDTLDELETEQRY="Delete from eg_birth_dtls where tenantid = :tenantid and registrationno = :registrationno; "; -// -// private static final String DEATHDTLDELETEQRY="Delete from eg_death_dtls where tenantid = :tenantid and registrationno = :registrationno; "; -// -// private static final String BIRTHDTLSAVEQRY="INSERT INTO public.eg_birth_dtls(id, registrationno, hospitalname, dateofreport, " -// + "dateofbirth, firstname, middlename, lastname, placeofbirth, informantsname, informantsaddress, " -// + "createdtime, createdby, lastmodifiedtime, lastmodifiedby, counter, tenantid, gender, remarks, hospitalid) " -// + "VALUES (:id, :registrationno, :hospitalname, :dateofreport, :dateofbirth, :firstname, :middlename, :lastname, " -// + ":placeofbirth, :informantsname, :informantsaddress, :createdtime, :createdby, :lastmodifiedtime, " -// + ":lastmodifiedby, :counter, :tenantid, :gender, :remarks, :hospitalid); "; -// -// private static final String BIRTHFATHERINFOSAVEQRY="INSERT INTO public.eg_birth_father_info( id, firstname, middlename, lastname, aadharno, " -// + "emailid, mobileno, education, proffession, nationality, religion, createdtime, createdby, lastmodifiedtime, lastmodifiedby, birthdtlid) " -// + "VALUES (:id, :firstname, :middlename, :lastname, :aadharno, :emailid, :mobileno, :education, :proffession, :nationality," -// + " :religion, :createdtime, :createdby, :lastmodifiedtime, :lastmodifiedby, :birthdtlid);"; -// -// private static final String BIRTHMOTHERINFOSAVEQRY="INSERT INTO public.eg_birth_mother_info(id, firstname, middlename, lastname, aadharno, " -// + "emailid, mobileno, education, proffession, nationality, religion, createdtime, createdby, lastmodifiedtime, lastmodifiedby, birthdtlid) " -// + "VALUES (:id, :firstname, :middlename, :lastname, :aadharno, :emailid, :mobileno, :education, :proffession, :nationality," -// + " :religion, :createdtime, :createdby, :lastmodifiedtime, :lastmodifiedby, :birthdtlid);"; -// -// private static final String BIRTHPERMADDRSAVEQRY="INSERT INTO public.eg_birth_permaddr(id, buildingno, houseno, streetname, locality, tehsil, " -// + "district, city, state, pinno, country, createdby, createdtime, lastmodifiedby, lastmodifiedtime, birthdtlid) " -// + "VALUES (:id, :buildingno, :houseno, :streetname, :locality, :tehsil, :district, :city, :state, :pinno, :country," -// + " :createdby, :createdtime, :lastmodifiedby, :lastmodifiedtime, :birthdtlid);"; -// -// private static final String BIRTHPRESENTADDRSAVEQRY="INSERT INTO public.eg_birth_presentaddr(id, buildingno, houseno, streetname, locality, tehsil, " -// + "district, city, state, pinno, country, createdby, createdtime, lastmodifiedby, lastmodifiedtime, birthdtlid) " -// + "VALUES (:id, :buildingno, :houseno, :streetname, :locality, :tehsil, :district, :city, :state, :pinno, :country, " -// + ":createdby, :createdtime, :lastmodifiedby, :lastmodifiedtime, :birthdtlid);"; -// -// private static final String DEATHDTLSAVEQRY="INSERT INTO public.eg_death_dtls(id, registrationno, hospitalname, dateofreport, " -// + "dateofdeath, firstname, middlename, lastname, placeofdeath, informantsname, informantsaddress, " -// + "createdtime, createdby, lastmodifiedtime, lastmodifiedby, counter, tenantid, gender, remarks, hospitalid, age, eidno, aadharno, nationality, religion, icdcode) " -// + "VALUES (:id, :registrationno, :hospitalname, :dateofreport, :dateofdeath, :firstname, :middlename, :lastname, " -// + ":placeofdeath, :informantsname, :informantsaddress, :createdtime, :createdby, :lastmodifiedtime, " -// + ":lastmodifiedby, :counter, :tenantid, :gender, :remarks, :hospitalid, :age, :eidno, :aadharno, :nationality, :religion, :icdcode); "; -// -// private static final String DEATHFATHERINFOSAVEQRY="INSERT INTO public.eg_death_father_info( id, firstname, middlename, lastname, aadharno, " -// + "emailid, mobileno, createdtime, createdby, lastmodifiedtime, lastmodifiedby, deathdtlid) " -// + "VALUES (:id, :firstname, :middlename, :lastname, :aadharno, :emailid, :mobileno, :createdtime, :createdby, :lastmodifiedtime, :lastmodifiedby, :deathdtlid);"; -// -// private static final String DEATHMOTHERINFOSAVEQRY="INSERT INTO public.eg_death_mother_info(id, firstname, middlename, lastname, aadharno, " -// + "emailid, mobileno, createdtime, createdby, lastmodifiedtime, lastmodifiedby, deathdtlid) " -// + "VALUES (:id, :firstname, :middlename, :lastname, :aadharno, :emailid, :mobileno, :createdtime, :createdby, :lastmodifiedtime, :lastmodifiedby, :deathdtlid);"; -// -// private static final String DEATHSPOUSEINFOSAVEQRY="INSERT INTO public.eg_death_spouse_info(id, firstname, middlename, lastname, aadharno, " -// + "emailid, mobileno, createdtime, createdby, lastmodifiedtime, lastmodifiedby, deathdtlid) " -// + "VALUES (:id, :firstname, :middlename, :lastname, :aadharno, :emailid, :mobileno, :createdtime, :createdby, :lastmodifiedtime, :lastmodifiedby, :deathdtlid);"; -// -// private static final String DEATHPERMADDRSAVEQRY="INSERT INTO public.eg_death_permaddr(id, buildingno, houseno, streetname, locality, tehsil, " -// + "district, city, state, pinno, country, createdby, createdtime, lastmodifiedby, lastmodifiedtime, deathdtlid) " -// + "VALUES (:id, :buildingno, :houseno, :streetname, :locality, :tehsil, :district, :city, :state, :pinno, :country," -// + " :createdby, :createdtime, :lastmodifiedby, :lastmodifiedtime, :deathdtlid);"; -// -// private static final String DEATHPRESENTADDRSAVEQRY="INSERT INTO public.eg_death_presentaddr(id, buildingno, houseno, streetname, locality, tehsil, " -// + "district, city, state, pinno, country, createdby, createdtime, lastmodifiedby, lastmodifiedtime, deathdtlid) " -// + "VALUES (:id, :buildingno, :houseno, :streetname, :locality, :tehsil, :district, :city, :state, :pinno, :country, " -// + ":createdby, :createdtime, :lastmodifiedby, :lastmodifiedtime, :deathdtlid);"; -// -// private static final String HOSPITALINSERTSQL="INSERT INTO public.eg_birth_death_hospitals(id, hospitalname, tenantid) VALUES " -// + " (?, ?, ?) ;"; -// -// private static final String BIRTHDTLUPDATEQRY="UPDATE public.eg_birth_dtls SET registrationno = :registrationno, hospitalname = :hospitalname, dateofreport = :dateofreport, " -// + "dateofbirth = :dateofbirth , firstname= :firstname, middlename = :middlename, lastname = :lastname, placeofbirth= :placeofbirth, informantsname = :informantsname, " -// + "informantsaddress = :informantsaddress, lastmodifiedtime = :lastmodifiedtime, lastmodifiedby= :lastmodifiedby, gender = :gender, remarks = :remarks, " -// + "hospitalid = :hospitalid WHERE id = :id;"; -// -// private static final String BIRTHFATHERINFOUPDATEQRY="UPDATE public.eg_birth_father_info SET firstname = :firstname, middlename = :middlename, lastname = :lastname, " -// + "aadharno = :aadharno, emailid = :emailid, mobileno = :mobileno, education = :education, proffession = :proffession, nationality = :nationality, " -// + "religion = :religion, lastmodifiedtime = :lastmodifiedtime, lastmodifiedby = :lastmodifiedby WHERE birthdtlid = :birthdtlid;"; -// -// private static final String BIRTHMOTHERINFOUPDATEQRY="UPDATE public.eg_birth_mother_info SET firstname = :firstname, middlename = :middlename, lastname = :lastname, " -// + "aadharno = :aadharno, emailid = :emailid, mobileno = :mobileno, education = :education, proffession = :proffession, nationality = :nationality, " -// + "religion = :religion, lastmodifiedtime = :lastmodifiedtime, lastmodifiedby = :lastmodifiedby WHERE birthdtlid = :birthdtlid;"; -// -// private static final String BIRTHPERMADDRUPDATEQRY = "UPDATE public.eg_birth_permaddr SET buildingno = :buildingno, houseno = :houseno, streetname = :streetname, " -// + "locality = :locality, tehsil = :tehsil, district = :district, city = :city, state = :state, pinno = :pinno, country = :country, " -// + "lastmodifiedby = :lastmodifiedby, lastmodifiedtime = :lastmodifiedtime WHERE birthdtlid = :birthdtlid;"; -// -// private static final String BIRTHPRESENTADDRUPDATEQRY="UPDATE public.eg_birth_presentaddr SET buildingno = :buildingno, houseno = :houseno, streetname = :streetname, " -// + "locality = :locality, tehsil = :tehsil, district = :district, city = :city, state = :state, pinno = :pinno, country = :country, " -// + "lastmodifiedby = :lastmodifiedby, lastmodifiedtime = :lastmodifiedtime WHERE birthdtlid = :birthdtlid;"; -// -// -// private static final String DEATHDTLUPDATEQRY="UPDATE public.eg_death_dtls SET registrationno = :registrationno, hospitalname = :hospitalname, dateofreport = :dateofreport, " -// + "dateofdeath = :dateofdeath , firstname= :firstname, middlename = :middlename, lastname = :lastname, placeofdeath= :placeofdeath, informantsname = :informantsname, " -// + "informantsaddress = :informantsaddress, lastmodifiedtime = :lastmodifiedtime, lastmodifiedby= :lastmodifiedby, gender = :gender, remarks = :remarks, " -// + "hospitalid = :hospitalid , age = :age, eidno = :eidno, aadharno = :aadharno, nationality = :nationality, religion = :religion, icdcode = :icdcode WHERE id = :id;"; -// -// private static final String DEATHFATHERINFOUPDATEQRY="UPDATE public.eg_death_father_info SET firstname = :firstname, middlename = :middlename, lastname = :lastname, " -// + "aadharno = :aadharno, emailid = :emailid, mobileno = :mobileno, lastmodifiedtime = :lastmodifiedtime, lastmodifiedby = :lastmodifiedby WHERE deathdtlid = :deathdtlid;"; -// -// private static final String DEATHMOTHERINFOUPDATEQRY="UPDATE public.eg_death_mother_info SET firstname = :firstname, middlename = :middlename, lastname = :lastname, " -// + "aadharno = :aadharno, emailid = :emailid, mobileno = :mobileno, lastmodifiedtime = :lastmodifiedtime, lastmodifiedby = :lastmodifiedby WHERE deathdtlid = :deathdtlid;"; -// -// private static final String DEATHSPOUSEINFOUPDATEQRY="UPDATE public.eg_death_spouse_info SET firstname = :firstname, middlename = :middlename, lastname = :lastname, " -// + "aadharno = :aadharno, emailid = :emailid, mobileno = :mobileno, lastmodifiedtime = :lastmodifiedtime, lastmodifiedby = :lastmodifiedby WHERE deathdtlid = :deathdtlid;"; -// -// private static final String DEATHPERMADDRUPDATEQRY = "UPDATE public.eg_death_permaddr SET buildingno = :buildingno, houseno = :houseno, streetname = :streetname, " -// + "locality = :locality, tehsil = :tehsil, district = :district, city = :city, state = :state, pinno = :pinno, country = :country, " -// + "lastmodifiedby = :lastmodifiedby, lastmodifiedtime = :lastmodifiedtime WHERE deathdtlid = :deathdtlid;"; -// -// private static final String DEATHPRESENTADDRUPDATEQRY="UPDATE public.eg_death_presentaddr SET buildingno = :buildingno, houseno = :houseno, streetname = :streetname, " -// + "locality = :locality, tehsil = :tehsil, district = :district, city = :city, state = :state, pinno = :pinno, country = :country, " -// + "lastmodifiedby = :lastmodifiedby, lastmodifiedtime = :lastmodifiedtime WHERE deathdtlid = :deathdtlid;"; -// -// -// public List getHospitalDtls(String tenantId) { -// List preparedStmtList = new ArrayList<>(); -// String query = queryBuilder.getHospitalDtls(tenantId, preparedStmtList); -// List hospitalDtls = jdbcTemplate.query(query, preparedStmtList.toArray(), rowMapper); -// return hospitalDtls; -// } -// -// public ImportBirthWrapper saveBirthImport(BirthResponse response, RequestInfo requestInfo) { -// ImportBirthWrapper importBirthWrapper = new ImportBirthWrapper(); -// try { -// Map uniqueList = new HashMap(); -// Map> uniqueHospList = new HashMap>(); -// Set duplicates = new HashSet(); -// response.getBirthCerts().forEach(bdtl -> { -// if(null != bdtl.getRejectReason()) -// { -// importBirthWrapper.updateMaps(BirthDeathConstants.EXCEL_DATA_ERROR, bdtl); -// } -// else -// { -// if (bdtl.getRegistrationno() != null) { -// if (uniqueList.get(bdtl.getRegistrationno()) == null) -// { -// birthValidator.removeSpaceChars(bdtl); -// uniqueList.put(bdtl.getRegistrationno(), bdtl); -// if (null != bdtl.getHospitalname() && !bdtl.getHospitalname().trim().isEmpty() ) -// { -// if(bdtl.getHospitalname().length() >500) { -// importBirthWrapper.updateMaps(BirthDeathConstants.HOSPNAME_LARGE, bdtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.HOSPNAME_LARGE); -// uniqueList.remove(bdtl.getRegistrationno()); -// } -// else { -// bdtl.setHospitalname(bdtl.getHospitalname().trim()); -// if(!uniqueHospList.containsKey(bdtl.getHospitalname())) -// { -// uniqueHospList.put(bdtl.getHospitalname(),new ArrayList()); -// } -// uniqueHospList.get(bdtl.getHospitalname()).add(bdtl); -// } -// } -// } -// else { -// importBirthWrapper.updateMaps(BirthDeathConstants.DUPLICATE_REG_EXCEL, bdtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.DUPLICATE_REG_EXCEL); -// duplicates.add(bdtl.getRegistrationno()); -// } -// } -// else -// { -// importBirthWrapper.updateMaps(BirthDeathConstants.REG_EMPTY, bdtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.REG_EMPTY); -// } -// } -// }); -// for (String regno : duplicates) { -// importBirthWrapper.updateMaps(BirthDeathConstants.DUPLICATE_REG_EXCEL, uniqueList.get(regno)); -// importBirthWrapper.setServiceError(BirthDeathConstants.DUPLICATE_REG_EXCEL); -// uniqueList.remove(regno); -// } -// modifyHospIdBirth(uniqueHospList , response.getBirthCerts().get(0).getTenantid()); -// AuditDetails auditDetails = commUtils.getAuditDetails(requestInfo.getUserInfo().getUuid(), true); -// int finalCount=0; -// for (Entry entry : uniqueList.entrySet()) { -// EgBirthDtl birthDtl = entry.getValue(); -// birthDtl.setGenderStr(birthDtl.getGenderStr()==null?"":birthDtl.getGenderStr().trim().toLowerCase()); -// switch (birthDtl.getGenderStr()) { -// case "male": -// birthDtl.setGender(1); -// break; -// case "female": -// birthDtl.setGender(2); -// break; -// case "others": -// birthDtl.setGender(3); -// break; -// default: -// birthDtl.setGender(0); -// break; -// } -// if(birthValidator.validateUniqueRegNo(birthDtl,importBirthWrapper) && birthValidator.validateImportFields(birthDtl,importBirthWrapper)){ -// try { -// namedParameterJdbcTemplate.update(BIRTHDTLSAVEQRY, getParametersForBirthDtl(birthDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(BIRTHFATHERINFOSAVEQRY, getParametersForFatherInfo(birthDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(BIRTHMOTHERINFOSAVEQRY, getParametersForMotherInfo(birthDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(BIRTHPERMADDRSAVEQRY, getParametersForPermAddr(birthDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(BIRTHPRESENTADDRSAVEQRY, getParametersForPresentAddr(birthDtl, auditDetails, true)); -// finalCount++; -// } -// catch (Exception e) { -// birthDtl.setRejectReason(BirthDeathConstants.DATA_ERROR); -// importBirthWrapper.updateMaps(BirthDeathConstants.DATA_ERROR, birthDtl); -// Map params = new HashMap<>(); -// params.put("tenantid", birthDtl.getTenantid()); -// params.put("registrationno", birthDtl.getRegistrationno()); -// namedParameterJdbcTemplate.update(BIRTHDTLDELETEQRY, params); -// e.printStackTrace(); -// } -// } -// } -// -// log.info("completed " + finalCount); -// importBirthWrapper.finaliseStats(response.getBirthCerts().size(),finalCount); -// List hospitaldtls = getHospitalDtls(response.getBirthCerts().get(0).getTenantid()); -// List hospitals = new ArrayList(); -// for(EgHospitalDtl hospitalDtl: hospitaldtls) { -// hospitals.add(hospitalDtl.getName()); -// } -// importBirthWrapper.setHospitals(hospitals); -// } -// catch (Exception e) { -// importBirthWrapper.setServiceError("Service Error in importing"); -// e.printStackTrace(); -// } -// return importBirthWrapper; -// } -// -// private void modifyHospIdBirth(Map> uniqueHospList , String tenantid) { -// Map dbHospNameIdMap = new HashMap(); -// List hospitals = commonService.search(tenantid); -// for (EgHospitalDtl egHospitalDtl : hospitals) { -// dbHospNameIdMap.put(egHospitalDtl.getName(), egHospitalDtl.getId()); -// } -// if(!uniqueHospList.keySet().isEmpty()) { -// -// for (String hospName : uniqueHospList.keySet()) { -// if(!dbHospNameIdMap.containsKey(hospName)) -// { -// String id = tenantid.split("\\.")[1] + "_" + (dbHospNameIdMap.keySet().size() + 1); -// jdbcTemplate.update(HOSPITALINSERTSQL, id,hospName,tenantid); -// dbHospNameIdMap.put(hospName,id); -// } -// for (EgBirthDtl bdtl : uniqueHospList.get(hospName)) { -// bdtl.setHospitalid(dbHospNameIdMap.get(hospName)); -// } -// } -// } -// } -// -// private void modifyHospIdDeath(Map> uniqueHospList , String tenantid) { -// Map dbHospNameIdMap = new HashMap(); -// List hospitals = commonService.search(tenantid); -// for (EgHospitalDtl egHospitalDtl : hospitals) { -// dbHospNameIdMap.put(egHospitalDtl.getName(), egHospitalDtl.getId()); -// } -// if(!uniqueHospList.keySet().isEmpty()) { -// -// for (String hospName : uniqueHospList.keySet()) { -// if(!dbHospNameIdMap.containsKey(hospName)) -// { -// String id = tenantid.split("\\.")[1] + "_" + (dbHospNameIdMap.keySet().size() + 1); -// jdbcTemplate.update(HOSPITALINSERTSQL, id,hospName,tenantid); -// dbHospNameIdMap.put(hospName,id); -// } -// for (EgDeathDtl bdtl : uniqueHospList.get(hospName)) { -// bdtl.setHospitalid(dbHospNameIdMap.get(hospName)); -// } -// } -// } -// } -// -// private MapSqlParameterSource getParametersForPresentAddr(EgBirthDtl birthDtl, AuditDetails auditDetails, boolean isInsert) { -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// EgBirthPresentaddr presentaddr = birthDtl.getBirthPresentaddr(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("buildingno", presentaddr.getBuildingno()); -// sqlParameterSource.addValue("houseno", presentaddr.getHouseno()); -// sqlParameterSource.addValue("streetname", presentaddr.getStreetname()); -// sqlParameterSource.addValue("locality", presentaddr.getLocality()); -// sqlParameterSource.addValue("tehsil", presentaddr.getTehsil()); -// sqlParameterSource.addValue("district", presentaddr.getDistrict()); -// sqlParameterSource.addValue("city", presentaddr.getCity()); -// sqlParameterSource.addValue("state", presentaddr.getState()); -// sqlParameterSource.addValue("pinno", presentaddr.getPinno()); -// sqlParameterSource.addValue("country", presentaddr.getCountry()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("birthdtlid", birthDtl.getId()); -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForPermAddr(EgBirthDtl birthDtl, AuditDetails auditDetails, boolean isInsert) { -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// EgBirthPermaddr permaddr = birthDtl.getBirthPermaddr(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("buildingno", permaddr.getBuildingno()); -// sqlParameterSource.addValue("houseno", permaddr.getHouseno()); -// sqlParameterSource.addValue("streetname", permaddr.getStreetname()); -// sqlParameterSource.addValue("locality", permaddr.getLocality()); -// sqlParameterSource.addValue("tehsil", permaddr.getTehsil()); -// sqlParameterSource.addValue("district", permaddr.getDistrict()); -// sqlParameterSource.addValue("city", permaddr.getCity()); -// sqlParameterSource.addValue("state", permaddr.getState()); -// sqlParameterSource.addValue("pinno", permaddr.getPinno()); -// sqlParameterSource.addValue("country", permaddr.getCountry()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("birthdtlid", birthDtl.getId()); -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForMotherInfo(EgBirthDtl birthDtl, AuditDetails auditDetails, boolean isInsert) { -// EgBirthMotherInfo birthMotherInfo = encryptionDecryptionUtil.encryptObject(birthDtl.getBirthMotherInfo(), "BndDetail", EgBirthMotherInfo.class); -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("firstname", birthMotherInfo.getFirstname()); -// sqlParameterSource.addValue("middlename", birthMotherInfo.getMiddlename()); -// sqlParameterSource.addValue("lastname", birthMotherInfo.getLastname()); -// sqlParameterSource.addValue("aadharno", birthMotherInfo.getAadharno()); -// sqlParameterSource.addValue("emailid", birthMotherInfo.getEmailid()); -// sqlParameterSource.addValue("mobileno", birthMotherInfo.getMobileno()); -// sqlParameterSource.addValue("education", birthMotherInfo.getEducation()); -// sqlParameterSource.addValue("proffession", birthMotherInfo.getProffession()); -// sqlParameterSource.addValue("nationality", birthMotherInfo.getNationality()); -// sqlParameterSource.addValue("religion", birthMotherInfo.getReligion()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("birthdtlid", birthDtl.getId()); -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForFatherInfo(EgBirthDtl birthDtl, AuditDetails auditDetails, boolean isInsert) { -// EgBirthFatherInfo birthFatherInfo = encryptionDecryptionUtil.encryptObject(birthDtl.getBirthFatherInfo(), "BndDetail", EgBirthFatherInfo.class); -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("firstname", birthFatherInfo.getFirstname()); -// sqlParameterSource.addValue("middlename", birthFatherInfo.getMiddlename()); -// sqlParameterSource.addValue("lastname", birthFatherInfo.getLastname()); -// sqlParameterSource.addValue("aadharno", birthFatherInfo.getAadharno()); -// sqlParameterSource.addValue("emailid", birthFatherInfo.getEmailid()); -// sqlParameterSource.addValue("mobileno", birthFatherInfo.getMobileno()); -// sqlParameterSource.addValue("education", birthFatherInfo.getEducation()); -// sqlParameterSource.addValue("proffession", birthFatherInfo.getProffession()); -// sqlParameterSource.addValue("nationality", birthFatherInfo.getNationality()); -// sqlParameterSource.addValue("religion", birthFatherInfo.getReligion()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("birthdtlid", birthDtl.getId()); -// -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForBirthDtl(EgBirthDtl birthDtl, AuditDetails auditDetails, boolean isInsert) { -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// String id= ""; -// if(isInsert) -// id= UUID.randomUUID().toString(); -// else -// id=birthDtl.getId(); -// sqlParameterSource.addValue("id", id); -// sqlParameterSource.addValue("registrationno", birthDtl.getRegistrationno()); -// sqlParameterSource.addValue("hospitalname", birthDtl.getHospitalname()); -// sqlParameterSource.addValue("dateofreport", birthDtl.getDateofreport()); -// sqlParameterSource.addValue("dateofbirth", birthDtl.getDateofbirth()); -// sqlParameterSource.addValue("firstname", birthDtl.getFirstname()); -// sqlParameterSource.addValue("middlename", birthDtl.getMiddlename()); -// sqlParameterSource.addValue("lastname", birthDtl.getLastname()); -// sqlParameterSource.addValue("placeofbirth", birthDtl.getPlaceofbirth()); -// sqlParameterSource.addValue("informantsname", birthDtl.getInformantsname()); -// sqlParameterSource.addValue("informantsaddress", birthDtl.getInformantsaddress()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("counter", birthDtl.getCounter()); -// sqlParameterSource.addValue("tenantid", birthDtl.getTenantid()); -// sqlParameterSource.addValue("gender", birthDtl.getGender()); -// sqlParameterSource.addValue("remarks", birthDtl.getRemarks()); -// sqlParameterSource.addValue("hospitalid", birthDtl.getHospitalid()); -// birthDtl.setId(id); -// return sqlParameterSource; -// -// } -// -// -// public ImportDeathWrapper saveDeathImport(DeathResponse response, RequestInfo requestInfo) { -// ImportDeathWrapper importDeathWrapper = new ImportDeathWrapper(); -// try { -// Map uniqueList = new HashMap(); -// Map> uniqueHospList = new HashMap>(); -// Set duplicates = new HashSet(); -// response.getDeathCerts().forEach(deathtl -> { -// if (null != deathtl.getRejectReason()) { -// importDeathWrapper.updateMaps(BirthDeathConstants.EXCEL_DATA_ERROR, deathtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.EXCEL_DATA_ERROR); -// } else { -// if (deathtl.getRegistrationno() != null) { -// if (uniqueList.get(deathtl.getRegistrationno()) == null) { -// deathValidator.removeSpaceChars(deathtl); -// uniqueList.put(deathtl.getRegistrationno(), deathtl); -// if (null != deathtl.getHospitalname() && !deathtl.getHospitalname().trim().isEmpty()) { -// if (deathtl.getHospitalname().length() > 500) { -// importDeathWrapper.updateMaps(BirthDeathConstants.HOSPNAME_LARGE, deathtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.HOSPNAME_LARGE); -// uniqueList.remove(deathtl.getRegistrationno()); -// } else { -// deathtl.setHospitalname(deathtl.getHospitalname().trim()); -// if (!uniqueHospList.containsKey(deathtl.getHospitalname())) { -// uniqueHospList.put(deathtl.getHospitalname(), new ArrayList()); -// } -// uniqueHospList.get(deathtl.getHospitalname()).add(deathtl); -// } -// } -// -// } else { -// importDeathWrapper.updateMaps(BirthDeathConstants.DUPLICATE_REG_EXCEL, deathtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.DUPLICATE_REG_EXCEL); -// duplicates.add(deathtl.getRegistrationno()); -// } -// } else { -// importDeathWrapper.updateMaps(BirthDeathConstants.REG_EMPTY, deathtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.REG_EMPTY); -// } -// } -// }); -// for (String regno : duplicates) { -// importDeathWrapper.updateMaps(BirthDeathConstants.DUPLICATE_REG_EXCEL, uniqueList.get(regno)); -// importDeathWrapper.setServiceError(BirthDeathConstants.DUPLICATE_REG_EXCEL); -// uniqueList.remove(regno); -// } -// modifyHospIdDeath(uniqueHospList , response.getDeathCerts().get(0).getTenantid()); -// AuditDetails auditDetails = commUtils.getAuditDetails(requestInfo.getUserInfo().getUuid(), true); -// int finalCount=0; -// for (Entry entry : uniqueList.entrySet()) { -// EgDeathDtl deathDtl = entry.getValue(); -// deathDtl.setGenderStr(deathDtl.getGenderStr()==null?"":deathDtl.getGenderStr().trim().toLowerCase()); -// switch (deathDtl.getGenderStr()) { -// case "male": -// deathDtl.setGender(1); -// break; -// case "female": -// deathDtl.setGender(2); -// break; -// case "others": -// deathDtl.setGender(3); -// break; -// default: -// deathDtl.setGender(0); -// break; -// } -// if(deathValidator.validateUniqueRegNo(deathDtl,importDeathWrapper) && deathValidator.validateImportFields(deathDtl,importDeathWrapper)){ -// try { -// namedParameterJdbcTemplate.update(DEATHDTLSAVEQRY, getParametersForDeathDtl(deathDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(DEATHFATHERINFOSAVEQRY, getParametersForFatherInfo(deathDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(DEATHMOTHERINFOSAVEQRY, getParametersForMotherInfo(deathDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(DEATHSPOUSEINFOSAVEQRY, getParametersForSpouseInfo(deathDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(DEATHPERMADDRSAVEQRY, getParametersForPermAddr(deathDtl, auditDetails, true)); -// namedParameterJdbcTemplate.update(DEATHPRESENTADDRSAVEQRY, getParametersForPresentAddr(deathDtl, auditDetails, true)); -// finalCount++; -// } -// catch (Exception e) { -// deathDtl.setRejectReason(BirthDeathConstants.DATA_ERROR); -// importDeathWrapper.updateMaps(BirthDeathConstants.DATA_ERROR, deathDtl); -// Map params = new HashMap<>(); -// params.put("tenantid", deathDtl.getTenantid()); -// params.put("registrationno", deathDtl.getRegistrationno()); -// namedParameterJdbcTemplate.update(DEATHDTLDELETEQRY, params); -// e.printStackTrace(); -// } -// } -// } -// -// log.info("completed " + finalCount); -// importDeathWrapper.finaliseStats(response.getDeathCerts().size(),finalCount); -// List hospitaldtls = getHospitalDtls(response.getDeathCerts().get(0).getTenantid()); -// List hospitals = new ArrayList(); -// for(EgHospitalDtl hospitalDtl: hospitaldtls) { -// hospitals.add(hospitalDtl.getName()); -// } -// importDeathWrapper.setHospitals(hospitals); -// } -// catch (Exception e) { -// importDeathWrapper.setServiceError("Service Error in importing"); -// e.printStackTrace(); -// } -// return importDeathWrapper; -// } -// -// private MapSqlParameterSource getParametersForPresentAddr(EgDeathDtl deathDtl, AuditDetails auditDetails, boolean isInsert) { -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// EgDeathPresentaddr presentaddr = deathDtl.getDeathPresentaddr(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("buildingno", presentaddr.getBuildingno()); -// sqlParameterSource.addValue("houseno", presentaddr.getHouseno()); -// sqlParameterSource.addValue("streetname", presentaddr.getStreetname()); -// sqlParameterSource.addValue("locality", presentaddr.getLocality()); -// sqlParameterSource.addValue("tehsil", presentaddr.getTehsil()); -// sqlParameterSource.addValue("district", presentaddr.getDistrict()); -// sqlParameterSource.addValue("city", presentaddr.getCity()); -// sqlParameterSource.addValue("state", presentaddr.getState()); -// sqlParameterSource.addValue("pinno", presentaddr.getPinno()); -// sqlParameterSource.addValue("country", presentaddr.getCountry()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("deathdtlid", deathDtl.getId()); -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForPermAddr(EgDeathDtl deathDtl, AuditDetails auditDetails, boolean isInsert) { -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// EgDeathPermaddr permaddr = deathDtl.getDeathPermaddr(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("buildingno", permaddr.getBuildingno()); -// sqlParameterSource.addValue("houseno", permaddr.getHouseno()); -// sqlParameterSource.addValue("streetname", permaddr.getStreetname()); -// sqlParameterSource.addValue("locality", permaddr.getLocality()); -// sqlParameterSource.addValue("tehsil", permaddr.getTehsil()); -// sqlParameterSource.addValue("district", permaddr.getDistrict()); -// sqlParameterSource.addValue("city", permaddr.getCity()); -// sqlParameterSource.addValue("state", permaddr.getState()); -// sqlParameterSource.addValue("pinno", permaddr.getPinno()); -// sqlParameterSource.addValue("country", permaddr.getCountry()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("deathdtlid", deathDtl.getId()); -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForMotherInfo(EgDeathDtl deathDtl, AuditDetails auditDetails, boolean isInsert) { -// EgDeathMotherInfo deathMotherInfo = encryptionDecryptionUtil.encryptObject(deathDtl.getDeathMotherInfo(), "BndDetail", EgDeathMotherInfo.class); -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("firstname", deathMotherInfo.getFirstname()); -// sqlParameterSource.addValue("middlename", deathMotherInfo.getMiddlename()); -// sqlParameterSource.addValue("lastname", deathMotherInfo.getLastname()); -// sqlParameterSource.addValue("aadharno", deathMotherInfo.getAadharno()); -// sqlParameterSource.addValue("emailid", deathMotherInfo.getEmailid()); -// sqlParameterSource.addValue("mobileno", deathMotherInfo.getMobileno()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("deathdtlid", deathDtl.getId()); -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForSpouseInfo(EgDeathDtl deathDtl, AuditDetails auditDetails, boolean isInsert) { -// EgDeathSpouseInfo deathSpouseInfo = encryptionDecryptionUtil.encryptObject(deathDtl.getDeathSpouseInfo(), "BndDetail", EgDeathSpouseInfo.class); -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("firstname", deathSpouseInfo.getFirstname()); -// sqlParameterSource.addValue("middlename", deathSpouseInfo.getMiddlename()); -// sqlParameterSource.addValue("lastname", deathSpouseInfo.getLastname()); -// sqlParameterSource.addValue("aadharno", deathSpouseInfo.getAadharno()); -// sqlParameterSource.addValue("emailid", deathSpouseInfo.getEmailid()); -// sqlParameterSource.addValue("mobileno", deathSpouseInfo.getMobileno()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("deathdtlid", deathDtl.getId()); -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForFatherInfo(EgDeathDtl deathDtl, -// AuditDetails auditDetails, boolean isInsert) { -// EgDeathFatherInfo deathFatherInfo = encryptionDecryptionUtil.encryptObject(deathDtl.getDeathFatherInfo(), "BndDetail", EgDeathFatherInfo.class); -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// sqlParameterSource.addValue("id", UUID.randomUUID().toString()); -// sqlParameterSource.addValue("firstname", deathFatherInfo.getFirstname()); -// sqlParameterSource.addValue("middlename", deathFatherInfo.getMiddlename()); -// sqlParameterSource.addValue("lastname", deathFatherInfo.getLastname()); -// sqlParameterSource.addValue("aadharno", deathFatherInfo.getAadharno()); -// sqlParameterSource.addValue("emailid", deathFatherInfo.getEmailid()); -// sqlParameterSource.addValue("mobileno", deathFatherInfo.getMobileno()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("deathdtlid", deathDtl.getId()); -// return sqlParameterSource; -// } -// -// private MapSqlParameterSource getParametersForDeathDtl(EgDeathDtl deathDtl, AuditDetails auditDetails, boolean isInsert) { -// MapSqlParameterSource sqlParameterSource = new MapSqlParameterSource(); -// EgDeathDtl deathDtlEnc = encryptionDecryptionUtil.encryptObject(deathDtl, "BndDetail", EgDeathDtl.class); -// String id=""; -// if(isInsert) -// id= UUID.randomUUID().toString(); -// else -// id=deathDtl.getId(); -// sqlParameterSource.addValue("id", id); -// sqlParameterSource.addValue("registrationno", deathDtl.getRegistrationno()); -// sqlParameterSource.addValue("hospitalname", deathDtl.getHospitalname()); -// sqlParameterSource.addValue("dateofreport", deathDtl.getDateofreport()); -// sqlParameterSource.addValue("dateofdeath", deathDtl.getDateofdeath()); -// sqlParameterSource.addValue("firstname", deathDtl.getFirstname()); -// sqlParameterSource.addValue("middlename", deathDtl.getMiddlename()); -// sqlParameterSource.addValue("lastname", deathDtl.getLastname()); -// sqlParameterSource.addValue("placeofdeath", deathDtl.getPlaceofdeath()); -// sqlParameterSource.addValue("informantsname", deathDtl.getInformantsname()); -// sqlParameterSource.addValue("informantsaddress", deathDtl.getInformantsaddress()); -// if(isInsert) { -// sqlParameterSource.addValue("createdtime", auditDetails.getCreatedTime()); -// sqlParameterSource.addValue("createdby", auditDetails.getCreatedBy()); -// sqlParameterSource.addValue("lastmodifiedtime", null); -// sqlParameterSource.addValue("lastmodifiedby", null); -// } -// else{ -// sqlParameterSource.addValue("lastmodifiedtime", auditDetails.getLastModifiedTime()); -// sqlParameterSource.addValue("lastmodifiedby", auditDetails.getLastModifiedBy()); -// } -// sqlParameterSource.addValue("counter", deathDtl.getCounter()); -// sqlParameterSource.addValue("tenantid", deathDtl.getTenantid()); -// sqlParameterSource.addValue("gender", deathDtl.getGender()); -// sqlParameterSource.addValue("remarks", deathDtl.getRemarks()); -// sqlParameterSource.addValue("hospitalid", deathDtl.getHospitalid()); -// sqlParameterSource.addValue("age", deathDtl.getAge() ); -// sqlParameterSource.addValue("eidno", deathDtl.getEidno() ); -// sqlParameterSource.addValue("aadharno", deathDtlEnc.getAadharno() ); -// sqlParameterSource.addValue("nationality", deathDtl.getNationality() ); -// sqlParameterSource.addValue("religion", deathDtl.getReligion() ); -// sqlParameterSource.addValue("icdcode", deathDtlEnc.getIcdcode() ); -// deathDtl.setId(id); -// return sqlParameterSource; -// -// } -// -// public ImportBirthWrapper updateBirthImport(BirthResponse response, RequestInfo requestInfo) { -// ImportBirthWrapper importBirthWrapper = new ImportBirthWrapper(); -// try { -// Map uniqueList = new HashMap(); -// Map> uniqueHospList = new HashMap>(); -// Set duplicates = new HashSet(); -// response.getBirthCerts().forEach(bdtl -> { -// if (null != bdtl.getRejectReason()) { -// importBirthWrapper.updateMaps(BirthDeathConstants.EXCEL_DATA_ERROR, bdtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.EXCEL_DATA_ERROR); -// } else { -// if (bdtl.getId() != null) { -// if (bdtl.getRegistrationno() != null) { -// if (uniqueList.get(bdtl.getRegistrationno()) == null) { -// birthValidator.removeSpaceChars(bdtl); -// uniqueList.put(bdtl.getRegistrationno(), bdtl); -// if (null != bdtl.getHospitalname() && !bdtl.getHospitalname().trim().isEmpty()) { -// if (bdtl.getHospitalname().length() > 500) { -// importBirthWrapper.updateMaps(BirthDeathConstants.HOSPNAME_LARGE, bdtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.EXCEL_DATA_ERROR); -// uniqueList.remove(bdtl.getRegistrationno()); -// } else { -// bdtl.setHospitalname(bdtl.getHospitalname().trim()); -// if (!uniqueHospList.containsKey(bdtl.getHospitalname())) { -// uniqueHospList.put(bdtl.getHospitalname(), new ArrayList()); -// } -// uniqueHospList.get(bdtl.getHospitalname()).add(bdtl); -// } -// } -// } else { -// importBirthWrapper.updateMaps(BirthDeathConstants.DUPLICATE_REG_EXCEL, bdtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.EXCEL_DATA_ERROR); -// duplicates.add(bdtl.getRegistrationno()); -// } -// } else { -// importBirthWrapper.updateMaps(BirthDeathConstants.REG_EMPTY, bdtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.EXCEL_DATA_ERROR); -// } -// } else { -// importBirthWrapper.updateMaps(BirthDeathConstants.UPDATE_ERROR, bdtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.EXCEL_DATA_ERROR); -// } -// } -// -// }); -// for (String regno : duplicates) { -// importBirthWrapper.updateMaps(BirthDeathConstants.DUPLICATE_REG_EXCEL, uniqueList.get(regno)); -// uniqueList.remove(regno); -// } -// modifyHospIdBirth(uniqueHospList , response.getBirthCerts().get(0).getTenantid()); -// AuditDetails auditDetails = commUtils.getAuditDetails(requestInfo.getUserInfo().getUuid(), false); -// int finalCount=0; -// for (Entry entry : uniqueList.entrySet()) { -// EgBirthDtl birthDtl = entry.getValue(); -// birthDtl.setGenderStr(birthDtl.getGenderStr()==null?"":birthDtl.getGenderStr().trim().toLowerCase()); -// switch (birthDtl.getGenderStr()) { -// case "male": -// birthDtl.setGender(1); -// break; -// case "female": -// birthDtl.setGender(2); -// break; -// case "others": -// birthDtl.setGender(3); -// break; -// default: -// birthDtl.setGender(0); -// break; -// } -// if(birthValidator.validateImportFields(birthDtl,importBirthWrapper)){ -// try { -// namedParameterJdbcTemplate.update(BIRTHDTLUPDATEQRY, getParametersForBirthDtl(birthDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(BIRTHFATHERINFOUPDATEQRY, getParametersForFatherInfo(birthDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(BIRTHMOTHERINFOUPDATEQRY, getParametersForMotherInfo(birthDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(BIRTHPERMADDRUPDATEQRY, getParametersForPermAddr(birthDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(BIRTHPRESENTADDRUPDATEQRY, getParametersForPresentAddr(birthDtl, auditDetails, false)); -// finalCount++; -// } -// catch (Exception e) { -// birthDtl.setRejectReason(BirthDeathConstants.DATA_ERROR); -// importBirthWrapper.updateMaps(BirthDeathConstants.DATA_ERROR, birthDtl); -// importBirthWrapper.setServiceError(BirthDeathConstants.DATA_ERROR); -// e.printStackTrace(); -// } -// } -// } -// -// log.info("completed " + finalCount); -// importBirthWrapper.finaliseStats(response.getBirthCerts().size(),finalCount); -// List hospitaldtls = getHospitalDtls(response.getBirthCerts().get(0).getTenantid()); -// List hospitals = new ArrayList(); -// for(EgHospitalDtl hospitalDtl: hospitaldtls) { -// hospitals.add(hospitalDtl.getName()); -// } -// importBirthWrapper.setHospitals(hospitals); -// } -// catch (Exception e) { -// importBirthWrapper.setServiceError("Service Error in Updating"); -// e.printStackTrace(); -// } -// return importBirthWrapper; -// } -// -// public ImportDeathWrapper updateDeathImport(DeathResponse response, RequestInfo requestInfo) { -// ImportDeathWrapper importDeathWrapper = new ImportDeathWrapper(); -// try { -// //DeathResponse response= mapper.convertValue(importJSon, DeathResponse.class); -// Map uniqueList = new HashMap(); -// Map> uniqueHospList = new HashMap>(); -// Set duplicates = new HashSet(); -// response.getDeathCerts().forEach(deathtl -> { -// if (null != deathtl.getRejectReason()) { -// importDeathWrapper.updateMaps(BirthDeathConstants.EXCEL_DATA_ERROR, deathtl); -// } else { -// if (deathtl.getId() != null) { -// if (deathtl.getRegistrationno() != null) { -// if (uniqueList.get(deathtl.getRegistrationno()) == null) { -// deathValidator.removeSpaceChars(deathtl); -// uniqueList.put(deathtl.getRegistrationno(), deathtl); -// if (null != deathtl.getHospitalname() && !deathtl.getHospitalname().trim().isEmpty()) { -// if (deathtl.getHospitalname().length() > 500) { -// importDeathWrapper.updateMaps(BirthDeathConstants.HOSPNAME_LARGE, deathtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.HOSPNAME_LARGE); -// uniqueList.remove(deathtl.getRegistrationno()); -// } else { -// deathtl.setHospitalname(deathtl.getHospitalname().trim()); -// if (!uniqueHospList.containsKey(deathtl.getHospitalname())) { -// uniqueHospList.put(deathtl.getHospitalname(), new ArrayList()); -// } -// uniqueHospList.get(deathtl.getHospitalname()).add(deathtl); -// } -// } -// -// } else { -// importDeathWrapper.updateMaps(BirthDeathConstants.DUPLICATE_REG_EXCEL, deathtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.DUPLICATE_REG_EXCEL); -// duplicates.add(deathtl.getRegistrationno()); -// } -// } else { -// importDeathWrapper.updateMaps(BirthDeathConstants.REG_EMPTY, deathtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.REG_EMPTY); -// } -// } else { -// importDeathWrapper.updateMaps(BirthDeathConstants.UPDATE_ERROR, deathtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.UPDATE_ERROR); -// } -// } -// }); -// for (String regno : duplicates) { -// importDeathWrapper.updateMaps(BirthDeathConstants.DUPLICATE_REG_EXCEL, uniqueList.get(regno)); -// importDeathWrapper.setServiceError(BirthDeathConstants.DUPLICATE_REG_EXCEL); -// uniqueList.remove(regno); -// } -// modifyHospIdDeath(uniqueHospList , response.getDeathCerts().get(0).getTenantid()); -// AuditDetails auditDetails = commUtils.getAuditDetails(requestInfo.getUserInfo().getUuid(), true); -// int finalCount=0; -// for (Entry entry : uniqueList.entrySet()) { -// EgDeathDtl deathDtl = entry.getValue(); -// deathDtl.setGenderStr(deathDtl.getGenderStr()==null?"":deathDtl.getGenderStr().trim().toLowerCase()); -// switch (deathDtl.getGenderStr()) { -// case "male": -// deathDtl.setGender(1); -// break; -// case "female": -// deathDtl.setGender(2); -// break; -// case "others": -// deathDtl.setGender(3); -// break; -// default: -// deathDtl.setGender(0); -// break; -// } -// if(deathValidator.validateImportFields(deathDtl,importDeathWrapper)){ -// try { -// namedParameterJdbcTemplate.update(DEATHDTLUPDATEQRY, getParametersForDeathDtl(deathDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(DEATHFATHERINFOUPDATEQRY, getParametersForFatherInfo(deathDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(DEATHMOTHERINFOUPDATEQRY, getParametersForMotherInfo(deathDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(DEATHSPOUSEINFOUPDATEQRY, getParametersForSpouseInfo(deathDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(DEATHPERMADDRUPDATEQRY, getParametersForPermAddr(deathDtl, auditDetails, false)); -// namedParameterJdbcTemplate.update(DEATHPRESENTADDRUPDATEQRY, getParametersForPresentAddr(deathDtl, auditDetails, false)); -// finalCount++; -// } -// catch (Exception e) { -// deathDtl.setRejectReason(BirthDeathConstants.DATA_ERROR); -// importDeathWrapper.updateMaps(BirthDeathConstants.DATA_ERROR, deathDtl); -// importDeathWrapper.setServiceError(BirthDeathConstants.DATA_ERROR); -// e.printStackTrace(); -// } -// } -// } -// -// log.info("completed " + finalCount); -// importDeathWrapper.finaliseStats(response.getDeathCerts().size(),finalCount); -// List hospitaldtls = getHospitalDtls(response.getDeathCerts().get(0).getTenantid()); -// List hospitals = new ArrayList(); -// for(EgHospitalDtl hospitalDtl: hospitaldtls) { -// hospitals.add(hospitalDtl.getName()); -// } -// importDeathWrapper.setHospitals(hospitals); -// } -// catch (Exception e) { -// importDeathWrapper.setServiceError("Service Error in Updating"); -// e.printStackTrace(); -// } -// return importDeathWrapper; -// } -// -//} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/DemandRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/DemandRepository.java deleted file mode 100644 index fde147bed91..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/DemandRepository.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.ksmart.birth.common.repository; - -import java.util.List; - -import org.ksmart.birth.common.calculation.demand.models.Demand; -import org.ksmart.birth.common.calculation.demand.models.DemandRequest; -import org.ksmart.birth.common.calculation.demand.models.DemandResponse; -import org.ksmart.birth.config.BirthConfiguration; -import org.egov.common.contract.request.RequestInfo; -import org.egov.tracer.model.CustomException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; - -import com.fasterxml.jackson.databind.ObjectMapper; - - -@Repository -public class DemandRepository { - - - @Autowired - private ServiceRequestRepository serviceRequestRepository; - - @Autowired - private BirthConfiguration config; - - @Autowired - @Qualifier("objectMapperBnd") - private ObjectMapper mapper; - - - /** - * Creates demand - * @param requestInfo The RequestInfo of the calculation Request - * @param demands The demands to be created - * @return The list of demand created - */ - public List saveDemand(RequestInfo requestInfo, List demands){ - StringBuilder url = new StringBuilder(config.getBillingHost()); - url.append(config.getDemandCreateEndpoint()); - DemandRequest request = new DemandRequest(requestInfo,demands); - Object result = serviceRequestRepository.fetchResult(url,request); - DemandResponse response = null; - try{ - response = mapper.convertValue(result,DemandResponse.class); - } - catch(IllegalArgumentException e){ - throw new CustomException("PARSING ERROR","Failed to parse response of create demand"); - } - return response.getDemands(); - } - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/IdGenRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/IdGenRepository.java deleted file mode 100644 index 77baa204856..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/IdGenRepository.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.ksmart.birth.common.repository; - - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.ksmart.birth.common.Idgen.IdGenerationRequest; -import org.ksmart.birth.common.Idgen.IdGenerationResponse; -import org.ksmart.birth.common.Idgen.IdRequest; -import org.ksmart.birth.common.Idgen.IdResponse; -import org.ksmart.birth.config.BirthConfiguration; -import org.egov.common.contract.request.RequestInfo; -import org.egov.tracer.model.CustomException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; -import org.springframework.util.CollectionUtils; -import org.springframework.web.client.RestTemplate; - -@Repository -public class IdGenRepository { - - @Autowired - private RestTemplate restTemplate; - - @Autowired - private BirthConfiguration config; - - @Autowired - @Qualifier("objectMapperBnd") - private ObjectMapper mapper; - - @Autowired - private ServiceRequestRepository restRepo; - - public IdGenerationResponse getId(RequestInfo requestInfo, String tenantId, String name, String format, int count) { - - List reqList = new ArrayList<>(); - for (int i = 0; i < count; i++) { - reqList.add(IdRequest.builder().idName(name).format(format).tenantId(tenantId).build()); - } - IdGenerationRequest req = IdGenerationRequest.builder().idRequests(reqList).requestInfo(requestInfo).build(); - IdGenerationResponse response = null; -// try { - response = restTemplate.postForObject( config.getIdGenHost()+ config.getIdGenPath(), req, IdGenerationResponse.class); -// } catch (HttpClientErrorException e) { -// throw new ServiceCallException(e.getResponseBodyAsString()); -// } catch (Exception e) { -// Map map = new HashMap<>(); -// map.put(e.getCause().getClass().getName(),e.getMessage()); -// throw new CustomException(map); -// } - return response; - } - - - public List getIdList(RequestInfo requestInfo, String tenantId, String idName, String idformat, - Integer count) { - List reqList = new ArrayList<>(); - for (int i = 0; i < count; i++) { - reqList.add(IdRequest.builder() - .idName(idName) - .format(idformat) - .tenantId(tenantId) - .build()); - } - - IdGenerationRequest request = IdGenerationRequest.builder() - .idRequests(reqList) - .requestInfo(requestInfo) - .build(); - StringBuilder uri = new StringBuilder(config.getIdGenHost()).append(config.getIdGenPath()); - IdGenerationResponse response = mapper.convertValue(restRepo.fetchResult(uri, request), - IdGenerationResponse.class); - - List idResponses = response.getIdResponses(); - - if (CollectionUtils.isEmpty(idResponses)) { - throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); - } - - return idResponses.stream() - .map(IdResponse::getId) - .collect(Collectors.toList()); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/ServiceRequestRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/ServiceRequestRepository.java deleted file mode 100644 index f37b5a9ccdd..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/ServiceRequestRepository.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.ksmart.birth.common.repository; - -import java.util.Map; - -import org.egov.tracer.model.ServiceCallException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; - -import lombok.extern.slf4j.Slf4j; - -@Repository -@Slf4j -public class ServiceRequestRepository { - - @Autowired - private RestTemplate restTemplate; - - @Autowired - @Qualifier("objectMapperBnd") - private ObjectMapper mapper; - - public Object fetchResult(StringBuilder uri, Object request) { - mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); - Object response = null; - log.info("URI: "+uri.toString()); - try { - log.info("Request: "+mapper.writeValueAsString(request)); - response = restTemplate.postForObject(uri.toString(), request, Map.class); - }catch(HttpClientErrorException e) { - log.error("External Service threw an Exception: ",e); - throw new ServiceCallException(e.getResponseBodyAsString()); - }catch(Exception e) { - log.error("Exception while fetching from searcher: ",e); - } - return response; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/builder/CommonQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/builder/CommonQueryBuilder.java deleted file mode 100644 index 0367d47b6c9..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/builder/CommonQueryBuilder.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.ksmart.birth.common.repository.builder; - -import java.util.List; - -import org.springframework.stereotype.Component; - -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@Component -public class CommonQueryBuilder { - - - private static final String QUERY_MASTER = "SELECT * FROM eg_birth_death_hospitals bdtl"; - - private static void addClauseIfRequired(List values, StringBuilder queryString) { - if (values.isEmpty()) - queryString.append(" WHERE "); - else { - queryString.append(" AND"); - } - } - - - public String getHospitalDtls(String teantId, List preparedStmtList) { - StringBuilder builder = new StringBuilder(QUERY_MASTER); - - if (teantId != null) { - addClauseIfRequired(preparedStmtList, builder); - builder.append(" tenantid=? "); - preparedStmtList.add(teantId); - } - return builder.toString(); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/rowmapper/CommonRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/rowmapper/CommonRowMapper.java deleted file mode 100644 index 81343f08fa6..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/repository/rowmapper/CommonRowMapper.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.ksmart.birth.common.repository.rowmapper; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.ksmart.birth.common.model.EgHospitalDtl; -import org.egov.tracer.model.CustomException; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ResultSetExtractor; -import org.springframework.stereotype.Component; - -@Component -public class CommonRowMapper implements ResultSetExtractor> { - - @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { - Map hospitalDtlMap = new LinkedHashMap<>(); - try { - while (rs.next()) { - String hospitalId = rs.getString("id"); - EgHospitalDtl hospitalDtl = hospitalDtlMap.get(hospitalId); - - if (hospitalDtl == null) { - hospitalDtl = EgHospitalDtl.builder().id(hospitalId).name(rs.getString("hospitalname")) - .tenantid(rs.getString("tenantid")) - .build(); - hospitalDtlMap.put(hospitalId, hospitalDtl); - } - - } - } catch (Exception e) { - e.printStackTrace(); - throw new CustomException("INVALID INPUT", "Error in fetching data"); - } - return new ArrayList<>(hospitalDtlMap.values()); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/services/CommonService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/services/CommonService.java deleted file mode 100644 index f2c02800102..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/common/services/CommonService.java +++ /dev/null @@ -1,77 +0,0 @@ -//package org.ksmart.birth.common.services; -// -//import java.util.ArrayList; -//import java.util.List; -// -////import org.ksmart.birth.birth.model.ImportBirthWrapper; -//import org.ksmart.birth.common.contract.BirthResponse; -//import org.ksmart.birth.common.contract.DeathResponse; -//import org.ksmart.birth.common.model.EgHospitalDtl; -//import org.ksmart.birth.common.repository.CommonRepository; -////import org.ksmart.birth.death.model.ImportDeathWrapper; -//import org.egov.common.contract.request.RequestInfo; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Service; -// -//@Service -//public class CommonService { -// -// private CommonRepository repository; -// -// @Autowired -// public CommonService(CommonRepository repository) { -// this.repository = repository; -// } -// -// /** -// * Search hospitals with tenantId -// * @param tenantId -// * @return list of hospitals -// */ -//// public List search(String tenantId) { -//// List hospitalDtls = new ArrayList<>() ; -//// hospitalDtls = repository.getHospitalDtls(tenantId); -//// return hospitalDtls; -//// } -//// -//// /** -//// * saves birth details -//// * @param importJSon birth details -//// * @param requestInfo which consists of user details and auth token -//// * @return ImportBirthWrapper -//// */ -//// public ImportBirthWrapper saveBirthImport(BirthResponse importJSon, RequestInfo requestInfo) { -//// return repository.saveBirthImport(importJSon, requestInfo); -//// } -//// -//// /** -//// * saves death details -//// * @param importJSon death details -//// * @param requestInfo which consists of user details and auth token -//// * @return ImportDeathWrapper -//// */ -//// public ImportDeathWrapper saveDeathImport(DeathResponse importJSon, RequestInfo requestInfo) { -//// return repository.saveDeathImport(importJSon, requestInfo); -//// } -//// -//// /** -//// * updates birth details -//// * @param importJSon birth details -//// * @param requestInfo which consists of user details and auth token -//// * @return ImportBirthWrapper -//// */ -//// public ImportBirthWrapper updateBirthImport(BirthResponse importJSon, RequestInfo requestInfo) { -//// return repository.updateBirthImport(importJSon, requestInfo); -//// } -//// -//// /** -//// * updates death details -//// * @param importJSon death details -//// * @param requestInfo which consists of user details and auth token -//// * @return ImportDeathWrapper -//// */ -//// public ImportDeathWrapper updateDeathImport(DeathResponse importJSon, RequestInfo requestInfo) { -//// return repository.updateDeathImport(importJSon, requestInfo); -//// } -// -//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/config/BirthConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/config/BirthConfiguration.java deleted file mode 100644 index 6623d9484d3..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/config/BirthConfiguration.java +++ /dev/null @@ -1,153 +0,0 @@ -package org.ksmart.birth.config; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -@Component -public class BirthConfiguration { - - - //Idgen Config - @Value("${egov.idgen.host}") - private String idGenHost; - - @Value("${egov.idgen.path}") - private String idGenPath; - - @Value("${egov.workflow.host}") - private String WfHost; - - @Value("${egov.workflow.path}") - private String WfTransitionPath; - - - @Value("${egov.idgen.birthapplnum.name}") - private String birthApplNumberIdgenName; - - @Value("${egov.idgen.birthapplnum.format}") - private String birthApplNumberIdgenFormat; - - @Value("${egov.idgen.birthapp.name}") - private String birthApplNumberIdName; - - @Value("${egov.idgen.birthapp.format}") - private String birthApplNumberIdFormat; - - @Value("${egov.idgen.birthfile.name}") - private String birthFileNumberName; - - @Value("${egov.idgen.birthfile.name}") - private String birthFileNumberFormat; - @Value("${egov.idgen.birthreg.name}") - private String birthRegisNumberName; - - @Value("${egov.idgen.birthreg.format}") - private String birthRegisNumberFormat; - - //Persister Config - @Value("${persister.save.birth.cert.topic}") - private String saveBirthCertificateTopic; - - @Value("${persister.update.birth.cert.topic}") - private String updateBirthCertificateTopic; - - @Value("${persister.save.adoption.topic}") - private String saveBirthAdoptionTopic; - - @Value("${persister.update.adoption.topic}") - private String updateBirthAdoptionTopic; - - @Value("${persister.save.birth.application.topic}") - private String saveBirthApplicationTopic; - - @Value("${persister.update.birth.application.topic}") - private String updateBirthApplicationTopic; - - @Value("${persister.save.birth.register.topic}") - private String saveBirthRegisterTopic; - - @Value("${persister.update.birth.register.topic}") - private String updateBirthRegisterTopic; - - //MDMS - @Value("${egov.mdms.host}") - private String mdmsHost; - - @Value("${egov.mdms.search.endpoint}") - private String mdmsEndPoint; - - @Value("${egov.billingservice.host}") - private String billingHost; - - @Value("${egov.bill.gen.endpoint}") - private String fetchBillEndpoint; - - @Value("${egov.demand.create.endpoint}") - private String demandCreateEndpoint; - - @Value("${egov.pdf.host}") - private String pdfHost; - - @Value("${egov.pdf.birthcert.postendpoint}") - private String saveBirthCertEndpoint; - - @Value("${egov.pdf.deathcert.postendpoint}") - private String saveDeathCertEndpoint; - - @Value("${egov.bnd.birthcert.link}") - private String birthCertLink; - - @Value("${egov.bnd.deathcert.link}") - private String deathCertLink; - - @Value("${egov.url.shortner.host}") - private String urlShortnerHost; - - @Value("${egov.url.shortner.endpoint}") - private String urlShortnerEndpoint; - - @Value("${egov.ui.app.host}") - private String uiAppHost; - - @Value("${egov.bnd.default.limit}") - private Integer defaultBndLimit; - - @Value("${egov.bnd.default.offset}") - private Integer defaultOffset; - - @Value("${egov.bnd.max.limit}") - private Integer maxSearchLimit; - - @Value("${egov.bnd.download.bufferdays}") - private Integer downloadBufferDays; - - @Value("${egov.collection.service.host}") - private String collectionServiceHost; - - @Value("${egov.payment.search.endpoint}") - private String PaymentSearchEndpoint; - - @Value("${egov.pdfservice.host}") - private String egovPdfHost; - - @Value("${egov.pdf.birthcert.createEndPoint}") - private String egovPdfBirthEndPoint; - - @Value("${egov.pdf.deathcert.createEndPoint}") - private String egovPdfDeathEndPoint; - - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/AdoptionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/AdoptionController.java deleted file mode 100644 index e5d81c16435..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/AdoptionController.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.ksmart.birth.marriageapplication.controller; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageapplication.model.AdoptionDetail; -import org.ksmart.birth.marriageapplication.model.adoption.AdoptionRequest; -import org.ksmart.birth.marriageapplication.service.AdoptionService; -import org.ksmart.birth.utils.ResponseInfoFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -@Slf4j -@RestController -@RequestMapping("/cr/adoption") -public class AdoptionController { - private final AdoptionService adoptionService; - private final ResponseInfoFactory responseInfoFactory; - - @Autowired - AdoptionController(AdoptionService adoptionService, ResponseInfoFactory responseInfoFactory) { - this.adoptionService = adoptionService; - this.responseInfoFactory = responseInfoFactory; - } - - @PostMapping(value = { "/_create"}) - public ResponseEntity saveAdoptionDetails(@RequestBody AdoptionRequest request) { - List adoptionDetails = adoptionService.saveAdoptionDetails(request); - return new ResponseEntity<>(adoptionDetails, HttpStatus.OK); - } - - @PostMapping(value = { "/_update"}) - public ResponseEntity updateRegisterBirthDetails(@RequestBody AdoptionRequest request) { - List registerBirthDetails = adoptionService.updateAdoptionDetails(request); - return new ResponseEntity<>(registerBirthDetails, HttpStatus.OK); - } -// -// @PostMapping(value = { "/_search"}) -// public ResponseEntity listByHospitalId(@RequestBody RegisterBirthDetailsRequest request, -// @Valid @ModelAttribute RegisterBirthSearchCriteria criteria) { -// List registerBirthDetail = adoptionService.searchRegisterBirthDetails(criteria); -// RegisterBirthResponse response = RegisterBirthResponse.builder() -// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),Boolean.TRUE)) -// .registerDetails(registerBirthDetail) -// .build(); -// return ResponseEntity.ok(response); -// } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/MultipleBirthApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/MultipleBirthApplicationController.java deleted file mode 100644 index 9177169b771..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/MultipleBirthApplicationController.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.ksmart.birth.marriageapplication.controller; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationResponse; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.marriageapplication.service.MultipleBirthApplicationService; -import org.ksmart.birth.utils.ResponseInfoFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; -@Slf4j -@RestController -@RequestMapping("/cr/multi") -public class MultipleBirthApplicationController { - - private final ResponseInfoFactory responseInfoFactory; - private final MultipleBirthApplicationService multipleBirthService; - - @Autowired - MultipleBirthApplicationController(MultipleBirthApplicationService multipleBirthService, ResponseInfoFactory responseInfoFactory) { - this.multipleBirthService = multipleBirthService; - this.responseInfoFactory = responseInfoFactory; - } - - @PostMapping(value = { "/_create"}) - public ResponseEntity saveBirthDetails(@RequestBody BirthDetailsRequest request) { - List birthDetails = multipleBirthService.saveBirthDetails(request); - BirthApplicationResponse response = BirthApplicationResponse.builder().birthDetails(birthDetails).responseInfo( - responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) - .build(); - return new ResponseEntity<>(response, HttpStatus.OK); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/BaseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/BaseEnrichment.java deleted file mode 100644 index 1395991be42..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/BaseEnrichment.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.ksmart.birth.marriageapplication.enrichment; - -import org.ksmart.birth.common.model.AuditDetails; - -public interface BaseEnrichment { - default AuditDetails buildAuditDetails(String by, Boolean create) { - AuditDetails auditDetails; - - Long currentTime = Long.valueOf(System.currentTimeMillis()); - if (create) { - auditDetails = AuditDetails.builder() - .createdBy(by) - .createdTime(currentTime) - .lastModifiedBy(by) - .lastModifiedTime(currentTime) - .build(); - } else { - auditDetails = AuditDetails.builder() - .lastModifiedBy(by) - .lastModifiedTime(currentTime) - .build(); - } - return auditDetails; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/adoption/AdoptionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/adoption/AdoptionEnrichment.java deleted file mode 100644 index 552150a2a42..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/adoption/AdoptionEnrichment.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.ksmart.birth.marriageapplication.enrichment.adoption; - -import org.apache.commons.collections4.CollectionUtils; -import org.egov.common.contract.request.RequestInfo; -import org.egov.common.contract.request.User; -import org.egov.tracer.model.CustomException; -import org.ksmart.birth.marriageapplication.model.AdoptionDetail; -import org.ksmart.birth.marriageapplication.model.adoption.AdoptionRequest; -import org.ksmart.birth.marriageapplication.enrichment.BaseEnrichment; -import org.ksmart.birth.common.model.AuditDetails; -import org.ksmart.birth.common.repository.IdGenRepository; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.utils.enums.ErrorCodes; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.List; -import java.util.ListIterator; -import java.util.UUID; - -@Component -public class AdoptionEnrichment implements BaseEnrichment { - @Autowired - BirthConfiguration config; - - @Autowired - IdGenRepository idGenRepository; - - public void enrichCreate(AdoptionRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); - request.getAdoptionDetails().forEach(adoption -> { - adoption.setId(UUID.randomUUID().toString()); - - adoption.setAuditDetails(auditDetails); - - adoption.getBirthPlace().setId(UUID.randomUUID().toString()); - - adoption.getBirthFatherInfo().setId(UUID.randomUUID().toString()); - - adoption.getBirthMotherInfo().setId(UUID.randomUUID().toString()); - - adoption.getBirthPermanentAddress().setId(UUID.randomUUID().toString()); - - adoption.getBirthPresentAddress().setId(UUID.randomUUID().toString()); - - adoption.getBirthStatisticalInformation().setId(UUID.randomUUID().toString()); - - adoption.getAdoptionFatherInfo().setId(UUID.randomUUID().toString()); - - adoption.getAdoptionMotherInfo().setId(UUID.randomUUID().toString()); - - adoption.getAdoptionPermanentAddress().setId(UUID.randomUUID().toString()); - - adoption.getAdoptionPresentAddress().setId(UUID.randomUUID().toString()); - }); - - setApplicationNumbers(request); - setFileNumbers(request); - setRegistrationNumber(request); - } - - public void enrichUpdate(AdoptionRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); - request.getAdoptionDetails() - .forEach(birth -> birth.setAuditDetails(auditDetails)); - } - - private void setApplicationNumbers(AdoptionRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getAdoptionDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthApplNumberIdName(), - config.getBirthApplNumberIdFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - - ListIterator itr = filecodes.listIterator(); - request.getAdoptionDetails() - .forEach(birth -> { - birth.setApplicationNo(itr.next()); - }); - } - - private void setFileNumbers(AdoptionRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getAdoptionDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthFileNumberName(), - config.getBirthFileNumberFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getAdoptionDetails() - .forEach(birth -> { - birth.setFmFileNo(itr.next()); - birth.setFileDate(currentTime); - }); - } - - private void setRegistrationNumber(AdoptionRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getAdoptionDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthRegisNumberName(), - config.getBirthRegisNumberFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getAdoptionDetails() - .forEach(birth -> { - birth.setRegistrationNo(itr.next()); - birth.setRegistrationDate(currentTime); - }); - } - - private List getIds(RequestInfo requestInfo, String tenantId, String idKey, String idformat, - int count) { - return idGenRepository.getIdList(requestInfo, tenantId, idKey, idformat, count); - } - - private void validateFileCodes(List fileCodes, int count) { - if (CollectionUtils.isEmpty(fileCodes)) { - throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), "No file code(s) returned from idgen service"); - } - - if (fileCodes.size() != count) { - throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), - "The number of file code(s) returned by idgen service is not equal to the request count"); - } - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/AdoptionDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/AdoptionDetail.java deleted file mode 100644 index 82e54e762df..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/AdoptionDetail.java +++ /dev/null @@ -1,235 +0,0 @@ -package org.ksmart.birth.marriageapplication.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.marriageapplication.model.adoption.AdoptionFatherInfo; -import org.ksmart.birth.marriageapplication.model.adoption.AdoptionMotherInfo; -import org.ksmart.birth.marriageapplication.model.adoption.AdoptionPermanentAddress; -import org.ksmart.birth.marriageapplication.model.adoption.AdoptionPresentAddress; -import org.ksmart.birth.marriageapplication.model.birth.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class AdoptionDetail { - @Size(max = 64) - @JsonProperty("id") - private String id; - - @JsonProperty("dateofreport") - private Long dateOfReport; - - @JsonProperty("dateofbirth") - private Long dateOfBirth; - - @JsonProperty("timeofbirth") - private Long timeOfBirth; - - @Size(max = 20) - @JsonProperty("am_pm") - private String ampm; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 1000) - @JsonProperty("gender") - private String gender; - - @Size(max = 2500) - @JsonProperty("remarks_en") - private String remarksEn; - - @Size(max = 2500) - @JsonProperty("remarks_ml") - private String remarksMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 64) - @JsonProperty("esign_user_code") - private String esignUserCode; - - @Size(max = 64) - @JsonProperty("esign_user_desig_code") - private String esignUserDesigCode; - - @JsonProperty("is_adopted") - private Boolean isAdopted; - - @JsonProperty("is_abandoned") - private Boolean isAbandoned; - - @JsonProperty("is_multiple_birth") - private Boolean isMultipleBirth; - - @JsonProperty("is_father_info_missing") - private Boolean isFatherInfoMissing; - - @JsonProperty("is_mother_info_missing") - private Boolean isMotherInfoMissing; - - @JsonProperty("no_of_alive_birth") - private Integer noOfAliveBirth; - - @Size(max = 64) - @JsonProperty("multiplebirthdetid") - private String multipleBirthDetailsId; - - @JsonProperty("is_born_outside") - private Boolean isBornOutside; - - @Size(max = 64) - @JsonProperty("ot_passportno") - private String passportNo; - - @JsonProperty("ot_dateofarrival") - private Long dateOfArrival; - - @Size(max = 64) - @JsonProperty("applicationtype") - private String applicationType; - - @Size(max = 64) - @JsonProperty("businessservice") - private String businessService; - - @Size(max = 64) - @JsonProperty("workflowcode") - private String workFlowCode; - - @Size(max = 64) - @JsonProperty("fm_fileno") - private String fmFileNo; - - @JsonProperty("file_date") - private Long fileDate; - - @Size(max = 64) - @JsonProperty("applicationno") - private String applicationNo; - - @Size(max = 64) - @JsonProperty("registrationno") - private String registrationNo; - - @JsonProperty("registration_date") - private Long registrationDate; - - @Size(max = 64) - @JsonProperty("action") - private String action; - - @Size(max = 64) - @JsonProperty("status") - private String status; - - @Size(max = 1000) - @JsonProperty("a_firstname_en") - private String adoptFirstNameEn; - - @Size(max = 1000) - @JsonProperty("adopt_firstname_ml") - private String adoptFirstNameMl; - - @Size(max = 1000) - @JsonProperty("adopt_middlename_en") - private String adoptMiddleNameEn; - - @Size(max = 1000) - @JsonProperty("adopt_middlename_ml") - private String adoptMiddleNameMl; - - @Size(max = 1000) - @JsonProperty("adopt_lastname_en") - private String adoptLastNameEn; - - @Size(max = 1000) - @JsonProperty("adopt_lastname_ml") - private String adoptLastNameMl; - - @Size(max = 64) - @JsonProperty("adopt_deed_order_no") - private String adoptDeedOrderNo; - - @JsonProperty("adopt_dateoforder_deed") - private Long adoptDateOfOrderDeed; - - @Size(max = 1000) - @JsonProperty("adopt_issuing_auththority") - private String adoptIssuingAuththority; - - @JsonProperty("adopt_has_agency") - private Boolean adoptHasAgency; - - @JsonProperty("adopt_agency_name") - private String adoptAgencyName; - - @JsonProperty("adopt_agency_address") - private String adoptAgencyAddress; - - @JsonProperty("birthPlace") - private BirthPlace birthPlace; - - @JsonProperty("birthFather") - private BirthFatherInfo birthFatherInfo; - - @JsonProperty("birthMother") - private BirthMotherInfo birthMotherInfo; - - @JsonProperty("birthPermanent") - private BirthPermanentAddress birthPermanentAddress; - - @JsonProperty("birthPresent") - private BirthPresentAddress birthPresentAddress; - - @JsonProperty("birthStatistical") - private BirthStatisticalInformation birthStatisticalInformation; - - @JsonProperty("adoptionMother") - private AdoptionMotherInfo adoptionMotherInfo; - - @JsonProperty("adoptionFather") - private AdoptionFatherInfo adoptionFatherInfo; - - @JsonProperty("adoptionPermanentAddress") - private AdoptionPermanentAddress adoptionPermanentAddress; - - @JsonProperty("adoptionPresentAddress") - private AdoptionPresentAddress adoptionPresentAddress; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionFatherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionFatherInfo.java deleted file mode 100644 index c58c3510618..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionFatherInfo.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.ksmart.birth.marriageapplication.model.adoption; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class AdoptionFatherInfo { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 100) - @JsonProperty("ot_passportno") - private String PassportNo; - - @Size(max = 300) - @JsonProperty("emailid") - private String emailId; - - @Size(max = 12) - @JsonProperty("mobileno") - private String mobileNo; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionMotherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionMotherInfo.java deleted file mode 100644 index a7d7dbd486d..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionMotherInfo.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.ksmart.birth.marriageapplication.model.adoption; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class AdoptionMotherInfo { - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 100) - @JsonProperty("ot_passportno") - private String PassportNo; - - @Size(max = 300) - @JsonProperty("emailid") - private String emailId; - - @Size(max = 12) - @JsonProperty("mobileno") - private String mobileNo; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionPermanentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionPermanentAddress.java deleted file mode 100644 index d5293b08094..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionPermanentAddress.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.ksmart.birth.marriageapplication.model.adoption; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class AdoptionPermanentAddress { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 64) - @JsonProperty("resdnce_addr_type") - private String ResdenceAddrType; - - @Size(max = 200) - @JsonProperty("buildingno") - private String buildingNo; - - @Size(max = 200) - @JsonProperty("houseno") - private String houseNo; - - @Size(max = 250) - @JsonProperty("res_asso_no") - private String resAssoNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2500) - @JsonProperty("ot_address1_en") - private String otAddress1En; - - @Size(max = 2500) - @JsonProperty("ot_address1_ml") - private String otAddress1Ml; - - @Size(max = 2500) - @JsonProperty("ot_address2_en") - private String otAddress2En; - - @Size(max = 2500) - @JsonProperty("ot_address2_ml") - private String otAddress2Ml; - - @Size(max = 2500) - @JsonProperty("locality_en") - private String localityEn; - - @Size(max = 2500) - @JsonProperty("locality_ml") - private String localityMl; - - @Size(max = 2500) - @JsonProperty("city_en") - private String cityEn; - - @Size(max = 2500) - @JsonProperty("city_ml") - private String cityMl; - - @Size(max = 64) - @JsonProperty("villageid") - private String villageId; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 64) - @JsonProperty("talukid") - private String talukId; - - @Size(max = 64) - @JsonProperty("districtid") - private String districtId; - - @Size(max = 64) - @JsonProperty("stateid") - private String stateId; - - @Size(max = 64) - @JsonProperty("poid") - private String poId; - - @Size(max = 10) - @JsonProperty("pinno") - private String pinNo; - - @Size(max = 2500) - @JsonProperty(" ot_state_region_province_en") - private String otStateRegionProvinceEn; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_ml") - private String otStateRegionProvinceMl; - - @Size(max = 64) - @JsonProperty("countryid") - private String countryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("same_as_permanent") - private Integer sameAsPermanent; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionPresentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionPresentAddress.java deleted file mode 100644 index f98e8587e0f..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionPresentAddress.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.ksmart.birth.marriageapplication.model.adoption; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class AdoptionPresentAddress { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 64) - @JsonProperty("resdnce_addr_type") - private String ResdenceAddrType; - - @Size(max = 200) - @JsonProperty("buildingno") - private String buildingNo; - - @Size(max = 200) - @JsonProperty("houseno") - private String houseNo; - - @Size(max = 250) - @JsonProperty("res_asso_no") - private String resAssoNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2500) - @JsonProperty("ot_address1_en") - private String otAddress1En; - - @Size(max = 2500) - @JsonProperty("ot_address1_ml") - private String otAddress1Ml; - - @Size(max = 2500) - @JsonProperty("ot_address2_en") - private String otAddress2En; - - @Size(max = 2500) - @JsonProperty("ot_address2_ml") - private String otAddress2Ml; - - @Size(max = 2500) - @JsonProperty("locality_en") - private String localityEn; - - @Size(max = 2500) - @JsonProperty("locality_ml") - private String localityMl; - - @Size(max = 2500) - @JsonProperty("city_en") - private String cityEn; - - @Size(max = 2500) - @JsonProperty("city_ml") - private String cityMl; - - @Size(max = 64) - @JsonProperty("villageid") - private String villageId; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 64) - @JsonProperty("talukid") - private String talukId; - - @Size(max = 64) - @JsonProperty("districtid") - private String districtId; - - @Size(max = 64) - @JsonProperty("stateid") - private String stateId; - - @Size(max = 64) - @JsonProperty("poid") - private String poId; - - @Size(max = 10) - @JsonProperty("pinno") - private String pinNo; - - @Size(max = 2500) - @JsonProperty(" ot_state_region_province_en") - private String otStateRegionProvinceEn; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_ml") - private String otStateRegionProvinceMl; - - @Size(max = 64) - @JsonProperty("countryid") - private String countryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionRequest.java deleted file mode 100644 index 227280bdfa3..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionRequest.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.ksmart.birth.marriageapplication.model.adoption; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.request.RequestInfo; -import org.ksmart.birth.marriageapplication.model.AdoptionDetail; -import org.springframework.validation.annotation.Validated; - -import javax.validation.Valid; -import java.util.List; -@Validated -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class AdoptionRequest { - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; - - @JsonProperty("AdoptionDetails") - @Valid - private List adoptionDetails; - - public AdoptionRequest addAdoptionDetails(AdoptionDetail adoptionDetail) { - if (adoptionDetails == null) { - adoptionDetails = null; - } - return this; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionResponse.java deleted file mode 100644 index 12bf793df6d..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/adoption/AdoptionResponse.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.ksmart.birth.marriageapplication.model.adoption; - -public class AdoptionResponse { -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthApplicationSearchCriteria.java deleted file mode 100644 index 5263150152e..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthApplicationSearchCriteria.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.ksmart.birth.marriageapplication.model.birth; - - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.Valid; - -@Data -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthApplicationSearchCriteria { - - @JsonProperty("tenantId") - private String tenantId; - - @JsonProperty("id") - private String id; // birthapplicant id - - @JsonProperty("applicationNo") - private String applicationNo; - - @JsonProperty("registrationNo") - private String registrationNo; - - @JsonProperty("fileCode") - private String fileCode; - - @JsonProperty("fromDate") - private Long fromDate; // report date - - @JsonProperty("toDate") - private Long toDate; // report date - - @JsonProperty("fromDateFile") - private Long fromDateFile; // file date - - @JsonProperty("toDateFile") - private Long toDateFile; // file date - - @JsonProperty("aadhaarNo") - private String aadhaarNo; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("limit") - private Integer limit; - - @JsonProperty("dateOfBirth") - @Valid - private String dateOfBirth; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthDetailsRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthDetailsRequest.java deleted file mode 100644 index 757a8de3b3b..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthDetailsRequest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.ksmart.birth.marriageapplication.model.birth; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.request.RequestInfo; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.springframework.validation.annotation.Validated; - -import javax.validation.Valid; -import java.util.List; - - -@Validated -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthDetailsRequest { - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; - - @JsonProperty("BirthDetails") - @Valid - private List birthDetails; - - public BirthDetailsRequest addBirthDetails(BirthApplicationDetail birthDetail) { - if (birthDetails == null) { - birthDetails = null; - } - return this; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/AdoptionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/AdoptionRepository.java deleted file mode 100644 index 7b8dd9849c5..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/AdoptionRepository.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageapplication.enrichment.adoption.AdoptionEnrichment; -import org.ksmart.birth.marriageapplication.model.AdoptionDetail; -import org.ksmart.birth.marriageapplication.model.adoption.AdoptionRequest; -import org.ksmart.birth.marriageregistry.repository.querybuilder.RegisterQueryBuilder; -import org.ksmart.birth.marriageregistry.repository.rowmapper.BirthRegisterRowMapper; -import org.ksmart.birth.common.producer.BndProducer; -import org.ksmart.birth.config.BirthConfiguration; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Repository; - -import java.util.List; - -@Slf4j -@Repository -public class AdoptionRepository { - private final BndProducer producer; - private final BirthConfiguration birthDeathConfiguration; - private final JdbcTemplate jdbcTemplate; - private final AdoptionEnrichment adoptionEnrichment; - private final BirthRegisterRowMapper birthRegisterRowMapper; - private final RegisterQueryBuilder registerQueryBuilder; - - @Autowired - AdoptionRepository(JdbcTemplate jdbcTemplate, AdoptionEnrichment adoptionEnrichment, - BirthConfiguration birthDeathConfiguration, BndProducer producer, - RegisterQueryBuilder registerQueryBuilder, BirthRegisterRowMapper birthRegisterRowMapper) { - this.jdbcTemplate = jdbcTemplate; - this.adoptionEnrichment = adoptionEnrichment; - this.birthDeathConfiguration = birthDeathConfiguration; - this.producer = producer; - this.registerQueryBuilder = registerQueryBuilder; - this.birthRegisterRowMapper = birthRegisterRowMapper; - } - - public List saveAdoptionDetails(AdoptionRequest request) { - adoptionEnrichment.enrichCreate(request); - producer.push(birthDeathConfiguration.getSaveBirthAdoptionTopic(), request); - return request.getAdoptionDetails(); - } - - public List updateAdoptionDetails(AdoptionRequest request) { - adoptionEnrichment.enrichUpdate(request); - producer.push(birthDeathConfiguration.getUpdateBirthAdoptionTopic(), request); - return request.getAdoptionDetails(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/querybuilder/BaseBirthQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/querybuilder/BaseBirthQuery.java deleted file mode 100644 index 1c54cdbd2e0..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/querybuilder/BaseBirthQuery.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.querybuilder; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Component; - -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -@Component -public class BaseBirthQuery { - void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, - List paramValues) { - - if (startDate != null || endDate != null) { - addWhereClause(paramValues, query); - query.append(" ("); - - if (startDate != null) { - query.append(column) - .append(" >= ? "); - paramValues.add(startDate); - } - - if (endDate != null) { - if (startDate != null) { - query.append(" AND "); - } - - query.append(column) - .append(" <= ? "); - paramValues.add(endDate); - } - - query.append(") "); - } - } - - void addFilters(String column, List ids, StringBuilder query, List paramValues) { - if (CollectionUtils.isNotEmpty(ids)) { - addWhereClause(paramValues, query); - query.append(column) - .append(" IN (") - .append(getStatementParameters(ids.size())) - .append(") "); - ids.forEach(paramValues::add); - } - } - - void addFilter(String column, String value, StringBuilder query, List paramValues) { - if (StringUtils.isNotBlank(value)) { - addWhereClause(paramValues, query); - query.append(column) - .append("=? "); - paramValues.add(value); - } - } - - void addWhereClause(List values, StringBuilder query) { - if (CollectionUtils.isEmpty(values)) { - query.append(" WHERE "); - } else { - query.append(" AND "); - } - } - - private String getStatementParameters(int count) { - return Collections.nCopies(count, "(?)") - .stream() - .collect(Collectors.joining(", ")); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/querybuilder/BirthApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/querybuilder/BirthApplicationQueryBuilder.java deleted file mode 100644 index 6b6a0f3b040..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/querybuilder/BirthApplicationQueryBuilder.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.querybuilder; - - -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.springframework.stereotype.Component; - -import javax.validation.constraints.NotNull; -import java.util.List; -@Component -public class BirthApplicationQueryBuilder extends BaseBirthQuery { - private static final String QUERY = new StringBuilder().append("SELECt ebd.id as ba_id,ebd.dateofreport as ba_dateofreport,ebd.dateofbirth as ba_dateofbirth,ebd.timeofbirth as ba_timeofbirth,ebd.am_pm as ba_am_pm,ebd.firstname_en as ba_firstname_en,") - .append("ebd.firstname_ml as ba_firstname_ml,ebd.middlename_en as ba_middlename_en,ebd.middlename_ml as ba_middlename_ml,ebd.lastname_en as ba_lastname_en,ebd.lastname_ml as ba_lastname_ml,") - .append("ebd.tenantid as ba_tenantid,ebd.gender as ba_gender,ebd.remarks_en as ba_remarks_en,ebd.remarks_ml as ba_remarks_ml,ebd.aadharno as ba_aadharno,ebd.esign_user_code as ba_esign_user_code,") - .append("ebd.esign_user_desig_code as ba_esign_user_desig_code,ebd.is_adopted as ba_is_adopted,ebd.is_abandoned as ba_is_abandoned,ebd.is_multiple_birth as ba_is_multiple_birth,") - .append(" ebd.is_father_info_missing as ba_is_father_info_missing,ebd.is_mother_info_missing as ba_is_mother_info_missing,ebd.no_of_alive_birth as ba_no_of_alive_birth,ebd.multiplebirthdetid as ba_multiplebirthdetid,") - .append(" ebd.is_born_outside as ba_is_born_outside,ebd.ot_passportno as ba_ot_passportno,ebd.ot_dateofarrival as ba_ot_dateofarrival,ebd.applicationtype as ba_applicationtype,ebd.businessservice as ba_businessservice,") - .append("ebd.workflowcode as ba_workflowcode,ebd.fm_fileno as ba_fm_fileno,ebd.file_date as ba_file_date,ebd.file_status as ba_file_status,ebd.applicationno as ba_applicationno,ebd.registrationno as ba_registrationno,") - .append("ebd.registration_date as ba_registration_date,ebd.action as ba_action,ebd.status as ba_status,ebd.createdtime,ebd.createdby,ebd.lastmodifiedtime ,") - .append("ebd.lastmodifiedby ,ebd.adopt_firstname_en as ba_adopt_firstname_en,ebd.adopt_firstname_ml as ba_adopt_firstname_ml,ebd.adopt_middlename_en as ba_adopt_middlename_en,") - .append("ebd.adopt_middlename_ml as ba_adopt_middlename_ml,ebd.adopt_lastname_en as ba_adopt_lastname_en,ebd.adopt_lastname_ml as ba_adopt_lastname_ml,ebd.adopt_deed_order_no as ba_adopt_deed_order_no,") - .append("ebd.adopt_dateoforder_deed as ba_adopt_dateoforder_deed,ebd.adopt_issuing_auththority as ba_adopt_issuing_auththority,ebd.adopt_has_agency as ba_adopt_has_agency,ebd.adopt_agency_name as ba_adopt_agency_name,") - .append("ebd.adopt_agency_address as ba_adopt_agency_address,ebfi.id as fa_id,ebfi.firstname_en as fa_firstname_en,ebfi.firstname_ml as fa_firstname_ml,ebfi.middlename_en as fa_middlename_en,") - .append("ebfi.middlename_ml as fa_middlename_ml,ebfi.lastname_en as fa_lastname_en,ebfi.lastname_ml as fa_lastname_ml,ebfi.aadharno as fa_aadharno,ebfi.ot_passportno as fa_ot_passportno,ebfi.emailid as fa_emailid,") - .append("ebfi.mobileno as fa_mobileno,ebfi.createdtime,ebfi.createdby,ebfi.lastmodifiedtime,ebfi.lastmodifiedby,") - .append("ebfi.birthdtlid as fa_birthdtlid,ebfi.bio_adopt as fa_bio_adopt,ebmi.id as mo_id,ebmi.firstname_en as mo_firstname_en,ebmi.firstname_ml as mo_firstname_ml,ebmi.middlename_en as mo_middlename_en,") - .append("ebmi.middlename_ml as mo_middlename_ml,ebmi.lastname_en as mo_lastname_en,ebmi.lastname_ml as mo_lastname_ml,ebmi.aadharno as mo_aadharno,ebmi.ot_passportno as mo_ot_passportno,ebmi.emailid as mo_emailid,") - .append("ebmi.mobileno as mo_mobileno,ebmi.createdtime,ebmi.createdby,ebmi.lastmodifiedtime ,ebmi.lastmodifiedby ,") - .append("ebmi.birthdtlid as mo_birthdtlid,ebmi.bio_adopt as mo_bio_adopt,eperad.id as per_id,eperad.resdnce_addr_type as per_resdnce_addr_type,eperad.buildingno as per_buildingno,") - .append("eperad.houseno as per_houseno,eperad.res_asso_no as per_res_asso_no,eperad.housename_en as per_housename_en,eperad.housename_ml as per_housename_ml,eperad.ot_address1_en as per_ot_address1_en,") - .append("eperad.ot_address1_ml as per_ot_address1_ml,eperad.ot_address2_en as per_ot_address2_en,eperad.ot_address2_ml as per_ot_address2_ml,") - .append("eperad.villageid as per_villageid,eperad.tenantid as per_tenantid,eperad.talukid as per_talukid,") - .append("eperad.districtid as per_districtid,eperad.stateid as per_stateid,eperad.poid as per_poid,eperad.pinno as per_pinno,eperad.ot_state_region_province_en as per_ot_state_region_province_en,") - .append("eperad.ot_state_region_province_ml as per_ot_state_region_province_ml,eperad.countryid as per_countryid,eperad.createdby ,eperad.createdtime,") - .append("eperad.lastmodifiedby ,eperad.lastmodifiedtime,eperad.birthdtlid as per_birthdtlid,eperad.same_as_present as per_same_as_present,") - .append("eperad.bio_adopt as per_bio_adopt,eperad.res_asso_no_ml as per_res_asso_no_ml,") - .append("ebp.id as pla_id,ebp.birthdtlid as pla_birthdtlid,ebp.placeofbirthid as pla_placeofbirthid,ebp.hospitalid as pla_hospitalid,ebp.vehicletypeid as pla_vehicletypeid,") - .append("ebp.vehicle_registration_no as pla_vehicle_registration_no,ebp.vehicle_from_en as pla_vehicle_from_en,ebp.vehicle_to_en as pla_vehicle_to_en,ebp.vehicle_from_ml as pla_vehicle_from_ml,") - .append("ebp.vehicle_to_ml as pla_vehicle_to_ml,ebp.vehicle_other_en as pla_vehicle_other_en,ebp.vehicle_other_ml as pla_vehicle_other_ml,ebp.vehicle_admit_hospital_en as pla_vehicle_admit_hospital_en,") - .append("ebp.vehicle_admit_hospital_ml as pla_vehicle_admit_hospital_ml,ebp.public_place_id as pla_public_place_id,ebp.ho_householder_en as pla_ho_householder_en,ebp.ho_householder_ml as pla_ho_householder_ml,") - .append("ebp.ho_buildingno as pla_ho_buildingno,ebp.ho_res_asso_no as pla_ho_res_asso_no,ebp.ho_houseno as pla_ho_houseno,ebp.ho_housename_en as pla_ho_housename_en,ebp.ho_housename_ml as pla_ho_housename_ml,") - .append("ebp.ho_villageid as pla_ho_villageid,ebp.ho_talukid as pla_ho_talukid,ebp.ho_districtid as pla_ho_districtid,") - .append("ebp.ho_stateid as pla_ho_stateid,ebp.ho_poid as pla_ho_poid,ebp.ho_pinno as pla_ho_pinno,ebp.ho_countryid as pla_ho_countryid,") - .append("ebp.ward_id as pla_ward_id,ebp.oth_details_en as pla_oth_details_en,ebp.oth_details_ml as pla_oth_details_ml,ebp.institution_type_id as pla_institution_type_id,ebp.institution_id as pla_institution_id,") - .append("ebp.auth_officer_id as pla_auth_officer_id,ebp.auth_officer_desig_id as pla_auth_officer_desig_id,ebp.oth_auth_officer_name as pla_oth_auth_officer_name,") - .append("ebp.oth_auth_officer_desig as pla_oth_auth_officer_desig,ebp.informantsname_en as pla_informantsname_en,ebp.informantsname_ml as pla_informantsname_ml,") - .append("ebp.informantsaddress_en as pla_informantsaddress_en,ebp.informantsaddress_ml as pla_informantsaddress_ml,ebp.informants_mobileno as pla_informants_mobileno,") - .append("ebp.informants_aadhaar_no as pla_informants_aadhaar_no,ebp.is_born_outside as pla_is_born_outside,ebp.createdtime ,ebp.createdby,") - .append("ebp.lastmodifiedtime,ebp.lastmodifiedby,epreadd.id as pres_id,epreadd.resdnce_addr_type as pres_resdnce_addr_type,epreadd.buildingno as pres_buildingno,") - .append("epreadd.houseno as pres_houseno,epreadd.res_asso_no as pres_res_asso_no,epreadd.housename_en as pres_housename_en,epreadd.housename_ml as pres_housename_ml,epreadd.ot_address1_en as pres_ot_address1_en,") - .append("epreadd.ot_address1_ml as pres_ot_address1_ml,epreadd.ot_address2_en as pres_ot_address2_en,epreadd.ot_address2_ml as pres_ot_address2_ml,") - .append("epreadd.villageid as pres_villageid,epreadd.tenantid as pres_tenantid,epreadd.talukid as pres_talukid,") - .append("epreadd.districtid as pres_districtid,epreadd.stateid as pres_stateid,epreadd.poid as pres_poid,epreadd.pinno as pres_pinno,epreadd.ot_state_region_province_en as pres_ot_state_region_province_en,") - .append("epreadd.ot_state_region_province_ml as pres_ot_state_region_province_ml,epreadd.countryid as pres_countryid,epreadd.createdby,epreadd.createdtime,") - .append("epreadd.lastmodifiedby,epreadd.lastmodifiedtime ,epreadd.birthdtlid as pres_birthdtlid,epreadd.bio_adopt as pres_bio_adopt,") - .append("epreadd.res_asso_no_ml as pres_res_asso_no_ml,estat.id as stat_id,estat.weight_of_child as stat_weight_of_child,") - .append("estat.duration_of_pregnancy_in_week as stat_duration_of_pregnancy_in_week,estat.nature_of_medical_attention as stat_nature_of_medical_attention,estat.way_of_pregnancy as stat_way_of_pregnancy,") - .append("estat.delivery_method as stat_delivery_method,estat.deliverytypeothers_en as stat_deliverytypeothers_en,estat.deliverytypeothers_ml as stat_deliverytypeothers_ml,estat.religionid as stat_religionid,") - .append("estat.father_nationalityid as stat_father_nationalityid,estat.father_educationid as stat_father_educationid,estat.father_education_subid as stat_father_education_subid,") - .append("estat.father_proffessionid as stat_father_proffessionid,estat.mother_educationid as stat_mother_educationid,estat.mother_education_subid as stat_mother_education_subid,") - .append("estat.mother_proffessionid as stat_mother_proffessionid,estat.mother_nationalityid as stat_mother_nationalityid,estat.mother_age_marriage as stat_mother_age_marriage,") - .append("estat.mother_age_delivery as stat_mother_age_delivery,estat.mother_no_of_birth_given as stat_mother_no_of_birth_given,estat.mother_maritalstatusid as stat_mother_maritalstatusid,") - .append("estat.mother_unmarried as stat_mother_unmarried,estat.mother_res_lbid as stat_mother_res_lbid,estat.mother_res_lb_code_id as stat_mother_res_lb_code_id,") - .append("estat.mother_res_place_type_id as stat_mother_res_place_type_id,estat.mother_res_lb_type_id as stat_mother_res_lb_type_id,estat.mother_res_district_id as stat_mother_res_district_id,") - .append("estat.mother_res_state_id as stat_mother_res_state_id,estat.mother_res_country_id as stat_mother_res_country_id,estat.mother_resdnce_addr_type as stat_mother_resdnce_addr_type,") - .append("estat.mother_resdnce_tenant as stat_mother_resdnce_tenant,estat.mother_resdnce_placetype as stat_mother_resdnce_placetype,estat.mother_resdnce_place_en as stat_mother_resdnce_place_en,") - .append("estat.mother_resdnce_place_ml as stat_mother_resdnce_place_ml,estat.mother_resdnce_lbtype as stat_mother_resdnce_lbtype,estat.mother_resdnce_district as stat_mother_resdnce_district,") - .append("estat.mother_resdnce_state as stat_mother_resdnce_state,estat.mother_resdnce_country as stat_mother_resdnce_country,estat.birthdtlid as stat_birthdtlid,estat.createdby,") - .append("estat.createdtime,estat.lastmodifiedtime,estat.lastmodifiedby,estat.mother_order_of_cur_delivery as stat_mother_order_of_cur_delivery,") - .append("estat.mother_order_cur_child as stat_mother_order_cur_child,estat.mother_res_no_of_years as stat_mother_res_no_of_years,estat.mother_dob as stat_mother_dob") - .append(" FROM public.eg_birth_details ebd LEFT JOIN eg_birth_place ebp ON ebp.birthdtlid = ebd.id LEFT JOIN eg_birth_father_information ebfi ON ebfi.birthdtlid = ebd.id AND ebfi.bio_adopt='BIOLOGICAL'") - .append(" LEFT JOIN eg_birth_mother_information ebmi ON ebmi.birthdtlid = ebd.id AND ebmi.bio_adopt='BIOLOGICAL'") - .append(" LEFT JOIN eg_birth_permanent_address eperad ON eperad.birthdtlid = ebd.id AND eperad.bio_adopt='BIOLOGICAL'") - .append(" LEFT JOIN eg_birth_present_address epreadd ON epreadd.birthdtlid = ebd.id AND epreadd.bio_adopt='BIOLOGICAL'") - .append(" LEFT JOIN eg_birth_statitical_information estat ON estat.birthdtlid = ebd.id").toString(); - - public String getBirthApplicationSearchQuery(@NotNull BirthApplicationSearchCriteria criteria, - @NotNull List preparedStmtValues, Boolean isCount) { - StringBuilder query = new StringBuilder(QUERY); - - addFilter("ebd.id", criteria.getId(), query, preparedStmtValues); - addFilter("ebd.tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("ebd.applicationno", criteria.getApplicationNo(), query, preparedStmtValues); - addFilter("ebd.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); - addFilter("ebd.fm_fileno", criteria.getFileCode(), query, preparedStmtValues); - - addDateRangeFilter("ebd.dateofreport", - criteria.getFromDate(), - criteria.getToDate(), - query, - preparedStmtValues); - - addDateRangeFilter("ebd.file_date", - criteria.getFromDateFile(), - criteria.getToDateFile(), - query, - preparedStmtValues); - return query.toString(); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BaseRowMapper.java deleted file mode 100644 index 61e823badbc..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BaseRowMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.rowmapper; - -import org.ksmart.birth.common.model.AuditDetails; - -import java.sql.ResultSet; -import java.sql.SQLException; - -interface BaseRowMapper { - - default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { - return AuditDetails.builder() - .createdBy(rs.getString("createdby")) - .createdTime(Long.valueOf(rs.getLong("createdtime"))) - .lastModifiedBy(rs.getString("lastmodifiedby")) - .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) - .build(); - } - -} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthApplicationRowMapper.java deleted file mode 100644 index a3d1a38b407..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthApplicationRowMapper.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ResultSetExtractor; -import org.springframework.stereotype.Component; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; -@Component -public class BirthApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper, BirthPlaceRowMapper, - BirthFatherInfoRowMapper, BirthMotherInfoRowMapper, BirthPermanentAddressRowMapper, - BirthPresentAddressRowMapper,BirthStatInfoRowMapper { - - @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null - List result = new ArrayList<>(); - while (rs.next()) { - result.add(BirthApplicationDetail.builder() - .id(rs.getString("ba_id")) - .dateOfReport(rs.getLong("ba_dateofreport")) - .dateOfBirth(rs.getLong("ba_dateofbirth")) - .timeOfBirth(rs.getLong("ba_timeofbirth")) - .ampm(rs.getString("ba_am_pm")) - .firstNameEn(rs.getString("ba_firstname_en")) - .firstNameMl(rs.getString("ba_firstname_ml")) - .middleNameEn(rs.getString("ba_middlename_en")) - .middleNameMl(rs.getString("ba_middlename_ml")) - .lastNameEn(rs.getString("ba_lastname_en")) - .lastNameMl(rs.getString("ba_lastname_ml")) - .tenantId(rs.getString("ba_tenantid")) - .gender(rs.getString("ba_gender")) - .remarksEn(rs.getString("ba_remarks_en")) - .remarksMl(rs.getString("ba_aadharno")) - .esignUserCode(rs.getString("ba_esign_user_code")) - .esignUserDesigCode(rs.getString("ba_esign_user_desig_code")) - .isAdopted(Boolean.valueOf(rs.getString("ba_is_adopted"))) - .isAbandoned(Boolean.valueOf(rs.getString("ba_is_abandoned"))) - .isMultipleBirth(Boolean.valueOf(rs.getString("ba_is_multiple_birth"))) - .isFatherInfoMissing(Boolean.valueOf(rs.getString("ba_is_father_info_missing"))) - .isMotherInfoMissing(Boolean.valueOf(rs.getString("ba_is_mother_info_missing"))) - .noOfAliveBirth(rs.getInt("ba_no_of_alive_birth")) - .multipleBirthDetailsIid(rs.getString("ba_multiplebirthdetid")) - .isBornOutside(rs.getBoolean("ba_is_born_outside")) - .passportNo(rs.getString("ba_ot_passportno")) - .dateOfArrival(rs.getLong("ba_ot_dateofarrival")) - .applicationType(rs.getString("ba_applicationtype")) - .businessService(rs.getString("ba_businessservice")) - .workFlowCode(rs.getString("ba_workflowcode")) - .fmFileNo(rs.getString("ba_fm_fileno")) - .fileDate(rs.getLong("ba_file_date")) - .applicationNo(rs.getString("ba_applicationno")) - .registrationNo(rs.getString("ba_registrationno")) - .registrationDate(rs.getLong("ba_registration_date")) - .action(rs.getString("ba_action")) - .status(rs.getString("ba_status")) - .birthPlace(getBirthPlace(rs)) - .birthFatherInfo(getBirthFatherInfo(rs)) - .birthMotherInfo(getBirthMotherInfo(rs)) - .birthPermanentAddress(getBirthPermanentAddress(rs)) - .birthPresentAddress(getBirthPresentAddress(rs)) - .birthStatisticalInformation(getBirthStatisticalInfo(rs)) - .auditDetails(getAuditDetails(rs)) - .build()); - } - return result; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthFatherInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthFatherInfoRowMapper.java deleted file mode 100644 index 084220a81d7..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthFatherInfoRowMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthFatherInfo; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthFatherInfoRowMapper { - default BirthFatherInfo getBirthFatherInfo(ResultSet rs) throws SQLException { - return BirthFatherInfo.builder() - .id(rs.getString("fa_id")) - .firstNameEn(rs.getString("fa_firstname_en")) - .firstNameMl(rs.getString("fa_firstname_ml")) - .middleNameEn(rs.getString("fa_middlename_en")) - .middleNameMl(rs.getString("fa_middlename_ml")) - .lastNameEn(rs.getString("fa_lastname_en")) - .lastNameMl(rs.getString("fa_lastname_ml")) - .aadharNo(rs.getString("fa_aadharno")) - .passportNo(rs.getString("fa_ot_passportno")) - .emailId(rs.getString("fa_emailid")) - .mobileNo(rs.getString("fa_mobileno")) - .birthDtlId(rs.getString("fa_birthdtlid")) - .build(); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthMotherInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthMotherInfoRowMapper.java deleted file mode 100644 index bdc5ccd04f8..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthMotherInfoRowMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthMotherInfo; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthMotherInfoRowMapper { - default BirthMotherInfo getBirthMotherInfo(ResultSet rs) throws SQLException { - return BirthMotherInfo.builder() - .id(rs.getString("mo_id")) - .firstNameEn(rs.getString("mo_firstname_en")) - .firstNameMl(rs.getString("mo_firstname_ml")) - .middleNameEn(rs.getString("mo_middlename_en")) - .middleNameMl(rs.getString("mo_middlename_ml")) - .lastNameEn(rs.getString("mo_lastname_en")) - .lastNameMl(rs.getString("mo_lastname_ml")) - .aadharNo(rs.getString("mo_aadharno")) - .passportNo(rs.getString("mo_ot_passportno")) - .emailId(rs.getString("mo_emailid")) - .mobileNo(rs.getString("mo_mobileno")) - .birthDtlId(rs.getString("mo_birthdtlid")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPermanentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPermanentAddressRowMapper.java deleted file mode 100644 index c11e8d069c4..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPermanentAddressRowMapper.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthPermanentAddress; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthPermanentAddressRowMapper { - - default BirthPermanentAddress getBirthPermanentAddress(ResultSet rs) throws SQLException { - return BirthPermanentAddress.builder() - .id(rs.getString("per_id")) - .resdnceAddrType(rs.getString("per_resdnce_addr_type")) - .resAssoNo(rs.getString("per_res_asso_no")) - .houseNameEn(rs.getString("per_housename_en")) - .houseNameMl(rs.getString("per_housename_ml")) - .otAddress1En(rs.getString("per_ot_address1_en")) - .otAddress1Ml(rs.getString("per_ot_address1_ml")) - .otAddress2En(rs.getString("per_ot_address2_en")) - .otAddress2Ml(rs.getString("per_ot_address2_ml")) - .villageId(rs.getString("per_villageid")) - .tenantId(rs.getString("per_tenantid")) - .talukId(rs.getString("per_talukid")) - .districtId(rs.getString("per_districtid")) - .stateId(rs.getString("per_stateid")) - .poId(rs.getString("per_poid")) - .pinNo(rs.getString("per_pinno")) - .otStateRegionProvinceEn(rs.getString("per_ot_state_region_province_en")) - .otStateRegionProvinceMl(rs.getString("per_ot_state_region_province_ml")) - .countryId(rs.getString("per_countryid")) - .birthDtlId(rs.getString("per_birthdtlid")) - .sameAsPresent(rs.getInt("same_as_present")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPlaceRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPlaceRowMapper.java deleted file mode 100644 index fdb03c90f9e..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPlaceRowMapper.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthPlace; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthPlaceRowMapper { - default BirthPlace getBirthPlace(ResultSet rs) throws SQLException { - return BirthPlace.builder() - .id(rs.getString("pla_id")) - .birthDtlId(rs.getString("pla_birthdtlid")) - .placeOfBirthId(rs.getString("pla_placeofbirthid")) - .hospitalId(rs.getString("pla_hospitalid")) - .vehicleTypeId(rs.getString("pla_vehicletypeid")) - .vehicleRegistrationNo(rs.getString("pla_vehicle_registration_no")) - .vehicleFromEn(rs.getString("pla_vehicle_from_en")) - .vehicleToEn(rs.getString("pla_vehicle_to_en")) - .vehicleFromMl(rs.getString("pla_vehicle_from_ml")) - .vehicleFromMl(rs.getString("pla_vehicle_to_ml")) - .vehicleOtherEn(rs.getString("pla_vehicle_other_en")) - .vehicleOtherMl(rs.getString("pla_vehicle_other_ml")) - .vehicleAdmitHospitalEn(rs.getString("pla_vehicle_admit_hospital_en")) - .vehicleAdmitHospitalMl(rs.getString("pla_vehicle_admit_hospital_ml")) - .publicPlaceId(rs.getString("pla_public_place_id")) - .hoHouseHolderEn(rs.getString("pla_ho_householder_en")) - .hoHouseHolderMl(rs.getString("pla_ho_householder_ml")) - .hoBuildingNo(rs.getString("pla_ho_buildingno")) - .hoResAssoNo(rs.getString("pla_ho_res_asso_no")) - .hoHousenNo(rs.getString("pla_ho_houseno")) - .hoHouseHolderEn(rs.getString("pla_ho_housename_en")) - .houseNameMl(rs.getString("pla_ho_housename_ml")) - .hoVillageId(rs.getString("pla_ho_villageid")) - .hoTalukId(rs.getString("pla_ho_talukid")) - .hoTalukId(rs.getString("pla_ho_districtid")) - .hoStateId(rs.getString("pla_ho_stateid")) - .hoPoId(rs.getString("pla_ho_poid")) - .hoPinNo(rs.getString("pla_ho_pinno")) - .hoCountryId(rs.getString("pla_ho_countryid")) - .wardId(rs.getString("pla_ward_id")) - .othDetailsEn(rs.getString("pla_oth_details_en")) - .othDetailsMl(rs.getString("pla_oth_details_ml")) - .institutionTypeId(rs.getString("pla_institution_type_id")) - .institutionId(rs.getString("pla_institution_id")) - .authOfficerId(rs.getString("pla_auth_officer_id")) - .authOfficerDesigId(rs.getString("pla_auth_officer_desig_id")) - .othAuthOfficerName(rs.getString("pla_oth_auth_officer_name")) - .othAuthOfficerDesig(rs.getString("pla_oth_auth_officer_desig")) - .informantsNameEn(rs.getString("pla_informantsname_en")) - .informantsAddressMl(rs.getString("pla_informantsname_ml")) - .informantsAddressEn(rs.getString("pla_informantsaddress_en")) - .informantsAddressMl(rs.getString("pla_informantsaddress_ml")) - .informantsMobileNo(rs.getString("pla_informants_mobileno")) - .informantsAadhaarNo(rs.getString("pla_informants_aadhaar_no")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPresentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPresentAddressRowMapper.java deleted file mode 100644 index 3e9d36d5a62..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthPresentAddressRowMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthPresentAddress; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthPresentAddressRowMapper { - - default BirthPresentAddress getBirthPresentAddress(ResultSet rs) throws SQLException { - return BirthPresentAddress.builder() - .id(rs.getString("pres_id")) - .resdnceAddrType(rs.getString("pres_resdnce_addr_type")) - .resAssoNo(rs.getString("pres_res_asso_no")) - .houseNameEn(rs.getString("pres_housename_en")) - .houseNameMl(rs.getString("pres_housename_ml")) - .otAddress1En(rs.getString("pres_ot_address1_en")) - .otAddress1Ml(rs.getString("pres_ot_address1_ml")) - .otAddress2En(rs.getString("pres_ot_address2_en")) - .otAddress2Ml(rs.getString("pres_ot_address2_ml")) - .villageId(rs.getString("pres_villageid")) - .tenantId(rs.getString("pres_tenantid")) - .talukId(rs.getString("pres_talukid")) - .districtId(rs.getString("pres_districtid")) - .stateId(rs.getString("pres_stateid")) - .poId(rs.getString("pres_poid")) - .pinNo(rs.getString("pres_pinno")) - .otStateRegionProvinceEn(rs.getString("pres_ot_state_region_province_en")) - .otStateRegionProvinceMl(rs.getString("pres_ot_state_region_province_ml")) - .countryId(rs.getString("pres_countryid")) - .birthDtlId(rs.getString("pres_birthdtlid")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthStatInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthStatInfoRowMapper.java deleted file mode 100644 index 79d5f37cb4d..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/rowmapper/BirthStatInfoRowMapper.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.ksmart.birth.marriageapplication.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthStatisticalInformation; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthStatInfoRowMapper { - default BirthStatisticalInformation getBirthStatisticalInfo(ResultSet rs) throws SQLException { - return BirthStatisticalInformation.builder() - .id(rs.getString("stat_id")) - .weightOfChild(rs.getLong("stat_weight_of_child")) - .durationOfPregnancyInWeek(rs.getInt("stat_duration_of_pregnancy_in_week")) - .natureOfMedicalAttention(rs.getString("stat_nature_of_medical_attention")) - .wayOfPregnancy(rs.getString("stat_way_of_pregnancy")) - .deliveryMethod(rs.getString("stat_delivery_method")) - .deliveryTypeOthersEn(rs.getString("stat_deliverytypeothers_en")) - .deliveryTypeOthersMl(rs.getString("stat_deliverytypeothers_ml")) - .religionId(rs.getString("stat_religionid")) - .fatherNationalityId(rs.getString("stat_father_nationalityid")) - .fatherEducationId(rs.getString("stat_father_educationid")) - .fatherEducationSubId(rs.getString("stat_father_education_subid")) - .fatherProffessionId(rs.getString("stat_father_proffessionid")) - .motherEducationId(rs.getString("stat_mother_educationid")) - .motherEducationSubId(rs.getString("stat_mother_education_subid")) - .motherProffessionId(rs.getString("stat_mother_proffessionid")) - .motherNationalityId(rs.getString("stat_mother_nationalityid")) - .motherAgeMarriage(rs.getInt("stat_mother_age_marriage")) - .motherAgeDelivery(rs.getInt("stat_mother_age_delivery")) - .motherNoOfBirthGiven(rs.getInt("stat_mother_no_of_birth_given")) - .motherMaritalStatusId(rs.getString("stat_mother_maritalstatusid")) - .motherUnmarried(rs.getInt("stat_mother_unmarried")) - .motherResLbId(rs.getInt("stat_mother_res_lbid")) - .motherResLbCode(rs.getInt("stat_mother_res_lb_code_id")) - .motherResPlaceTypeId(rs.getInt("stat_mother_res_place_type_id")) - .motherResLbTypeId(rs.getInt("stat_mother_res_lb_type_id")) - .motherResDistrictId(rs.getInt("stat_mother_res_district_id")) - .motherResStateId(rs.getInt("stat_mother_res_state_id")) - .motherResCountryId(rs.getInt("stat_mother_res_country_id")) - .motherResdnceAddrType(rs.getString("stat_mother_resdnce_addr_type")) - .motherResdnceTenentId(rs.getString("stat_mother_resdnce_tenant")) - .motherResdncePlaceType(rs.getString("stat_mother_resdnce_placetype")) - .motherResdncePlaceEn(rs.getString("stat_mother_resdnce_place_en")) - .motherResdncePlaceMl(rs.getString("stat_mother_resdnce_place_ml")) - .motherResdnceLbType(rs.getString("stat_mother_resdnce_lbtype")) - .motherResdnceDistrictId(rs.getString("stat_mother_resdnce_district")) - .motherResdnceStateId(rs.getString("stat_mother_resdnce_state")) - .motherResdnceCountryId(rs.getString("stat_mother_resdnce_country")) - .birthDtlId(rs.getString("stat_birthdtlid")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/AdoptionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/AdoptionService.java deleted file mode 100644 index d100be7df38..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/AdoptionService.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.ksmart.birth.marriageapplication.service; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageapplication.model.AdoptionDetail; -import org.ksmart.birth.marriageapplication.model.adoption.AdoptionRequest; -import org.ksmart.birth.marriageapplication.repository.AdoptionRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Slf4j -@Service -public class AdoptionService { - private final AdoptionRepository adoptionRepository; - @Autowired - AdoptionService(AdoptionRepository adoptionRepository) { - this.adoptionRepository = adoptionRepository; - } - - public List saveAdoptionDetails(AdoptionRequest request) { - return adoptionRepository.saveAdoptionDetails(request); - } - - public List updateAdoptionDetails(AdoptionRequest request) { - return adoptionRepository.updateAdoptionDetails(request); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/MultipleBirthApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/MultipleBirthApplicationService.java deleted file mode 100644 index 8453e6038bb..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/MultipleBirthApplicationService.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.ksmart.birth.marriageapplication.service; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.marriageapplication.repository.BirthApplicationRepository; -import org.ksmart.birth.marriageapplication.validator.MdmsValidator; -import org.ksmart.birth.marriageapplication.validator.MultipleBirthApplicationValidator; -import org.ksmart.birth.utils.MdmsUtil; -import org.ksmart.birth.workflow.WorkflowIntegrator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; -@Slf4j -@Service -public class MultipleBirthApplicationService { - - private final BirthApplicationRepository repository; - private final WorkflowIntegrator workflowIntegrator; - private final MdmsUtil mdmsUtil; - private final MdmsValidator mdmsValidator; - - private final MultipleBirthApplicationValidator applicationValidator; - - @Autowired - MultipleBirthApplicationService(BirthApplicationRepository repository, WorkflowIntegrator workflowIntegrator, MdmsUtil mdmsUtil, - MdmsValidator mdmsValidator, MultipleBirthApplicationValidator applicationValidator) { - this.repository = repository; - this.workflowIntegrator = workflowIntegrator; - this.mdmsUtil = mdmsUtil; - this.mdmsValidator = mdmsValidator; - this.applicationValidator = applicationValidator; - } - - - public List saveBirthDetails(BirthDetailsRequest request) { - - - // validate mdms data - Object mdmsData = mdmsUtil.mdmsCall(request.getRequestInfo()); - - // validate request - applicationValidator.validateCreate(request, mdmsData); - - // workflowIntegrator.callWorkFlow(request); - return repository.saveBirthDetails(request); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/RegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/RegistryRequestService.java deleted file mode 100644 index cf71c8a9958..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/RegistryRequestService.java +++ /dev/null @@ -1,226 +0,0 @@ -package org.ksmart.birth.marriageapplication.service; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.marriageregistry.model.*; -import org.springframework.stereotype.Service; - -import java.util.LinkedList; -import java.util.List; - -@Slf4j -@Service -public class RegistryRequestService { - public RegisterBirthDetailsRequest createRegistryRequest(BirthDetailsRequest requestBirthReq){ - RegisterBirthDetailsRequest request = new RegisterBirthDetailsRequest(); - List registerBirthDetails = new LinkedList<>(); - RegisterBirthDetail registerBirthDetail = new RegisterBirthDetail(); - registerBirthDetail.setDateOfReport(requestBirthReq.getBirthDetails().get(0).getDateOfReport()); - registerBirthDetail.setDateOfBirth(requestBirthReq.getBirthDetails().get(0).getDateOfBirth()); - registerBirthDetail.setDateOfReport(requestBirthReq.getBirthDetails().get(0).getDateOfReport()); - registerBirthDetail.setDateOfBirth(requestBirthReq.getBirthDetails().get(0).getDateOfBirth()); - registerBirthDetail.setTimeOfBirth(requestBirthReq.getBirthDetails().get(0).getTimeOfBirth()); - registerBirthDetail.setAmpm(requestBirthReq.getBirthDetails().get(0).getAmpm()); - registerBirthDetail.setFirstNameEn(requestBirthReq.getBirthDetails().get(0).getFirstNameEn()); - registerBirthDetail.setFirstNameMl(requestBirthReq.getBirthDetails().get(0).getFirstNameMl()); - registerBirthDetail.setMiddleNameEn(requestBirthReq.getBirthDetails().get(0).getMiddleNameEn()); - registerBirthDetail.setMiddleNameMl(requestBirthReq.getBirthDetails().get(0).getMiddleNameMl()); - registerBirthDetail.setLastNameEn(requestBirthReq.getBirthDetails().get(0).getLastNameEn()); - registerBirthDetail.setLastNameMl(requestBirthReq.getBirthDetails().get(0).getLastNameMl()); - registerBirthDetail.setTenantId(requestBirthReq.getBirthDetails().get(0).getTenantId()); - registerBirthDetail.setGender(requestBirthReq.getBirthDetails().get(0).getGender()); - registerBirthDetail.setRemarksEn(requestBirthReq.getBirthDetails().get(0).getRemarksEn()); - registerBirthDetail.setRemarksMl(requestBirthReq.getBirthDetails().get(0).getRemarksMl()); - registerBirthDetail.setAadharNo(requestBirthReq.getBirthDetails().get(0).getAadharNo()); - registerBirthDetail.setEsignUserCode(requestBirthReq.getBirthDetails().get(0).getEsignUserCode()); - registerBirthDetail.setEsignUserDesigCode(requestBirthReq.getBirthDetails().get(0).getEsignUserDesigCode()); - registerBirthDetail.setIsAdopted(requestBirthReq.getBirthDetails().get(0).getIsAdopted()); - registerBirthDetail.setIsAbandoned(requestBirthReq.getBirthDetails().get(0).getIsAbandoned()); - registerBirthDetail.setIsMultipleBirth(requestBirthReq.getBirthDetails().get(0).getIsMultipleBirth()); - registerBirthDetail.setIsFatherInfoMissing(requestBirthReq.getBirthDetails().get(0).getIsFatherInfoMissing()); - registerBirthDetail.setIsMotherInfoMissing(requestBirthReq.getBirthDetails().get(0).getIsMotherInfoMissing()); - registerBirthDetail.setNoOfAliveBirth(requestBirthReq.getBirthDetails().get(0).getNoOfAliveBirth()); - registerBirthDetail.setMultipleBirthDetId(requestBirthReq.getBirthDetails().get(0).getMultipleBirthDetailsIid()); - registerBirthDetail.setIsBornOutside(requestBirthReq.getBirthDetails().get(0).getIsBornOutside()); - registerBirthDetail.setOtPassportNo(requestBirthReq.getBirthDetails().get(0).getPassportNo()); - registerBirthDetail.setRegistrationNo(requestBirthReq.getBirthDetails().get(0).getRegistrationNo()); - registerBirthDetail.setRegistrationStatus("ACTIVE"); - registerBirthDetail.setRegistrationDate(requestBirthReq.getBirthDetails().get(0).getRegistrationDate()); - registerBirthDetail.setRegisterBirthPlace(createBirthPlace(requestBirthReq)); - registerBirthDetail.setRegisterBirthFather(createFatherInfor(requestBirthReq)); - registerBirthDetail.setRegisterBirthMother(createMotherInfor(requestBirthReq)); - registerBirthDetail.setRegisterBirthPermanent(createRegisterBirthPermanentAddress(requestBirthReq)); - registerBirthDetail.setRegisterBirthPresent(createRegisterBirthPresentAddress(requestBirthReq)); - registerBirthDetail.setRegisterBirthStatitical(createRegisterBirthStatiticalInformation(requestBirthReq)); - registerBirthDetails.add(registerBirthDetail); - request.setRequestInfo(requestBirthReq.getRequestInfo()); - request.setRegisterBirthDetails(registerBirthDetails); - return request; - } - private RegisterBirthPlace createBirthPlace(BirthDetailsRequest requestBirthReq) { - RegisterBirthPlace registerBirthPlace = new RegisterBirthPlace(); - registerBirthPlace.setPlaceOfBirthId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getPlaceOfBirthId()); - registerBirthPlace.setHospitalId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHospitalId()); - registerBirthPlace.setVehicleTypeId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleTypeId()); - registerBirthPlace.setVehicleRegistrationNo(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleRegistrationNo()); - registerBirthPlace.setVehicleFromEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleFromEn()); - registerBirthPlace.setVehicleToEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleToEn()); - registerBirthPlace.setVehicleFromMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleFromMl()); - registerBirthPlace.setVehicleToMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleToMl()); - registerBirthPlace.setVehicleOtherEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleOtherEn()); - registerBirthPlace.setVehicleOtherMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleOtherMl()); - registerBirthPlace.setVehicleAdmitHospitalEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleAdmitHospitalEn()); - registerBirthPlace.setVehicleAdmitHospitalMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getVehicleAdmitHospitalMl()); - registerBirthPlace.setPublicPlaceId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getPublicPlaceId()); - registerBirthPlace.setHoHouseHolderEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoHouseHolderEn()); - registerBirthPlace.setHoHouseHolderMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoHouseHolderMl()); - registerBirthPlace.setHoBuildingNo(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoBuildingNo()); - registerBirthPlace.setHoResAssoNo(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoResAssoNo()); - registerBirthPlace.setHoHousenNo(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoHousenNo()); - registerBirthPlace.setHouseNameEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHouseNameEn()); - registerBirthPlace.setHouseNameMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHouseNameMl()); - registerBirthPlace.setHoVillageId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoVillageId()); - registerBirthPlace.setHoTalukId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoTalukId()); - registerBirthPlace.setHoDistrictId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoDistrictId()); - registerBirthPlace.setHoStateId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoStateId()); - registerBirthPlace.setHoPoId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoPoId()); - registerBirthPlace.setHoPinNo(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoPinNo()); - registerBirthPlace.setHoCountryId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getHoCountryId()); - registerBirthPlace.setWardId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getWardId()); - registerBirthPlace.setOthDetailsEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getOthDetailsEn()); - registerBirthPlace.setOthDetailsMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getOthDetailsMl()); - registerBirthPlace.setInstitutionTypeId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getInstitutionTypeId()); - registerBirthPlace.setInstitutionId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getInstitutionId()); - registerBirthPlace.setAuthOfficerId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getAuthOfficerId()); - registerBirthPlace.setAuthOfficerDesigId(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getAuthOfficerDesigId()); - registerBirthPlace.setOthAuthOfficerName(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getOthAuthOfficerName()); - registerBirthPlace.setOthAuthOfficerDesig(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getOthAuthOfficerDesig()); - registerBirthPlace.setInformantsNameEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getInformantsNameEn()); - registerBirthPlace.setInformantsNameMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getInformantsNameMl()); - registerBirthPlace.setInformantsAddressEn(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getInformantsAddressEn()); - registerBirthPlace.setInformantsAddressMl(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getInformantsAddressMl()); - registerBirthPlace.setInformantsMobileNo(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getInformantsMobileNo()); - registerBirthPlace.setInformantsAadhaarNo(requestBirthReq.getBirthDetails().get(0).getBirthPlace().getInformantsAadhaarNo()); - return registerBirthPlace; - } - - private RegisterBirthMotherInfo createMotherInfor(BirthDetailsRequest requestBirthReq) { - RegisterBirthMotherInfo registerBirthMotherInfo = new RegisterBirthMotherInfo(); - registerBirthMotherInfo.setFirstNameEn(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getFirstNameEn()); - registerBirthMotherInfo.setFirstNameMl(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getFirstNameMl()); - registerBirthMotherInfo.setMiddleNameEn(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getMiddleNameEn()); - registerBirthMotherInfo.setMiddleNameMl(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getMiddleNameMl()); - registerBirthMotherInfo.setLastNameEn(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getLastNameEn()); - registerBirthMotherInfo.setLastNameMl(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getLastNameMl()); - registerBirthMotherInfo.setAadharNo(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getAadharNo()); - registerBirthMotherInfo.setOtPassportNo(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getPassportNo()); - registerBirthMotherInfo.setEmailId(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getEmailId()); - registerBirthMotherInfo.setMobileNo(requestBirthReq.getBirthDetails().get(0).getBirthMotherInfo().getMobileNo()); - return registerBirthMotherInfo; - } - - private RegisterBirthFatherInfo createFatherInfor(BirthDetailsRequest requestBirthReq) { - RegisterBirthFatherInfo registerBirthFatherInfo = new RegisterBirthFatherInfo(); - registerBirthFatherInfo.setFirstNameEn(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getFirstNameEn()); - registerBirthFatherInfo.setFirstNameMl(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getFirstNameMl()); - registerBirthFatherInfo.setMiddleNameEn(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getMiddleNameEn()); - registerBirthFatherInfo.setMiddleNameMl(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getMiddleNameMl()); - registerBirthFatherInfo.setLastNameEn(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getLastNameEn()); - registerBirthFatherInfo.setLastNameMl(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getLastNameMl()); - registerBirthFatherInfo.setAadharNo(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getAadharNo()); - registerBirthFatherInfo.setOtPassportNo(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getPassportNo()); - registerBirthFatherInfo.setEmailId(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getEmailId()); - registerBirthFatherInfo.setMobileNo(requestBirthReq.getBirthDetails().get(0).getBirthFatherInfo().getMobileNo()); - return registerBirthFatherInfo; - } - - private RegisterBirthPermanentAddress createRegisterBirthPermanentAddress(BirthDetailsRequest requestBirthReq) { - RegisterBirthPermanentAddress registerBirthPermanentAddress = new RegisterBirthPermanentAddress(); - registerBirthPermanentAddress.setResAssoNo(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getResAssoNo()); - registerBirthPermanentAddress.setHouseNameEn(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getHouseNameEn()); - registerBirthPermanentAddress.setHouseNameMl(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getHouseNameMl()); - registerBirthPermanentAddress.setOtAddress1En(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getOtAddress1En()); - registerBirthPermanentAddress.setOtAddress1Ml(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getOtAddress1Ml()); - registerBirthPermanentAddress.setOtAddress2En(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getOtAddress2En()); - registerBirthPermanentAddress.setOtAddress2Ml(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getOtAddress2Ml()); - registerBirthPermanentAddress.setVillageId(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getVillageId()); - registerBirthPermanentAddress.setTenantId(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getTenantId()); - registerBirthPermanentAddress.setTalukId(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getTalukId()); - registerBirthPermanentAddress.setDistrictId(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getDistrictId()); - registerBirthPermanentAddress.setStateId(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getStateId()); - registerBirthPermanentAddress.setPoId(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getPoId()); - registerBirthPermanentAddress.setPinNo(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getPinNo()); - registerBirthPermanentAddress.setOtStateRegionProvinceEn(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getOtStateRegionProvinceEn()); - registerBirthPermanentAddress.setOtStateRegionProvinceMl(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getOtStateRegionProvinceMl()); - registerBirthPermanentAddress.setCountryId(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getCountryId()); - registerBirthPermanentAddress.setResAssoNoMl(requestBirthReq.getBirthDetails().get(0).getBirthPermanentAddress().getResAssoNoMl()); - return registerBirthPermanentAddress; - } - - private RegisterBirthPresentAddress createRegisterBirthPresentAddress(BirthDetailsRequest requestBirthReq) { - RegisterBirthPresentAddress registerBirthPresentAddress = new RegisterBirthPresentAddress(); - registerBirthPresentAddress.setResAssoNo(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getResAssoNo()); - registerBirthPresentAddress.setHouseNameEn(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getHouseNameEn()); - registerBirthPresentAddress.setHouseNameMl(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getHouseNameMl()); - registerBirthPresentAddress.setOtAddress1En(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getOtAddress1En()); - registerBirthPresentAddress.setOtAddress1Ml(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getOtAddress1Ml()); - registerBirthPresentAddress.setOtAddress2En(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getOtAddress2En()); - registerBirthPresentAddress.setOtAddress2Ml(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getOtAddress2Ml()); - registerBirthPresentAddress.setVillageId(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getVillageId()); - registerBirthPresentAddress.setTenantId(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getTenantId()); - registerBirthPresentAddress.setTalukId(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getTalukId()); - registerBirthPresentAddress.setDistrictId(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getDistrictId()); - registerBirthPresentAddress.setStateId(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getStateId()); - registerBirthPresentAddress.setPoId(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getPoId()); - registerBirthPresentAddress.setPinNo(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getPinNo()); - registerBirthPresentAddress.setOtStateRegionProvinceEn(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getOtStateRegionProvinceEn()); - registerBirthPresentAddress.setOtStateRegionProvinceMl(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getOtStateRegionProvinceMl()); - registerBirthPresentAddress.setCountryId(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getCountryId()); - registerBirthPresentAddress.setResAssoNoMl(requestBirthReq.getBirthDetails().get(0).getBirthPresentAddress().getResAssoNoMl()); - return registerBirthPresentAddress; - } - - private RegisterBirthStatiticalInformation createRegisterBirthStatiticalInformation(BirthDetailsRequest requestBirthReq) { - RegisterBirthStatiticalInformation registerBirthStatiticalInformation = new RegisterBirthStatiticalInformation(); - - registerBirthStatiticalInformation.setDeliveryMethod(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getDeliveryMethod()); - registerBirthStatiticalInformation.setWeightOfChild(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getWeightOfChild()); - registerBirthStatiticalInformation.setDurationOfPregnancyInWeek(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getDurationOfPregnancyInWeek()); - registerBirthStatiticalInformation.setNatureOfMedicalAttention(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getNatureOfMedicalAttention()); - registerBirthStatiticalInformation.setWayOfPregnancy(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getWayOfPregnancy()); - registerBirthStatiticalInformation.setDeliveryMethod(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getDeliveryMethod()); - registerBirthStatiticalInformation.setDeliveryTypeOthersEn(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getDeliveryTypeOthersEn()); - registerBirthStatiticalInformation.setDeliveryTypeOthersMl(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getDeliveryTypeOthersMl()); - registerBirthStatiticalInformation.setReligionId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getReligionId()); - registerBirthStatiticalInformation.setFatherEducationId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getFatherEducationId()); - registerBirthStatiticalInformation.setFatherEducationSubId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getFatherEducationSubId()); - registerBirthStatiticalInformation.setFatherProffessionId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getFatherProffessionId()); - registerBirthStatiticalInformation.setMotherEducationId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherEducationId()); - registerBirthStatiticalInformation.setMotherProffessionId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherProffessionId()); - registerBirthStatiticalInformation.setMotherNationalityId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherNationalityId()); - registerBirthStatiticalInformation.setMotherAgeMarriage(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherAgeMarriage()); - registerBirthStatiticalInformation.setMotherAgeDelivery(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherAgeDelivery()); - registerBirthStatiticalInformation.setMotherNoOfBirthGiven(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherNoOfBirthGiven()); - registerBirthStatiticalInformation.setMotherMaritalStatusId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherMaritalStatusId()); - registerBirthStatiticalInformation.setMotherUnmarried(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherUnmarried()); - registerBirthStatiticalInformation.setMotherResLbId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResLbId()); - registerBirthStatiticalInformation.setMotherResLbCode(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResLbCode()); - registerBirthStatiticalInformation.setMotherResPlaceTypeId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResPlaceTypeId()); - registerBirthStatiticalInformation.setMotherResLbTypeId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResLbTypeId()); - registerBirthStatiticalInformation.setMotherResDistrictId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResDistrictId()); - registerBirthStatiticalInformation.setMotherResStateId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResStateId()); - registerBirthStatiticalInformation.setMotherResCountryId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResCountryId()); - registerBirthStatiticalInformation.setMotherResdnceAddrType(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdnceAddrType()); - registerBirthStatiticalInformation.setMotherResdnceTenentId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdnceTenentId()); - registerBirthStatiticalInformation.setMotherResdncePlaceType(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdncePlaceType()); - registerBirthStatiticalInformation.setMotherResdncePlaceEn(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdncePlaceEn()); - registerBirthStatiticalInformation.setMotherResdncePlaceMl(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdncePlaceMl()); - registerBirthStatiticalInformation.setMotherResdnceLbType(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdnceLbType()); - registerBirthStatiticalInformation.setMotherResdnceDistrictId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdnceDistrictId()); - registerBirthStatiticalInformation.setMotherResdnceStateId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdnceStateId()); - registerBirthStatiticalInformation.setMotherResdnceCountryId(requestBirthReq.getBirthDetails().get(0).getBirthStatisticalInformation().getMotherResdnceCountryId()); - return registerBirthStatiticalInformation; - } - -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/AdoptionValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/AdoptionValidator.java deleted file mode 100644 index c4ff718280a..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/AdoptionValidator.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.ksmart.birth.marriageapplication.validator; - -public class AdoptionValidator { -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/MdmsValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/MdmsValidator.java deleted file mode 100644 index 9318061859f..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/MdmsValidator.java +++ /dev/null @@ -1,512 +0,0 @@ -package org.ksmart.birth.marriageapplication.validator; - -import com.jayway.jsonpath.JsonPath; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.collections4.MapUtils; -import org.egov.tracer.model.CustomException; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.utils.BirthConstants; -import org.ksmart.birth.utils.BirthUtils; -import org.springframework.stereotype.Component; - -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - -import static org.ksmart.birth.utils.BirthConstants.*; -import static org.ksmart.birth.utils.enums.ErrorCodes.MDMS_DATA_ERROR; -@Component -@Slf4j -public class MdmsValidator { - - public void validateMdmsData(BirthDetailsRequest request, Object mdmsData) { - - if (log.isDebugEnabled()) { - log.debug("MDMS master data \n {}", BirthUtils.toJson(mdmsData)); - } - - Map masterBirthData = getBirthMasterData(mdmsData); - validateBirthMasterData(masterBirthData); - - - Map masterCommonData = getCommonMasterData(mdmsData); - validateCommonMasterData(masterCommonData); - - Map masterTenantData = getTenantData(mdmsData); - validateTenantMasterData(masterTenantData); - - List tenantCode = getTenantCodes(mdmsData); - - - List professionCodes = getProfessionCodes(mdmsData); - List religionCodes = getReligionCodes(mdmsData); - List qualificationCodes = getQualificationCode(mdmsData); - List talukCodes = getTaulkCodes(mdmsData); - List stateCodes = getStateCodes(mdmsData); - List countryCodes = getCountryCodes(mdmsData); - List instCodes = getInstitutionCodes(mdmsData); - List medicalCodes = getMedicalCodes(mdmsData); - List villageCodes = getVillageCode(mdmsData); - List districtCodes = getDistrictCode(mdmsData); - List postOfficeCodes = getPostOfficeCode(mdmsData); - List institutionTypeCodes = getInstitutionTypeCode(mdmsData); - List deliveryMethodCodes = getdeliveryMethodCode(mdmsData); - List lBTypeCodes = getLbTypeCode(mdmsData); - List birthPlaceCodes = getBirthPlaceCode(mdmsData); - - Map errorMap = new ConcurrentHashMap<>(); - request.getBirthDetails() - .forEach(birth -> { - String professionCodeFather = birth.getBirthStatisticalInformation().getFatherProffessionId(); - String professionCodeMother = birth.getBirthStatisticalInformation().getMotherProffessionId(); - String religionCode = birth.getBirthStatisticalInformation().getReligionId(); - String qualificationCodeMother= birth.getBirthStatisticalInformation().getMotherEducationId(); - String talukCodePresent= birth.getBirthPresentAddress().getTalukId(); - String talukCodePermanent= birth.getBirthPermanentAddress().getTalukId(); - String talukCodePlace= birth.getBirthPlace().getHoTalukId(); - String stateCodesPresent= birth.getBirthPresentAddress().getStateId(); - String stateCodesPermanent= birth.getBirthPermanentAddress().getStateId(); - String stateCodesPlace= birth.getBirthPlace().getHoStateId(); - String stateCodesStatitical= birth.getBirthStatisticalInformation().getMotherResdnceStateId(); - String countryCodesPresent= birth.getBirthPresentAddress().getCountryId(); - String countryCodesPermanent= birth.getBirthPermanentAddress().getCountryId(); - String countryCodesPlace= birth.getBirthPlace().getHoCountryId(); - String countryCodesStatitical= birth.getBirthStatisticalInformation().getMotherResdnceCountryId(); - String motherNationalityCode=birth.getBirthStatisticalInformation().getMotherNationalityId(); - String fatherNationalityCode=birth.getBirthStatisticalInformation().getFatherNationalityId(); - String institutionCode= birth.getBirthPlace().getInstitutionId(); - String medicalCode= birth.getBirthStatisticalInformation().getNatureOfMedicalAttention(); - String villageCodePresent = birth.getBirthPresentAddress().getVillageId(); - String villageCodePermanent = birth.getBirthPermanentAddress().getVillageId(); - String villageCodePlace = birth.getBirthPlace().getHoVillageId(); - String districtCodePresent = birth.getBirthPresentAddress().getDistrictId(); - String districtCodePermanent = birth.getBirthPermanentAddress().getDistrictId(); - String districtCodePlace = birth.getBirthPlace().getHoDistrictId(); - String districtCodeStatitical = birth.getBirthStatisticalInformation().getMotherResdnceDistrictId(); - String postOfficeCodePlace = birth.getBirthPlace().getHoPoId(); - String postOfficeCodePresent = birth.getBirthPresentAddress().getPoId(); - String postOfficeCodePermanent = birth.getBirthPermanentAddress().getPoId(); - String institutionTypeCodePlace = birth.getBirthPlace().getInstitutionTypeId(); - String deliveryMethodCode = birth.getBirthStatisticalInformation().getDeliveryMethod(); - String lBTypeCode = birth.getBirthStatisticalInformation().getMotherResdnceLbType(); - String birthPlaceCode = birth.getBirthPlace().getPlaceOfBirthId(); - - - - if (log.isDebugEnabled()) { - log.debug("Father Profession code : \n{}", professionCodeFather); - } - - if (log.isDebugEnabled()) { - log.debug("Mother Profession code : \n{}", professionCodeMother); - } - - if (log.isDebugEnabled()) { - log.debug("Mother Qualification code : \n{}", qualificationCodeMother); - } - - if (log.isDebugEnabled()) { - log.debug("Religion code : \n{}", religionCode); - } - - if (log.isDebugEnabled()) { - log.debug("Taulk code Present: \n{}", talukCodePresent); - } - - if (log.isDebugEnabled()) { - log.debug("Taulk code Permanent: \n{}", talukCodePermanent); - } - - if (log.isDebugEnabled()) { - log.debug("Taulk code Place: \n{}", talukCodePlace); - } - - if (log.isDebugEnabled()) { - log.debug("State code Present: \n{}", stateCodesPresent); - } - - if (log.isDebugEnabled()) { - log.debug("State code Permanent: \n{}", stateCodesPermanent); - } - - if (log.isDebugEnabled()) { - log.debug("State code Place: \n{}", stateCodesPlace); - } - - if (log.isDebugEnabled()) { - log.debug("State code Statitical: \n{}", stateCodesStatitical); - } - - if (log.isDebugEnabled()) { - log.debug("Country code Present: \n{}", countryCodesPresent); - } - - if (log.isDebugEnabled()) { - log.debug("Country code Permanent: \n{}", countryCodesPermanent); - } - - if (log.isDebugEnabled()) { - log.debug("Country code Place: \n{}", countryCodesPlace); - } - - if (log.isDebugEnabled()) { - log.debug("Country code Statitical: \n{}", countryCodesStatitical); - } - - if (log.isDebugEnabled()) { - log.debug("mother Nationality Code: \n{}", motherNationalityCode); - } - - if (log.isDebugEnabled()) { - log.debug("father Nationality Code: \n{}", fatherNationalityCode); - } - - if (log.isDebugEnabled()) { - log.debug("Institution code : \n{}", institutionCode); - } - - if (log.isDebugEnabled()) { - log.debug("Medical Code : \n{}", medicalCode); - } - - if (log.isDebugEnabled()) { - log.debug("Village code : \n{}", villageCodePresent); - } - - if (log.isDebugEnabled()) { - log.debug("Village code : \n{}", villageCodePermanent); - } - - if (log.isDebugEnabled()) { - log.debug("Village code : \n{}", villageCodePlace); - } - - if (log.isDebugEnabled()) { - log.debug("District code : \n{}", districtCodePresent); - } - - if (log.isDebugEnabled()) { - log.debug("District code : \n{}", districtCodePermanent); - } - - if (log.isDebugEnabled()) { - log.debug("District code : \n{}", districtCodePlace); - } - - if (log.isDebugEnabled()) { - log.debug("District code : \n{}", districtCodeStatitical); - } - - - if (log.isDebugEnabled()) { - log.debug("Postoffice code : \n{}", postOfficeCodePlace); - } - - if (log.isDebugEnabled()) { - log.debug("Postoffice code : \n{}", postOfficeCodePresent); - } - - if (log.isDebugEnabled()) { - log.debug("Postoffice code : \n{}", postOfficeCodePermanent); - } - - if (log.isDebugEnabled()) { - log.debug("Institution Type code : \n{}", institutionTypeCodePlace); - } - - if (log.isDebugEnabled()) { - log.debug("Delivery method code : \n{}", deliveryMethodCode); - } - - if (log.isDebugEnabled()) { - log.debug("LBType code : \n{}", lBTypeCode); - } - - if (log.isDebugEnabled()) { - log.debug("place of birth code : \n{}", birthPlaceCode); - } - - if (CollectionUtils.isEmpty(professionCodes) || !professionCodes.contains(professionCodeFather)) { - - errorMap.put(CR_MDMS_PROFESSION, "The Profession code '" + professionCodeFather + "' does not exists"); - } - - if (CollectionUtils.isEmpty(professionCodes) || !professionCodes.contains(professionCodeMother)) { - errorMap.put(CR_MDMS_PROFESSION, "The Profession code '" + professionCodeMother + "' does not exists"); - } - - if (CollectionUtils.isEmpty(qualificationCodes) || !qualificationCodes.contains(qualificationCodeMother)) { - errorMap.put(CR_MDMS_QUALIFICATION, "The Education code '" + qualificationCodeMother + "' does not exists"); - } - - if (CollectionUtils.isEmpty(religionCodes) || !religionCodes.contains(religionCode)) { - errorMap.put(COMMON_MDMS_RELIGION, "The Religion code '" + religionCode + "' does not exists"); - } - - if (CollectionUtils.isEmpty(talukCodes) || !talukCodes.contains(talukCodePresent)) { - errorMap.put(COMMON_MDMS_TALUK, "The Taulk code Present'" + talukCodePresent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(talukCodes) || !talukCodes.contains(talukCodePermanent)) { - errorMap.put(COMMON_MDMS_TALUK, "The Taulk code Permanent'" + talukCodePermanent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(talukCodes) || !talukCodes.contains(talukCodePlace)) { - errorMap.put(COMMON_MDMS_TALUK, "The Taulk code Place'" + talukCodePlace + "' does not exists"); - } - - if (CollectionUtils.isEmpty(stateCodes) || !stateCodes.contains(stateCodesPresent)) { - errorMap.put(COMMON_MDMS_STATE, "The State code Present'" + stateCodesPresent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(stateCodes) || !stateCodes.contains(stateCodesPermanent)) { - errorMap.put(COMMON_MDMS_STATE, "The State code Permanent'" + stateCodesPermanent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(stateCodes) || !stateCodes.contains(stateCodesPlace)) { - errorMap.put(COMMON_MDMS_STATE, "The State code Place'" + stateCodesPlace + "' does not exists"); - } - - if (CollectionUtils.isEmpty(stateCodes) || !stateCodes.contains(stateCodesStatitical)) { - errorMap.put(COMMON_MDMS_STATE, "The State code Statitical'" + stateCodesStatitical + "' does not exists"); - } - - if (CollectionUtils.isEmpty(countryCodes) || !countryCodes.contains(countryCodesPresent)) { - errorMap.put(COMMON_MDMS_COUNTRY, "The Country code Present'" + countryCodesPresent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(countryCodes) || !countryCodes.contains(countryCodesPermanent)) { - errorMap.put(COMMON_MDMS_COUNTRY, "The Country code Permanent'" + countryCodesPermanent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(countryCodes) || !countryCodes.contains(countryCodesPlace)) { - errorMap.put(COMMON_MDMS_COUNTRY, "The Country code Place'" + countryCodesPlace + "' does not exists"); - } - - if (CollectionUtils.isEmpty(countryCodes) || !countryCodes.contains(motherNationalityCode)) { - errorMap.put(COMMON_MDMS_COUNTRY, "The Mother Nationality Code'" + motherNationalityCode + "' does not exists"); - } - - if (CollectionUtils.isEmpty(countryCodes) || !countryCodes.contains(fatherNationalityCode)) { - errorMap.put(COMMON_MDMS_COUNTRY, "The Father Nationality Code'" + fatherNationalityCode + "' does not exists"); - } - - if (CollectionUtils.isEmpty(countryCodes) || !countryCodes.contains(countryCodesStatitical)) { - errorMap.put(COMMON_MDMS_COUNTRY, "The Country code Statitical'" + countryCodesStatitical + "' does not exists"); - } - - if (CollectionUtils.isEmpty(instCodes) || !instCodes.contains(institutionCode)) { - errorMap.put(COMMON_MDMS_INSTITUTION, "The Institution code '" + institutionCode + "' does not exists"); - } - - if (CollectionUtils.isEmpty(medicalCodes) || !medicalCodes.contains(medicalCode)) { - errorMap.put(COMMON_MDMS_MEDICAL_ATTENTION_TYPE, "The medicalCode code '" + medicalCode + "' does not exists"); - - } - - if (CollectionUtils.isEmpty(villageCodes) || !villageCodes.contains(villageCodePresent)) { - errorMap.put(COMMON_MDMS_VILLAGE, "The Village code '" + villageCodePresent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(villageCodes) || !villageCodes.contains(villageCodePermanent)) { - errorMap.put(COMMON_MDMS_VILLAGE, "The Village code '" + villageCodePermanent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(villageCodes) || !villageCodes.contains(villageCodePlace)) { - errorMap.put(COMMON_MDMS_VILLAGE, "The Village code '" + villageCodePlace + "' does not exists"); - } - - if (CollectionUtils.isEmpty(districtCodes) || !districtCodes.contains(districtCodePresent)) { - errorMap.put(COMMON_MDMS_DISTRICT, "The District code '" + districtCodePresent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(districtCodes) || !districtCodes.contains(districtCodePermanent)) { - errorMap.put(COMMON_MDMS_DISTRICT, "The District code '" + districtCodePermanent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(districtCodes) || !districtCodes.contains(districtCodePlace)) { - errorMap.put(COMMON_MDMS_DISTRICT, "The District code '" + districtCodePlace + "' does not exists"); - } - - if (CollectionUtils.isEmpty(districtCodes) || !districtCodes.contains(districtCodeStatitical)) { - errorMap.put(COMMON_MDMS_DISTRICT, "The District code '" + districtCodeStatitical + "' does not exists"); - } - - if (CollectionUtils.isEmpty(postOfficeCodes) || !postOfficeCodes.contains(postOfficeCodePlace)) { - errorMap.put(COMMON_MDMS_POSTOFFICE, "The Postoffice code '" + postOfficeCodePlace + "' does not exists"); - } - - if (CollectionUtils.isEmpty(postOfficeCodes) || !postOfficeCodes.contains(postOfficeCodePresent)) { - errorMap.put(COMMON_MDMS_POSTOFFICE, "The Postoffice code '" + postOfficeCodePresent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(postOfficeCodes) || !postOfficeCodes.contains(postOfficeCodePermanent)) { - errorMap.put(COMMON_MDMS_POSTOFFICE, "The Postoffice code '" + postOfficeCodePermanent + "' does not exists"); - } - - if (CollectionUtils.isEmpty(institutionTypeCodes) || !institutionTypeCodes.contains(institutionTypeCodePlace)) { - errorMap.put(CR_MDMS_INSTITUTIONTYPE, "The Institution Type code '" + institutionTypeCodePlace + "' does not exists"); - } - - if (CollectionUtils.isEmpty(deliveryMethodCodes) || !deliveryMethodCodes.contains(deliveryMethodCode)) { - errorMap.put(CR_MDMS_DELIVERYMETHOD, "The Delivery Method code '" + deliveryMethodCode + "' does not exists"); - } - - if (CollectionUtils.isEmpty(lBTypeCodes) || !lBTypeCodes.contains(lBTypeCode)) { - errorMap.put(COMMON_MDMS_LBTYPE, "The LBType code '" + lBTypeCode + "' does not exists"); - } - - if (CollectionUtils.isEmpty(birthPlaceCodes) || !birthPlaceCodes.contains(birthPlaceCode)) { - errorMap.put(COMMON_MDMS_PLACEMASTER, "The Birth Place code '" + birthPlaceCode + "' does not exists"); - } - }); - - if (MapUtils.isNotEmpty(errorMap)) { - throw new CustomException(errorMap); - } - } - - private Map getBirthMasterData(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_BIRTH_JSONPATH); - } - - private Map getCommonMasterData(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.MDMS_COMMON_JSONPATH); - } - - private Map getTenantData(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.MDMS_TENANT_JSONPATH); - } - - private void validateTenantMasterData(Map masterData) { - if (masterData.get(BirthConstants.CR_MDMS_TENANTS) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.CR_MDMS_TENANTS - + " codes from MDMS")); - } - - } - - private void validateBirthMasterData(Map masterData) { - if (masterData.get(BirthConstants.CR_MDMS_PROFESSION) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.CR_MDMS_PROFESSION - + " codes from MDMS")); - } - - if (masterData.get(BirthConstants.CR_MDMS_QUALIFICATION) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.CR_MDMS_QUALIFICATION - + " codes from MDMS")); - } - - if (masterData.get(BirthConstants.COMMON_MDMS_INSTITUTION) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.COMMON_MDMS_INSTITUTION - + " codes from MDMS")); - } - - if (masterData.get(BirthConstants.COMMON_MDMS_MEDICAL_ATTENTION_TYPE) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.COMMON_MDMS_MEDICAL_ATTENTION_TYPE - + " codes from MDMS")); - } - } - - private void validateCommonMasterData(Map masterData) { - if (masterData.get(COMMON_MDMS_RELIGION) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.COMMON_MDMS_RELIGION - + " codes from MDMS")); - } - if (masterData.get(COMMON_MDMS_TALUK) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.COMMON_MDMS_TALUK - + " codes from MDMS")); - } - if (masterData.get(COMMON_MDMS_STATE) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.COMMON_MDMS_STATE - + " codes from MDMS")); - } - if (masterData.get(COMMON_MDMS_COUNTRY) == null) { - throw new CustomException(Collections.singletonMap(MDMS_DATA_ERROR.getCode(), - "Unable to fetch " - + BirthConstants.COMMON_MDMS_COUNTRY - + " codes from MDMS")); - } - } - //Tenant - private List getTenantCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TENANTS_CODE_JSONPATH); - } - - - // CR MASTERS - private List getProfessionCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_PROFESSION_CODE_JSONPATH); - } - - private List getQualificationCode(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_QUALIFICATION_CODE_JSONPATH); - } - - private List getInstitutionTypeCode(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_INTITUTIONTYPE_CODE_JSONPATH); - } - private List getdeliveryMethodCode(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_DELIVERYMETHOD_CODE_JSONPATH); - } - - // COMMON MASTERS - - private List getReligionCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_RELIGION_CODE_JSONPATH); - } - private List getTaulkCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TALUK_CODE_JSONPATH); - } - private List getStateCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_STATE_CODE_JSONPATH); - } - - private List getCountryCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_COUNTRY_CODE_JSONPATH); - } - private List getInstitutionCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_INSTITUTION_CODE_JSONPATH); - } - private List getMedicalCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_MEDICAL_ATTENTION_TYPE_CODE_JSONPATH); - } - - private List getVillageCode(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_VILLAGE_CODE_JSONPATH); - } - - private List getDistrictCode(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_DISTRICT_CODE_JSONPATH); - } - - private List getPostOfficeCode(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_POSTOFFICE_CODE_JSONPATH); - } - - private List getLbTypeCode(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_LBTYPE_CODE_JSONPATH); - } - - private List getBirthPlaceCode(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_PLACEMASTER_CODE_JSONPATH); - } -} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/MultipleBirthApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/MultipleBirthApplicationValidator.java deleted file mode 100644 index 08e6e74c7f9..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/MultipleBirthApplicationValidator.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.ksmart.birth.marriageapplication.validator; - -import org.egov.tracer.model.CustomException; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.utils.enums.ErrorCodes; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; - -import java.util.List; - -import static org.ksmart.birth.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; -@Component -public class MultipleBirthApplicationValidator { - - private final BirthConfiguration bndCofig; - private final MdmsValidator mdmsValidator; - - - @Autowired - MultipleBirthApplicationValidator(BirthConfiguration bndCofig, MdmsValidator mdmsValidator) { - - this.bndCofig = bndCofig; - - this.mdmsValidator = mdmsValidator; - } - - /** - * Validate abirth details create request. - * - * @param request the {@link BirthDetailsRequest} - */ - public void validateCreate(BirthDetailsRequest request, Object mdmsData) { - List applicantPersonals = request.getBirthDetails(); - if (CollectionUtils.isEmpty(request.getBirthDetails())) { - throw new CustomException(ErrorCodes.BIRTH_DETAILS_REQUIRED.getCode(), - "Birth details is required."); - } - - if (applicantPersonals.size() > request.getBirthDetails().get(0).getNoOfAliveBirth()) { // NOPMD - - throw new CustomException(BIRTH_DETAILS_REQUIRED.getCode(), - "Supports multiple Birth application create request."); - } - - mdmsValidator.validateMdmsData(request, mdmsData); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/controller/BirthCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/controller/BirthCorrectionController.java deleted file mode 100644 index 5cf17c5a59c..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/controller/BirthCorrectionController.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.ksmart.birth.marriagecorrection.controller; - - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriagecorrection.service.BirthCorrectionService; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationResponse; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.utils.ResponseInfoFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import java.util.List; - -@Slf4j -@RestController -@RequestMapping("/cr/birth/correction") -public class BirthCorrectionController { - - private final ResponseInfoFactory responseInfoFactory; - private final BirthCorrectionService birthCorrectionService; - - @Autowired - BirthCorrectionController(BirthCorrectionService birthCorrectionService, ResponseInfoFactory responseInfoFactory) { - this.birthCorrectionService = birthCorrectionService; - this.responseInfoFactory = responseInfoFactory; - } - - @PostMapping(value = { "/_create"}) - public ResponseEntity saveBirthDetails(@RequestBody BirthDetailsRequest request) { - List birthDetails = birthCorrectionService.saveBirthDetails(request); - return new ResponseEntity<>(birthDetails, HttpStatus.OK); - } - - @PostMapping(value = { "/_update"}) - public ResponseEntity updateBirthDetails(@RequestBody BirthDetailsRequest request) { - List birthDetails = birthCorrectionService.updateBirthDetails(request); - return new ResponseEntity<>(birthDetails, HttpStatus.OK); - } - - @PostMapping(value = { "/_search"}) - public ResponseEntity listByHospitalId(@RequestBody BirthDetailsRequest request, - @Valid @ModelAttribute BirthApplicationSearchCriteria criteria) { - List birthDetails = birthCorrectionService.searchBirthDetails(criteria); - BirthApplicationResponse response = BirthApplicationResponse.builder() - .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), - Boolean.TRUE)) - .birthDetails(birthDetails) - .build(); - return ResponseEntity.ok(response); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/enrichment/BaseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/enrichment/BaseEnrichment.java deleted file mode 100644 index 5af910820de..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/enrichment/BaseEnrichment.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.ksmart.birth.marriagecorrection.enrichment; - -import org.ksmart.birth.common.model.AuditDetails; - -public interface BaseEnrichment { - default AuditDetails buildAuditDetails(String by, Boolean create) { - AuditDetails auditDetails; - - Long currentTime = Long.valueOf(System.currentTimeMillis()); - if (create) { - auditDetails = AuditDetails.builder() - .createdBy(by) - .createdTime(currentTime) - .lastModifiedBy(by) - .lastModifiedTime(currentTime) - .build(); - } else { - auditDetails = AuditDetails.builder() - .lastModifiedBy(by) - .lastModifiedTime(currentTime) - .build(); - } - return auditDetails; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/enrichment/birth/BirthDetailsCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/enrichment/birth/BirthDetailsCorrectionEnrichment.java deleted file mode 100644 index 99161c3ce7e..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/enrichment/birth/BirthDetailsCorrectionEnrichment.java +++ /dev/null @@ -1,144 +0,0 @@ -package org.ksmart.birth.marriagecorrection.enrichment.birth; - -import org.apache.commons.collections4.CollectionUtils; -import org.egov.common.contract.request.RequestInfo; -import org.egov.common.contract.request.User; -import org.egov.tracer.model.CustomException; -import org.ksmart.birth.marriagecorrection.enrichment.BaseEnrichment; -import org.ksmart.birth.common.model.AuditDetails; -import org.ksmart.birth.common.repository.IdGenRepository; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.utils.enums.ErrorCodes; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.List; -import java.util.ListIterator; -import java.util.UUID; - - -@Component -public class BirthDetailsCorrectionEnrichment implements BaseEnrichment { - - @Autowired - BirthConfiguration config; - - @Autowired - IdGenRepository idGenRepository; - - public void enrichCreate(BirthDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); - request.getBirthDetails().forEach(birth -> { - - birth.setId(UUID.randomUUID().toString()); - - birth.setAuditDetails(auditDetails); - - birth.getBirthPlace().setId(UUID.randomUUID().toString()); - - birth.getBirthFatherInfo().setId(UUID.randomUUID().toString()); - - birth.getBirthMotherInfo().setId(UUID.randomUUID().toString()); - - birth.getBirthPermanentAddress().setId(UUID.randomUUID().toString()); - - birth.getBirthPresentAddress().setId(UUID.randomUUID().toString()); - }); - setApplicationNumbers(request); - setFileNumbers(request); - setRegistrationNumber(request); - } - - public void enrichUpdate(BirthDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); - - request.getBirthDetails() - .forEach(birth -> birth.setAuditDetails(auditDetails)); - } - - private void setApplicationNumbers(BirthDetailsRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthApplNumberIdName(), - config.getBirthApplNumberIdFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - - ListIterator itr = filecodes.listIterator(); - request.getBirthDetails() - .forEach(birth -> { - birth.setApplicationNo(itr.next()); - - }); - } - - private void setFileNumbers(BirthDetailsRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthFileNumberName(), - config.getBirthFileNumberFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getBirthDetails() - .forEach(birth -> { - birth.setFmFileNo(itr.next()); - birth.setFileDate(currentTime); - }); - } - - private void setRegistrationNumber(BirthDetailsRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthRegisNumberName(), - config.getBirthRegisNumberFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getBirthDetails() - .forEach(birth -> { - birth.setRegistrationNo(itr.next()); - birth.setRegistrationDate(currentTime); - }); - } - - private List getIds(RequestInfo requestInfo, String tenantId, String idKey, String idformat, - int count) { - return idGenRepository.getIdList(requestInfo, tenantId, idKey, idformat, count); - } - - private void validateFileCodes(List fileCodes, int count) { - if (CollectionUtils.isEmpty(fileCodes)) { - throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), "No file code(s) returned from idgen service"); - } - - if (fileCodes.size() != count) { - throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), - "The number of file code(s) returned by idgen service is not equal to the request count"); - } - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthApplicationResponse.java deleted file mode 100644 index e30c3729116..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthApplicationResponse.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.ksmart.birth.marriagecorrection.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.response.ResponseInfo; -import org.springframework.validation.annotation.Validated; - -import javax.validation.Valid; -import java.util.ArrayList; -import java.util.List; - -@Validated -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - - -public class BirthApplicationResponse { - - @JsonProperty("ResponseInfo") - private ResponseInfo responseInfo; - - @JsonProperty("BirthDetails") - @Valid - private List birthDetails; - - @JsonProperty("Count") - private int count; - - public BirthApplicationResponse addBirthApplication(BirthDetail birthDetail) { - if (birthDetails == null) { - birthDetails = new ArrayList<>(); - } - birthDetails.add(birthDetail); - return this; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthDetail.java deleted file mode 100644 index bf5065d07f8..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthDetail.java +++ /dev/null @@ -1,189 +0,0 @@ -package org.ksmart.birth.marriagecorrection.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; -import org.ksmart.birth.marriageapplication.model.birth.BirthStatisticalInformation; - -import javax.validation.constraints.Size; -import java.util.List; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthDetail { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @JsonProperty("dateofreport") - private Long dateOfReport; - - @JsonProperty("dateofbirth") - private Long dateOfBirth; - - @JsonProperty("timeofbirth") - private Long timeOfBirth; - - @Size(max = 20) - @JsonProperty("am_pm") - private String ampm; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 1000) - @JsonProperty("gender") - private String gender; - - @Size(max = 2500) - @JsonProperty("remarks_en") - private String remarksEn; - - @Size(max = 2500) - @JsonProperty("remarks_ml") - private String remarksMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 64) - @JsonProperty("esign_user_code") - private String esignUserCode; - - @Size(max = 64) - @JsonProperty("esign_user_desig_code") - private String esignUserDesigCode; - - @JsonProperty("is_adopted") - private Boolean isAdopted; - - @JsonProperty("is_abandoned") - private Boolean isAbandoned; - - @JsonProperty("is_multiple_birth") - private Boolean isMultipleBirth; - - @JsonProperty("is_father_info_missing") - private Boolean isFatherInfoMissing; - - @JsonProperty("is_mother_info_missing") - private Boolean isMotherInfoMissing; - - @JsonProperty("no_of_alive_birth") - private Integer noOfAliveBirth; - - @Size(max = 64) - @JsonProperty("multiplebirthdetid") - private String multipleBirthDeeailsIid; - - @JsonProperty("is_born_outside") - private Boolean isBornOutside; - - @Size(max = 64) - @JsonProperty("ot_passportno") - private String passportNo; - - @JsonProperty("ot_dateofarrival") - private Long dateOfArrival; - - @Size(max = 64) - @JsonProperty("applicationtype") - private String applicationType; - - @Size(max = 64) - @JsonProperty("businessservice") - private String businessService; - - @Size(max = 64) - @JsonProperty("workflowcode") - private String workFlowCode; - - @Size(max = 64) - @JsonProperty("fm_fileno") - private String fmFileNo; - - @JsonProperty("file_date") - private Long fileDate; - - @Size(max = 64) - @JsonProperty("applicationno") - private String applicationNo; - - @Size(max = 64) - @JsonProperty("registrationno") - private String registrationNo; - - @JsonProperty("registration_date") - private Long registrationDate; - - @Size(max = 64) - @JsonProperty("action") - private String action; - - @JsonProperty("assignee") - private List assignee; - - private String comment; - - @JsonProperty("WfDocuments") - private String WfDocuments; - - @Size(max = 64) - @JsonProperty("status") - private String status; - - @JsonProperty("birthPlace") - private BirthPlace birthPlace; - - @JsonProperty("birthFather") - private BirthFatherInfo birthFatherInfo; - - @JsonProperty("birthMother") - private BirthMotherInfo birthMotherInfo; - - @JsonProperty("birthPermanent") - private BirthPermanentAddress birthPermanentAddress; - - @JsonProperty("birthPresent") - private BirthPresentAddress birthPresentAddress; - - @JsonProperty("birthStatistical") - private BirthStatisticalInformation birthStatisticalInformation; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - - - -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthDetailsRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthDetailsRequest.java deleted file mode 100644 index f91a39d2b4f..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthDetailsRequest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.ksmart.birth.marriagecorrection.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.request.RequestInfo; -import org.springframework.validation.annotation.Validated; - -import javax.validation.Valid; -import java.util.List; - - -@Validated -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthDetailsRequest { - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; - - @JsonProperty("BirthDetails") - @Valid - private List birthDetails; - - public BirthDetailsRequest addBirthDetails(BirthDetail birthDetail) { - if (birthDetails == null) { - birthDetails = null; - } - return this; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthFatherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthFatherInfo.java deleted file mode 100644 index 21ba1d4140c..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthFatherInfo.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.ksmart.birth.marriagecorrection.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - - @Getter - @Setter - @AllArgsConstructor - @NoArgsConstructor - @Builder - - public class BirthFatherInfo { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 64) - @JsonProperty("ot_passportno") - private String passportNo; - - @Size(max = 300) - @JsonProperty("emailid") - private String emailId; - - @Size(max = 12) - @JsonProperty("mobileno") - private String mobileNo; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthMotherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthMotherInfo.java deleted file mode 100644 index 101e3e36206..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthMotherInfo.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.ksmart.birth.marriagecorrection.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthMotherInfo { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 64) - @JsonProperty("ot_passportno") - private String passportNo; - - @Size(max = 300) - @JsonProperty("emailid") - private String emailId; - - @Size(max = 12) - @JsonProperty("mobileno") - private String mobileNo; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPermanentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPermanentAddress.java deleted file mode 100644 index 8843e36e971..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPermanentAddress.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.ksmart.birth.marriagecorrection.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthPermanentAddress { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 200) - @JsonProperty("buildingno") - private String buildingNo; - - @Size(max = 200) - @JsonProperty("houseno") - private String houseNo; - - @Size(max = 250) - @JsonProperty("res_asso_no") - private String resAssoNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2500) - @JsonProperty("ot_address1_en") - private String otAddress1En; - - @Size(max = 2500) - @JsonProperty("ot_address1_ml") - private String otAddress1Ml; - - @Size(max = 2500) - @JsonProperty("ot_address2_en") - private String otAddress2En; - - @Size(max = 2500) - @JsonProperty("ot_address2_ml") - private String otAddress2Ml; - - @Size(max = 2500) - @JsonProperty("locality_en") - private String localityEn; - - @Size(max = 2500) - @JsonProperty("locality_ml") - private String localityMl; - - @Size(max = 2500) - @JsonProperty("city_en") - private String cityEn; - - @Size(max = 2500) - @JsonProperty("city_ml") - private String cityMl; - - @Size(max = 64) - @JsonProperty("villageid") - private String villageId; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 64) - @JsonProperty("talukid") - private String talukId; - - @Size(max = 64) - @JsonProperty("districtid") - private String districtId; - - @Size(max = 64) - @JsonProperty("stateid") - private String stateId; - - @Size(max = 64) - @JsonProperty("poid") - private String poId; - - @Size(max = 10) - @JsonProperty("pinno") - private String pinNo; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_en") - private String otStateRegionProvinceEn; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_ml") - private String otStateRegionProvinceMl; - - @Size(max = 64) - @JsonProperty("countryid") - private String countryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("same_as_permanent") - private Integer sameAsPermanent; - -} - - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPlace.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPlace.java deleted file mode 100644 index 44ed6c90d5e..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPlace.java +++ /dev/null @@ -1,205 +0,0 @@ -package org.ksmart.birth.marriagecorrection.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthPlace { - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @Size(max = 64) - @JsonProperty("placeofbirthid") - private String placeOfBirthId; - - @Size(max = 64) - @JsonProperty("hospitalid") - private String hospitalId; - - @Size(max = 64) - @JsonProperty("vehicletypeid") - private String vehicleTypeId; - - @Size(max = 64) - @JsonProperty("vehicle_registration_no") - private String vehicleRegistrationNo; - - @Size(max = 1000) - @JsonProperty("vehicle_from_en") - private String vehicleFromEn; - - @Size(max = 1000) - @JsonProperty("vehicle_to_en") - private String vehicleToEn; - - @Size(max = 1000) - @JsonProperty("vehicle_from_ml") - private String vehicleFromMl; - - @Size(max = 1000) - @JsonProperty("vehicle_to_ml") - private String vehicleToMl; - - @Size(max = 1000) - @JsonProperty("vehicle_other_en") - private String vehicleOtherEn; - - @Size(max = 1000) - @JsonProperty("vehicle_other_ml") - private String vehicleOtherMl; - - @Size(max = 1000) - @JsonProperty("vehicle_admit_hospital_en") - private String vehicleAdmitHospitalEn; - - @Size(max = 1000) - @JsonProperty("vehicle_admit_hospital_ml") - private String vehicleAdmitHospitalMl; - - @Size(max = 64) - @JsonProperty("public_place_id") - private String publicPlaceId; - - @Size(max = 2000) - @JsonProperty("ho_householder_en") - private String hoHouseHolderEn; - - @Size(max = 2000) - @JsonProperty("ho_householder_ml") - private String hoHouseHolderMl; - - @Size(max = 200) - @JsonProperty("ho_buildingno") - private String hoBuildingNo; - - @Size(max = 250) - @JsonProperty("ho_res_asso_no") - private String hoResAssoNo; - - @Size(max = 200) - @JsonProperty("ho_houseno") - private String hoHousenNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2000) - @JsonProperty("ho_locality_en") - private String hoLocalityEn; - - @Size(max = 2000) - @JsonProperty("ho_locality_ml") - private String hoLocalityMl; - - @Size(max = 64) - @JsonProperty("ho_villageid") - private String hoVillageId; - - @Size(max = 64) - @JsonProperty("ho_talukid") - private String hoTalukId; - - @Size(max = 64) - @JsonProperty("ho_districtid") - private String hoDistrictId; - - @Size(max = 2000) - @JsonProperty("ho_city_en") - private String hoCityEn; - - @Size(max = 2000) - @JsonProperty("ho_city_ml") - private String hoCityMl; - - @Size(max = 64) - @JsonProperty("ho_stateid") - private String hoStateId; - - @Size(max = 200) - @JsonProperty("ho_poid") - private String hoPoId; - - @Size(max = 10) - @JsonProperty("ho_pinno") - private String hoPinNo; - - @Size(max = 64) - @JsonProperty("ho_countryid") - private String hoCountryId; - - @Size(max = 64) - @JsonProperty("ward_id") - private String wardId; - - @Size(max = 2000) - @JsonProperty("oth_details_en") - private String othDetailsEn; - - @Size(max = 2000) - @JsonProperty("oth_details_ml") - private String othDetailsMl; - - @Size(max = 64) - @JsonProperty("institution_type_id") - private String institutionTypeId; - - @Size(max = 64) - @JsonProperty("institution_id") - private String institutionId; - - @Size(max = 64) - @JsonProperty("auth_officer_id") - private String authOfficerId; - - @Size(max = 64) - @JsonProperty("auth_officer_desig_id") - private String authOfficerDesigId; - - @Size(max = 2000) - @JsonProperty("oth_auth_officer_name") - private String othAuthOfficerName; - - @Size(max = 2000) - @JsonProperty("oth_auth_officer_desig") - private String othAuthOfficerDesig; - - @Size(max = 1000) - @JsonProperty("informantsname_en") - private String informantsNameEn; - - @Size(max = 1000) - @JsonProperty("informantsname_ml") - private String informantsNameMl; - - @Size(max = 2000) - @JsonProperty("informantsaddress_en") - private String informantsAddressEn; - - @Size(max = 2000) - @JsonProperty("informantsaddress_ml") - private String informantsAddressMl; - - @Size(max = 12) - @JsonProperty("informants_mobileno") - private String informantsMobileNo; - - @Size(max = 20) - @JsonProperty("informants_aadhaar_no") - private String informantsAadhaarNo; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPresentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPresentAddress.java deleted file mode 100644 index 613d97bf2dd..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthPresentAddress.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.ksmart.birth.marriagecorrection.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@ToString -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class BirthPresentAddress { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 200) - @JsonProperty("buildingno") - private String buildingNo; - - @Size(max = 200) - @JsonProperty("houseno") - private String houseNo; - - @Size(max = 250) - @JsonProperty("res_asso_no") - private String resAssoNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2500) - @JsonProperty("ot_address1_en") - private String otAddress1En; - - @Size(max = 2500) - @JsonProperty("ot_address1_ml") - private String otAddress1Ml; - - @Size(max = 2500) - @JsonProperty("ot_address2_en") - private String otAddress2En; - - @Size(max = 2500) - @JsonProperty("ot_address2_ml") - private String otAddress2Ml; - - @Size(max = 2500) - @JsonProperty("locality_en") - private String localityEn; - - @Size(max = 2500) - @JsonProperty("locality_ml") - private String localityMl; - - @Size(max = 2500) - @JsonProperty("city_en") - private String cityEn; - - @Size(max = 2500) - @JsonProperty("city_ml") - private String cityMl; - - @Size(max = 64) - @JsonProperty("villageid") - private String villageId; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 64) - @JsonProperty("talukid") - private String talukId; - - @Size(max = 64) - @JsonProperty("districtid") - private String districtId; - - @Size(max = 64) - @JsonProperty("stateid") - private String stateId; - - @Size(max = 64) - @JsonProperty("poid") - private String poId; - - @Size(max = 10) - @JsonProperty("pinno") - private String pinNo; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_en") - private String otStateRegionProvinceEn; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_ml") - private String otStateRegionProvinceMl; - - @Size(max = 64) - @JsonProperty("countryid") - private String countryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/BirthCorrectionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/BirthCorrectionRepository.java deleted file mode 100644 index 5b656a67f76..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/BirthCorrectionRepository.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriagecorrection.enrichment.birth.BirthDetailsCorrectionEnrichment; -import org.ksmart.birth.common.producer.BndProducer; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.marriageapplication.repository.querybuilder.BirthApplicationQueryBuilder; -import org.ksmart.birth.marriageapplication.repository.rowmapper.BirthApplicationRowMapper; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Repository; - -import java.util.ArrayList; -import java.util.List; - -@Slf4j -@Repository -public class BirthCorrectionRepository { - - private final BndProducer producer; - private final BirthConfiguration birthDeathConfiguration; - private final JdbcTemplate jdbcTemplate; - private final BirthApplicationQueryBuilder birthQueryBuilder; - private final BirthApplicationRowMapper birthApplicationRowMapper; - private final BirthDetailsCorrectionEnrichment birthDetailsCorrectionEnrichment; - - @Autowired - BirthCorrectionRepository(JdbcTemplate jdbcTemplate, BirthApplicationQueryBuilder birthQueryBuilder, - BirthApplicationRowMapper birthApplicationRowMapper, BirthDetailsCorrectionEnrichment birthDetailsCorrectionEnrichment, - BirthConfiguration birthDeathConfiguration, BndProducer producer) { - this.jdbcTemplate = jdbcTemplate; - this.birthQueryBuilder = birthQueryBuilder; - this.birthApplicationRowMapper = birthApplicationRowMapper; - this.birthDetailsCorrectionEnrichment = birthDetailsCorrectionEnrichment; - this.birthDeathConfiguration = birthDeathConfiguration; - this.producer = producer; - } - - public List saveBirthDetails(BirthDetailsRequest request) { - birthDetailsCorrectionEnrichment.enrichCreate(request); - producer.push(birthDeathConfiguration.getSaveBirthApplicationTopic(), request); - return request.getBirthDetails(); - } - - - public List updateBirthDetails(BirthDetailsRequest request) { - birthDetailsCorrectionEnrichment.enrichUpdate(request); - producer.push(birthDeathConfiguration.getUpdateBirthApplicationTopic(), request); - return request.getBirthDetails(); - } - - public List searchBirthDetails(BirthApplicationSearchCriteria criteria) { - List preparedStmtValues = new ArrayList<>(); - String query = birthQueryBuilder.getBirthApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), birthApplicationRowMapper); - return result; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/querybuilder/BaseCorrectionQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/querybuilder/BaseCorrectionQuery.java deleted file mode 100644 index 51277ef6e39..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/querybuilder/BaseCorrectionQuery.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.querybuilder; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Component; - -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -@Component -public class BaseCorrectionQuery { - void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, - List paramValues) { - - if (startDate != null || endDate != null) { - addWhereClause(paramValues, query); - query.append(" ("); - - if (startDate != null) { - query.append(column) - .append(" >= ? "); - paramValues.add(startDate); - } - - if (endDate != null) { - if (startDate != null) { - query.append(" AND "); - } - - query.append(column) - .append(" <= ? "); - paramValues.add(endDate); - } - - query.append(") "); - } - } - - void addFilters(String column, List ids, StringBuilder query, List paramValues) { - if (CollectionUtils.isNotEmpty(ids)) { - addWhereClause(paramValues, query); - query.append(column) - .append(" IN (") - .append(getStatementParameters(ids.size())) - .append(") "); - ids.forEach(paramValues::add); - } - } - - void addFilter(String column, String value, StringBuilder query, List paramValues) { - if (StringUtils.isNotBlank(value)) { - addWhereClause(paramValues, query); - query.append(column) - .append("=? "); - paramValues.add(value); - } - } - - void addWhereClause(List values, StringBuilder query) { - if (CollectionUtils.isEmpty(values)) { - query.append(" WHERE "); - } else { - query.append(" AND "); - } - } - - private String getStatementParameters(int count) { - return Collections.nCopies(count, "(?)") - .stream() - .collect(Collectors.joining(", ")); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/querybuilder/BirthCorrectionQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/querybuilder/BirthCorrectionQueryBuilder.java deleted file mode 100644 index 004c82252ab..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/querybuilder/BirthCorrectionQueryBuilder.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.querybuilder; - - -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.springframework.stereotype.Component; - -import javax.validation.constraints.NotNull; -import java.util.List; -@Component -public class BirthCorrectionQueryBuilder extends BaseCorrectionQuery { - private static final String QUERY = new StringBuilder() - .append("SELECT ebd.id, ebd.dateofreport, ebd.dateofbirth, ebd.timeofbirth, ebd.am_pm, ebd.firstname_en, ebd.firstname_ml, ebd.middlename_en,") - .append("ebd.middlename_ml, ebd.lastname_en, ebd.lastname_ml, ebd.tenantid, ebd.gender, ebd.remarks_en, ebd.remarks_ml, ebd.aadharno,") - .append("ebd.esign_user_code, ebd.esign_user_desig_code, ebd.is_adopted, ebd.is_abandoned, ebd.is_multiple_birth, ebd.is_father_info_missing,") - .append("ebd.is_mother_info_missing, ebd.no_of_alive_birth, ebd.multiplebirthdetid, ebd.is_born_outside, ebd.ot_passportno, ebd.ot_dateofarrival,") - .append("ebd.applicationtype, ebd.businessservice, ebd.workflowcode, ebd.fm_fileno, ebd.file_date, ebd.applicationno, ebd.registrationno,") - .append("ebd.registration_date, ebd.action, ebd.status, ebd.createdtime, ebd.createdby, ebd.lastmodifiedtime, ebd.lastmodifiedby, ebfi.id,") - .append("ebp.id, ebp.birthdtlid, ebp.placeofbirthid, ebp.hospitalid, ebp.vehicletypeid, ebp.vehicle_registration_no, ebp.vehicle_from_en, ebp.vehicle_to_en, ") - .append("ebp.vehicle_from_ml, ebp.vehicle_to_ml, ebp.vehicle_other_en, ebp.vehicle_other_ml, ebp.vehicle_admit_hospital_en, ebp.vehicle_admit_hospital_ml, ") - .append("ebp.public_place_id, ebp.ho_householder_en, ebp.ho_householder_ml, ebp.ho_buildingno, ebp.ho_res_asso_no, ebp.ho_houseno, ebp.ho_housename_en, ") - .append("ebp.ho_housename_ml, ebp.ho_locality_en, ebp.ho_locality_ml, ebp.ho_villageid, ebp.ho_talukid, ebp.ho_districtid, ebp.ho_city_en, ebp.ho_city_ml, ") - .append("ebp.ho_stateid, ebp.ho_poid, ebp.ho_pinno, ebp.ho_countryid, ebp.ward_id, ebp.oth_details_en, ebp.oth_details_ml, ebp.institution_type_id, ") - .append("ebp.institution_id, ebp.auth_officer_id, ebp.auth_officer_desig_id, ebp.oth_auth_officer_name, ebp.oth_auth_officer_desig, ebp.informantsname_en, ") - .append("ebp.informantsname_ml, ebp.informantsaddress_en, ebp.informantsaddress_ml, ebp.informants_mobileno, ebp.informants_aadhaar_no, ebp.is_born_outside, ") - .append("ebp.createdtime, ebp.createdby, ebp.lastmodifiedtime, ebp.lastmodifiedby,") - .append("ebfi.firstname_en, ebfi.firstname_ml, ebfi.middlename_en, ebfi.middlename_ml, ebfi.lastname_en, ebfi.lastname_ml, ebfi.aadharno,") - .append("ebfi.ot_passportno, ebfi.emailid, ebfi.mobileno, ebfi.createdtime, ebfi.createdby, ebfi.lastmodifiedtime, ebfi.lastmodifiedby,") - .append("ebfi.birthdtlid, ebmi.firstname_en, ebmi.firstname_ml, ebmi.middlename_en, ebmi.middlename_ml, ebmi.lastname_en, ebmi.lastname_ml,") - .append("ebmi.aadharno, ebmi.ot_passportno, ebmi.emailid, ebmi.mobileno, ebmi.createdtime, ebmi.createdby, ebmi.lastmodifiedtime, ebmi.lastmodifiedby,") - .append("ebmi.birthdtlid, eperad.resdnce_addr_type, eperad.buildingno, eperad.houseno, eperad.res_asso_no, eperad.housename_en, eperad.housename_ml,") - .append("eperad.ot_address1_en, eperad.ot_address1_ml, eperad.ot_address2_en, eperad.ot_address2_ml, eperad.locality_en, eperad.locality_ml, eperad.city_en,") - .append("eperad.city_ml, eperad.villageid, eperad.tenantid, eperad.talukid, eperad.districtid, eperad.stateid, eperad.poid, eperad.pinno,") - .append("eperad.ot_state_region_province_en, eperad.ot_state_region_province_ml, eperad.countryid, eperad.createdby, eperad.createdtime,") - .append("eperad.lastmodifiedby, eperad.lastmodifiedtime, eperad.birthdtlid, eperad.same_as_permanent, epreadd.buildingno, epreadd.houseno,") - .append("epreadd.res_asso_no, epreadd.housename_en, epreadd.housename_ml, epreadd.ot_address1_en, epreadd.ot_address1_ml, epreadd.ot_address2_en,") - .append("epreadd.ot_address2_ml, epreadd.locality_en, epreadd.locality_ml, epreadd.city_en, epreadd.city_ml, epreadd.villageid,") - .append("epreadd.tenantid, epreadd.talukid, epreadd.districtid, epreadd.stateid, epreadd.poid, epreadd.pinno, epreadd.ot_state_region_province_en,") - .append("epreadd.ot_state_region_province_ml, epreadd.countryid, epreadd.createdby, epreadd.createdtime, epreadd.lastmodifiedby, epreadd.lastmodifiedtime,") - .append("epreadd.birthdtlid, estat.weight_of_child, estat.duration_of_pregnancy_in_week, estat.nature_of_medical_attention, estat.way_of_pregnancy,") - .append("estat.delivery_method, estat.deliverytypeothers_en, estat.deliverytypeothers_ml, estat.religionid, estat.father_nationalityid,") - .append("estat.father_educationid, estat.father_education_subid, estat.father_proffessionid, estat.mother_educationid, estat.mother_education_subid,") - .append("estat.mother_proffessionid, estat.mother_nationalityid, estat.mother_age_marriage, estat.mother_age_delivery, estat.mother_no_of_birth_given,") - .append("estat.mother_maritalstatusid, estat.mother_unmarried, estat.mother_res_lbid, estat.mother_res_lb_code_id, estat.mother_res_place_type_id,") - .append("estat.mother_res_lb_type_id, estat.mother_res_district_id, estat.mother_res_state_id, estat.mother_res_country_id,") - .append("estat.mother_resdnce_addr_type, estat.mother_resdnce_tenant, estat.mother_resdnce_placetype, estat.mother_resdnce_place_en,") - .append("estat.mother_resdnce_place_ml, estat.mother_resdnce_lbtype, estat.mother_resdnce_district, estat.mother_resdnce_state,") - .append("estat.mother_resdnce_country, estat.birthdtlid, estat.createdby, estat.createdtime, estat.lastmodifiedtime, estat.lastmodifiedby") - .append(" FROM public.kl_birth_details ebd") - .append(" LEFT JOIN kl_birth_place ebp ON ebp.birthdtlid = ebd.id LEFT JOIN kl_birth_father_information ebfi ON ebfi.birthdtlid = ebd.id") - .append(" LEFT JOIN kl_birth_mother_information ebmi ON ebmi.birthdtlid = ebd.id") - .append(" LEFT JOIN kl_birth_permanent_address eperad ON eperad.birthdtlid = ebd.id") - .append(" LEFT JOIN kl_birth_present_address epreadd ON epreadd.birthdtlid = ebd.id") - .append(" LEFT JOIN kl_birth_statitical_information estat ON estat.birthdtlid = ebd.id").toString(); - - public String getBirthApplicationSearchQuery(@NotNull BirthApplicationSearchCriteria criteria, - @NotNull List preparedStmtValues, Boolean isCount) { - StringBuilder query = new StringBuilder(QUERY); - - addFilter("ebd.id", criteria.getId(), query, preparedStmtValues); - addFilter("ebd.tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("ebd.applicationno", criteria.getApplicationNo(), query, preparedStmtValues); - addFilter("ebd.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); - addFilter("ebd.fm_fileno", criteria.getFileCode(), query, preparedStmtValues); - - addDateRangeFilter("ebd.dateofreport", - criteria.getFromDate(), - criteria.getToDate(), - query, - preparedStmtValues); - - addDateRangeFilter("ebd.file_date", - criteria.getFromDateFile(), - criteria.getToDateFile(), - query, - preparedStmtValues); - return query.toString(); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BaseRowMapper.java deleted file mode 100644 index 8444bbe8598..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BaseRowMapper.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.rowmapper; - -import org.ksmart.birth.common.model.AuditDetails; - -import java.sql.ResultSet; -import java.sql.SQLException; - -interface BaseRowMapper { - - default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { - return AuditDetails.builder() - .createdBy(rs.getString("createdby")) - .createdTime(Long.valueOf(rs.getLong("createdtime"))) - .lastModifiedBy(rs.getString("lastmodifiedby")) - .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) - .build(); - } - -} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthCorrectionRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthCorrectionRowMapper.java deleted file mode 100644 index d79d2f9583c..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthCorrectionRowMapper.java +++ /dev/null @@ -1,65 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ResultSetExtractor; -import org.springframework.stereotype.Component; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; -@Component -public class BirthCorrectionRowMapper implements ResultSetExtractor>, BaseRowMapper, BirthPlaceRowMapper, - BirthFatherInfoRowMapper, BirthMotherInfoRowMapper, BirthPermanentAddressRowMapper, - BirthPresentAddressRowMapper,BirthStatInfoRowMapper { - - @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null - List result = new ArrayList<>(); - while (rs.next()) { - result.add(BirthApplicationDetail.builder() - .id(rs.getString("id")) - .dateOfReport(rs.getLong("dateofreport")) - .dateOfBirth(rs.getLong("dateofbirth")) - .timeOfBirth(rs.getLong("timeofbirth")) - .ampm(rs.getString("am_pm")) - .firstNameEn(rs.getString("firstname_en")) - .firstNameMl(rs.getString("firstname_ml")) - .middleNameEn(rs.getString("middlename_en")) - .middleNameMl(rs.getString("middlename_ml")) - .lastNameEn(rs.getString("lastname_en")) - .lastNameMl(rs.getString("lastname_ml")) - .tenantId(rs.getString("tenantid")) - .gender(rs.getString("gender")) - .remarksEn(rs.getString("remarks_en")) - .remarksMl(rs.getString("aadharno")) - .esignUserCode(rs.getString("esign_user_code")) - .esignUserDesigCode(rs.getString("esign_user_desig_code")) - .multipleBirthDetailsIid(rs.getString("multiplebirthdetid")) - .isBornOutside(Boolean.valueOf(rs.getString("is_born_outside"))) - .passportNo(rs.getString("ot_passportno")) - //.dateOfArrival(Long.valueOf(rs.getString("ot_dateofarrival"))) - .applicationType(rs.getString("applicationtype")) - .businessService(rs.getString("businessservice")) - .workFlowCode(rs.getString("workflowcode")) - .fmFileNo(rs.getString("fm_fileno")) - .fileDate(Long.valueOf(rs.getString("file_date"))) - .applicationNo(rs.getString("applicationno")) - .registrationNo(rs.getString("registrationno")) - .registrationDate(Long.valueOf(rs.getString("registration_date"))) - .action(rs.getString("action")) - .status(rs.getString("status")) - .birthPlace(getBirthPlace(rs)) - .birthFatherInfo(getBirthFatherInfo(rs)) - .birthMotherInfo(getBirthMotherInfo(rs)) - .birthPermanentAddress(getBirthPermanentAddress(rs)) - .birthPresentAddress(getBirthPresentAddress(rs)) - .birthStatisticalInformation(getBirthStatisticalInfo(rs)) - .auditDetails(getAuditDetails(rs)) - .build()); - } - - return result; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthFatherInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthFatherInfoRowMapper.java deleted file mode 100644 index c1fd101ad53..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthFatherInfoRowMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthFatherInfo; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthFatherInfoRowMapper { - default BirthFatherInfo getBirthFatherInfo(ResultSet rs) throws SQLException { - return BirthFatherInfo.builder() - .id(rs.getString("id")) - .firstNameEn(rs.getString("firstname_en")) - .firstNameMl(rs.getString("firstname_ml")) - .middleNameEn(rs.getString("middlename_en")) - .middleNameMl(rs.getString("middlename_ml")) - .lastNameEn(rs.getString("lastname_en")) - .lastNameMl(rs.getString("lastname_ml")) - .aadharNo(rs.getString("aadharno")) - .passportNo(rs.getString("ot_passportno")) - .emailId(rs.getString("emailid")) - .mobileNo(rs.getString("mobileno")) - .birthDtlId(rs.getString("birthdtlid")) - .build(); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthMotherInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthMotherInfoRowMapper.java deleted file mode 100644 index d1fe7477bda..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthMotherInfoRowMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthMotherInfo; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthMotherInfoRowMapper { - default BirthMotherInfo getBirthMotherInfo(ResultSet rs) throws SQLException { - return BirthMotherInfo.builder() - .id(rs.getString("id")) - .firstNameEn(rs.getString("firstname_en")) - .firstNameMl(rs.getString("firstname_ml")) - .middleNameEn(rs.getString("middlename_en")) - .middleNameMl(rs.getString("middlename_ml")) - .lastNameEn(rs.getString("lastname_en")) - .lastNameMl(rs.getString("lastname_ml")) - .aadharNo(rs.getString("aadharno")) - .passportNo(rs.getString("ot_passportno")) - .emailId(rs.getString("emailid")) - .mobileNo(rs.getString("mobileno")) - .birthDtlId(rs.getString("birthdtlid")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPermanentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPermanentAddressRowMapper.java deleted file mode 100644 index c012c8f1a9c..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPermanentAddressRowMapper.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthPermanentAddress; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthPermanentAddressRowMapper { - - default BirthPermanentAddress getBirthPermanentAddress(ResultSet rs) throws SQLException { - return BirthPermanentAddress.builder() - .id(rs.getString("id")) - .resdnceAddrType(rs.getString("resdnce_addr_type")) - .resAssoNo(rs.getString("res_asso_no")) - .houseNameEn(rs.getString("housename_en")) - .houseNameMl(rs.getString("housename_ml")) - .otAddress1En(rs.getString("ot_address1_en")) - .otAddress1Ml(rs.getString("ot_address1_ml")) - .otAddress2En(rs.getString("ot_address2_en")) - .otAddress2Ml(rs.getString("ot_address2_ml")) - .villageId(rs.getString("villageid")) - .tenantId(rs.getString("tenantid")) - .talukId(rs.getString("talukid")) - .districtId(rs.getString("districtid")) - .stateId(rs.getString("stateid")) - .poId(rs.getString("poid")) - .pinNo(rs.getString("pinno")) - .otStateRegionProvinceEn(rs.getString("ot_state_region_province_en")) - .otStateRegionProvinceMl(rs.getString("ot_state_region_province_ml")) - .countryId(rs.getString("countryid")) - .birthDtlId(rs.getString("birthdtlid")) - .sameAsPresent(Integer.valueOf(rs.getString("same_as_present"))) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPlaceRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPlaceRowMapper.java deleted file mode 100644 index bc45fea8ef3..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPlaceRowMapper.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthPlace; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthPlaceRowMapper { - default BirthPlace getBirthPlace(ResultSet rs) throws SQLException { - return BirthPlace.builder() - .id(rs.getString("id")) - .birthDtlId(rs.getString("birthdtlid")) - .placeOfBirthId(rs.getString("placeofbirthid")) - .hospitalId(rs.getString("hospitalid")) - .vehicleTypeId(rs.getString("vehicletypeid")) - .vehicleRegistrationNo(rs.getString("vehicle_registration_no")) - .vehicleFromEn(rs.getString("vehicle_from_en")) - .vehicleToEn(rs.getString("vehicle_to_en")) - .vehicleFromMl(rs.getString("vehicle_from_ml")) - .vehicleFromMl(rs.getString("vehicle_to_ml")) - .vehicleOtherEn(rs.getString("vehicle_other_en")) - .vehicleOtherMl(rs.getString("vehicle_other_ml")) - .vehicleAdmitHospitalEn(rs.getString("vehicle_admit_hospital_en")) - .vehicleAdmitHospitalMl(rs.getString("vehicle_admit_hospital_ml")) - .publicPlaceId(rs.getString("public_place_id")) - .hoHouseHolderEn(rs.getString("ho_householder_en")) - .hoHouseHolderMl(rs.getString("ho_householder_ml")) - .hoBuildingNo(rs.getString("ho_buildingno")) - .hoResAssoNo(rs.getString("ho_res_asso_no")) - .hoHousenNo(rs.getString("ho_houseno")) - .hoHouseHolderEn(rs.getString("ho_housename_en")) - .houseNameMl(rs.getString("ho_housename_ml")) - .hoVillageId(rs.getString("ho_villageid")) - .hoTalukId(rs.getString("ho_talukid")) - .hoTalukId(rs.getString("ho_districtid")) - .hoStateId(rs.getString("ho_stateid")) - .hoPoId(rs.getString("ho_poid")) - .hoPinNo(rs.getString("ho_pinno")) - .hoCountryId(rs.getString("ho_countryid")) - .wardId(rs.getString("ward_id")) - .othDetailsEn(rs.getString("oth_details_en")) - .othDetailsMl(rs.getString("oth_details_ml")) - .institutionTypeId(rs.getString("institution_type_id")) - .institutionId(rs.getString("institution_id")) - .authOfficerId(rs.getString("auth_officer_id")) - .authOfficerDesigId(rs.getString("auth_officer_desig_id")) - .othAuthOfficerName(rs.getString("oth_auth_officer_name")) - .othAuthOfficerDesig(rs.getString("oth_auth_officer_desig")) - .informantsNameEn(rs.getString("informantsname_en")) - .informantsAddressMl(rs.getString("informantsname_ml")) - .informantsAddressEn(rs.getString("informantsaddress_en")) - .informantsAddressMl(rs.getString("informantsaddress_ml")) - .informantsMobileNo(rs.getString("informants_mobileno")) - .informantsAadhaarNo(rs.getString("informants_aadhaar_no")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPresentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPresentAddressRowMapper.java deleted file mode 100644 index 3fcdeb9fe77..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthPresentAddressRowMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthPresentAddress; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthPresentAddressRowMapper { - - default BirthPresentAddress getBirthPresentAddress(ResultSet rs) throws SQLException { - return BirthPresentAddress.builder() - .id(rs.getString("id")) - //.re(rs.getString("resdnce_addr_type")) - .resAssoNo(rs.getString("res_asso_no")) - .houseNameEn(rs.getString("housename_en")) - .houseNameMl(rs.getString("housename_ml")) - .otAddress1En(rs.getString("ot_address1_en")) - .otAddress1Ml(rs.getString("ot_address1_ml")) - .otAddress2En(rs.getString("ot_address2_en")) - .otAddress2Ml(rs.getString("ot_address2_ml")) - .villageId(rs.getString("villageid")) - .tenantId(rs.getString("tenantid")) - .talukId(rs.getString("talukid")) - .districtId(rs.getString("districtid")) - .stateId(rs.getString("stateid")) - .poId(rs.getString("poid")) - .pinNo(rs.getString("pinno")) - .otStateRegionProvinceEn(rs.getString("ot_state_region_province_en")) - .otStateRegionProvinceMl(rs.getString("ot_state_region_province_ml")) - .countryId(rs.getString("countryid")) - .birthDtlId(rs.getString("birthdtlid")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthStatInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthStatInfoRowMapper.java deleted file mode 100644 index 64f7bf24639..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/repository/rowmapper/BirthStatInfoRowMapper.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.ksmart.birth.marriagecorrection.repository.rowmapper; - -import org.ksmart.birth.marriageapplication.model.birth.BirthStatisticalInformation; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthStatInfoRowMapper { - default BirthStatisticalInformation getBirthStatisticalInfo(ResultSet rs) throws SQLException { - return BirthStatisticalInformation.builder() - .id(rs.getString("id")) - .weightOfChild(Long.valueOf(rs.getString("weight_of_child"))) - .durationOfPregnancyInWeek(Integer.valueOf(rs.getString("duration_of_pregnancy_in_week"))) - .natureOfMedicalAttention(rs.getString("nature_of_medical_attention")) - .wayOfPregnancy(rs.getString("way_of_pregnancy")) - .deliveryMethod(rs.getString("delivery_method")) - .deliveryTypeOthersEn(rs.getString("deliverytypeothers_en")) - .deliveryTypeOthersMl(rs.getString("deliverytypeothers_ml")) - .religionId(rs.getString("religionid")) - .fatherNationalityId(rs.getString("father_nationalityid")) - .fatherEducationId(rs.getString("father_educationid")) - .fatherEducationSubId(rs.getString("father_education_subid")) - .fatherProffessionId(rs.getString("father_proffessionid")) - .motherEducationId(rs.getString("mother_educationid")) - .motherEducationSubId(rs.getString("mother_education_subid")) - .motherProffessionId(rs.getString("mother_proffessionid")) - .motherNationalityId(rs.getString("mother_nationalityid")) - //.motherAgeMarriage(Integer.valueOf(rs.getString("mother_age_marriage"))) - //.motherAgeDelivery(Integer.valueOf(rs.getString("mother_age_delivery"))) - .motherNoOfBirthGiven(Integer.valueOf(rs.getString("mother_no_of_birth_given"))) - .motherMaritalStatusId(rs.getString("mother_maritalstatusid")) -// .motherUnmarried(Integer.valueOf(rs.getString("mother_unmarried"))) -// .motherResLbId(Integer.valueOf(rs.getString("mother_res_lbid"))) -// .motherResLbCode(Integer.valueOf(rs.getString("mother_res_lb_code_id"))) -// .motherResPlaceTypeId(Integer.valueOf(rs.getString("mother_res_place_type_id"))) -// .motherResLbTypeId(Integer.valueOf(rs.getString("mother_res_lb_type_id"))) -// .motherResDistrictId(Integer.valueOf(rs.getString("mother_res_district_id"))) -// .motherResStateId(Integer.valueOf(rs.getString("mother_res_state_id"))) -// .motherResCountryId(Integer.valueOf(rs.getString("mother_res_country_id"))) - .motherResdnceAddrType(rs.getString("mother_resdnce_addr_type")) - .motherResdnceTenentId(rs.getString("mother_resdnce_tenant")) - .motherResdncePlaceType(rs.getString("mother_resdnce_placetype")) - .motherResdncePlaceEn(rs.getString("mother_resdnce_place_en")) - .motherResdncePlaceMl(rs.getString("mother_resdnce_place_ml")) - .motherResdnceLbType(rs.getString("mother_resdnce_lbtype")) - .motherResdnceDistrictId(rs.getString("mother_resdnce_district")) - .motherResdnceStateId(rs.getString("mother_resdnce_state")) - .motherResdnceCountryId(rs.getString("mother_resdnce_country")) - .birthDtlId(rs.getString("birthdtlid")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/service/BirthCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/service/BirthCorrectionService.java deleted file mode 100644 index 52114997d78..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/service/BirthCorrectionService.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.ksmart.birth.marriagecorrection.service; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriagecorrection.repository.BirthCorrectionRepository; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.workflow.WorkflowIntegrator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Slf4j -@Service -public class BirthCorrectionService { - - @Autowired - BirthCorrectionRepository repository; - - @Autowired - WorkflowIntegrator WorkflowIntegrator; - - - public List saveBirthDetails(BirthDetailsRequest request) { - - WorkflowIntegrator.callWorkFlow(request); - return repository.saveBirthDetails(request); - } - - public List updateBirthDetails(BirthDetailsRequest request) { - return repository.updateBirthDetails(request); - } - - public List searchBirthDetails(BirthApplicationSearchCriteria criteria) { - return repository.searchBirthDetails(criteria); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/validator/BirthDetailsValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/validator/BirthDetailsValidator.java deleted file mode 100644 index f11bf40aed0..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/validator/BirthDetailsValidator.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.ksmart.birth.marriagecorrection.validator; - -import org.egov.tracer.model.CustomException; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.utils.enums.ErrorCodes; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.util.CollectionUtils; - -public class BirthDetailsValidator { - private final BirthConfiguration bndCofig; - - - - @Autowired - public BirthDetailsValidator(BirthConfiguration bndCofig) { - this.bndCofig = bndCofig; - } - - /** - * Validate abirth details create request. - * - * @param request the {@link BirthDetailsRequest} - */ - public void validateCreate(BirthDetailsRequest request, Object mdmsData) { - if (CollectionUtils.isEmpty(request.getBirthDetails())) { - throw new CustomException(ErrorCodes.BIRTH_DETAILS_REQUIRED.getCode(), - "Birth details is required."); - } - - // mdmsValidator.validateMdmsData(request, mdmsData); - } - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/Calculation.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/Calculation.java deleted file mode 100644 index 72dec324638..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/Calculation.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.ksmart.birth.marriageregistry.calculation; - -import java.util.List; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - - -import org.ksmart.birth.marriageregistry.model.BirthCertificate; -import org.ksmart.birth.common.calculation.TaxHeadEstimate; -import org.springframework.validation.annotation.Validated; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - - -@Validated - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class Calculation { - - @JsonProperty("birthCertificateNo") - private String birthCertificateNo = null; - - @JsonProperty("birthCertificate") - private BirthCertificate birthCertificate = null; - - @NotNull - @JsonProperty("tenantId") - @Size(min = 2, max = 256) - private String tenantId = null; - - @JsonProperty("taxHeadEstimates") - List taxHeadEstimates; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalculationReq.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalculationReq.java deleted file mode 100644 index ec648c90dbb..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalculationReq.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.ksmart.birth.marriageregistry.calculation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.request.RequestInfo; - -import javax.validation.Valid; -import java.util.List; - - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class CalculationReq { - @JsonProperty("RequestInfo") - @Valid - private RequestInfo requestInfo = null; - - @JsonProperty("CalulationCriteria") - @Valid - private List calulationCriteria = null; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalculationRes.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalculationRes.java deleted file mode 100644 index 5a48379b943..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalculationRes.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.ksmart.birth.marriageregistry.calculation; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.response.ResponseInfo; - -import javax.validation.Valid; -import java.util.List; - - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -@ToString -public class CalculationRes { - @JsonProperty("ResponseInfo") - @Valid - private ResponseInfo responseInfo; - - @JsonProperty("Calculations") - @Valid - private List calculations; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalulationCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalulationCriteria.java deleted file mode 100644 index a2324d3ae8a..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/calculation/CalulationCriteria.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.ksmart.birth.marriageregistry.calculation; - -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - -import org.ksmart.birth.marriageregistry.model.BirthCertificate; -import org.springframework.validation.annotation.Validated; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -@Validated -@javax.annotation.Generated(value = "org.egov.codegen.SpringBootCodegen", date = "2018-09-27T14:56:03.454+05:30") - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class CalulationCriteria { - @JsonProperty("birthCertificate") - @Valid - private BirthCertificate birthCertificate = null; - - @JsonProperty("birthCertificateNo") - @Size(min=2,max=64) - private String birthCertificateNo = null; - - @JsonProperty("tenantId") - @NotNull@Size(min=2,max=256) - private String tenantId = null; - - -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/controller/RegistryBirthController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/controller/RegistryBirthController.java deleted file mode 100644 index 56a0c59bdcf..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/controller/RegistryBirthController.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.ksmart.birth.marriageregistry.controller; - -import lombok.extern.slf4j.Slf4j; - - -import org.ksmart.birth.marriageregistry.model.*; -import org.ksmart.birth.marriageregistry.model.BirthCertificate; -import org.ksmart.birth.marriageregistry.service.RegisterBirthService; -import org.ksmart.birth.common.contract.RequestInfoWrapper; -import org.ksmart.birth.utils.ResponseInfoFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import java.util.List; - -@Slf4j -@RestController -@RequestMapping("/cr/registry") -public class RegistryBirthController { - - private final ResponseInfoFactory responseInfoFactory; - private final RegisterBirthService registerBirthService; - - @Autowired - RegistryBirthController(RegisterBirthService registerBirthService, ResponseInfoFactory responseInfoFactory) { - this.registerBirthService=registerBirthService; - this.responseInfoFactory=responseInfoFactory; - } - - - @PostMapping(value = {"/_create"}) - public ResponseEntity saveRegisterBirthDetails(@RequestBody RegisterBirthDetailsRequest request) { - List registerBirthDetails=registerBirthService.saveRegisterBirthDetails(request); - return new ResponseEntity<>(registerBirthDetails, HttpStatus.OK); - } - - @PostMapping(value = {"/_update"}) - public ResponseEntity updateRegisterBirthDetails(@RequestBody RegisterBirthDetailsRequest request) { - List registerBirthDetails=registerBirthService.updateRegisterBirthDetails(request); - return new ResponseEntity<>(registerBirthDetails, HttpStatus.OK); - } - - @PostMapping(value = {"/_search"}) - public ResponseEntity listByHospitalId(@RequestBody RegisterBirthDetailsRequest request, @Valid @ModelAttribute RegisterBirthSearchCriteria criteria) { - List registerBirthDetail=registerBirthService.searchRegisterBirthDetails(criteria); - RegisterBirthResponse response=RegisterBirthResponse.builder() - .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) - .registerDetails(registerBirthDetail) - .build(); - return ResponseEntity.ok(response); - } - - @PostMapping(value = {"/_download"}) - public ResponseEntity download(@RequestBody RequestInfoWrapper requestInfoWrapper, @Valid @ModelAttribute RegisterBirthSearchCriteria criteria) { - BirthCertificate birthCert=registerBirthService.download(criteria, requestInfoWrapper.getRequestInfo()); - BirthCertResponse response; - response=BirthCertResponse.builder() - .filestoreId(birthCert.getFilestoreid()) - .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(), true)) - .build(); - return new ResponseEntity<>(response, HttpStatus.OK); - } - -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/enrichment/RegisterBirthEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/enrichment/RegisterBirthEnrichment.java deleted file mode 100644 index c7b6a95c9aa..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/enrichment/RegisterBirthEnrichment.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.ksmart.birth.marriageregistry.enrichment; - -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetailsRequest; -import org.ksmart.birth.common.model.AuditDetails; -import org.ksmart.birth.marriageapplication.enrichment.BaseEnrichment; -import org.egov.common.contract.request.RequestInfo; -import org.egov.common.contract.request.User; -import org.springframework.stereotype.Component; - -import java.util.UUID; -@Component -public class RegisterBirthEnrichment implements BaseEnrichment { - - public void enrichCreate(RegisterBirthDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); - - request.getRegisterBirthDetails().forEach(register -> { - - register.setId(UUID.randomUUID().toString()); - register.setRegistrationDate(System.currentTimeMillis()); - register.setAuditDetails(auditDetails); - - register.getRegisterBirthPlace().setId(UUID.randomUUID().toString()); - - register.getRegisterBirthFather().setId(UUID.randomUUID().toString()); - - register.getRegisterBirthMother().setId(UUID.randomUUID().toString()); - - register.getRegisterBirthPermanent().setId(UUID.randomUUID().toString()); - - register.getRegisterBirthPresent().setId(UUID.randomUUID().toString()); - - register.getRegisterBirthStatitical().setId(UUID.randomUUID().toString()); - }); - } - - public void enrichUpdate(RegisterBirthDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); - - request.getRegisterBirthDetails() - .forEach(personal -> personal.setAuditDetails(auditDetails)); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertRequest.java deleted file mode 100644 index 449b204f642..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertRequest.java +++ /dev/null @@ -1,33 +0,0 @@ - -package org.ksmart.birth.marriageregistry.model; - -import org.egov.common.contract.request.RequestInfo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import lombok.ToString; - - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -@ToString -public class BirthCertRequest { - - - @JsonProperty("RequestInfo") - private RequestInfo requestInfo = null; - - @JsonProperty("birthCertificate") - private BirthCertificate birthCertificate = null; - - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertResponse.java deleted file mode 100644 index 3fefb59f7d1..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertResponse.java +++ /dev/null @@ -1,39 +0,0 @@ - -package org.ksmart.birth.marriageregistry.model; - -import org.egov.common.contract.response.ResponseInfo; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -import java.util.List; - - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthCertResponse { - - @JsonProperty("responseInfo") - private ResponseInfo responseInfo = null; - - @JsonProperty("birthCertificate") - private List birthCertificates = null; - - @JsonProperty("filestoreId") - private String filestoreId; - - @JsonProperty("consumerCode") - private String consumerCode; - - @JsonProperty("tenantId") - private String tenantId; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertificate.java deleted file mode 100644 index a168ef75943..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthCertificate.java +++ /dev/null @@ -1,136 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; - -import java.sql.Timestamp; -import java.util.List; - -import org.ksmart.birth.common.model.Amount; -import org.ksmart.birth.common.model.AuditDetails; -import org.egov.common.contract.request.User; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonValue; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -//import org.ksmart.birth.birthregistry.calculation.Calculation; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthCertificate { - - @JsonProperty("citizen") - private User citizen = null; - - @JsonProperty("id") - private String id = null; - - @JsonProperty("tenantId") - private String tenantId; - - @JsonProperty("businessService") - private String businessService = null; - - @JsonProperty("birthCertificateNo") - private String birthCertificateNo = null; - - @JsonProperty("additionalDetail") - private Object additionalDetail = null; - - @JsonProperty("source") - private String source = null; - - @JsonProperty("taxPeriodFrom") - private Long taxPeriodFrom = null; - - @JsonProperty("taxPeriodTo") - private Long taxPeriodTo = null; - -// @JsonProperty("calculation") -// private Calcu calculation; - - @JsonProperty("amount") - private List amount; - - @JsonProperty("birthDtlId") - private String birthDtlId = null; - - @JsonProperty("filestoreid") - private String filestoreid = null; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails = null; - - @JsonProperty("gender") - private String gender = null; - - @JsonProperty("birthPlace") - private String birthPlace = null; - - @JsonProperty("state") - private String state = null; - - @JsonProperty("ward") - private String ward = null; - - @JsonProperty("district") - private String district = null; - - public enum StatusEnum { - ACTIVE("ACTIVE"), - - CANCELLED("CANCELLED"), - - FREE_DOWNLOAD("FREE_DOWNLOAD"), - - PAID_DOWNLOAD("PAID_DOWNLOAD"), - - PAID_PDF_GENERATED("PAID_PDF_GENERATED"), - - PAID("PAID"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @Override - @JsonValue - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String text) { - for (StatusEnum b : StatusEnum.values()) { - if (String.valueOf(b.value).equals(text)) { - return b; - } - } - return null; - } - } - - @JsonProperty("applicationStatus") - private StatusEnum applicationStatus = null; - - @JsonProperty("counter") - private Integer counter ; - - private String embeddedUrl; - - private Long dateofissue; - - private Timestamp dateofbirth; - - private Timestamp dateofreport; - - private String year; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthPdfRegisterRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthPdfRegisterRequest.java deleted file mode 100644 index e58b52b5373..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/BirthPdfRegisterRequest.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.request.RequestInfo; -import org.springframework.validation.annotation.Validated; - -import java.util.List; -@Validated -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BirthPdfRegisterRequest { - @JsonProperty("RequestInfo") - private RequestInfo requestInfo = null; - - @JsonProperty("BirthCertificate") - private List birthCertificate; -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthDetail.java deleted file mode 100644 index 2db2bc18054..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthDetail.java +++ /dev/null @@ -1,163 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class RegisterBirthDetail { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @JsonProperty("dateofreport") - private Long dateOfReport; - - @JsonProperty("dateofbirthstr") - private String dobStr; - - @JsonProperty("dateofbirth") - private Long dateOfBirth; - - @JsonProperty("timeofbirth") - private Long timeOfBirth; - - @Size(max = 20) - @JsonProperty("am_pm") - private String ampm; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 1000) - @JsonProperty("gender") - private String gender; - - @Size(max = 2500) - @JsonProperty("remarks_en") - private String remarksEn; - - @Size(max = 2500) - @JsonProperty("remarks_ml") - private String remarksMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 64) - @JsonProperty("esign_user_code") - private String esignUserCode; - - @Size(max = 64) - @JsonProperty("esign_user_desig_code") - private String esignUserDesigCode; - - @JsonProperty("is_adopted") - private Boolean isAdopted; - - @JsonProperty("is_abandoned") - private Boolean isAbandoned; - - @JsonProperty("is_multiple_birth") - private Boolean isMultipleBirth; - - @JsonProperty("is_father_info_missing") - private Boolean isFatherInfoMissing; - - @JsonProperty("is_mother_info_missing") - private Boolean isMotherInfoMissing; - - @JsonProperty("no_of_alive_birth") - private Integer noOfAliveBirth; - - @Size(max = 64) - @JsonProperty("multiplebirthdetid") - private String multipleBirthDetId; - - @JsonProperty("is_born_outside") - private Boolean isBornOutside; - - @Size(max = 100) - @JsonProperty("ot_passportno") - private String otPassportNo; - - @Size(max = 64) - @JsonProperty("registrationno") - private String registrationNo; - - @Size(max = 64) - @JsonProperty("registration_status") - private String registrationStatus; - - @JsonProperty("registration_date") - private Long registrationDate; - - @JsonProperty("registration_date_str") - private String registrationDateStr; - - @JsonProperty("registerBirthPlace") - private RegisterBirthPlace registerBirthPlace; - - @JsonProperty("registerBirthFather") - private RegisterBirthFatherInfo registerBirthFather; - - @JsonProperty("registerBirthMother") - private RegisterBirthMotherInfo registerBirthMother; - - @JsonProperty("registerBirthPermanent") - private RegisterBirthPermanentAddress registerBirthPermanent; - - @JsonProperty("registerBirthPresent") - private RegisterBirthPresentAddress registerBirthPresent; - - @JsonProperty("registerBirthStatitical") - private RegisterBirthStatiticalInformation registerBirthStatitical; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - /// for PDF SERVICE - private String fullName; - private String fullNameMl; - private String embeddedUrl; - private String dateofbirth; - private String registrationno; - private String dateofreport; - private Long dateofissue; - private Long remarks; - private String certId; - private String placeofbirth; - private String certificateType; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthDetailsRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthDetailsRequest.java deleted file mode 100644 index 73625dceea5..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthDetailsRequest.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.request.RequestInfo; -import org.springframework.validation.annotation.Validated; - -import javax.validation.Valid; -import java.util.List; - -@Validated -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class RegisterBirthDetailsRequest { - - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; - - @JsonProperty("RegisterBirthDetails") - @Valid - private List registerBirthDetails; - - public RegisterBirthDetailsRequest addRegisterBirthDetails(RegisterBirthDetail registerBirthDetail) { - if (registerBirthDetails == null) { - registerBirthDetails = null; - } - return this; - } - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthFatherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthFatherInfo.java deleted file mode 100644 index 5ce38f0cf62..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthFatherInfo.java +++ /dev/null @@ -1,73 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class RegisterBirthFatherInfo { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 100) - @JsonProperty("ot_passportno") - private String otPassportNo; - - @Size(max = 300) - @JsonProperty("emailid") - private String emailId; - - @Size(max = 12) - @JsonProperty("mobileno") - private String mobileNo; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - @Size(max = 64) - @JsonProperty("bio_adopt") - private String bioAdopt; - - @Size(max = 64) - @JsonProperty("father_fullname") - private String fatherFullName; - @Size(max = 64) - @JsonProperty("father_fullname_ml") - private String fatherFullNameMl; - private String aadharno; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthMotherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthMotherInfo.java deleted file mode 100644 index afd1f26f63e..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthMotherInfo.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class RegisterBirthMotherInfo { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 100) - @JsonProperty("ot_passportno") - private String otPassportNo; - - @Size(max = 300) - @JsonProperty("emailid") - private String emailId; - - @Size(max = 12) - @JsonProperty("mobileno") - private String mobileNo; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - @Size(max = 64) - @JsonProperty("bio_adopt") - private String bioAdopt; - - - @Size(max = 64) - @JsonProperty("mother_fullname") - private String motherFullName; - @Size(max = 64) - @JsonProperty("mother_fullname_ml") - private String motherFullNameMl; - - private String aadharno; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPermanentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPermanentAddress.java deleted file mode 100644 index 1694ca60fc3..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPermanentAddress.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class RegisterBirthPermanentAddress { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 200) - @JsonProperty("resdnce_addr_type") - private String resdnceAddrType; - @Size(max = 250) - @JsonProperty("res_asso_no") - private String resAssoNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2500) - @JsonProperty("ot_address1_en") - private String otAddress1En; - - @Size(max = 2500) - @JsonProperty("ot_address1_ml") - private String otAddress1Ml; - - @Size(max = 2500) - @JsonProperty("ot_address2_en") - private String otAddress2En; - - @Size(max = 2500) - @JsonProperty("ot_address2_ml") - private String otAddress2Ml; - - @Size(max = 64) - @JsonProperty("villageid") - private String villageId; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 64) - @JsonProperty("talukid") - private String talukId; - - @Size(max = 64) - @JsonProperty("districtid") - private String districtId; - - @Size(max = 64) - @JsonProperty("stateid") - private String stateId; - - @Size(max = 64) - @JsonProperty("poid") - private String poId; - - @Size(max = 10) - @JsonProperty("pinno") - private String pinNo; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_en") - private String otStateRegionProvinceEn; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_ml") - private String otStateRegionProvinceMl; - - @Size(max = 64) - @JsonProperty("countryid") - private String countryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("same_as_present") - private Integer sameAsPresent; - - @Size(max = 64) - @JsonProperty("bio_adopt") - private String bioAdopt; - - @Size(max = 250) - @JsonProperty("res_asso_no_ml") - private String resAssoNoMl; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - - @Size(max = 1000) - @JsonProperty("taluk_name") - private String talukName; - - @Size(max = 1000) - @JsonProperty("village_name") - private String villageName; - - @Size(max = 64) - @JsonProperty("ward_code") - private String wardCode; - - @JsonProperty("doorno") - private String doorNo; - - @Size(max = 10) - @JsonProperty("subno") - private String subNo; - - @Size(max = 10) - @JsonProperty("ot_zipcode") - private String otZipcode; - - private String fullAddress; - - private String city; - - private String streetname; - - private String tehsil; - - private String district; - - private String state; - - private String permanentAddress; - - private String permanentAddressMl; - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPlace.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPlace.java deleted file mode 100644 index 503acb48759..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPlace.java +++ /dev/null @@ -1,210 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class RegisterBirthPlace { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @Size(max = 64) - @JsonProperty("placeofbirthid") - private String placeOfBirthId; - - @Size(max = 64) - @JsonProperty("hospitalid") - private String hospitalId; - - @Size(max = 64) - @JsonProperty("vehicletypeid") - private String vehicleTypeId; - - @Size(max = 64) - @JsonProperty("vehicle_registration_no") - private String vehicleRegistrationNo; - - @Size(max = 1000) - @JsonProperty("vehicle_from_en") - private String vehicleFromEn; - - @Size(max = 1000) - @JsonProperty("vehicle_to_en") - private String vehicleToEn; - - @Size(max = 1000) - @JsonProperty("vehicle_from_ml") - private String vehicleFromMl; - - @Size(max = 1000) - @JsonProperty("vehicle_to_ml") - private String vehicleToMl; - - @Size(max = 1000) - @JsonProperty("vehicle_other_en") - private String vehicleOtherEn; - - @Size(max = 1000) - @JsonProperty("vehicle_other_ml") - private String vehicleOtherMl; - - @Size(max = 1000) - @JsonProperty("vehicle_admit_hospital_en") - private String vehicleAdmitHospitalEn; - - @Size(max = 1000) - @JsonProperty("vehicle_admit_hospital_ml") - private String vehicleAdmitHospitalMl; - - @Size(max = 64) - @JsonProperty("public_place_id") - private String publicPlaceId; - - @Size(max = 2000) - @JsonProperty("ho_householder_en") - private String hoHouseHolderEn; - - @Size(max = 2000) - @JsonProperty("ho_householder_ml") - private String hoHouseHolderMl; - - @Size(max = 200) - @JsonProperty("ho_buildingno") - private String hoBuildingNo; - - @Size(max = 200) - @JsonProperty("ho_res_asso_no") - private String hoResAssoNo; - - @Size(max = 200) - @JsonProperty("ho_houseno") - private String hoHousenNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 64) - @JsonProperty("ho_villageid") - private String hoVillageId; - - @Size(max = 64) - @JsonProperty("ho_talukid") - private String hoTalukId; - - @Size(max = 64) - @JsonProperty("ho_districtid") - private String hoDistrictId; - - @Size(max = 64) - @JsonProperty("ho_stateid") - private String hoStateId; - - @Size(max = 200) - @JsonProperty("ho_poid") - private String hoPoId; - - @Size(max = 10) - @JsonProperty("ho_pinno") - private String hoPinNo; - - @Size(max = 64) - @JsonProperty("ho_countryid") - private String hoCountryId; - - @Size(max = 64) - @JsonProperty("ward_id") - private String wardId; - - @Size(max = 2000) - @JsonProperty("oth_details_en") - private String othDetailsEn; - - @Size(max = 2000) - @JsonProperty("oth_details_ml") - private String othDetailsMl; - - @Size(max = 64) - @JsonProperty("institution_type_id") - private String institutionTypeId; - - @Size(max = 64) - @JsonProperty("institution_id") - private String institutionId; - - @Size(max = 64) - @JsonProperty("auth_officer_id") - private String authOfficerId; - - @Size(max = 64) - @JsonProperty("auth_officer_desig_id") - private String authOfficerDesigId; - - @Size(max = 2000) - @JsonProperty("oth_auth_officer_name") - private String othAuthOfficerName; - - @Size(max = 2000) - @JsonProperty("oth_auth_officer_desig") - private String othAuthOfficerDesig; - - @Size(max = 1000) - @JsonProperty("informantsname_en") - private String informantsNameEn; - - @Size(max = 1000) - @JsonProperty("informantsname_ml") - private String informantsNameMl; - - @Size(max = 2000) - @JsonProperty("informantsaddress_en") - private String informantsAddressEn; - - @Size(max = 2000) - @JsonProperty("informantsaddress_ml") - private String informantsAddressMl; - - @Size(max = 12) - @JsonProperty("informants_mobileno") - private String informantsMobileNo; - - @Size(max = 20) - @JsonProperty("informants_aadhaar_no") - private String informantsAadhaarNo; - - - @JsonProperty("ho_doorno") - private Boolean hoDoorno; - - @Size(max = 10) - @JsonProperty("ho_subno") - private String hoSubno; - - @Size(max = 1000) - @JsonProperty("vehicle_haltplace") - private String vehicleHaltplace; - - @Size(max = 64) - @JsonProperty("vehicle_hospitalid") - private String vehicleHospitalid; - - @Size(max = 64) - @JsonProperty("informant_addressline2") - private String informantAddressline2; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPresentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPresentAddress.java deleted file mode 100644 index e5e3863ce37..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthPresentAddress.java +++ /dev/null @@ -1,133 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder - -public class RegisterBirthPresentAddress { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 200) - @JsonProperty("resdnce_addr_type") - private String resdnceAddrType; - - @Size(max = 250) - @JsonProperty("res_asso_no") - private String resAssoNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2500) - @JsonProperty("ot_address1_en") - private String otAddress1En; - - @Size(max = 2500) - @JsonProperty("ot_address1_ml") - private String otAddress1Ml; - - @Size(max = 2500) - @JsonProperty("ot_address2_en") - private String otAddress2En; - - @Size(max = 2500) - @JsonProperty("ot_address2_ml") - private String otAddress2Ml; - - @Size(max = 64) - @JsonProperty("villageid") - private String villageId; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 64) - @JsonProperty("talukid") - private String talukId; - - @Size(max = 64) - @JsonProperty("districtid") - private String districtId; - - @Size(max = 64) - @JsonProperty("stateid") - private String stateId; - - @Size(max = 64) - @JsonProperty("poid") - private String poId; - - @Size(max = 10) - @JsonProperty("pinno") - private String pinNo; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_en") - private String otStateRegionProvinceEn; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_ml") - private String otStateRegionProvinceMl; - - @Size(max = 64) - @JsonProperty("countryid") - private String countryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - @Size(max = 64) - @JsonProperty("bio_adopt") - private String bioAdopt; - - @Size(max = 250) - @JsonProperty("res_asso_no_ml") - private String resAssoNoMl; - - @Size(max = 1000) - @JsonProperty("taluk_name") - private String talukName; - - @Size(max = 1000) - @JsonProperty("village_name") - private String villageName; - - @Size(max = 64) - @JsonProperty("ward_code") - private String wardCode; - - @JsonProperty("doorno") - private String doorNo; - - @Size(max = 10) - @JsonProperty("subno") - private String subNo; - - @Size(max = 10) - @JsonProperty("ot_zipcode") - private String otZipcode; - - @Size(max = 2500) - private String presentAddress; - @Size(max = 2500) - private String presentAddressMl; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthResponse.java deleted file mode 100644 index 5fce01ada27..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthResponse.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.response.ResponseInfo; -import org.springframework.validation.annotation.Validated; - -import javax.validation.Valid; -import java.util.ArrayList; -import java.util.List; -@Validated -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class RegisterBirthResponse { - - @JsonProperty("ResponseInfo") - private ResponseInfo responseInfo; - - @JsonProperty("RegisterBirthDetails") - @Valid - private List registerDetails; - - @JsonProperty("Count") - private int count; - - public RegisterBirthResponse addRegisterBirth(RegisterBirthDetail registerBirthDetail) { - if (registerDetails == null) { - registerDetails = new ArrayList<>(); - } - registerDetails.add(registerBirthDetail); - return this; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthSearchCriteria.java deleted file mode 100644 index f43a64111cc..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthSearchCriteria.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.Valid; -@Data -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class RegisterBirthSearchCriteria { - @JsonProperty("tenantId") - private String tenantId; - - @JsonProperty("id") - private String id; // birthapplicant id - - @JsonProperty("registrationNo") - private String registrationNo; - @JsonProperty("fromDate") - private Long fromDate; // report date - - @JsonProperty("toDate") - private Long toDate; // report date - - @JsonProperty("fromDateReg") - private Long fromDateReg; // Registration date - - @JsonProperty("toDateReg") - private Long toDateReg; // Registration date - - @JsonProperty("aadhaarNo") - private String aadhaarNo; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("limit") - private Integer limit; - - @JsonProperty("dateOfBirth") - @Valid - private String dateOfBirth; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthStatiticalInformation.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthStatiticalInformation.java deleted file mode 100644 index fea1db3d99b..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/model/RegisterBirthStatiticalInformation.java +++ /dev/null @@ -1,170 +0,0 @@ -package org.ksmart.birth.marriageregistry.model; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.birth.common.model.AuditDetails; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class RegisterBirthStatiticalInformation { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @JsonProperty("weight_of_child") - private Long weightOfChild; - - @JsonProperty("duration_of_pregnancy_in_week") - private Integer durationOfPregnancyInWeek; - - @Size(max = 64) - @JsonProperty("nature_of_medical_attention") - private String natureOfMedicalAttention; - - @Size(max = 64) - @JsonProperty("way_of_pregnancy") - private String wayOfPregnancy; - - @Size(max = 64) - @JsonProperty("delivery_method") - private String deliveryMethod; - - @Size(max = 1000) - @JsonProperty("deliverytypeothers_en") - private String deliveryTypeOthersEn; - - @Size(max = 1000) - @JsonProperty("deliverytypeothers_ml") - private String deliveryTypeOthersMl; - - @Size(max = 64) - @JsonProperty("religionid") - private String religionId; - - @Size(max = 64) - @JsonProperty("father_nationalityid") - private String fatherNationalityId; - - @Size(max = 64) - @JsonProperty("father_educationid") - private String fatherEducationId; - - @Size(max = 64) - @JsonProperty("father_education_subid") - private String fatherEducationSubId; - - @Size(max = 64) - @JsonProperty("father_proffessionid") - private String fatherProffessionId; - - @Size(max = 64) - @JsonProperty("mother_educationid") - private String motherEducationId; - - @Size(max = 64) - @JsonProperty("mother_education_subid") - private String motherEducationSubId; - - @Size(max = 64) - @JsonProperty("mother_proffessionid") - private String motherProffessionId; - - @Size(max = 64) - @JsonProperty("mother_nationalityid") - private String motherNationalityId; - - @JsonProperty("mother_age_marriage") - private Integer motherAgeMarriage; - - @JsonProperty("mother_age_delivery") - private Integer motherAgeDelivery; - - @JsonProperty("mother_no_of_birth_given") - private Integer motherNoOfBirthGiven; - - @JsonProperty("mother_order_of_cur_delivery") - private Integer motherOrderOfCurDelivery; - - @JsonProperty("mother_order_cur_child") - private Integer motherOrderCurChild; - - @Size(max = 64) - @JsonProperty("mother_maritalstatusid") - private String motherMaritalStatusId; - - @JsonProperty("mother_unmarried") - private Integer motherUnmarried; - - @JsonProperty("mother_res_lbid") - private Integer motherResLbId; - - @JsonProperty("mother_res_no_of_years") - private Integer motherResNoOfYears; - - @JsonProperty("mother_res_lb_code") - private Integer motherResLbCode; - - @JsonProperty("mother_res_place_type_id") - private Integer motherResPlaceTypeId; - - @JsonProperty("mother_res_lb_type_id") - private Integer motherResLbTypeId; - - @JsonProperty("mother_res_district_id") - private Integer motherResDistrictId; - - @JsonProperty("mother_res_state_id") - private Integer motherResStateId; - - @JsonProperty("mother_res_country_id") - private Integer motherResCountryId; - - @Size(max = 64) - @JsonProperty("mother_resdnce_addr_type") - private String motherResdnceAddrType; - - @Size(max = 64) - @JsonProperty("mother_resdnce_tenentid") - private String motherResdnceTenentId; - - @Size(max = 64) - @JsonProperty("mother_resdnce_placetype") - private String motherResdncePlaceType; - - @Size(max = 2500) - @JsonProperty("mother_resdnce_place_en") - private String motherResdncePlaceEn; - - @Size(max = 2500) - @JsonProperty("mother_resdnce_place_ml") - private String motherResdncePlaceMl; - - @Size(max = 64) - @JsonProperty("mother_resdnce_lbtype") - private String motherResdnceLbType; - - @Size(max = 64) - @JsonProperty("mother_resdnce_districtid") - private String motherResdnceDistrictId; - - @Size(max = 64) - @JsonProperty("mother_resdnce_stateid") - private String motherResdnceStateId; - - @Size(max = 64) - @JsonProperty("mother_resdnce_countryid") - private String motherResdnceCountryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/RegisterBirthRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/RegisterBirthRepository.java deleted file mode 100644 index cfc3d923702..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/RegisterBirthRepository.java +++ /dev/null @@ -1,138 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository; - -import com.google.gson.Gson; -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageregistry.model.BirthCertRequest; -import org.ksmart.birth.marriageregistry.enrichment.RegisterBirthEnrichment; -import org.ksmart.birth.marriageregistry.model.BirthPdfRegisterRequest; -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetail; -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetailsRequest; -import org.ksmart.birth.marriageregistry.model.RegisterBirthSearchCriteria; -import org.ksmart.birth.marriageregistry.repository.querybuilder.RegisterQueryBuilder; -import org.ksmart.birth.marriageregistry.repository.rowmapper.BirthRegisterRowMapper; -import org.ksmart.birth.common.contract.EgovPdfResp; -import org.ksmart.birth.common.producer.BndProducer; -import org.ksmart.birth.config.BirthConfiguration; -import org.egov.tracer.model.CustomException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Repository; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import org.springframework.web.client.RestTemplate; - -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -@Slf4j -@Repository -public class RegisterBirthRepository { - private final BndProducer producer; - private final BirthConfiguration config; - private final JdbcTemplate jdbcTemplate; - private final RegisterBirthEnrichment registerBirthDetailsEnrichment; - private final BirthRegisterRowMapper birthRegisterRowMapper; - private final RegisterQueryBuilder registerQueryBuilder; - private final RestTemplate restTemplate; - - @Autowired - RegisterBirthRepository(JdbcTemplate jdbcTemplate, RegisterBirthEnrichment registerBirthDetailsEnrichment, BirthConfiguration birthDeathConfiguration, BndProducer producer, RegisterQueryBuilder registerQueryBuilder, BirthRegisterRowMapper birthRegisterRowMapper, RestTemplate restTemplate) { - this.jdbcTemplate=jdbcTemplate; - this.registerBirthDetailsEnrichment=registerBirthDetailsEnrichment; - this.config=birthDeathConfiguration; - this.producer=producer; - this.registerQueryBuilder=registerQueryBuilder; - this.birthRegisterRowMapper=birthRegisterRowMapper; - this.restTemplate=restTemplate; - } - - public List saveRegisterBirthDetails(RegisterBirthDetailsRequest request) { - Boolean isAdopted=false; - registerBirthDetailsEnrichment.enrichCreate(request); - request.getRegisterBirthDetails() - .forEach(register -> { - if (register.getIsAdopted()) { - producer.push(config.getSaveBirthRegisterTopic(), request); - } else { - producer.push(config.getSaveBirthRegisterTopic(), request); - } - }); - return request.getRegisterBirthDetails(); - } - - public List updateRegisterBirthDetails(RegisterBirthDetailsRequest request) { - registerBirthDetailsEnrichment.enrichUpdate(request); - producer.push(config.getUpdateBirthRegisterTopic(), request); - return request.getRegisterBirthDetails(); - } - - public List searchRegisterBirthDetails(RegisterBirthSearchCriteria criteria) { - List preparedStmtValues=new ArrayList<>(); - String query=registerQueryBuilder.getRegBirthApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result=jdbcTemplate.query(query, preparedStmtValues.toArray(), birthRegisterRowMapper); - return result; - } - - public void saveRegisterBirthCert(BirthCertRequest request) { -// registerBirthDetailsEnrichment.enrichCreate(request); - producer.push(config.getSaveBirthCertificateTopic(), request); - //return request.getRegisterBirthDetails(); - } - - public EgovPdfResp saveBirthCertPdf(BirthPdfRegisterRequest pdfApplicationRequest) { - EgovPdfResp result=new EgovPdfResp(); - try { - SimpleDateFormat format=new SimpleDateFormat("dd-MM-yyyy"); - pdfApplicationRequest.getBirthCertificate() - .forEach(cert -> { - String uiHost=config.getUiAppHost(); - String birthCertPath=config.getBirthCertLink(); - birthCertPath=birthCertPath.replace("$id", cert.getId()); - birthCertPath=birthCertPath.replace("$tenantId", cert.getTenantId()); - birthCertPath=birthCertPath.replace("$regNo", cert.getRegistrationNo()); - birthCertPath=birthCertPath.replace("$dateofbirth", format.format(cert.getDateOfBirth())); - birthCertPath=birthCertPath.replace("$gender", cert.getGender().toString()); - birthCertPath=birthCertPath.replace("$birthcertificateno", cert.getRegistrationNo()); - String finalPath=uiHost + birthCertPath; - cert.setEmbeddedUrl(getShortenedUrl(finalPath)); - }); - log.info(new Gson().toJson(pdfApplicationRequest)); - - BirthPdfRegisterRequest req=BirthPdfRegisterRequest.builder() - .birthCertificate(pdfApplicationRequest.getBirthCertificate()) - .requestInfo(pdfApplicationRequest.getRequestInfo()) - .build(); - - pdfApplicationRequest.getBirthCertificate() - .forEach(cert -> { - String uiHost=config.getEgovPdfHost(); - String birthCertPath=config.getEgovPdfBirthEndPoint(); - String tenantId=cert.getTenantId() - .split("\\.")[0]; - birthCertPath=birthCertPath.replace("$tenantId", tenantId); - String pdfFinalPath=uiHost + birthCertPath; - EgovPdfResp response=restTemplate.postForObject(pdfFinalPath, req, EgovPdfResp.class); - if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { - throw new CustomException("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE", "No file store id found from pdf service"); - } - result.setFilestoreIds(response.getFilestoreIds()); - }); - } catch (Exception e) { - e.printStackTrace(); - throw new CustomException("PDF_ERROR", "Error in generating PDF"); - } - return result; - } - - public String getShortenedUrl(String url) { - HashMap body=new HashMap<>(); - body.put("url", url); - String res=restTemplate.postForObject(config.getUrlShortnerHost() + config.getUrlShortnerEndpoint(), body, String.class); - if (StringUtils.isEmpty(res)) { - log.error("URL_SHORTENING_ERROR", "Unable to shorten url: " + url); - return url; - } else return res; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/querybuilder/BaseRegBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/querybuilder/BaseRegBuilder.java deleted file mode 100644 index f88d3c9e9b4..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/querybuilder/BaseRegBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.querybuilder; - -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Component; - -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; -@Component -public class BaseRegBuilder { - void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, - List paramValues) { - - if (startDate != null || endDate != null) { - addWhereClause(paramValues, query); - query.append(" ("); - - if (startDate != null) { - query.append(column) - .append(" >= ? "); - paramValues.add(startDate); - } - - if (endDate != null) { - if (startDate != null) { - query.append(" AND "); - } - - query.append(column) - .append(" <= ? "); - paramValues.add(endDate); - } - - query.append(") "); - } - } - - void addFilters(String column, List ids, StringBuilder query, List paramValues) { - if (CollectionUtils.isNotEmpty(ids)) { - addWhereClause(paramValues, query); - query.append(column) - .append(" IN (") - .append(getStatementParameters(ids.size())) - .append(") "); - ids.forEach(paramValues::add); - } - } - - void addFilter(String column, String value, StringBuilder query, List paramValues) { - if (StringUtils.isNotBlank(value)) { - addWhereClause(paramValues, query); - query.append(column) - .append("=? "); - paramValues.add(value); - } - } - - void addWhereClause(List values, StringBuilder query) { - if (CollectionUtils.isEmpty(values)) { - query.append(" WHERE "); - } else { - query.append(" AND "); - } - } - - private String getStatementParameters(int count) { - return Collections.nCopies(count, "(?)") - .stream() - .collect(Collectors.joining(", ")); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/querybuilder/RegisterQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/querybuilder/RegisterQueryBuilder.java deleted file mode 100644 index d7a30aa3654..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/querybuilder/RegisterQueryBuilder.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.querybuilder; - - -import org.ksmart.birth.marriageregistry.model.RegisterBirthSearchCriteria; -import org.springframework.stereotype.Component; - -import javax.validation.constraints.NotNull; -import java.util.List; - -@Component -public class RegisterQueryBuilder extends BaseRegBuilder { - private static final String QUERY=new StringBuilder().append("SELECT krbd.id, krbd.dateofreport, krbd.dateofbirth, krbd.timeofbirth, krbd.am_pm, krbd.firstname_en, krbd.firstname_ml, krbd.middlename_en,") - .append("krbd.middlename_ml, krbd.lastname_en, krbd.lastname_ml, krbd.tenantid, krbd.gender, krbd.remarks_en, krbd.remarks_ml, krbd.aadharno,") - .append("krbd.createdtime, krbd.createdby, krbd.lastmodifiedtime, krbd.lastmodifiedby, krbd.esign_user_code, krbd.esign_user_desig_code, krbd.is_adopted,") - .append("krbd.is_abandoned, krbd.is_multiple_birth, krbd.is_father_info_missing, krbd.is_mother_info_missing, krbd.no_of_alive_birth, krbd.multiplebirthdetid,") - .append("krbd.ot_passportno, krbd.registrationno, krbd.registration_status, krbd.registration_date, krbd.is_born_outside, krbd.ot_dateofarrival, kbfi.id,") - .append("kbp.id, kbp.birthdtlid, kbp.placeofbirthid, kbp.hospitalid, kbp.vehicletypeid, kbp.vehicle_registration_no, kbp.vehicle_from_en, kbp.vehicle_to_en, ") - .append("kbp.vehicle_from_ml, kbp.vehicle_to_ml, kbp.vehicle_other_en, kbp.vehicle_other_ml, kbp.vehicle_admit_hospital_en, kbp.vehicle_admit_hospital_ml, ") - .append("kbp.public_place_id, kbp.ho_householder_en, kbp.ho_householder_ml, kbp.ho_buildingno, kbp.ho_res_asso_no, kbp.ho_houseno, kbp.ho_housename_en, ") - .append("kbp.ho_housename_ml, kbp.ho_villageid, kbp.ho_talukid, kbp.ho_districtid,") - .append("kbp.ho_stateid, kbp.ho_poid, kbp.ho_pinno, kbp.ho_countryid, kbp.ward_id, kbp.oth_details_en, kbp.oth_details_ml, kbp.institution_type_id, ") - .append("kbp.institution_id, kbp.auth_officer_id, kbp.auth_officer_desig_id, kbp.oth_auth_officer_name, kbp.oth_auth_officer_desig, kbp.informantsname_en, ") - .append("kbp.informantsname_ml, kbp.informantsaddress_en, kbp.informantsaddress_ml, kbp.informants_mobileno, kbp.informants_aadhaar_no, ") - .append("kbp.createdtime, kbp.createdby, kbp.lastmodifiedtime, kbp.lastmodifiedby,") - .append("kbfi.firstname_en as father_fn, kbfi.firstname_ml as father_fn_ml, kbfi.middlename_en as father_mn, kbfi.middlename_ml as father_mn_ml , ") - .append("kbfi.lastname_en as father_ln, kbfi.lastname_en as father_ln_ml, kbfi.aadharno as fa_aadh,") - .append("kbfi.ot_passportno as fa_pass, kbfi.emailid as fa_email, kbfi.mobileno as fa_mob, kbfi.createdtime, kbfi.createdby, kbfi.lastmodifiedtime, kbfi.lastmodifiedby,") - .append("kbfi.birthdtlid, kbmi.firstname_en as mother_fn, kbmi.firstname_ml as mother_fn_ml, kbmi.middlename_en as mother_mn, kbmi.middlename_ml as mother_mn_ml, kbmi.lastname_en as mother_ln, kbmi.lastname_ml as mother_ln_ml,") - .append("kbmi.aadharno as mo_aadh, kbmi.ot_passportno as mo_pass, kbmi.emailid as mo_email, kbmi.mobileno as mo_mob, kbmi.createdtime, kbmi.createdby, kbmi.lastmodifiedtime, kbmi.lastmodifiedby,") - .append("kbmi.birthdtlid,kperad.id as per_id,kperad.resdnce_addr_type as per_resdnce_addr_type,kperad.buildingno as per_buildingno,kperad.houseno as per_houseno,kperad.res_asso_no as per_res_asso_no,") - .append("kperad.housename_en as per_housename_en,kperad.housename_ml as per_housename_ml,kperad.ot_address1_en as per_ot_address1_en,kperad.ot_address1_ml as per_ot_address1_ml,") - .append("kperad.ot_address2_en as per_ot_address2_en,kperad.ot_address2_ml as per_ot_address2_ml,") - .append("kperad.villageid as per_villageid,kperad.tenantid as per_tenantid,kperad.talukid as per_talukid,kperad.districtid as per_districtid,") - .append("kperad.stateid as per_stateid,kperad.poid as per_poid,kperad.pinno as per_pinno,kperad.ot_state_region_province_en as per_ot_state_region_province_en,") - .append("kperad.ot_state_region_province_ml as per_ot_state_region_province_ml,kperad.countryid as per_countryid,kperad.createdby as per_createdby,kperad.createdtime as per_createdtime,") - .append("kperad.lastmodifiedby as per_lastmodifiedby,kperad.lastmodifiedtime as per_lastmodifiedtime,kperad.birthdtlid as per_birthdtlid,kperad.same_as_present as per_same_as_present,") - .append("kperad.bio_adopt as per_bio_adopt,kperad.res_asso_no_ml as per_res_asso_no_ml,kpreadd.id as pres_id,") - .append("kpreadd.resdnce_addr_type as pres_resdnce_addr_type,kpreadd.buildingno as pres_buildingno,kpreadd.houseno as pres_houseno,kpreadd.res_asso_no as pres_res_asso_no,kpreadd.housename_en as pres_housename_en,") - .append("kpreadd.housename_ml as pres_housename_ml,kpreadd.ot_address1_en as pres_ot_address1_en,kpreadd.ot_address1_ml as pres_ot_address1_ml,kpreadd.ot_address2_en as pres_ot_address2_en,") - .append("kpreadd.ot_address2_ml as pres_ot_address2_ml,") - .append("kpreadd.villageid as pres_villageid,kpreadd.tenantid as pres_tenantid,kpreadd.talukid as pres_talukid,kpreadd.districtid as pres_districtid,kpreadd.stateid as pres_stateid,kpreadd.poid as pres_poid,") - .append("kpreadd.pinno as pres_pinno,kpreadd.ot_state_region_province_en as pres_ot_state_region_province_en,kpreadd.ot_state_region_province_ml as pres_ot_state_region_province_ml,kpreadd.countryid as pres_countryid,") - .append("kpreadd.createdby as pres_createdby,kpreadd.createdtime as pres_createdtime,kpreadd.lastmodifiedby as pres_lastmodifiedby,kpreadd.lastmodifiedtime as pres_lastmodifiedtime,") - .append("kpreadd.birthdtlid as pres_birthdtlid,kpreadd.bio_adopt as pres_bio_adopt,kpreadd.res_asso_no_ml as pres_res_asso_no_ml,") - .append("kstat.weight_of_child, kstat.duration_of_pregnancy_in_week, kstat.nature_of_medical_attention, kstat.way_of_pregnancy,") - .append("kstat.delivery_method, kstat.deliverytypeothers_en, kstat.deliverytypeothers_ml, kstat.religionid, kstat.father_nationalityid,") - .append("kstat.father_educationid, kstat.father_education_subid, kstat.father_proffessionid, kstat.mother_educationid, kstat.mother_education_subid,") - .append("kstat.mother_proffessionid, kstat.mother_nationalityid, kstat.mother_age_marriage, kstat.mother_age_delivery, kstat.mother_no_of_birth_given,") - .append("kstat.mother_maritalstatusid, kstat.mother_unmarried, kstat.mother_res_lbid, kstat.mother_res_lb_code_id, kstat.mother_res_place_type_id,") - .append("kstat.mother_res_lb_type_id, kstat.mother_res_district_id, kstat.mother_res_state_id, kstat.mother_res_country_id,") - .append("kstat.mother_resdnce_addr_type, kstat.mother_resdnce_tenant, kstat.mother_resdnce_placetype, kstat.mother_resdnce_place_en,") - .append("kstat.mother_resdnce_place_ml, kstat.mother_resdnce_lbtype, kstat.mother_resdnce_district, kstat.mother_resdnce_state,") - .append("kstat.mother_resdnce_country, kstat.birthdtlid, kstat.createdby, kstat.createdtime, kstat.lastmodifiedtime, kstat.lastmodifiedby") - .append(" FROM public.eg_register_birth_details krbd ") - .append(" LEFT JOIN eg_register_birth_place kbp ON kbp.birthdtlid = krbd.id ") - .append(" LEFT JOIN eg_register_birth_father_information kbfi ON kbfi.birthdtlid = krbd.id AND kbfi.bio_adopt='BIOLOGICAL'") - .append(" LEFT JOIN eg_register_birth_mother_information kbmi ON kbmi.birthdtlid = krbd.id AND kbmi.bio_adopt='BIOLOGICAL'") - .append(" LEFT JOIN eg_register_birth_permanent_address kperad ON kperad.birthdtlid = krbd.id AND kperad.bio_adopt='BIOLOGICAL'") - .append(" LEFT JOIN eg_register_birth_present_address kpreadd ON kpreadd.birthdtlid = krbd.id AND kpreadd.bio_adopt='BIOLOGICAL'") - .append(" LEFT JOIN eg_register_birth_statitical_information kstat ON kstat.birthdtlid = krbd.id") - .toString(); - - - public String getRegBirthApplicationSearchQuery(@NotNull RegisterBirthSearchCriteria criteria, @NotNull List preparedStmtValues, Boolean isCount) { - - StringBuilder query=new StringBuilder(QUERY); - addFilter("krbd.id", criteria.getId(), query, preparedStmtValues); - addFilter("krbd.tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("krbd.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); - addDateRangeFilter("krbd.dateofreport", criteria.getFromDate(), criteria.getToDate(), query, preparedStmtValues); - addDateRangeFilter("krbd.file_date", criteria.getFromDateReg(), criteria.getToDateReg(), query, preparedStmtValues); - return query.toString(); - } - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BaseRegRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BaseRegRowMapper.java deleted file mode 100644 index 81563e9401e..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BaseRegRowMapper.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.rowmapper; - -import org.ksmart.birth.common.model.AuditDetails; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BaseRegRowMapper { - default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { - return AuditDetails.builder() - .createdBy(rs.getString("createdby")) - .createdTime(Long.valueOf(rs.getLong("createdtime"))) - .lastModifiedBy(rs.getString("lastmodifiedby")) - .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegFatherInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegFatherInfoRowMapper.java deleted file mode 100644 index ce872dbb854..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegFatherInfoRowMapper.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.rowmapper; - -import org.ksmart.birth.marriageregistry.model.RegisterBirthFatherInfo; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthRegFatherInfoRowMapper { - default RegisterBirthFatherInfo getRegBirthFatherInfo(ResultSet rs) throws SQLException { - return RegisterBirthFatherInfo.builder() - .id(rs.getString("id")) - .firstNameEn(rs.getString("father_fn")) - .firstNameMl(rs.getString("father_fn_ml")) - .middleNameEn(rs.getString("father_mn")) - .middleNameMl(rs.getString("father_mn_ml")) - .lastNameEn(rs.getString("father_ln")) - .lastNameMl(rs.getString("father_fn_ml")) - .aadharNo(rs.getString("fa_aadh")) - .otPassportNo(rs.getString("fa_pass")) - .emailId(rs.getString("fa_email")) - .mobileNo(rs.getString("fa_mob")) - .birthDtlId(rs.getString("birthdtlid")) - - .fatherFullName(new StringBuilder().append(rs.getString("father_fn")==null?"":rs.getString("father_fn")) - .append(" ") - .append(rs.getString("father_mn")==null?"":rs.getString("father_mn")) - .append(" ") - .append(rs.getString("father_ln")==null?"":rs.getString("father_ln")).toString()) - .fatherFullNameMl(new StringBuilder().append(rs.getString("father_fn_ml")==null?"":rs.getString("father_fn_ml")) - .append(" ") - .append(rs.getString("father_mn_ml")==null?"":rs.getString("father_mn_ml")) - .append(" ") - .append(rs.getString("father_ln_ml")==null?"":rs.getString("father_ln_ml")).toString()) -// .fullName(rs.getString("father_fn")==null?"":rs.getString("father_fn")+" " -// +rs.getString("father_mn")==null?"":rs.getString("father_mn")+" " -// +rs.getString("father_ln")==null?"":rs.getString("father_ln")) -// .fullNameMl(rs.getString("father_fn_ml")==null?"":rs.getString("father_fn_ml")+" " -// +rs.getString("father_mn_ml")==null?"":rs.getString("father_mn_ml")+" " -// +rs.getString("father_ln_ml")==null?"":rs.getString("father_ln_ml")) - - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegMotherInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegMotherInfoRowMapper.java deleted file mode 100644 index 086b87d1433..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegMotherInfoRowMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.rowmapper; - -import org.ksmart.birth.marriageregistry.model.RegisterBirthMotherInfo; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthRegMotherInfoRowMapper { - default RegisterBirthMotherInfo getRegBirthMotherInfo(ResultSet rs) throws SQLException { - return RegisterBirthMotherInfo.builder() - .id(rs.getString("id")) - .firstNameEn(rs.getString("mother_fn")) - .firstNameMl(rs.getString("mother_fn_ml")) - .middleNameEn(rs.getString("mother_mn")) - .middleNameMl(rs.getString("mother_mn_ml")) - .lastNameEn(rs.getString("mother_ln")) - .lastNameMl(rs.getString("mother_ln_ml")) - .aadharNo(rs.getString("mo_aadh")) - .otPassportNo(rs.getString("mo_pass")) - .emailId(rs.getString("mo_email")) - .mobileNo(rs.getString("mo_mob")) - .birthDtlId(rs.getString("birthdtlid")) - .motherFullName(new StringBuilder().append(rs.getString("mother_fn")==null?"":rs.getString("mother_fn")) - .append(" ") - .append(rs.getString("mother_mn")==null?"":rs.getString("mother_mn")) - .append(" ") - .append(rs.getString("mother_ln")==null?"":rs.getString("mother_ln")).toString()) - .motherFullNameMl(new StringBuilder().append(rs.getString("mother_fn_ml")==null?"":rs.getString("mother_fn_ml")) - .append(" ") - .append(rs.getString("mother_mn_ml")==null?"":rs.getString("mother_mn_ml")) - .append(" ") - .append(rs.getString("mother_ln_ml")==null?"":rs.getString("mother_ln_ml")).toString()) - - - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPerAddRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPerAddRowMapper.java deleted file mode 100644 index 8f916fccb8c..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPerAddRowMapper.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.rowmapper; - -import org.ksmart.birth.marriageregistry.model.RegisterBirthPermanentAddress; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthRegPerAddRowMapper { - default RegisterBirthPermanentAddress getRegBirthPermanentAddress(ResultSet rs) throws SQLException { - return RegisterBirthPermanentAddress.builder() - .id(rs.getString("per_id")) - .resAssoNo(rs.getString("per_res_asso_no")) - .houseNameEn(rs.getString("per_housename_en")) - .houseNameMl(rs.getString("per_housename_ml")) - .otAddress1En(rs.getString("per_ot_address1_en")) - .otAddress1Ml(rs.getString("per_ot_address1_ml")) - .otAddress2En(rs.getString("per_ot_address2_en")) - .otAddress2Ml(rs.getString("per_ot_address2_ml")) - .villageId(rs.getString("per_villageid")) - .tenantId(rs.getString("per_tenantid")) - .talukId(rs.getString("per_talukid")) - .districtId(rs.getString("per_districtid")) - .stateId(rs.getString("per_stateid")) - .poId(rs.getString("per_poid")) - .pinNo(rs.getString("per_pinno")) - .otStateRegionProvinceEn(rs.getString("per_ot_state_region_province_en")) - .otStateRegionProvinceMl(rs.getString("per_ot_state_region_province_ml")) - .countryId(rs.getString("per_countryid")) - .birthDtlId(rs.getString("per_birthdtlid")) - .sameAsPresent(rs.getInt("per_same_as_present")) - .permanentAddress(new StringBuilder().append(rs.getString("per_housename_en") == null ? "" : rs.getString("per_housename_en")) - .append(", ") - .append(rs.getString("per_res_asso_no") == null ? "" : rs.getString("per_res_asso_no")) - .append(", ") - .append(rs.getString("per_poid") == null ? "" : rs.getString("per_poid")) - .append(", ") - .append(rs.getString("per_districtid") == null ? "" : rs.getString("per_districtid")) - .append(", ") - .append(rs.getString("per_stateid") == null ? "" : rs.getString("per_stateid")) - .append(", ") - .append(rs.getString("per_countryid") == null ? "" : rs.getString("per_countryid")).toString()) - .permanentAddressMl(new StringBuilder().append(rs.getString("per_housename_ml") == null ? "" : rs.getString("per_housename_ml")) - .append(", ") - .append(rs.getString("per_res_asso_no") == null ? "" : rs.getString("per_res_asso_no")) - .append(", ") - .append(rs.getString("per_poid") == null ? "" : rs.getString("per_poid")) - .append(", ") - .append(rs.getString("per_districtid") == null ? "" : rs.getString("per_districtid")) - .append(", ") - .append(rs.getString("per_stateid") == null ? "" : rs.getString("per_stateid")) - .append(", ") - .append(rs.getString("per_countryid") == null ? "" : rs.getString("per_countryid")).toString()) - - .build(); - } -} - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPlaceRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPlaceRowMapper.java deleted file mode 100644 index 2b490577f2d..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPlaceRowMapper.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.rowmapper; - -import org.ksmart.birth.marriageregistry.model.RegisterBirthPlace; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthRegPlaceRowMapper { - default RegisterBirthPlace getRegBirthPlace(ResultSet rs) throws SQLException { - return RegisterBirthPlace.builder() - .id(rs.getString("id")) - .birthDtlId(rs.getString("birthdtlid")) - .placeOfBirthId(rs.getString("placeofbirthid")) - .hospitalId(rs.getString("hospitalid")) - .vehicleTypeId(rs.getString("vehicletypeid")) - .vehicleRegistrationNo(rs.getString("vehicle_registration_no")) - .vehicleFromEn(rs.getString("vehicle_from_en")) - .vehicleToEn(rs.getString("vehicle_to_en")) - .vehicleFromMl(rs.getString("vehicle_from_ml")) - .vehicleFromMl(rs.getString("vehicle_to_ml")) - .vehicleOtherEn(rs.getString("vehicle_other_en")) - .vehicleOtherMl(rs.getString("vehicle_other_ml")) - .vehicleAdmitHospitalEn(rs.getString("vehicle_admit_hospital_en")) - .vehicleAdmitHospitalMl(rs.getString("vehicle_admit_hospital_ml")) - .publicPlaceId(rs.getString("public_place_id")) - .hoHouseHolderEn(rs.getString("ho_householder_en")) - .hoHouseHolderMl(rs.getString("ho_householder_ml")) - .hoBuildingNo(rs.getString("ho_buildingno")) - .hoResAssoNo(rs.getString("ho_res_asso_no")) - .hoHousenNo(rs.getString("ho_houseno")) - .hoHouseHolderEn(rs.getString("ho_housename_en")) - .houseNameMl(rs.getString("ho_housename_ml")) - .hoVillageId(rs.getString("ho_villageid")) - .hoTalukId(rs.getString("ho_talukid")) - .hoTalukId(rs.getString("ho_districtid")) - .hoStateId(rs.getString("ho_stateid")) - .hoPoId(rs.getString("ho_poid")) - .hoPinNo(rs.getString("ho_pinno")) - .hoCountryId(rs.getString("ho_countryid")) - .wardId(rs.getString("ward_id")) - .othDetailsEn(rs.getString("oth_details_en")) - .othDetailsMl(rs.getString("oth_details_ml")) - .institutionTypeId(rs.getString("institution_type_id")) - .institutionId(rs.getString("institution_id")) - .authOfficerId(rs.getString("auth_officer_id")) - .authOfficerDesigId(rs.getString("auth_officer_desig_id")) - .othAuthOfficerName(rs.getString("oth_auth_officer_name")) - .othAuthOfficerDesig(rs.getString("oth_auth_officer_desig")) - .informantsNameEn(rs.getString("informantsname_en")) - .informantsAddressMl(rs.getString("informantsname_ml")) - .informantsAddressEn(rs.getString("informantsaddress_en")) - .informantsAddressMl(rs.getString("informantsaddress_ml")) - .informantsMobileNo(rs.getString("informants_mobileno")) - .informantsAadhaarNo(rs.getString("informants_aadhaar_no")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPreAddRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPreAddRowMapper.java deleted file mode 100644 index 24260448218..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegPreAddRowMapper.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.rowmapper; - -import org.ksmart.birth.marriageregistry.model.RegisterBirthPresentAddress; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthRegPreAddRowMapper { - default RegisterBirthPresentAddress getRegBirthPresentAddress(ResultSet rs) throws SQLException { - return RegisterBirthPresentAddress.builder() - .id(rs.getString("pres_id")) - .resAssoNo(rs.getString("pres_res_asso_no")) - .houseNameEn(rs.getString("pres_housename_en")) - .houseNameMl(rs.getString("pres_housename_ml")) - .otAddress1En(rs.getString("pres_ot_address1_en")) - .otAddress1Ml(rs.getString("pres_ot_address1_ml")) - .otAddress2En(rs.getString("pres_ot_address2_en")) - .otAddress2Ml(rs.getString("pres_ot_address2_ml")) - .villageId(rs.getString("pres_villageid")) - .tenantId(rs.getString("pres_tenantid")) - .talukId(rs.getString("pres_talukid")) - .districtId(rs.getString("pres_districtid")) - .stateId(rs.getString("pres_stateid")) - .poId(rs.getString("pres_poid")) - .pinNo(rs.getString("pres_pinno")) - .otStateRegionProvinceEn(rs.getString("pres_ot_state_region_province_en")) - .otStateRegionProvinceMl(rs.getString("pres_ot_state_region_province_ml")) - .countryId(rs.getString("pres_countryid")) - .birthDtlId(rs.getString("pres_birthdtlid")) - .presentAddress(new StringBuilder().append(rs.getString("pres_housename_en")==null?"":rs.getString("pres_housename_en")) - .append(", ") - .append(rs.getString("pres_res_asso_no")==null?"":rs.getString("pres_res_asso_no")) - .append(", ") - .append(rs.getString("pres_poid")==null?"":rs.getString("pres_poid")) - .append(", ") - .append(rs.getString("pres_districtid")==null?"":rs.getString("pres_districtid")) - .append(", ") - .append(rs.getString("pres_stateid")==null?"":rs.getString("pres_stateid")) - .append(", ") - .append(rs.getString("pres_countryid")==null?"":rs.getString("pres_countryid")).toString()) - .presentAddressMl(new StringBuilder().append(rs.getString("pres_housename_ml")==null?"":rs.getString("pres_housename_ml")) - .append(", ") - .append(rs.getString("pres_res_asso_no")==null?"":rs.getString("pres_res_asso_no")) - .append(", ") - .append(rs.getString("pres_poid")==null?"":rs.getString("pres_poid")) - .append(", ") - .append(rs.getString("pres_districtid")==null?"":rs.getString("pres_districtid")) - .append(", ") - .append(rs.getString("pres_stateid")==null?"":rs.getString("pres_stateid")) - .append(", ") - .append(rs.getString("pres_countryid")==null?"":rs.getString("pres_countryid")).toString()) - - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegStatInfoRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegStatInfoRowMapper.java deleted file mode 100644 index 4889a9d7cb1..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegStatInfoRowMapper.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.rowmapper; - -import org.ksmart.birth.marriageregistry.model.RegisterBirthStatiticalInformation; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface BirthRegStatInfoRowMapper { - default RegisterBirthStatiticalInformation getRegBirthStatisticalInfo(ResultSet rs) throws SQLException { - return RegisterBirthStatiticalInformation.builder() - .id(rs.getString("id")) - .weightOfChild(rs.getLong("weight_of_child")) - .durationOfPregnancyInWeek(rs.getInt("duration_of_pregnancy_in_week")) - .natureOfMedicalAttention(rs.getString("nature_of_medical_attention")) - .wayOfPregnancy(rs.getString("way_of_pregnancy")) - .deliveryMethod(rs.getString("delivery_method")) - .deliveryTypeOthersEn(rs.getString("deliverytypeothers_en")) - .deliveryTypeOthersMl(rs.getString("deliverytypeothers_ml")) - .religionId(rs.getString("religionid")) - .fatherNationalityId(rs.getString("father_nationalityid")) - .fatherEducationId(rs.getString("father_educationid")) - .fatherEducationSubId(rs.getString("father_education_subid")) - .fatherProffessionId(rs.getString("father_proffessionid")) - .motherEducationId(rs.getString("mother_educationid")) - .motherEducationSubId(rs.getString("mother_education_subid")) - .motherProffessionId(rs.getString("mother_proffessionid")) - .motherNationalityId(rs.getString("mother_nationalityid")) - .motherAgeMarriage(rs.getInt("mother_age_marriage")) - .motherAgeDelivery(rs.getInt("mother_age_delivery")) - .motherNoOfBirthGiven(rs.getInt("mother_no_of_birth_given")) - .motherMaritalStatusId(rs.getString("mother_maritalstatusid")) - .motherUnmarried(rs.getInt("mother_unmarried")) - .motherResLbId(rs.getInt("mother_res_lbid")) - .motherResLbCode(rs.getInt("mother_res_lb_code_id")) - .motherResPlaceTypeId(rs.getInt("mother_res_place_type_id")) - .motherResLbTypeId(rs.getInt("mother_res_lb_type_id")) - .motherResDistrictId(rs.getInt("mother_res_district_id")) - .motherResStateId(rs.getInt("mother_res_state_id")) - .motherResCountryId(rs.getInt("mother_res_country_id")) - .motherResdnceAddrType(rs.getString("mother_resdnce_addr_type")) - .motherResdnceTenentId(rs.getString("mother_resdnce_tenant")) - .motherResdncePlaceType(rs.getString("mother_resdnce_placetype")) - .motherResdncePlaceEn(rs.getString("mother_resdnce_place_en")) - .motherResdncePlaceMl(rs.getString("mother_resdnce_place_ml")) - .motherResdnceLbType(rs.getString("mother_resdnce_lbtype")) - .motherResdnceDistrictId(rs.getString("mother_resdnce_district")) - .motherResdnceStateId(rs.getString("mother_resdnce_state")) - .motherResdnceCountryId(rs.getString("mother_resdnce_country")) - .birthDtlId(rs.getString("birthdtlid")) - .build(); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegisterRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegisterRowMapper.java deleted file mode 100644 index 507b08ea2dc..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/repository/rowmapper/BirthRegisterRowMapper.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.ksmart.birth.marriageregistry.repository.rowmapper; - -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetail; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ResultSetExtractor; -import org.springframework.stereotype.Component; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -@Component -public class BirthRegisterRowMapper implements ResultSetExtractor>,BaseRegRowMapper,BirthRegPlaceRowMapper, - BirthRegFatherInfoRowMapper, BirthRegMotherInfoRowMapper, BirthRegPerAddRowMapper, BirthRegPreAddRowMapper,BirthRegStatInfoRowMapper { - @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null - List result = new ArrayList<>(); - DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); - while (rs.next()) { - Date regDate = new Date(rs.getLong("registration_date")); - Date dobDate = new Date(rs.getLong("dateofbirth")); - result.add(RegisterBirthDetail.builder() - .id(rs.getString("id")) - .dateOfReport(rs.getLong("dateofreport")) - .dobStr(formatter.format(dobDate)) - .dateOfBirth(rs.getLong("dateofbirth")) - .timeOfBirth(rs.getLong("timeofbirth")) - .ampm(rs.getString("am_pm")) - .firstNameEn(rs.getString("firstname_en")) - .firstNameMl(rs.getString("firstname_ml")) - .middleNameEn(rs.getString("middlename_en")) - .middleNameMl(rs.getString("middlename_ml")) - .lastNameEn(rs.getString("lastname_en")) - .lastNameMl(rs.getString("lastname_ml")) - .tenantId(rs.getString("tenantid")) - .gender(rs.getString("gender")) - .aadharNo(rs.getString("aadharno")) - .remarksEn(rs.getString("remarks_en")) - .remarksMl(rs.getString("remarks_ml")) - .esignUserCode(rs.getString("esign_user_code")) - .esignUserDesigCode(rs.getString("esign_user_desig_code")) - .isAdopted(rs.getBoolean("is_adopted")) - .isAbandoned(rs.getBoolean("is_abandoned")) - .isMultipleBirth(rs.getBoolean("is_multiple_birth")) - .isFatherInfoMissing(rs.getBoolean("is_father_info_missing")) - .isMotherInfoMissing(rs.getBoolean("is_mother_info_missing")) - .noOfAliveBirth(Integer.parseInt(rs.getString("no_of_alive_birth"))) - .multipleBirthDetId(rs.getString("multiplebirthdetid")) - .isBornOutside(rs.getBoolean("is_born_outside")) - .otPassportNo(rs.getString("ot_passportno")) - .fullName(rs.getString("firstname_en")+" "+rs.getString("middlename_en")+" "+rs.getString("lastname_en")) - .fullNameMl(rs.getString("firstname_ml")+" "+rs.getString("middlename_ml")+" "+rs.getString("lastname_ml")) - .registrationNo(rs.getString("registrationno")) - .registrationDate(rs.getLong("registration_date")) - .registerBirthPlace(getRegBirthPlace(rs)) - .registerBirthFather(getRegBirthFatherInfo(rs)) - .registerBirthMother(getRegBirthMotherInfo(rs)) - .registerBirthPermanent(getRegBirthPermanentAddress(rs)) - .registerBirthPresent(getRegBirthPresentAddress(rs)) - .registerBirthStatitical(getRegBirthStatisticalInfo(rs)) - .auditDetails(getAuditDetails(rs)) - .registrationDateStr(formatter.format(regDate)) - .build()); - } - - return result; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/EnrichmentService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/EnrichmentService.java deleted file mode 100644 index b363a810429..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/EnrichmentService.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.ksmart.birth.marriageregistry.service; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.UUID; -import java.util.stream.Collectors; - -import org.ksmart.birth.marriageregistry.model.BirthCertRequest; -import org.ksmart.birth.marriageregistry.model.BirthCertificate; -import org.ksmart.birth.common.Idgen.IdResponse; -import org.ksmart.birth.common.model.Amount; -import org.ksmart.birth.common.model.AuditDetails; -import org.ksmart.birth.common.repository.IdGenRepository; -import org.ksmart.birth.common.repository.ServiceRequestRepository; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.utils.CommonUtils; -import org.egov.common.contract.request.RequestInfo; -import org.egov.mdms.model.MasterDetail; -import org.egov.mdms.model.MdmsCriteria; -import org.egov.mdms.model.MdmsCriteriaReq; -import org.egov.mdms.model.ModuleDetail; -import org.egov.tracer.model.CustomException; -import org.ksmart.birth.utils.BirthDeathConstants; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; - -import com.jayway.jsonpath.JsonPath; - -@Service -public class EnrichmentService { - - @Autowired - CommonUtils commUtils; - - @Autowired - IdGenRepository idGenRepository; - - @Autowired - BirthConfiguration config; - - @Autowired - ServiceRequestRepository serviceRequestRepository; - - public void enrichCreateRequest(BirthCertRequest birthCertRequest) { - RequestInfo requestInfo = birthCertRequest.getRequestInfo(); - String uuid = requestInfo.getUserInfo().getUuid(); - AuditDetails auditDetails = commUtils.getAuditDetails(uuid, true); - BirthCertificate birthCert = birthCertRequest.getBirthCertificate(); - birthCert.setAuditDetails(auditDetails); - birthCert.setId(UUID.randomUUID().toString()); - } - - private List getIdList(RequestInfo requestInfo, String tenantId, String idKey, - String idformat, int count) { - List idResponses = idGenRepository.getId(requestInfo, tenantId, idKey, idformat, count).getIdResponses(); - - if (CollectionUtils.isEmpty(idResponses)) - throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); - - return idResponses.stream() - .map(IdResponse::getId).collect(Collectors.toList()); - } - - public void setIdgenIds(BirthCertRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - String tenantId = request.getBirthCertificate().getTenantId(); - BirthCertificate birthCert = request.getBirthCertificate(); - String applNo = getIdList(requestInfo, tenantId, config.getBirthApplNumberIdgenName(), config.getBirthApplNumberIdgenFormat(), 1).get(0); - birthCert.setBirthCertificateNo(applNo); - } - - public void setGLCode(BirthCertRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - BirthCertificate birthCert = request.getBirthCertificate(); - String tenantId = birthCert.getTenantId(); - ModuleDetail glCodeRequest = getGLCodeRequest(); - List moduleDetails = new LinkedList<>(); - moduleDetails.add(glCodeRequest); - MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(tenantId) - .build(); - MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) - .requestInfo(requestInfo).build(); - - StringBuilder url = new StringBuilder().append(config.getMdmsHost()).append(config.getMdmsEndPoint()); - - Object result = serviceRequestRepository.fetchResult(url, mdmsCriteriaReq); - String jsonPath = BirthDeathConstants.GL_CODE_JSONPATH_CODE.replace("{}",birthCert.getBusinessService()); - List> jsonOutput = JsonPath.read(result, jsonPath); - if(!jsonOutput.isEmpty()) { - Map glCodeObj = jsonOutput.get(0); - birthCert.setAdditionalDetail(glCodeObj); - } - } - - private ModuleDetail getGLCodeRequest() { - List masterDetails = new ArrayList<>(); - masterDetails.add(MasterDetail.builder().name(BirthDeathConstants.GL_CODE_MASTER).build()); - return ModuleDetail.builder().masterDetails(masterDetails) - .moduleName(BirthDeathConstants.BILLING_SERVICE).build(); - } - - public void setDemandParams(BirthCertRequest birthCertRequest) { - BirthCertificate birthCert = birthCertRequest.getBirthCertificate(); - birthCert.setBusinessService(BirthDeathConstants.BIRTH_CERT); - ArrayList amounts = new ArrayList<>(); - Amount amount=new Amount(); - amount.setTaxHeadCode(BirthDeathConstants.BIRTH_CERT_FEE); - amount.setAmount(new BigDecimal(50)); - amounts.add(amount); - //birthCert.setAmount(amounts); - birthCert.setCitizen(birthCertRequest.getRequestInfo().getUserInfo()); -// birthCert.setTaxPeriodFrom(System.currentTimeMillis()); -// birthCert.setTaxPeriodTo(System.currentTimeMillis()+86400000); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/MdmsDataService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/MdmsDataService.java deleted file mode 100644 index ed940050599..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/MdmsDataService.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.ksmart.birth.marriageregistry.service; - -import com.jayway.jsonpath.JsonPath; -import org.egov.common.contract.request.RequestInfo; -import org.ksmart.birth.utils.BirthConstants; -import org.ksmart.birth.utils.MdmsUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service -public class MdmsDataService { - private final MdmsUtil mdmsUtil; - - @Autowired - MdmsDataService(MdmsUtil mdmsUtil) { - this.mdmsUtil = mdmsUtil; - } - - public void getPdfDataForMaster(RequestInfo requestInfo) { - - Object mdmsData = mdmsUtil.mdmsCall(requestInfo); - - List tenantCode = getTenantCodes(mdmsData); - System.out.println(tenantCode.get(0)); - - List tenantDistCode = getTenantDistCodes(mdmsData); - System.out.println(tenantDistCode.get(0)); - } - - - private List getTenantCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TENANTS_CODE_JSONPATH); - } - - private List getTenantDistCodes(Object mdmsData) { - return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TENANTS_DIST_CODE_JSONPATH); - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/RegisterBirthService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/RegisterBirthService.java deleted file mode 100644 index 3abbadb9999..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageregistry/service/RegisterBirthService.java +++ /dev/null @@ -1,82 +0,0 @@ -package org.ksmart.birth.marriageregistry.service; - -import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageregistry.model.BirthCertRequest; -import org.ksmart.birth.marriageregistry.model.BirthCertificate; -import org.ksmart.birth.marriageregistry.model.BirthPdfRegisterRequest; -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetail; -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetailsRequest; -import org.ksmart.birth.marriageregistry.model.RegisterBirthSearchCriteria; -import org.ksmart.birth.marriageregistry.repository.RegisterBirthRepository; - -import org.ksmart.birth.common.contract.EgovPdfResp; -import org.egov.common.contract.request.RequestInfo; -import org.egov.tracer.model.CustomException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.sql.Timestamp; -import java.text.SimpleDateFormat; -import java.util.List; -@Slf4j -@Service -public class RegisterBirthService { - @Autowired - RegisterBirthRepository repository; - - @Autowired - EnrichmentService enrichmentService; - - - public List saveRegisterBirthDetails(RegisterBirthDetailsRequest request) { - return repository.saveRegisterBirthDetails(request); - } - - public List updateRegisterBirthDetails(RegisterBirthDetailsRequest request) { - return repository.updateRegisterBirthDetails(request); - } - - public List searchRegisterBirthDetails(RegisterBirthSearchCriteria criteria) { - return repository.searchRegisterBirthDetails(criteria); - } - public BirthCertificate download(RegisterBirthSearchCriteria criteria, RequestInfo requestInfo) { -// try { - BirthCertificate birthCertificate = new BirthCertificate(); -// birthCertificate.setSource(criteria.getSource().toString()); - birthCertificate.setBirthDtlId(criteria.getId()); - birthCertificate.setTenantId(criteria.getTenantId()); - BirthCertRequest birthCertRequest = BirthCertRequest.builder().birthCertificate(birthCertificate).requestInfo(requestInfo).build(); - List regDetail = repository.searchRegisterBirthDetails(criteria); - birthCertificate.setBirthPlace(regDetail.get(0).getRegisterBirthPlace().getHospitalId()); - birthCertificate.setGender(regDetail.get(0).getGender().toString()); - birthCertificate.setWard(regDetail.get(0).getRegisterBirthPlace().getWardId()); - birthCertificate.setState(regDetail.get(0).getRegisterBirthPermanent().getStateId()); - birthCertificate.setDistrict(regDetail.get(0).getRegisterBirthPermanent().getDistrictId()); - birthCertificate.setBirthCertificateNo(regDetail.get(0).getRegistrationNo().toString()); - birthCertificate.setDateofbirth(new Timestamp(regDetail.get(0).getDateOfBirth()) ); - birthCertificate.setDateofreport(new Timestamp(regDetail.get(0).getRegistrationDate())); - birthCertificate.setTenantId(regDetail.get(0).getTenantId()); - SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy"); - String date = format.format(regDetail.get(0).getDateOfReport()); - String datestr = date.split("-")[2]; - birthCertificate.setYear(datestr); - if (regDetail.size() > 1) - throw new CustomException("Invalid_Input", "Error in processing data"); - enrichmentService.enrichCreateRequest(birthCertRequest); - regDetail.get(0).setCertId(birthCertRequest.getBirthCertificate().getBirthCertificateNo()); - BirthPdfRegisterRequest pdfRegisterRequest = BirthPdfRegisterRequest.builder().requestInfo(requestInfo).birthCertificate(regDetail).build(); - EgovPdfResp pdfResp = repository.saveBirthCertPdf(pdfRegisterRequest); - birthCertificate.setEmbeddedUrl(pdfRegisterRequest.getBirthCertificate().get(0).getEmbeddedUrl()); - birthCertificate.setDateofissue(pdfRegisterRequest.getBirthCertificate().get(0).getRegistrationDate()); - birthCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); - birthCertificate.setApplicationStatus(BirthCertificate.StatusEnum.FREE_DOWNLOAD); - repository.saveRegisterBirthCert(birthCertRequest); - return birthCertificate; -// } catch (Exception e) { -// e.printStackTrace(); -// throw new CustomException("DOWNLOAD_ERROR", "Error in Downloading Certificate"); -// } - } - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthConstants.java deleted file mode 100644 index 154700f147b..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthConstants.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.ksmart.birth.utils; - -public class BirthConstants { - - public static final String CR_MDMS_TENANT = "kl"; - - public static final String CR_MDMS_MODULE = "birth-death-service"; - - public static final String COMMON_MDMS_MODULE = "common-masters"; - - public static final String TENANTS_MODULE = "tenant"; - - public static final String CR_MDMS_BIRTH_JSONPATH = "$.MdmsRes.birth-death-service"; - - public static final String MDMS_COMMON_JSONPATH = "$.MdmsRes.common-masters"; - - public static final String MDMS_TENANT_JSONPATH = "$.MdmsRes.tenant"; - public static final String CR_MDMS_TENANTS = "tenants"; - - public static final String CR_MDMS_QUALIFICATION = "Qualification"; - - public static final String CR_MDMS_PROFESSION = "Profession"; - - public static final String COMMON_MDMS_RELIGION = "Religion"; - - public static final String COMMON_MDMS_TALUK = "Taluk"; - - public static final String COMMON_MDMS_STATE = "State"; - - public static final String COMMON_MDMS_COUNTRY = "Country"; - - public static final String COMMON_MDMS_INSTITUTION= "Institution"; - - public static final String COMMON_MDMS_MEDICAL_ATTENTION_TYPE= "MedicalAttentionType"; - - public static final String COMMON_MDMS_VILLAGE = "Village"; - - public static final String COMMON_MDMS_DISTRICT = "District"; - - public static final String COMMON_MDMS_POSTOFFICE = "PostOffice"; - - public static final String COMMON_MDMS_LBTYPE = "LBType"; - - public static final String COMMON_MDMS_PLACEMASTER = "PlaceMaster"; - - public static final String CR_MDMS_INSTITUTIONTYPE = "InstitutionType"; - - public static final String CR_MDMS_DELIVERYMETHOD = "DeliveryMethod"; - - public static final String CR_MDMS_TENANTS_CODE_JSONPATH = "$.MdmsRes.tenant.tenants[*].code"; - - public static final String CR_MDMS_TENANTS_DIST_CODE_JSONPATH = "$.MdmsRes.tenant.tenants[*].city.distCodeStr"; - - public static final String CR_MDMS_PROFESSION_CODE_JSONPATH = "$.MdmsRes.birth-death-service.Profession[*].code"; - - public static final String CR_MDMS_QUALIFICATION_CODE_JSONPATH = "$.MdmsRes.birth-death-service.Qualification[*].code"; - - public static final String CR_MDMS_RELIGION_CODE_JSONPATH = "$.MdmsRes.common-masters.Religion[*].code"; - - public static final String CR_MDMS_TALUK_CODE_JSONPATH = "$.MdmsRes.common-masters.Taluk[*].code"; - - public static final String CR_MDMS_STATE_CODE_JSONPATH = "$.MdmsRes.common-masters.State[*].code"; - - public static final String CR_MDMS_COUNTRY_CODE_JSONPATH = "$.MdmsRes.common-masters.Country[*].code"; - - public static final String CR_MDMS_INSTITUTION_CODE_JSONPATH = "$.MdmsRes.birth-death-service.Institution[*].code"; - - public static final String CR_MDMS_MEDICAL_ATTENTION_TYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.MedicalAttentionType[*].code"; - - public static final String CR_MDMS_VILLAGE_CODE_JSONPATH = "$.MdmsRes.common-masters.Village[*].code"; - - public static final String CR_MDMS_DISTRICT_CODE_JSONPATH = "$.MdmsRes.common-masters.District[*].code"; - - public static final String CR_MDMS_POSTOFFICE_CODE_JSONPATH = "$.MdmsRes.common-masters.PostOffice[*].code"; - - public static final String CR_MDMS_INTITUTIONTYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.InstitutionType[*].code"; - - public static final String CR_MDMS_DELIVERYMETHOD_CODE_JSONPATH = "$.MdmsRes.birth-death-service.DeliveryMethod[*].code"; - - public static final String CR_MDMS_LBTYPE_CODE_JSONPATH = "$.MdmsRes.common-masters.LBType[*].code"; - - public static final String CR_MDMS_PLACEMASTER_CODE_JSONPATH = "$.MdmsRes.common-masters.PlaceMaster[*].code"; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthDeathConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthDeathConstants.java deleted file mode 100644 index 2cd41694673..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthDeathConstants.java +++ /dev/null @@ -1,208 +0,0 @@ -package org.ksmart.birth.utils; - -import org.springframework.stereotype.Component; - -@Component -public class BirthDeathConstants { - public static final String GL_CODE_JSONPATH_CODE = "$.MdmsRes.BillingService.GLCode[?(@.code==\"{}\")]"; - - public static final String GL_CODE = "glcode"; - - public static final String GL_CODE_MASTER = "GLCode"; - - public static final String BILLING_SERVICE = "BillingService"; - - public static final String BIRTH_CERT = "BIRTH_CERT"; - - public static final String BIRTH_CERT_FEE = "BIRTH_CERT_FEE"; - - public static final String DEATH_CERT = "DEATH_CERT"; - - public static final String DEATH_CERT_FEE = "DEATH_CERT_FEE"; - - public static final String TENANT_EMPTY = "Tenantid cannot be empty"; - public static final String B_MANDATORY_MISSING = "DOB/GENDER is empty"; - public static final String D_MANDATORY_MISSING = "DOD/GENDER is empty"; - public static final String DUPLICATE_REG = "Reg No already exists"; - public static final String DUPLICATE_REG_EXCEL = "Reg No already exists in Excel"; - public static final String HOSPNAME_LARGE = "Hospital name cannot exceed 500 chars"; - public static final String REG_EMPTY = "Reg No cannot be empty"; - public static final String DOB_EMPTY = "DoB cannot be empty"; - public static final String GENDER_EMPTY = "Gender cannot be empty"; - public static final String GENDER_INVALID = "Invalid Gender value"; - public static final String FIRSTNAME_LARGE = "Firstname cannot exceed 200 chars"; - public static final String MIDDLENAME_LARGE = "Middlename cannot exceed 200 chars"; - public static final String LASTNAME_LARGE = "Lastname cannot exceed 200 chars"; - public static final String REGNO_LARGE = "Registration No. cannot exceed 64 chars"; - public static final String F_FIRSTNAME_LARGE = "Father Firstname cannot exceed 200 chars"; - public static final String F_MIDDLENAME_LARGE = "Father Middlename cannot exceed 200 chars"; - public static final String F_LASTNAME_LARGE = "Father Lastname cannot exceed 200 chars"; - public static final String F_EDUCATION_LARGE = "Father Education cannot exceed 100 chars"; - public static final String F_RELIGION_LARGE = "Father Religion cannot exceed 100 chars"; - public static final String F_PROFFESSION_LARGE = "Father Profession cannot exceed 100 chars"; - public static final String F_NATIONALITY_LARGE = "Father Nationality cannot exceed 100 chars"; - public static final String M_EDUCATION_LARGE = "Mother Education cannot exceed 100 chars"; - public static final String M_RELIGION_LARGE = "Mother Religion cannot exceed 100 chars"; - public static final String M_PROFFESSION_LARGE = "Mother Profession cannot exceed 100 chars"; - public static final String M_NATIONALITY_LARGE = "Mother Nationality cannot exceed 100 chars"; - public static final String M_FIRSTNAME_LARGE = "Mother Firstname cannot exceed 200 chars"; - public static final String M_MIDDLENAME_LARGE = "Mother Middlename cannot exceed 200 chars"; - public static final String M_LASTNAME_LARGE = "Mother Lastname cannot exceed 200 chars"; - public static final String F_EMAIL_LARGE = "Father Email cannot exceed 50 chars"; - public static final String M_EMAIL_LARGE = "Mother Email cannot exceed 50 chars"; - public static final String F_MOBILE_LARGE = "Father Mobile cannot exceed 20 chars"; - public static final String M_MOBILE_LARGE = "Mother Mobile cannot exceed 20 chars"; - public static final String F_AADHAR_LARGE = "Father Aadhar cannot exceed 50 chars"; - public static final String M_AADHAR_LARGE = "Mother Aadhar cannot exceed 50 chars"; - public static final String S_EMAIL_LARGE = "Spouse Email cannot exceed 50 chars"; - public static final String S_AADHAR_LARGE = "Spouse Aadhar cannot exceed 50 chars"; - public static final String S_MOBILE_LARGE = "Spouse Mobile cannot exceed 20 chars"; - public static final String INFORMANTNAME_LARGE = "Informants name cannot exceed 200 chars"; - public static final String INFORMANTADDR_LARGE = "Informants Address cannot exceed 1000 chars"; - public static final String PLACEOFBIRTH_LARGE = "Place of Birth cannot exceed 1000 chars"; - public static final String AGE_LARGE = "Age cannot exceed 100 chars"; - public static final String EIDNO_LARGE = "EID No cannot exceed 100 chars"; - public static final String AADHAR_LARGE = "Aadhar No cannot exceed 150 chars"; - public static final String NATIONALITY_LARGE = "Nationality cannot exceed 100 chars"; - public static final String RELIGION_LARGE = "Religion cannot exceed 100 chars"; - public static final String ICDCODE_LARGE = "ICD Code cannot exceed 300 chars"; - - public static final String INVALID_DOB = "DOB not valid"; - public static final String INVALID_DOB_RANGE = "DOB not in range"; - public static final String INVALID_DOR = "DOR not valid"; - public static final String INVALID_DOR_RANGE = "DOR not in range"; - - public static final String DOD_EMPTY = "DoD cannot be empty"; - public static final String INVALID_DOD = "DOD not valid"; - public static final String INVALID_DOD_RANGE = "DOD not in range"; - public static final String S_FIRSTNAME_LARGE = "Spouse Firstname cannot exceed 200 chars"; - public static final String S_MIDDLENAME_LARGE = "Spouse Middlename cannot exceed 200 chars"; - public static final String S_LASTNAME_LARGE = "Spouse Lastname cannot exceed 200 chars"; - public static final String PLACEOFDEATH_LARGE = "Place of Death cannot exceed 1000 chars"; - - public static final String PERM_BUILDINGNO = "Building No in Permanent Address cannot exceed 1000 chars"; - public static final String PERM_HOUSENO = "House No in Permanent Address cannot exceed 1000 chars"; - public static final String PERM_STREETNAME = "Street name in Permanent Address cannot exceed 1000 chars"; - public static final String PERM_LOCALITY = "Locality in Permanent Address cannot exceed 1000 chars"; - public static final String PERM_TEHSIL = "Tehsil in Permanent Address cannot exceed 1000 chars"; - public static final String PERM_DISTRICT = "District in Permanent Address cannot exceed 100 chars"; - public static final String PERM_CITY = "City in Permanent Address cannot exceed 100 chars"; - public static final String PERM_STATE = "State in Permanent Address cannot exceed 100 chars"; - public static final String PERM_PINNO = "Pin No in Permanent Address cannot exceed 100 chars"; - public static final String PERM_COUNTRY = "Country in Permanent Address cannot exceed 100 chars"; - - public static final String PRESENT_BUILDINGNO = "Building No in Present Address cannot exceed 1000 chars"; - public static final String PRESENT_HOUSENO = "House No in Present Address cannot exceed 1000 chars"; - public static final String PRESENT_STREETNAME = "Street name in Present Address cannot exceed 1000 chars"; - public static final String PRESENT_LOCALITY = "Locality in Present Address cannot exceed 1000 chars"; - public static final String PRESENT_TEHSIL = "Tehsil in Present Address cannot exceed 1000 chars"; - public static final String PRESENT_DISTRICT = "District in Present Address cannot exceed 100 chars"; - public static final String PRESENT_CITY = "City in Present Address cannot exceed 100 chars"; - public static final String PRESENT_STATE = "State in Present Address cannot exceed 100 chars"; - public static final String PRESENT_PINNO = "Pin No in Present Address cannot exceed 100 chars"; - public static final String PRESENT_COUNTRY = "Country in Present Address cannot exceed 100 chars"; - - public static final String DATA_ERROR = "Data Error"; - public static final String EXCEL_DATA_ERROR = "Excel Data Error"; - public static final String UPDATE_ERROR = "Id cannot be empty for Updation"; - - public static final String PLACE_OF_BIRTH_EMPTY = "Place of birth cannot be empty"; - - public static final String FATHER_FIRSTNAME_EMPTY = "Father firstname cannot be empty"; - - public static final String FATHER_NATIONALITY_EMPTY = "Father nationality cannot be empty"; - - public static final String FATHER_MIDDLE_EMPTY = "Father middlename cannot be empty"; - - public static final String FATHER_LASTNAME_EMPTY = "Father lastname cannot be empty"; - - public static final String MOTHER_FIRSTNAME_EMPTY = "Mother firstname cannot be empty"; - - public static final String MOTHER_MIDDLE_EMPTY = "Mother middlename cannot be empty"; - - public static final String MOTHER_LASTNAME_EMPTY = "Mother lastname cannot be empty"; - - public static final String MOTHER_NATIONALITY_EMPTY = "Mother nationality cannot be empty"; - - public static final String PERMENANT_BUILDING_NO_EMPTY = "Building no cannot be empty"; - - public static final String PERMENANT_HOUSE_NO_EMPTY = "House no cannot be empty"; - - public static final String PERMENANT_STREET_NAME_EMPTY = "Street name cannot be empty"; - - public static final String PERMENANT_LOCALITY_EMPTY = "locality cannot be empty"; - - public static final String PERMENANT_TEHSIL_EMPTY = "Tehsil cannot be empty"; - - public static final String PERMENANT_DISTRICT_EMPTY = "District cannot be empty"; - - public static final String PERMENANT_CITY_EMPTY = "City cannot be empty"; - - public static final String PERMENANT_STATE_EMPTY = "State cannot be empty"; - - public static final String PERMENANT_PINCODE_EMPTY = "Pincode cannot be empty"; - - public static final String PERMENANT_COUNTRY_EMPTY = "Country cannot be empty"; - - public static final String NATIONALITY_EMPTY = "Nationality cannot be empty"; - - public static final String TENANTID_PREPARED_STMT = " bdtl.tenantid=? "; - - public static final String ID_PREPARED_STMT = " bdtl.id=? "; - - public static final String REGNO_PREPARED_STMT = " bdtl.registrationno=? "; - - public static final String GENDER_PREPARED_STMT = " bdtl.gender=? "; - - public static final String BND_DESCRYPT_KEY = "BndDetail"; - - public static final String REPLACE_CONT = "\\w(?=\\w{4})"; - - public static final String REPLACE_CONT_ASTERICK = "*"; - - public static final String PAYMENT_ERROR_MESSAGE = "Exception while processing payment update "; - - public static final String UPDATE_ERROR_MESSAGE = "UPDATE_ERROR"; - - // workflow integrator - public static final String BUSINESS_SERVICE_BND = "NewBirth"; - - public static final String TENANTIDKEY = "tenantId"; - - public static final String BUSINESSSERVICEKEY = "businessService"; - - public static final String ACTIONKEY = "action"; - - public static final String COMMENTKEY = "comment"; - - public static final String MODULENAMEKEY = "moduleName"; - - public static final String BUSINESSIDKEY = "businessId"; - - public static final String DOCUMENTSKEY = "documents"; - - public static final String ASSIGNEEKEY = "assignes"; - - public static final String UUIDKEY = "uuid"; - - public static final String BNDMODULENAMEVALUE = "birth-services"; - - public static final String WORKFLOWREQUESTARRAYKEY = "ProcessInstances"; - - public static final String REQUESTINFOKEY = "RequestInfo"; - - public static final String PROCESSINSTANCESJOSNKEY = "$.ProcessInstances"; - - public static final String BUSINESSIDJOSNKEY = "$.businessId"; - - public static final String STATUSJSONKEY = "$.state.applicationStatus"; - - public static final String TRIGGER_NOWORKFLOW = "NOWORKFLOW"; - - ///// KSMART - - - - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthUtils.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthUtils.java deleted file mode 100644 index f9c25c5e0c3..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/BirthUtils.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.ksmart.birth.utils; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import lombok.AccessLevel; -import lombok.NoArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.egov.tracer.model.CustomException; -import org.springframework.beans.BeanWrapper; -import org.springframework.beans.BeansException; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; - -import java.util.Collection; -import java.util.List; -import static org.ksmart.birth.utils.enums.ErrorCodes.INVALID_SEARCH; - -@Component -@NoArgsConstructor(access = AccessLevel.PRIVATE) -@Slf4j -public class BirthUtils implements ApplicationContextAware { - - private static ApplicationContext applicationContext; - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { // NOPMD - BirthUtils.applicationContext = applicationContext; - } - - public static ObjectMapper getObjectMapper() { - return applicationContext.getBean(ObjectMapper.class); - } - - public static String toJson(Object obj) { - try { - return getObjectMapper().writerWithDefaultPrettyPrinter() - .writeValueAsString(obj); - } catch (JsonProcessingException e) { - log.error("Failed converting to json", e); - } - return StringUtils.EMPTY; - } - - public static void validateSearchParam(BeanWrapper bw, String param, List allowedParams) { - Object value = bw.getPropertyValue(param); - - boolean invalid = false; // NOPMD - if (value instanceof Collection) { - invalid = CollectionUtils.isNotEmpty((Collection) value) && !allowedParams.contains(param); - } else { - invalid = value != null && !allowedParams.contains(param); - } - - if (invalid) { - throw new CustomException(INVALID_SEARCH.getCode(), String.format("Search on %s is not allowed", param)); - } - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/CommonUtils.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/CommonUtils.java deleted file mode 100644 index bc4bfcba6a9..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/CommonUtils.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.ksmart.birth.utils; - - -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetail; -import org.ksmart.birth.common.model.AuditDetails; -//import org.ksmart.birth.death.model.EgDeathDtl; -import org.springframework.stereotype.Component; - -import lombok.Getter; -@Component -@Getter -public class CommonUtils { - - - /** - * Method to return auditDetails for create/update flows - * - * @param by - * @param isCreate - * @return AuditDetails - */ - public AuditDetails getAuditDetails(String by, Boolean isCreate) { - - Long time = System.currentTimeMillis(); - - if(isCreate) - return AuditDetails.builder().createdBy(by).lastModifiedBy(by).createdTime(time).lastModifiedTime(time).build(); - else - return AuditDetails.builder().lastModifiedBy(by).lastModifiedTime(time).build(); - } - - public String addfullName(String firstname, String middlename, String lastname) { - StringBuilder fullName = new StringBuilder(); - if(null!=firstname) - fullName.append(firstname); - if(null!=middlename) - fullName.append(" "+middlename); - if(null!=lastname) - fullName.append(" "+lastname); - return fullName.toString(); - } - - public String addFullAddress(String houseno, String buildingno, String streetname, String locality, String tehsil, - String district, String city, String state, String pinno, String country) { - StringBuilder fullAddress = new StringBuilder(); - if(null!=houseno) - fullAddress.append(houseno); - if(null!=buildingno) - fullAddress.append(" "+buildingno); - if(null!=streetname) - fullAddress.append(" "+streetname); - if(null!=locality) - fullAddress.append(" "+locality); - if(null!=tehsil) - fullAddress.append(" "+tehsil); - if(null!=district) - fullAddress.append(" "+district); - if(null!=city) - fullAddress.append(" "+city); - if(null!=state) - fullAddress.append(" "+state); - if(null!=pinno) - fullAddress.append(" "+pinno); - if(null!=country) - fullAddress.append(" "+country); - return fullAddress.toString(); - } - - public void maskAndShowLast4Chars(RegisterBirthDetail birthDtl) { - if(null!=birthDtl.getRegisterBirthFather().getAadharNo()) - birthDtl.getRegisterBirthFather().setAadharNo(birthDtl.getRegisterBirthFather().getAadharNo().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); - if(null!=birthDtl.getRegisterBirthMother().getAadharNo()) - birthDtl.getRegisterBirthMother().setAadharNo(birthDtl.getRegisterBirthMother().getAadharNo().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); - - if(null!=birthDtl.getRegisterBirthFather().getMobileNo()) - birthDtl.getRegisterBirthFather().setMobileNo(birthDtl.getRegisterBirthFather().getMobileNo().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); - if(null!=birthDtl.getRegisterBirthMother().getMobileNo()) - birthDtl.getRegisterBirthMother().setMobileNo(birthDtl.getRegisterBirthMother().getMobileNo().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); - - if(null!=birthDtl.getRegisterBirthFather().getEmailId()) - birthDtl.getRegisterBirthFather().setEmailId(birthDtl.getRegisterBirthFather().getEmailId().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); - if(null!=birthDtl.getRegisterBirthMother().getEmailId()) - birthDtl.getRegisterBirthMother().setEmailId(birthDtl.getRegisterBirthMother().getEmailId().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); - } - -// public void maskAndShowLast4Chars(EgDeathDtl deathDtl) { -// if(null!=deathDtl.getAadharno()) -// deathDtl.setAadharno(deathDtl.getAadharno().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// if(null!=deathDtl.getDeathFatherInfo().getAadharno()) -// deathDtl.getDeathFatherInfo().setAadharno(deathDtl.getDeathFatherInfo().getAadharno().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// if(null!=deathDtl.getDeathMotherInfo().getAadharno()) -// deathDtl.getDeathMotherInfo().setAadharno(deathDtl.getDeathMotherInfo().getAadharno().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// if(null!=deathDtl.getDeathSpouseInfo().getAadharno()) -// deathDtl.getDeathSpouseInfo().setAadharno(deathDtl.getDeathSpouseInfo().getAadharno().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// -// if(null!=deathDtl.getDeathFatherInfo().getMobileno()) -// deathDtl.getDeathFatherInfo().setMobileno(deathDtl.getDeathFatherInfo().getMobileno().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// if(null!=deathDtl.getDeathMotherInfo().getMobileno()) -// deathDtl.getDeathMotherInfo().setMobileno(deathDtl.getDeathMotherInfo().getMobileno().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// if(null!=deathDtl.getDeathSpouseInfo().getMobileno()) -// deathDtl.getDeathSpouseInfo().setMobileno(deathDtl.getDeathSpouseInfo().getMobileno().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// -// if(null!=deathDtl.getDeathFatherInfo().getEmailid()) -// deathDtl.getDeathFatherInfo().setEmailid(deathDtl.getDeathFatherInfo().getEmailid().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// if(null!=deathDtl.getDeathMotherInfo().getEmailid()) -// deathDtl.getDeathMotherInfo().setEmailid(deathDtl.getDeathMotherInfo().getEmailid().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// if(null!=deathDtl.getDeathSpouseInfo().getEmailid()) -// deathDtl.getDeathSpouseInfo().setEmailid(deathDtl.getDeathSpouseInfo().getEmailid().replaceAll(BirthDeathConstants.REPLACE_CONT, BirthDeathConstants.REPLACE_CONT_ASTERICK)); -// } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/MdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/MdmsUtil.java deleted file mode 100644 index 3c00044a287..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/MdmsUtil.java +++ /dev/null @@ -1,223 +0,0 @@ -package org.ksmart.birth.utils; - -import lombok.extern.slf4j.Slf4j; -import org.egov.common.contract.request.RequestInfo; -import org.egov.mdms.model.MasterDetail; -import org.egov.mdms.model.MdmsCriteria; -import org.egov.mdms.model.MdmsCriteriaReq; -import org.egov.mdms.model.ModuleDetail; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import org.springframework.web.client.RestTemplate; - -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -@Slf4j -@Component -public class MdmsUtil { - - @Autowired - private RestTemplate restTemplate; - - @Value("${egov.mdms.host}") - private String mdmsHost; - - @Value("${egov.mdms.search.endpoint}") - private String mdmsUrl; - - @Value("${egov.mdms.module.name}") - private String moduleName; - - - public Object mdmsCall(RequestInfo requestInfo) { - // Call MDMS microservice with MdmsCriteriaReq as params - - MdmsCriteriaReq mdmsCriteriaReq = getMdmsRequest(requestInfo); - - String mdmsUri = String.format("%s%s", mdmsHost, mdmsUrl); - Object result = null; - try { - result = restTemplate.postForObject(mdmsUri, mdmsCriteriaReq, Map.class); - } catch (Exception e) { - log.error("Exception occurred while fetching MDMS data: ", e); - } - return result; - } - - private MdmsCriteriaReq getMdmsRequest(RequestInfo requestInfo) { - - List moduleDetails = new LinkedList<>(); - - //Add all modules of birth-death services - moduleDetails.addAll(getCRModuleDetails()); - - //Add all modules of common services - moduleDetails.addAll(getCommonModuleDetails()); - - moduleDetails.addAll(getTenantModuleDetails()); - - //Prepare MDMS Criteria wih all modules in birth-death services and common services - - MdmsCriteria mdmsCriteria = MdmsCriteria.builder() - .moduleDetails(moduleDetails) - .tenantId(BirthConstants.CR_MDMS_TENANT) - .build(); - //Return MDMS criteria request for calling MDMS microservice - return MdmsCriteriaReq.builder() - .mdmsCriteria(mdmsCriteria) - .requestInfo(requestInfo) - .build(); - } - - public List getCRModuleDetails() { - // master details for CR module - - List crMasterDetails = new LinkedList<>(); - - // - List masterProfession = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.CR_MDMS_PROFESSION) - .build()); - crMasterDetails.addAll(masterProfession); - - // Add Module Qualification - List masterQualification = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.CR_MDMS_QUALIFICATION) - .build()); - crMasterDetails.addAll(masterQualification); - - // Add Module Institution - List masterInstitution = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.COMMON_MDMS_INSTITUTION) - .build()); - crMasterDetails.addAll(masterInstitution); - - // Add Module Medical Attention Type - List masterMedicalAttentionType = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.COMMON_MDMS_MEDICAL_ATTENTION_TYPE) - .build()); - crMasterDetails.addAll(masterMedicalAttentionType); - - // Add Module InstitutionType - List masterInstitutionType = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.CR_MDMS_INSTITUTIONTYPE) - .build()); - crMasterDetails.addAll(masterInstitutionType); - - // Add Module DeliveryMethod - List masterDeliveryMethod = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.CR_MDMS_DELIVERYMETHOD) - .build()); - crMasterDetails.addAll(masterDeliveryMethod); - - - //Add masters to modules - ModuleDetail crModuleDetail = ModuleDetail.builder() - .masterDetails(crMasterDetails) - .moduleName(BirthConstants.CR_MDMS_MODULE) - .build(); - - return Collections.singletonList(crModuleDetail); - - } - - public List getCommonModuleDetails() { - // master details for Common module - - List commonMasterDetails = new LinkedList<>(); - // Add Module Religion - List masterReligion = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.COMMON_MDMS_RELIGION) - .build()); - - commonMasterDetails.addAll(masterReligion); - // Add Module Taluk - List masterTaluk = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants - .COMMON_MDMS_TALUK).build()); - - commonMasterDetails.addAll(masterTaluk); - // Add Module State - List masterState = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants - .COMMON_MDMS_STATE).build()); - commonMasterDetails.addAll(masterState); - // Add Module Country - List masterCountry = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants - .COMMON_MDMS_COUNTRY).build()); - commonMasterDetails.addAll(masterCountry); - - - // Add Module Village - - List masterVillage = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.COMMON_MDMS_VILLAGE) - .build()); - - commonMasterDetails.addAll(masterVillage); - - // Add Module District - - List masterDistrict = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.COMMON_MDMS_DISTRICT) - .build()); - - commonMasterDetails.addAll(masterDistrict); - - // Add Module Postoffice - - List masterPostOffice = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.COMMON_MDMS_POSTOFFICE) - .build()); - - commonMasterDetails.addAll(masterPostOffice); - - // Add Module LbType - - List masterLbType = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.COMMON_MDMS_LBTYPE) - .build()); - - commonMasterDetails.addAll(masterLbType); - - // Add Module PlaceMaster - - List masterBirthPlace = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.COMMON_MDMS_PLACEMASTER) - .build()); - - commonMasterDetails.addAll(masterBirthPlace); - - ModuleDetail commonModuleDetail = ModuleDetail.builder() - .masterDetails(commonMasterDetails) - .moduleName(BirthConstants.COMMON_MDMS_MODULE) - .build(); - - return Collections.singletonList(commonModuleDetail); - - } - - public List getTenantModuleDetails() { - // master details for Tenant module - moduleName = "tenant"; - List tenantDetails = new LinkedList<>(); - // Add Module Religion - List masterTenants = Collections.singletonList(MasterDetail.builder() - .name(BirthConstants.CR_MDMS_TENANTS) - .build()); - tenantDetails.addAll(masterTenants); - - ModuleDetail tenantModuleDetail = ModuleDetail.builder() - .masterDetails(tenantDetails) - .moduleName(BirthConstants.TENANTS_MODULE) - .build(); - - return Collections.singletonList(tenantModuleDetail); - - } -} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/ResponseInfoFactory.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/ResponseInfoFactory.java deleted file mode 100644 index 6075c9fe1e6..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/ResponseInfoFactory.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.ksmart.birth.utils; - -import org.egov.common.contract.request.RequestInfo; -import org.egov.common.contract.response.ResponseInfo; -import org.springframework.stereotype.Component; - -@Component -public class ResponseInfoFactory { - - public ResponseInfo createResponseInfoFromRequestInfo(final RequestInfo requestInfo, final Boolean success) { - - final String apiId = requestInfo != null ? requestInfo.getApiId() : ""; - final String ver = requestInfo != null ? requestInfo.getVer() : ""; - Long ts = null; - if(requestInfo!=null) - ts = requestInfo.getTs(); - final String resMsgId = "uief87324"; - final String msgId = requestInfo != null ? requestInfo.getMsgId() : ""; - final String responseStatus = success ? "successful" : "failed"; - - return ResponseInfo.builder().apiId(apiId).ver(ver).ts(ts).resMsgId(resMsgId).msgId(msgId).resMsgId(resMsgId) - .status(responseStatus).build(); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/enums/ErrorCodes.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/enums/ErrorCodes.java deleted file mode 100644 index c4a00086d27..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/utils/enums/ErrorCodes.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.ksmart.birth.utils.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum ErrorCodes { - - // Birth Details - BIRTH_DETAILS_REQUIRED("REQUIRED"), - BIRTH_DETAILS_NOT_FOUND("NOT_FOUND"), - BIRTH_DETAILS_INVALID_SEARCH_CRITERIA("INVALID_CRITERIA"), - BIRTH_DETAILS_INVALID_UPDATE("INVALID_UPDATE"), - MDMS_DATA_ERROR("MDMS_DATA_ERROR"), - INVALID_SEARCH("INVALID_SEARCH"), - // Idgen Service - IDGEN_ERROR("IDGEN_ERROR"); - private String code; - - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/birth/workflow/WorkflowIntegrator.java deleted file mode 100755 index ac7d0dfdea8..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/workflow/WorkflowIntegrator.java +++ /dev/null @@ -1,158 +0,0 @@ -package org.ksmart.birth.workflow; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -//import org.egov.filemgmnt.config.FMConfiguration; -//import org.egov.filemgmnt.util.FMConstants; -//import org.egov.filemgmnt.web.models.ApplicantPersonal; -//import org.egov.filemgmnt.web.models.ApplicantPersonalRequest; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.utils.BirthDeathConstants; -import org.egov.tracer.model.CustomException; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; - -import com.jayway.jsonpath.DocumentContext; -import com.jayway.jsonpath.JsonPath; -import com.jayway.jsonpath.PathNotFoundException; - -import lombok.extern.slf4j.Slf4j; -import net.minidev.json.JSONArray; -import net.minidev.json.JSONObject; - -@Service -@Slf4j -public class WorkflowIntegrator { - - - - private final BirthConfiguration bndConfig; - private final RestTemplate restTemplate; - - @Autowired - public WorkflowIntegrator(RestTemplate restTemplate, BirthConfiguration bndConfig) { - this.restTemplate = restTemplate; - this.bndConfig = bndConfig; - - } - - /** - * Method to integrate with workflow - * - * takes the filedetails request (now take applicant personal request) as - * parameter constructs the work-flow request - * - * and sets the resultant status from wf-response back to file details object - * - * @param request the {@link BirthDetailsRequest} - */ - public void callWorkFlow(BirthDetailsRequest request) { - - BirthApplicationDetail currentFile = request.getBirthDetails().get(0); - String wfTenantId = currentFile.getTenantId(); - String businessServiceFromMDMS = currentFile.getBusinessService(); - - if (businessServiceFromMDMS == null) { - businessServiceFromMDMS = BirthDeathConstants.BUSINESS_SERVICE_BND; - } - - JSONArray array = new JSONArray(); - - for (BirthApplicationDetail birth : request.getBirthDetails()) { - if (businessServiceFromMDMS.equals(BirthDeathConstants.BUSINESS_SERVICE_BND) || !request.getBirthDetails() - .get(0).getAction().equalsIgnoreCase(BirthDeathConstants.TRIGGER_NOWORKFLOW)) { - - JSONObject obj = new JSONObject(); - List> uuidmaps = new LinkedList<>(); - - if (!CollectionUtils.isEmpty(birth.getAssignee())) { - - // Adding assignes to processInstance - - birth.getAssignee().forEach(assignee -> { - - Map uuidMap = new HashMap<>(); - - uuidMap.put(BirthDeathConstants.UUIDKEY, assignee); - uuidmaps.add(uuidMap); - }); - } - - obj.put(BirthDeathConstants.BUSINESSIDKEY, birth.getApplicationNo()); - obj.put(BirthDeathConstants.TENANTIDKEY, wfTenantId); - obj.put(BirthDeathConstants.BUSINESSSERVICEKEY, currentFile.getWorkFlowCode()); - obj.put(BirthDeathConstants.MODULENAMEKEY, BirthDeathConstants.BNDMODULENAMEVALUE); - obj.put(BirthDeathConstants.ACTIONKEY, birth.getAction()); - obj.put(BirthDeathConstants.COMMENTKEY, birth.getComment()); - if (!CollectionUtils.isEmpty(birth.getAssignee())) { - obj.put(BirthDeathConstants.ASSIGNEEKEY, uuidmaps); - } - obj.put(BirthDeathConstants.DOCUMENTSKEY, birth.getWfDocuments()); - array.add(obj); - } - } - - if (!CollectionUtils.isEmpty(array)) { - JSONObject workFlowRequest = new JSONObject(); - workFlowRequest.put(BirthDeathConstants.REQUESTINFOKEY, request.getRequestInfo()); - workFlowRequest.put(BirthDeathConstants.WORKFLOWREQUESTARRAYKEY, array); - String response = null; - System.out.println("workflow Check :" + workFlowRequest); - log.info("workflow integrator request " + workFlowRequest); - - try { - response = restTemplate.postForObject(bndConfig.getWfHost().concat(bndConfig.getWfTransitionPath()), - workFlowRequest, String.class); - } catch (HttpClientErrorException e) { - /* - * extracting message from client error exception - */ - DocumentContext responseContext = JsonPath.parse(e.getResponseBodyAsString()); - List errros = null; - try { - errros = responseContext.read("$.Errors"); - } catch (PathNotFoundException pnfe) { - log.error("EG_BND_WF_ERROR_KEY_NOT_FOUND", - " Unable to read the json path in error object : " + pnfe.getMessage()); - throw new CustomException("EG_BND_WF_ERROR_KEY_NOT_FOUND", - " Unable to read the json path in error object : " + pnfe.getMessage()); - } - throw new CustomException("EG_WF_ERROR", errros.toString()); - } catch (Exception e) { - throw new CustomException("EG_WF_ERROR", - " Exception occured while integrating with workflow : " + e.getMessage()); - } - - log.info("workflow integrator response " + response); - - /* - * on success result from work-flow read the data and set the status back to TL - * object - */ - System.out.println("response Check :" + response); - DocumentContext responseContext = JsonPath.parse(response); - List> responseArray = responseContext.read(BirthDeathConstants.PROCESSINSTANCESJOSNKEY); - Map idStatusMap = new HashMap<>(); - responseArray.forEach(object -> { - - DocumentContext instanceContext = JsonPath.parse(object); - idStatusMap.put(instanceContext.read(BirthDeathConstants.BUSINESSIDJOSNKEY), - instanceContext.read(BirthDeathConstants.STATUSJSONKEY)); - }); - // setting the status back to TL object from wf response - - request.getBirthDetails().forEach( - bndObj -> bndObj.setStatus(idStatusMap.get(bndObj.getApplicationNo()))); - - } - - } - -} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/MarriageApplication.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/MarriageApplication.java similarity index 96% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/MarriageApplication.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/MarriageApplication.java index f571a67dab3..5969efa5123 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/MarriageApplication.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/MarriageApplication.java @@ -1,4 +1,4 @@ -package org.ksmart.birth; +package org.ksmart.marriage; import java.util.TimeZone; import javax.annotation.PostConstruct; @@ -19,7 +19,7 @@ import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; -@SpringBootApplication(scanBasePackages = "org.ksmart.birth" ) +@SpringBootApplication(scanBasePackages = "org.ksmart.marriage") @EnableSwagger2 @Import({TracerConfiguration.class,EncryptionConfiguration.class}) public class MarriageApplication { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/BirthApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java similarity index 85% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/BirthApplicationController.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index 20005571156..26e6b3bd3a0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/controller/BirthApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -1,19 +1,19 @@ -package org.ksmart.birth.marriageapplication.controller; +package org.ksmart.marriage.marriageapplication.controller; import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationResponse; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.marriageapplication.service.BirthApplicationService; -import org.ksmart.birth.marriageapplication.service.RegistryRequestService; -import org.ksmart.birth.marriageregistry.model.BirthCertificate; -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetail; -import org.ksmart.birth.marriageregistry.model.RegisterBirthDetailsRequest; -import org.ksmart.birth.marriageregistry.model.RegisterBirthSearchCriteria; -import org.ksmart.birth.marriageregistry.service.RegisterBirthService; -import org.ksmart.birth.utils.ResponseInfoFactory; +import org.ksmart.marriage.marriageapplication.model.birth.BirthApplicationResponse; +import org.ksmart.marriage.marriageapplication.model.birth.BirthApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.model.BirthApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.birth.BirthDetailsRequest; +import org.ksmart.marriage.marriageapplication.service.BirthApplicationService; +import org.ksmart.marriage.marriageapplication.service.RegistryRequestService; +import org.ksmart.marriage.marriageregistry.model.BirthCertificate; +import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; +import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetailsRequest; +import org.ksmart.marriage.marriageregistry.model.RegisterBirthSearchCriteria; +import org.ksmart.marriage.marriageregistry.service.RegisterBirthService; +import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/birth/BirthDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java similarity index 79% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/birth/BirthDetailsEnrichment.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java index 52c16c29100..bd5eca3d3d6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/enrichment/birth/BirthDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java @@ -1,13 +1,13 @@ -package org.ksmart.birth.marriageapplication.enrichment.birth; +package org.ksmart.marriage.marriageapplication.enrichment.birth; import org.apache.commons.collections4.CollectionUtils; -import org.ksmart.birth.common.model.AuditDetails; -import org.ksmart.birth.common.repository.IdGenRepository; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.marriageapplication.enrichment.BaseEnrichment; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.utils.enums.ErrorCodes; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.common.repository.IdGenRepository; +import org.ksmart.marriage.config.MarriageConfiguration; +import org.ksmart.marriage.marriageapplication.enrichment.BaseEnrichment; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.utils.enums.ErrorCodes; import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; import org.egov.tracer.model.CustomException; @@ -20,15 +20,15 @@ @Component -public class BirthDetailsEnrichment implements BaseEnrichment { +public class MarriageDetailsEnrichment implements BaseEnrichment { @Autowired - BirthConfiguration config; + MarriageConfiguration config; @Autowired IdGenRepository idGenRepository; - public void enrichCreate(BirthDetailsRequest request) { + public void enrichCreate(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); User userInfo = requestInfo.getUserInfo(); @@ -56,7 +56,7 @@ public void enrichCreate(BirthDetailsRequest request) { setRegistrationNumber(request); } - public void enrichUpdate(BirthDetailsRequest request) { + public void enrichUpdate(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); User userInfo = requestInfo.getUserInfo(); @@ -66,9 +66,9 @@ public void enrichUpdate(BirthDetailsRequest request) { .forEach(birth -> birth.setAuditDetails(auditDetails)); } - private void setApplicationNumbers(BirthDetailsRequest request) { + private void setApplicationNumbers(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); + List birthDetails = request.getBirthDetails(); String tenantId = birthDetails.get(0) .getTenantId(); List filecodes = getIds(requestInfo, @@ -86,9 +86,9 @@ private void setApplicationNumbers(BirthDetailsRequest request) { }); } - private void setFileNumbers(BirthDetailsRequest request) { + private void setFileNumbers(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); + List birthDetails = request.getBirthDetails(); String tenantId = birthDetails.get(0) .getTenantId(); @@ -107,9 +107,9 @@ private void setFileNumbers(BirthDetailsRequest request) { }); } - private void setRegistrationNumber(BirthDetailsRequest request) { + private void setRegistrationNumber(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); + List birthDetails = request.getBirthDetails(); String tenantId = birthDetails.get(0) .getTenantId(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/BirthApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java similarity index 94% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/BirthApplicationDetail.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index 32503576ddf..108ed1ce47b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/BirthApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -1,10 +1,10 @@ -package org.ksmart.birth.marriageapplication.model; +package org.ksmart.marriage.marriageapplication.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; -import org.ksmart.birth.marriageapplication.model.birth.*; -import org.ksmart.birth.common.model.AuditDetails; -import org.ksmart.birth.common.model.Document; +import org.ksmart.marriage.marriageapplication.model.birth.*; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.common.model.Document; import javax.validation.constraints.Size; import java.util.List; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java similarity index 69% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthApplicationResponse.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java index d358567cb63..c23fd0208f5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java @@ -1,10 +1,10 @@ -package org.ksmart.birth.marriageapplication.model.birth; +package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.egov.common.contract.response.ResponseInfo; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageregistry.model.BirthCertificate; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageregistry.model.BirthCertificate; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; @@ -26,7 +26,7 @@ public class BirthApplicationResponse { @JsonProperty("BirthDetails") @Valid - private List birthDetails; + private List birthDetails; @JsonProperty("BirthCertificate") @Valid @@ -36,7 +36,7 @@ public class BirthApplicationResponse { @JsonProperty("Count") private int count; - public BirthApplicationResponse addBirthApplication(BirthApplicationDetail birthDetail) { + public BirthApplicationResponse addBirthApplication(MarriageApplicationDetail birthDetail) { if (birthDetails == null) { birthDetails = new ArrayList<>(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java similarity index 94% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthApplicationSearchCriteria.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java index c787416dafe..53a7c91e9ce 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriagecorrection/model/BirthApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java @@ -1,4 +1,4 @@ -package org.ksmart.birth.marriagecorrection.model; +package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthFatherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java similarity index 95% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthFatherInfo.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java index 05839162c87..b472e8df39c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthFatherInfo.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java @@ -1,4 +1,4 @@ -package org.ksmart.birth.marriageapplication.model.birth; +package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthMotherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java similarity index 95% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthMotherInfo.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java index f9d96f224e1..5947e5458ab 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthMotherInfo.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java @@ -1,4 +1,4 @@ -package org.ksmart.birth.marriageapplication.model.birth; +package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPermanentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java similarity index 97% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPermanentAddress.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java index cffc3e8ffef..0a45c61b4c2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPermanentAddress.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java @@ -1,4 +1,4 @@ -package org.ksmart.birth.marriageapplication.model.birth; +package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPlace.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java similarity index 98% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPlace.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java index 5e25a9233f1..571b07ec9db 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPlace.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java @@ -1,4 +1,4 @@ -package org.ksmart.birth.marriageapplication.model.birth; +package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPresentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java similarity index 97% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPresentAddress.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java index 820a6eafd52..924a3baa554 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthPresentAddress.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java @@ -1,4 +1,4 @@ -package org.ksmart.birth.marriageapplication.model.birth; +package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthStatisticalInformation.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java similarity index 98% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthStatisticalInformation.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java index 85c359b4cf7..fdaf27e4bc2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/model/birth/BirthStatisticalInformation.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java @@ -1,4 +1,4 @@ -package org.ksmart.birth.marriageapplication.model.birth; +package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/BirthApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java similarity index 53% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/BirthApplicationRepository.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 5e343b489b0..e6e5a8bd365 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/repository/BirthApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -1,14 +1,14 @@ -package org.ksmart.birth.marriageapplication.repository; +package org.ksmart.marriage.marriageapplication.repository; import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.common.producer.BndProducer; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.marriageapplication.enrichment.birth.BirthDetailsEnrichment; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.marriageapplication.repository.querybuilder.BirthApplicationQueryBuilder; -import org.ksmart.birth.marriageapplication.repository.rowmapper.BirthApplicationRowMapper; +import org.ksmart.marriage.common.producer.BndProducer; +import org.ksmart.marriage.config.MarriageConfiguration; +import org.ksmart.marriage.marriageapplication.enrichment.birth.MarriageDetailsEnrichment; +import org.ksmart.marriage.marriageapplication.model.marriage.BirthApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.marriage.BirthDetailsRequest; +import org.ksmart.marriage.marriageapplication.repository.querybuilder.BirthApplicationQueryBuilder; +import org.ksmart.marriage.marriageapplication.repository.rowmapper.BirthApplicationRowMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; @@ -21,16 +21,16 @@ public class BirthApplicationRepository { private final BndProducer producer; - private final BirthConfiguration birthDeathConfiguration; + private final MarriageConfiguration birthDeathConfiguration; private final JdbcTemplate jdbcTemplate; private final BirthApplicationQueryBuilder birthQueryBuilder; private final BirthApplicationRowMapper birthApplicationRowMapper; - private final BirthDetailsEnrichment birthDetailsEnrichment; + private final MarriageDetailsEnrichment birthDetailsEnrichment; @Autowired BirthApplicationRepository(JdbcTemplate jdbcTemplate, BirthApplicationQueryBuilder birthQueryBuilder, - BirthApplicationRowMapper birthApplicationRowMapper, BirthDetailsEnrichment birthDetailsEnrichment, - BirthConfiguration birthDeathConfiguration, BndProducer producer) { + BirthApplicationRowMapper birthApplicationRowMapper, MarriageDetailsEnrichment birthDetailsEnrichment, + MarriageConfiguration birthDeathConfiguration, BndProducer producer) { this.jdbcTemplate = jdbcTemplate; this.birthQueryBuilder = birthQueryBuilder; this.birthApplicationRowMapper = birthApplicationRowMapper; @@ -39,23 +39,23 @@ public class BirthApplicationRepository { this.producer = producer; } - public List saveBirthDetails(BirthDetailsRequest request) { + public List saveBirthDetails(BirthDetailsRequest request) { birthDetailsEnrichment.enrichCreate(request); producer.push(birthDeathConfiguration.getSaveBirthApplicationTopic(), request); return request.getBirthDetails(); } - public List updateBirthDetails(BirthDetailsRequest request) { + public List updateBirthDetails(BirthDetailsRequest request) { birthDetailsEnrichment.enrichUpdate(request); producer.push(birthDeathConfiguration.getUpdateBirthApplicationTopic(), request); return request.getBirthDetails(); } - public List searchBirthDetails(BirthApplicationSearchCriteria criteria) { + public List searchBirthDetails(BirthApplicationSearchCriteria criteria) { List preparedStmtValues = new ArrayList<>(); String query = birthQueryBuilder.getBirthApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), birthApplicationRowMapper); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), birthApplicationRowMapper); return result; } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/BirthApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java similarity index 53% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/BirthApplicationService.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 3b655ba89d3..c401822f04c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/service/BirthApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -1,15 +1,15 @@ -package org.ksmart.birth.marriageapplication.service; +package org.ksmart.marriage.marriageapplication.service; import lombok.extern.slf4j.Slf4j; -import org.ksmart.birth.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.marriageapplication.repository.BirthApplicationRepository; -import org.ksmart.birth.marriageapplication.validator.BirthApplicationValidator; -import org.ksmart.birth.marriageapplication.validator.MdmsValidator; -import org.ksmart.birth.marriageregistry.service.MdmsDataService; -import org.ksmart.birth.utils.MdmsUtil; -import org.ksmart.birth.workflow.WorkflowIntegrator; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; +import org.ksmart.marriage.marriageapplication.validator.BirthApplicationValidator; +import org.ksmart.marriage.marriageapplication.validator.MdmsValidator; +import org.ksmart.marriage.marriageregistry.service.MdmsDataService; +import org.ksmart.marriage.utils.MdmsUtil; +import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -18,7 +18,7 @@ @Slf4j @Service public class BirthApplicationService { - private final BirthApplicationRepository repository; + private final MarriageApplicationRepository repository; private final WorkflowIntegrator workflowIntegrator; private final MdmsUtil mdmsUtil; @@ -27,7 +27,7 @@ public class BirthApplicationService { private final BirthApplicationValidator applicationValidator; @Autowired - BirthApplicationService(BirthApplicationRepository repository, WorkflowIntegrator workflowIntegrator, MdmsUtil mdmsUtil, + BirthApplicationService(MarriageApplicationRepository repository, WorkflowIntegrator workflowIntegrator, MdmsUtil mdmsUtil, MdmsValidator mdmsValidator, BirthApplicationValidator applicationValidator, MdmsDataService mdmsDataService) { this.repository = repository; this.workflowIntegrator = workflowIntegrator; @@ -38,7 +38,7 @@ public class BirthApplicationService { } - public List saveBirthDetails(BirthDetailsRequest request) { + public List saveBirthDetails(MarriageDetailsRequest request) { //validate mdms data Object mdmsData = mdmsUtil.mdmsCall(request.getRequestInfo()); @@ -47,7 +47,7 @@ public List saveBirthDetails(BirthDetailsRequest request applicationValidator.validateCreate(request, mdmsData); //call save - List birthApplicationDetails = repository.saveBirthDetails(request); + List birthApplicationDetails = repository.saveBirthDetails(request); //WorkFlow Integration workflowIntegrator.callWorkFlow(request); @@ -55,7 +55,7 @@ public List saveBirthDetails(BirthDetailsRequest request return birthApplicationDetails; } - public List updateBirthDetails(BirthDetailsRequest request) { + public List updateBirthDetails(MarriageDetailsRequest request) { workflowIntegrator.callWorkFlow(request); @@ -65,7 +65,7 @@ public List updateBirthDetails(BirthDetailsRequest reque } - public List searchBirthDetails(BirthApplicationSearchCriteria criteria) { + public List searchBirthDetails(MarriageApplicationSearchCriteria criteria) { return repository.searchBirthDetails(criteria); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/BirthApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java similarity index 56% rename from municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/BirthApplicationValidator.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index f777012375c..5ef809cfa0a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/birth/marriageapplication/validator/BirthApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1,24 +1,24 @@ -package org.ksmart.birth.marriageapplication.validator; +package org.ksmart.marriage.marriageapplication.validator; -import org.ksmart.birth.config.BirthConfiguration; -import org.ksmart.birth.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.birth.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.birth.utils.enums.ErrorCodes; +import org.ksmart.marriage.config.MarriageConfiguration; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.utils.enums.ErrorCodes; import org.egov.tracer.model.CustomException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; import java.util.List; -import static org.ksmart.birth.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; +import static org.ksmart.marriage.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; @Component public class BirthApplicationValidator { - private final BirthConfiguration bndCofig; + private final MarriageConfiguration bndCofig; private final MdmsValidator mdmsValidator; @Autowired - BirthApplicationValidator(BirthConfiguration bndCofig, MdmsValidator mdmsValidator) { + BirthApplicationValidator(MarriageConfiguration bndCofig, MdmsValidator mdmsValidator) { this.bndCofig = bndCofig; @@ -28,10 +28,10 @@ public class BirthApplicationValidator { /** * Validate abirth details create request. * - * @param request the {@link BirthDetailsRequest} + * @param request the {@link MarriageDetailsRequest} */ - public void validateCreate(BirthDetailsRequest request, Object mdmsData) { - List applicantPersonals = request.getBirthDetails(); + public void validateCreate(MarriageDetailsRequest request, Object mdmsData) { + List applicantPersonals = request.getBirthDetails(); if (CollectionUtils.isEmpty(request.getBirthDetails())) { throw new CustomException(ErrorCodes.BIRTH_DETAILS_REQUIRED.getCode(), "Birth details is required."); From 29e51cf434f4b385d8167ff25007c5cdca78ff48 Mon Sep 17 00:00:00 2001 From: MayaDevops Date: Tue, 31 Jan 2023 11:14:08 +0530 Subject: [PATCH 002/420] marriage added --- .../ksmart/marriage/MarriageApplication.java | 2 +- .../MarriageApplicationController.java | 129 +++++++-------- .../marriage/MarriageDetailsEnrichment.java | 150 +----------------- .../model/MarriageApplicationDetail.java | 28 ++-- .../marriage/MarriageApplicationResponse.java | 12 +- .../MarriageApplicationSearchCriteria.java | 2 +- .../model/marriage/MarriageFatherInfo.java | 2 +- .../model/marriage/MarriageMotherInfo.java | 2 +- .../marriage/MarriagePermanentAddress.java | 2 +- .../model/marriage/MarriagePlace.java | 2 +- .../marriage/MarriagePresentAddress.java | 2 +- .../MarriageStatisticalInformation.java | 2 +- .../MarriageApplicationRepository.java | 51 +----- .../service/MarriageApplicationService.java | 64 +------- .../MarriageApplicationValidator.java | 43 +---- .../src/main/resources/application.properties | 38 ++--- 16 files changed, 116 insertions(+), 415 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/MarriageApplication.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/MarriageApplication.java index 5969efa5123..b3ead1e8d64 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/MarriageApplication.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/MarriageApplication.java @@ -33,7 +33,7 @@ public static void main(String[] args) { public Docket apis() { - return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.basePackage("org.ksmart.birth")).build(); + return new Docket(DocumentationType.SWAGGER_2).select().apis(RequestHandlerSelectors.basePackage("org.ksmart.marriage")).build(); } @Bean diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index 26e6b3bd3a0..8776ce8d6bb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -2,90 +2,67 @@ import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageapplication.model.birth.BirthApplicationResponse; -import org.ksmart.marriage.marriageapplication.model.birth.BirthApplicationSearchCriteria; -import org.ksmart.marriage.marriageapplication.model.BirthApplicationDetail; -import org.ksmart.marriage.marriageapplication.model.birth.BirthDetailsRequest; -import org.ksmart.marriage.marriageapplication.service.BirthApplicationService; -import org.ksmart.marriage.marriageapplication.service.RegistryRequestService; -import org.ksmart.marriage.marriageregistry.model.BirthCertificate; -import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; -import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetailsRequest; -import org.ksmart.marriage.marriageregistry.model.RegisterBirthSearchCriteria; -import org.ksmart.marriage.marriageregistry.service.RegisterBirthService; -import org.ksmart.marriage.utils.ResponseInfoFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; +//import org.ksmart.marriage.marriageregistry.model.BirthCertificate; +//import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; +//import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetailsRequest; +//import org.ksmart.marriage.marriageregistry.model.RegisterBirthSearchCriteria; +//import org.ksmart.marriage.marriageregistry.service.RegisterBirthService; +//import org.ksmart.marriage.utils.ResponseInfoFactory; -import javax.validation.Valid; -import java.util.List; @Slf4j -@RestController -@RequestMapping("/cr/birth") -public class BirthApplicationController { +//@RestController +//@RequestMapping("/cr/birth") +public class MarriageApplicationController { - private final ResponseInfoFactory responseInfoFactory; - private final BirthApplicationService crBirthService; - private final RegisterBirthService registerBirthService; - private final RegistryRequestService registryRequestService; - @Autowired - BirthApplicationController(BirthApplicationService crBirthService, ResponseInfoFactory responseInfoFactory, - RegisterBirthService registerBirthService, RegistryRequestService registryRequestService) { - this.crBirthService=crBirthService; - this.responseInfoFactory=responseInfoFactory; - this.registerBirthService = registerBirthService; - this.registryRequestService = registryRequestService; - } - @PostMapping(value = {"/_create"}) - public ResponseEntity saveBirthDetails(@RequestBody BirthDetailsRequest request) { - List birthDetails=crBirthService.saveBirthDetails(request); - BirthApplicationResponse response=BirthApplicationResponse.builder() - .birthDetails(birthDetails) - .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), - true)) - .build(); - return new ResponseEntity<>(response, HttpStatus.OK); - } - @PostMapping(value = {"/_update"}) - public ResponseEntity updateBirthDetails(@RequestBody BirthDetailsRequest request) { - BirthCertificate birthCertificate = new BirthCertificate(); - List birthApplicationDetails=crBirthService.updateBirthDetails(request); - //Download certificate when Approved - if((birthApplicationDetails.get(0).getStatus() == "APPROVED") && (birthApplicationDetails.get(0).getAction() == "APPROVE")){ - RegisterBirthDetailsRequest registerBirthDetailsRequest = registryRequestService.createRegistryRequest(request); - List registerBirthDetails = registerBirthService.saveRegisterBirthDetails(registerBirthDetailsRequest); - RegisterBirthSearchCriteria criteria = new RegisterBirthSearchCriteria(); - criteria.setTenantId(registerBirthDetails.get(0).getTenantId()); - System.out.println(criteria.getTenantId()); - - criteria.setRegistrationNo(registerBirthDetails.get(0).getRegistrationNo()); System.out.println(registerBirthDetails.get(0).getRegistrationNo()); - birthCertificate = registerBirthService.download(criteria,request.getRequestInfo()); - } - BirthApplicationResponse response=BirthApplicationResponse.builder() - .birthDetails(birthApplicationDetails) - .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), - true)) - .birthCertificate(birthCertificate) - .build(); - return new ResponseEntity<>(response, HttpStatus.OK); - } +// @PostMapping(value = {"/_create"}) +// public ResponseEntity saveBirthDetails(@RequestBody MarriageDetailsRequest request) { +// List birthDetails=crBirthService.saveBirthDetails(request); +// MarriageApplicationResponse response= MarriageApplicationResponse.builder() +// .birthDetails(birthDetails) +// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), +// true)) +// .build(); +// return new ResponseEntity<>(response, HttpStatus.OK); +// } - @PostMapping(value = {"/_search"}) - public ResponseEntity listByHospitalId(@RequestBody BirthDetailsRequest request, @Valid @ModelAttribute BirthApplicationSearchCriteria criteria) { - List birthDetails=crBirthService.searchBirthDetails(criteria); - BirthApplicationResponse response=BirthApplicationResponse.builder() - .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), - Boolean.TRUE)) - .birthDetails(birthDetails) - .build(); - return ResponseEntity.ok(response); - } +// @PostMapping(value = {"/_update"}) +// public ResponseEntity updateBirthDetails(@RequestBody MarriageDetailsRequest request) { +// //BirthCertificate birthCertificate = new BirthCertificate(); +// List birthApplicationDetails=crBirthService.updateBirthDetails(request); +// //Download certificate when Approved +// if((birthApplicationDetails.get(0).getStatus() == "APPROVED") && (birthApplicationDetails.get(0).getAction() == "APPROVE")){ +// RegisterBirthDetailsRequest registerBirthDetailsRequest = registryRequestService.createRegistryRequest(request); +// List registerBirthDetails = registerBirthService.saveRegisterBirthDetails(registerBirthDetailsRequest); +// RegisterBirthSearchCriteria criteria = new RegisterBirthSearchCriteria(); +// criteria.setTenantId(registerBirthDetails.get(0).getTenantId()); +// System.out.println(criteria.getTenantId()); +// +// criteria.setRegistrationNo(registerBirthDetails.get(0).getRegistrationNo()); System.out.println(registerBirthDetails.get(0).getRegistrationNo()); +// birthCertificate = registerBirthService.download(criteria,request.getRequestInfo()); +// } +// MarriageApplicationResponse response= MarriageApplicationResponse.builder() +// .birthDetails(birthApplicationDetails) +// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), +// true)) +// .birthCertificate(birthCertificate) +// .build(); +// return new ResponseEntity<>(response, HttpStatus.OK); +// } +// +// @PostMapping(value = {"/_search"}) +// public ResponseEntity listByHospitalId(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { +// List birthDetails=crBirthService.searchBirthDetails(criteria); +// MarriageApplicationResponse response= MarriageApplicationResponse.builder() +// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), +// Boolean.TRUE)) +// .birthDetails(birthDetails) +// .build(); +// return ResponseEntity.ok(response); +// } // @PostMapping(value = { "/_getfilestoreid"}) // public ResponseEntity getfilestoreid(@RequestBody RequestInfoWrapper requestInfoWrapper, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java index bd5eca3d3d6..5d62bc69d64 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java @@ -1,146 +1,8 @@ -package org.ksmart.marriage.marriageapplication.enrichment.birth; +package org.ksmart.marriage.marriageapplication.enrichment.marriage; -import org.apache.commons.collections4.CollectionUtils; -import org.ksmart.marriage.common.model.AuditDetails; -import org.ksmart.marriage.common.repository.IdGenRepository; -import org.ksmart.marriage.config.MarriageConfiguration; -import org.ksmart.marriage.marriageapplication.enrichment.BaseEnrichment; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; -import org.ksmart.marriage.utils.enums.ErrorCodes; -import org.egov.common.contract.request.RequestInfo; -import org.egov.common.contract.request.User; -import org.egov.tracer.model.CustomException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import java.util.List; -import java.util.ListIterator; -import java.util.UUID; - - -@Component -public class MarriageDetailsEnrichment implements BaseEnrichment { - - @Autowired - MarriageConfiguration config; - - @Autowired - IdGenRepository idGenRepository; - - public void enrichCreate(MarriageDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); - request.getBirthDetails().forEach(birth -> { - - birth.setId(UUID.randomUUID().toString()); - - birth.setAuditDetails(auditDetails); - - birth.getBirthPlace().setId(UUID.randomUUID().toString()); - - birth.getBirthFatherInfo().setId(UUID.randomUUID().toString()); - - birth.getBirthMotherInfo().setId(UUID.randomUUID().toString()); - - birth.getBirthPermanentAddress().setId(UUID.randomUUID().toString()); - - birth.getBirthPresentAddress().setId(UUID.randomUUID().toString()); - - birth.getBirthStatisticalInformation().setId(UUID.randomUUID().toString()); - }); - setApplicationNumbers(request); - setFileNumbers(request); - setRegistrationNumber(request); - } - - public void enrichUpdate(MarriageDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); - - request.getBirthDetails() - .forEach(birth -> birth.setAuditDetails(auditDetails)); - } - - private void setApplicationNumbers(MarriageDetailsRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthApplNumberIdName(), - config.getBirthApplNumberIdFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - - ListIterator itr = filecodes.listIterator(); - request.getBirthDetails() - .forEach(birth -> { - birth.setApplicationNo(itr.next()); - - }); - } - - private void setFileNumbers(MarriageDetailsRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthFileNumberName(), - config.getBirthFileNumberFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getBirthDetails() - .forEach(birth -> { - birth.setFmFileNo(itr.next()); - birth.setFileDate(currentTime); - }); - } - - private void setRegistrationNumber(MarriageDetailsRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - List birthDetails = request.getBirthDetails(); - String tenantId = birthDetails.get(0) - .getTenantId(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getBirthRegisNumberName(), - config.getBirthRegisNumberFormat(), - birthDetails.size()); - validateFileCodes(filecodes, birthDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getBirthDetails() - .forEach(birth -> { - birth.setRegistrationNo(itr.next()); - birth.setRegistrationDate(currentTime); - }); - } - - private List getIds(RequestInfo requestInfo, String tenantId, String idKey, String idformat, - int count) { - return idGenRepository.getIdList(requestInfo, tenantId, idKey, idformat, count); - } - - private void validateFileCodes(List fileCodes, int count) { - if (CollectionUtils.isEmpty(fileCodes)) { - throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), "No file code(s) returned from idgen service"); - } - - if (fileCodes.size() != count) { - throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), - "The number of file code(s) returned by idgen service is not equal to the request count"); - } - } -} +//@Component +//public class MarriageDetailsEnrichment implements BaseEnrichment { +// +// +//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index 108ed1ce47b..4068e95bc91 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -2,9 +2,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; -import org.ksmart.marriage.marriageapplication.model.birth.*; -import org.ksmart.marriage.common.model.AuditDetails; -import org.ksmart.marriage.common.model.Document; +import org.ksmart.marriage.marriageapplication.model.marriage.*; +//import org.ksmart.marriage.common.model.AuditDetails; +//import org.ksmart.marriage.common.model.Document; import javax.validation.constraints.Size; import java.util.List; @@ -14,7 +14,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class BirthApplicationDetail { +public class MarriageApplicationDetail { @Size(max = 64) @JsonProperty("id") private String id; @@ -156,33 +156,33 @@ public class BirthApplicationDetail { private String comment; - @JsonProperty("wfDocuments") - private List wfDocuments; + //@JsonProperty("wfDocuments") + //private List wfDocuments; @Size(max = 64) @JsonProperty("status") private String status; @JsonProperty("birthPlace") - private BirthPlace birthPlace; + private MarriagePlace birthPlace; @JsonProperty("birthFather") - private BirthFatherInfo birthFatherInfo; + private MarriageFatherInfo birthFatherInfo; @JsonProperty("birthMother") - private BirthMotherInfo birthMotherInfo; + private MarriageMotherInfo birthMotherInfo; @JsonProperty("birthPermanent") - private BirthPermanentAddress birthPermanentAddress; + private MarriagePermanentAddress birthPermanentAddress; @JsonProperty("birthPresent") - private BirthPresentAddress birthPresentAddress; + private MarriagePresentAddress birthPresentAddress; @JsonProperty("birthStatistical") - private BirthStatisticalInformation birthStatisticalInformation; + private MarriageStatisticalInformation birthStatisticalInformation; - @JsonProperty("auditDetails") - private AuditDetails auditDetails; + //@JsonProperty("auditDetails") + //private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java index c23fd0208f5..fe725325f6a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java @@ -4,7 +4,7 @@ import lombok.*; import org.egov.common.contract.response.ResponseInfo; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; -import org.ksmart.marriage.marriageregistry.model.BirthCertificate; +//import org.ksmart.marriage.marriageregistry.model.BirthCertificate; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; @@ -19,7 +19,7 @@ @Builder -public class BirthApplicationResponse { +public class MarriageApplicationResponse { @JsonProperty("ResponseInfo") private ResponseInfo responseInfo; @@ -28,15 +28,15 @@ public class BirthApplicationResponse { @Valid private List birthDetails; - @JsonProperty("BirthCertificate") - @Valid - private BirthCertificate birthCertificate; +// @JsonProperty("BirthCertificate") +// @Valid + // private BirthCertificate birthCertificate; @JsonProperty("Count") private int count; - public BirthApplicationResponse addBirthApplication(MarriageApplicationDetail birthDetail) { + public MarriageApplicationResponse addBirthApplication(MarriageApplicationDetail birthDetail) { if (birthDetails == null) { birthDetails = new ArrayList<>(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java index 53a7c91e9ce..00e3fc8f79d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java @@ -12,7 +12,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class BirthApplicationSearchCriteria { +public class MarriageApplicationSearchCriteria { @JsonProperty("tenantId") private String tenantId; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java index b472e8df39c..4df2f335c23 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java @@ -11,7 +11,7 @@ @NoArgsConstructor @Builder - public class BirthFatherInfo { + public class MarriageFatherInfo { @Size(max = 64) @JsonProperty("id") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java index 5947e5458ab..3752795785d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java @@ -10,7 +10,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class BirthMotherInfo { +public class MarriageMotherInfo { @Size(max = 64) @JsonProperty("id") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java index 0a45c61b4c2..ec6037d1128 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java @@ -10,7 +10,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class BirthPermanentAddress { +public class MarriagePermanentAddress { @Size(max = 64) @JsonProperty("id") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java index 571b07ec9db..a717b596aa6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java @@ -10,7 +10,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class BirthPlace { +public class MarriagePlace { @Size(max = 64) @JsonProperty("id") private String id; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java index 924a3baa554..15ea5a5f362 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java @@ -11,7 +11,7 @@ @Builder @AllArgsConstructor @NoArgsConstructor -public class BirthPresentAddress { +public class MarriagePresentAddress { @Size(max = 64) @JsonProperty("id") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java index fdaf27e4bc2..343a8072c42 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java @@ -10,7 +10,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class BirthStatisticalInformation { +public class MarriageStatisticalInformation { @Size(max = 64) @JsonProperty("id") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index e6e5a8bd365..f24b68cffb6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -1,16 +1,11 @@ package org.ksmart.marriage.marriageapplication.repository; import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.common.producer.BndProducer; -import org.ksmart.marriage.config.MarriageConfiguration; -import org.ksmart.marriage.marriageapplication.enrichment.birth.MarriageDetailsEnrichment; -import org.ksmart.marriage.marriageapplication.model.marriage.BirthApplicationSearchCriteria; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; -import org.ksmart.marriage.marriageapplication.model.marriage.BirthDetailsRequest; -import org.ksmart.marriage.marriageapplication.repository.querybuilder.BirthApplicationQueryBuilder; -import org.ksmart.marriage.marriageapplication.repository.rowmapper.BirthApplicationRowMapper; +//import org.ksmart.marriage.common.producer.BndProducer; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; +//import org.ksmart.marriage.common.producer.MarriageProducer; import org.springframework.stereotype.Repository; import java.util.ArrayList; @@ -18,44 +13,8 @@ @Slf4j @Repository -public class BirthApplicationRepository { - - private final BndProducer producer; - private final MarriageConfiguration birthDeathConfiguration; - private final JdbcTemplate jdbcTemplate; - private final BirthApplicationQueryBuilder birthQueryBuilder; - private final BirthApplicationRowMapper birthApplicationRowMapper; - private final MarriageDetailsEnrichment birthDetailsEnrichment; - - @Autowired - BirthApplicationRepository(JdbcTemplate jdbcTemplate, BirthApplicationQueryBuilder birthQueryBuilder, - BirthApplicationRowMapper birthApplicationRowMapper, MarriageDetailsEnrichment birthDetailsEnrichment, - MarriageConfiguration birthDeathConfiguration, BndProducer producer) { - this.jdbcTemplate = jdbcTemplate; - this.birthQueryBuilder = birthQueryBuilder; - this.birthApplicationRowMapper = birthApplicationRowMapper; - this.birthDetailsEnrichment = birthDetailsEnrichment; - this.birthDeathConfiguration = birthDeathConfiguration; - this.producer = producer; - } - - public List saveBirthDetails(BirthDetailsRequest request) { - birthDetailsEnrichment.enrichCreate(request); - producer.push(birthDeathConfiguration.getSaveBirthApplicationTopic(), request); - return request.getBirthDetails(); - } - +public class MarriageApplicationRepository { - public List updateBirthDetails(BirthDetailsRequest request) { - birthDetailsEnrichment.enrichUpdate(request); - producer.push(birthDeathConfiguration.getUpdateBirthApplicationTopic(), request); - return request.getBirthDetails(); - } + //private final org.ksmart.birth.common.producer.MarriageProducer producer; - public List searchBirthDetails(BirthApplicationSearchCriteria criteria) { - List preparedStmtValues = new ArrayList<>(); - String query = birthQueryBuilder.getBirthApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), birthApplicationRowMapper); - return result; - } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index c401822f04c..bb385eeb07f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -1,71 +1,11 @@ package org.ksmart.marriage.marriageapplication.service; import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; -import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; -import org.ksmart.marriage.marriageapplication.validator.BirthApplicationValidator; -import org.ksmart.marriage.marriageapplication.validator.MdmsValidator; -import org.ksmart.marriage.marriageregistry.service.MdmsDataService; -import org.ksmart.marriage.utils.MdmsUtil; -import org.ksmart.marriage.workflow.WorkflowIntegrator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import java.util.List; +import org.springframework.stereotype.Service; @Slf4j @Service -public class BirthApplicationService { - private final MarriageApplicationRepository repository; - private final WorkflowIntegrator workflowIntegrator; - private final MdmsUtil mdmsUtil; - - private final MdmsDataService mdmsDataService; - private final MdmsValidator mdmsValidator; - private final BirthApplicationValidator applicationValidator; - - @Autowired - BirthApplicationService(MarriageApplicationRepository repository, WorkflowIntegrator workflowIntegrator, MdmsUtil mdmsUtil, - MdmsValidator mdmsValidator, BirthApplicationValidator applicationValidator, MdmsDataService mdmsDataService) { - this.repository = repository; - this.workflowIntegrator = workflowIntegrator; - this.mdmsUtil = mdmsUtil; - this.mdmsValidator = mdmsValidator; - this.applicationValidator = applicationValidator; - this.mdmsDataService = mdmsDataService; - } - - - public List saveBirthDetails(MarriageDetailsRequest request) { - - //validate mdms data - Object mdmsData = mdmsUtil.mdmsCall(request.getRequestInfo()); - - // validate request - applicationValidator.validateCreate(request, mdmsData); - - //call save - List birthApplicationDetails = repository.saveBirthDetails(request); - - //WorkFlow Integration - workflowIntegrator.callWorkFlow(request); - - return birthApplicationDetails; - } - - public List updateBirthDetails(MarriageDetailsRequest request) { - - workflowIntegrator.callWorkFlow(request); - - //mdmsDataService, - - return repository.updateBirthDetails(request); - - } +public class MarriageApplicationService { - public List searchBirthDetails(MarriageApplicationSearchCriteria criteria) { - return repository.searchBirthDetails(criteria); - } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 5ef809cfa0a..546624bc7bb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1,49 +1,12 @@ package org.ksmart.marriage.marriageapplication.validator; -import org.ksmart.marriage.config.MarriageConfiguration; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; -import org.ksmart.marriage.utils.enums.ErrorCodes; -import org.egov.tracer.model.CustomException; -import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Component; -import org.springframework.util.CollectionUtils; -import java.util.List; -import static org.ksmart.marriage.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; +//import static org.ksmart.marriage.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; @Component -public class BirthApplicationValidator { - private final MarriageConfiguration bndCofig; - private final MdmsValidator mdmsValidator; - - @Autowired - BirthApplicationValidator(MarriageConfiguration bndCofig, MdmsValidator mdmsValidator) { - - this.bndCofig = bndCofig; - - this.mdmsValidator = mdmsValidator; - } - - /** - * Validate abirth details create request. - * - * @param request the {@link MarriageDetailsRequest} - */ - public void validateCreate(MarriageDetailsRequest request, Object mdmsData) { - List applicantPersonals = request.getBirthDetails(); - if (CollectionUtils.isEmpty(request.getBirthDetails())) { - throw new CustomException(ErrorCodes.BIRTH_DETAILS_REQUIRED.getCode(), - "Birth details is required."); - } - - if (applicantPersonals.size() > 1) { // NOPMD - throw new CustomException(BIRTH_DETAILS_REQUIRED.getCode(), - "Supports only single Birth application create request."); - } - - mdmsValidator.validateMdmsData(request, mdmsData); - } +public class MarriageApplicationValidator { } diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index e9e56b7f91a..d6d3b9066d4 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -1,30 +1,30 @@ server.context-path=/marriage-services server.servlet.context-path=/marriage-services -server.port=9111 +server.port=8089 app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://ikm-firstqa-eks-db.c865b3gqkoui.ap-south-1.rds.amazonaws.com:5432/ikmeksdb -spring.datasource.username=ikmeksdb +spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.datasource.username=postgres spring.datasource.password=ikm123456 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://ikm-firstqa-eks-db.c865b3gqkoui.ap-south-1.rds.amazonaws.com:5432/ikmeksdb -spring.flyway.user=ikmeksdb +spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.flyway.user=postgres spring.flyway.password=ikm123456 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true spring.flyway.locations=classpath:/db/migration/main -spring.flyway.enabled=true +spring.flyway.enabled=false # KAFKA SERVER CONFIGURATIONS kafka.config.bootstrap_server_config=localhost:9092 spring.kafka.consumer.value-deserializer=org.egov.tracer.kafka.deserializer.HashMapDeserializer spring.kafka.consumer.key-deserializer=org.apache.kafka.common.serialization.StringDeserializer -spring.kafka.consumer.group-id=birth-servies +spring.kafka.consumer.group-id=marriage-services spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer spring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer spring.kafka.listener.missing-topics-fatal=false @@ -43,28 +43,28 @@ spring.kafka.producer.buffer_memory_config=33554432 #org.egov.detailed.tracing.enabled = false #kafka topics for save and update birth -persister.save.birth.cert.topic=save-birth-cert-topic -persister.update.birth.cert.topic=update-birth-cert-topic +#persister.save.birth.cert.topic=save-birth-cert-topic +#persister.update.birth.cert.topic=update-birth-cert-topic #kafka topics for save and update birth -persister.save.birth.topic=save-birth-details-topic -persister.update.birth.topic=update-birth-details-topic +#persister.save.birth.topic=save-birth-details-topic +#persister.update.birth.topic=update-birth-details-topic #kafka topics for save and update registry details -persister.save.birth.register.topic=save-birth-register-topic -persister.update.birth.register.topic=update-birth-register-topic +#persister.save.birth.register.topic=save-birth-register-topic +#persister.update.birth.register.topic=update-birth-register-topic #kafka topics for save and update adoption registry details -persister.save.adoption.register.topic=save-adoption-register-topic -persister.update.adoption.register.topic=update-adoption-register-topic +#persister.save.adoption.register.topic=save-adoption-register-topic +#persister.update.adoption.register.topic=update-adoption-register-topic #kafka topics for save and update birth details -persister.save.birth.application.topic=save-birth-application-topic -persister.update.birth.application.topic=update-birth-application-topic +#persister.save.birth.application.topic=save-birth-application-topic +#persister.update.birth.application.topic=update-birth-application-topic #kafka topics for save and update adoption -persister.save.adoption.topic=save-birth-adoption-topic -persister.update.adoption.topic=update-birth-adoption-topic +#persister.save.adoption.topic=save-birth-adoption-topic +#persister.update.adoption.topic=update-birth-adoption-topic #kafka topics for downloading receipt kafka.topics.receipt.create=egov.collection.payment-create From 2cb0c704e1e4959c3ffb3a190a4b98ee067123b8 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 2 Feb 2023 10:36:34 +0530 Subject: [PATCH 003/420] create added marriage --- .../src/main/resources/application.properties | 8 +- .../src/main/resources/application.properties | 12 +- .../src/main/resources/marriage.yml | 167 ++++++++++++++++++ .../marriage/common/model/AuditDetails.java | 34 ++++ .../common/producer/MarriageProducer.java | 16 ++ .../MarriageApplicationConfiguration.java | 22 +++ .../MarriageApplicationController.java | 48 +++-- .../enrichment/BaseEnrichment.java | 25 +++ .../enrichment/MarriageDetailsEnrichment.java | 32 ++++ .../marriage/MarriageDetailsEnrichment.java | 8 - .../model/MarriageApplicationDetail.java | 106 +++++------ .../marriage/MarriageApplicationResponse.java | 11 +- .../marriage/MarriageDetailsRequest.java | 33 ++++ .../MarriageApplicationRepository.java | 37 +++- .../service/MarriageApplicationService.java | 25 +++ .../marriage/utils/ResponseInfoFactory.java | 25 +++ .../src/main/resources/application.properties | 8 +- 17 files changed, 513 insertions(+), 104 deletions(-) create mode 100644 core-services/egov-persister/src/main/resources/marriage.yml create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/AuditDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/producer/MarriageProducer.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/BaseEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/ResponseInfoFactory.java diff --git a/core-services/egov-enc-service/src/main/resources/application.properties b/core-services/egov-enc-service/src/main/resources/application.properties index ce8785259ba..77541f22377 100644 --- a/core-services/egov-enc-service/src/main/resources/application.properties +++ b/core-services/egov-enc-service/src/main/resources/application.properties @@ -5,13 +5,13 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/enc_service +spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage spring.datasource.username=postgres -spring.datasource.password=postgres +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/enc_service +spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage spring.flyway.user=postgres -spring.flyway.password=postgres +spring.flyway.password=123 spring.flyway.table=flyway spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 14a59089ff1..585d89bba83 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/rainmaker_pgr +spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage spring.datasource.username=postgres -spring.datasource.password=postgres +spring.datasource.password=123 #Set context root server.port = 8082 @@ -10,9 +10,9 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/rainmaker_pgr +spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage spring.flyway.user=postgres -spring.flyway.password=postgres +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -42,7 +42,9 @@ spring.kafka.producer.value-serializer=org.springframework.kafka.support.seriali kafka.topics.create.message=egov-message-create #-------------------------------------------------------------- #egov.persist.yml.repo.path=classpath:pg-service-persister.yml -egov.persist.yml.repo.path=file:///home/aniket/Documents/core-services/egov-persister/src/main/resources/pgr-services-persister.yml,file:///home/aniket/Documents/core-services/egov-persister/src/main/resources/apportion-persister.yml,file:///home/aniket/Documents/core-services/egov-persister/src/main/resources/apportion-persister.yml +#egov.persist.yml.repo.path=classpath:persister.yml + +egov.persist.yml.repo.path=file:///home/neenu/Documents/ksmartproject/Marriage/KSMART/core-services/egov-persister/src/main/resources/marriage.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml new file mode 100644 index 00000000000..c47b0f6c114 --- /dev/null +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -0,0 +1,167 @@ +serviceMaps: + serviceName: marriage-services + mappings: + - version: 1.0 + description: Persists save marriage details in cr_marriage table + fromTopic: save-marriage-application-topic + isTransaction: true + queryMaps: + - query: INSERT INTO public.eg_marriage_details( + id, dateofreport, dateofmarriage, firstname_bride_en, firstname_bride_ml, middlename_bride_en, middlename_bride_ml, lastname_bride_en, lastname_bride_ml, firstname_groom_en, firstname_groom_ml, middlename_groom_en, middlename_groom_ml, lastname_groom_en, lastname_groom_ml, tenantid, remarks_en, remarks_ml, aadharno, esign_user_code, esign_user_desig_code, applicationtype, businessservice, workflowcode, fm_fileno, file_date, file_status, applicationno, registrationno, registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.dateofreport + + - jsonPath: $.MarriageDetails.*.dateofmarriage + + - jsonPath: $.MarriageDetails.*.firstname_bride_en + + - jsonPath: $.MarriageDetails.*.firstname_bride_ml + + - jsonPath: $.MarriageDetails.*.middlename_bride_en + + - jsonPath: $.MarriageDetails.*.middlename_bride_ml + + - jsonPath: $.MarriageDetails.*.lastname_bride_en + + - jsonPath: $.MarriageDetails.*.lastname_bride_ml + + - jsonPath: $.MarriageDetails.*.firstname_groom_en + + - jsonPath: $.MarriageDetails.*.firstname_groom_ml + + - jsonPath: $.MarriageDetails.*.middlename_groom_en + + - jsonPath: $.MarriageDetails.*.middlename_groom_ml + + - jsonPath: $.MarriageDetails.*.lastname_groom_en + + - jsonPath: $.MarriageDetails.*.lastname_groom_ml + + - jsonPath: $.MarriageDetails.*.tenantid + + - jsonPath: $.MarriageDetails.*.remarks_en + + - jsonPath: $.MarriageDetails.*.remarks_ml + + - jsonPath: $.MarriageDetails.*. + + - jsonPath: $.MarriageDetails.*.esign_user_code + + - jsonPath: $.MarriageDetails.*.esign_user_desig_code + + - jsonPath: $.MarriageDetails.*.applicationtype + + - jsonPath: $.MarriageDetails.*.businessservice + + - jsonPath: $.MarriageDetails.*.workflowcode + + - jsonPath: $.MarriageDetails.*.fm_fileno + + - jsonPath: $.MarriageDetails.*.file_date + + - jsonPath: $.MarriageDetails.*.file_status + + - jsonPath: $.MarriageDetails.*.applicationno + + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.registration_date + + - jsonPath: $.MarriageDetails.*.action + + - jsonPath: $.MarriageDetails.*.status + + - jsonPath: $.MarriageDetails.*.auditDetails.createdtime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdby + + - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedtime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedby + + - query: UPDATE public.eg_marriage_details + dateofreport=?, dateofmarriage=?, firstname_bride_en=?, firstname_bride_ml=?, middlename_bride_en=?, middlename_bride_ml=?, lastname_bride_en=?, lastname_bride_ml=?, firstname_groom_en=?, firstname_groom_ml=?, middlename_groom_en=?, middlename_groom_ml=?, lastname_groom_en=?, lastname_groom_ml=?, tenantid=?, remarks_en=?, remarks_ml=?, aadharno=?, esign_user_code=?, esign_user_desig_code=?, applicationtype=?, businessservice=?, workflowcode=?, fm_fileno=?, file_date=?, file_status=?, applicationno=?, registrationno=?, registration_date=?, action=?, status=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=? + WHERE id=?; + basePath: MarriageDetails.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.dateofreport + + - jsonPath: $.MarriageDetails.*.dateofmarriage + + - jsonPath: $.MarriageDetails.*.firstname_bride_en + + - jsonPath: $.MarriageDetails.*.firstname_bride_ml + + - jsonPath: $.MarriageDetails.*.middlename_bride_en + + - jsonPath: $.MarriageDetails.*.middlename_bride_ml + + - jsonPath: $.MarriageDetails.*.lastname_bride_en + + - jsonPath: $.MarriageDetails.*.lastname_bride_ml + + - jsonPath: $.MarriageDetails.*.firstname_groom_en + + - jsonPath: $.MarriageDetails.*.firstname_groom_ml + + - jsonPath: $.MarriageDetails.*.middlename_groom_en + + - jsonPath: $.MarriageDetails.*.middlename_groom_ml + + - jsonPath: $.MarriageDetails.*.lastname_groom_en + + - jsonPath: $.MarriageDetails.*.lastname_groom_ml + + - jsonPath: $.MarriageDetails.*.tenantid + + - jsonPath: $.MarriageDetails.*.remarks_en + + - jsonPath: $.MarriageDetails.*.remarks_ml + + - jsonPath: $.MarriageDetails.*. + + - jsonPath: $.MarriageDetails.*.esign_user_code + + - jsonPath: $.MarriageDetails.*.esign_user_desig_code + + - jsonPath: $.MarriageDetails.*.applicationtype + + - jsonPath: $.MarriageDetails.*.businessservice + + - jsonPath: $.MarriageDetails.*.workflowcode + + - jsonPath: $.MarriageDetails.*.fm_fileno + + - jsonPath: $.MarriageDetails.*.file_date + + - jsonPath: $.MarriageDetails.*.file_status + + - jsonPath: $.MarriageDetails.*.applicationno + + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.registration_date + + - jsonPath: $.MarriageDetails.*.action + + - jsonPath: $.MarriageDetails.*.status + + - jsonPath: $.MarriageDetails.*.auditDetails.createdtime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdby + + - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedtime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedby + + - jsonPath: $.MarriageDetails.*.id + + + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/AuditDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/AuditDetails.java new file mode 100644 index 00000000000..89f3f946660 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/AuditDetails.java @@ -0,0 +1,34 @@ +package org.ksmart.marriage.common.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; + +import javax.validation.Valid; + +/** + * Collection of audit related fields used by most models + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class AuditDetails { + + @JsonProperty("createdBy") + @Valid + private String createdBy = null; + + @JsonProperty("lastModifiedBy") + @Valid + private String lastModifiedBy = null; + + @JsonProperty("createdTime") + @Valid + private Long createdTime = null; + + @JsonProperty("lastModifiedTime") + @Valid + private Long lastModifiedTime = null; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/producer/MarriageProducer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/producer/MarriageProducer.java new file mode 100644 index 00000000000..e0ee1ac45cc --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/producer/MarriageProducer.java @@ -0,0 +1,16 @@ +package org.ksmart.marriage.common.producer; + +import org.egov.tracer.kafka.CustomKafkaTemplate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class MarriageProducer { + + @Autowired + private CustomKafkaTemplate kafkaTemplate; + + public void push(String topic, Object value) { + kafkaTemplate.send(topic, value); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java new file mode 100644 index 00000000000..bdb85150214 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -0,0 +1,22 @@ +package org.ksmart.marriage.config; + +import lombok.*; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@Component +public class MarriageApplicationConfiguration { + + + @Value("${persister.save.marriage.application.topic}") + private String SaveMarriageApplicationTopic; + + + @Value("${persister.update.marriage.application.topic}") + private String UpdateMarriageApplicationTopic; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index 8776ce8d6bb..da78982b1ab 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -2,6 +2,19 @@ import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationResponse; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; +import org.ksmart.marriage.utils.ResponseInfoFactory; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; //import org.ksmart.marriage.marriageregistry.model.BirthCertificate; //import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; //import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetailsRequest; @@ -11,24 +24,35 @@ @Slf4j -//@RestController -//@RequestMapping("/cr/birth") +@RestController +@RequestMapping("/cr/marriage") public class MarriageApplicationController { + private final MarriageApplicationService crMarriageService; + private final ResponseInfoFactory responseInfoFactory; + public MarriageApplicationController(MarriageApplicationService crBirthService, ResponseInfoFactory responseInfoFactory) { + this.crMarriageService = crBirthService; + this.responseInfoFactory = responseInfoFactory; + } -// @PostMapping(value = {"/_create"}) -// public ResponseEntity saveBirthDetails(@RequestBody MarriageDetailsRequest request) { -// List birthDetails=crBirthService.saveBirthDetails(request); -// MarriageApplicationResponse response= MarriageApplicationResponse.builder() -// .birthDetails(birthDetails) -// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), -// true)) -// .build(); -// return new ResponseEntity<>(response, HttpStatus.OK); -// } + @PostMapping(value = {"/_create"}) + public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { + List marriageDetails=crMarriageService.saveMarriageDetails(request); + MarriageApplicationResponse response= MarriageApplicationResponse.builder() + .marriageApplicationDetailsDetails(marriageDetails) + .responseInfo( + responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),true)) + .build(); + return new ResponseEntity<>(response, HttpStatus.OK); + } + @PostMapping(value = { "/_update"}) + public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { + List birthDetails = crMarriageService.updateMarriageDetails(request); + return new ResponseEntity<>(birthDetails, HttpStatus.OK); + } // @PostMapping(value = {"/_update"}) // public ResponseEntity updateBirthDetails(@RequestBody MarriageDetailsRequest request) { // //BirthCertificate birthCertificate = new BirthCertificate(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/BaseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/BaseEnrichment.java new file mode 100644 index 00000000000..d35b4a3095c --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/BaseEnrichment.java @@ -0,0 +1,25 @@ +package org.ksmart.marriage.marriageapplication.enrichment; +import org.ksmart.marriage.common.model.AuditDetails; + + +public interface BaseEnrichment { + default AuditDetails buildAuditDetails(String by, Boolean create) { + AuditDetails auditDetails; + + Long currentTime = Long.valueOf(System.currentTimeMillis()); + if (create) { + auditDetails = AuditDetails.builder() + .createdBy(by) + .createdTime(currentTime) + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } else { + auditDetails = AuditDetails.builder() + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } + return auditDetails; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java new file mode 100644 index 00000000000..c39b8e659fe --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -0,0 +1,32 @@ +package org.ksmart.marriage.marriageapplication.enrichment; + +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.request.User; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.UUID; +@Component +public class MarriageDetailsEnrichment implements BaseEnrichment { + @Autowired + MarriageApplicationConfiguration config; + public void enrichCreate(MarriageDetailsRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + request.getMarriageDetails().forEach(marriage -> { + + marriage.setId(UUID.randomUUID().toString()); + + marriage.setAuditDetails(auditDetails); + + + }); + + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java deleted file mode 100644 index 5d62bc69d64..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/marriage/MarriageDetailsEnrichment.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.ksmart.marriage.marriageapplication.enrichment.marriage; - - -//@Component -//public class MarriageDetailsEnrichment implements BaseEnrichment { -// -// -//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index 4068e95bc91..eaa2f53c15e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.marriageapplication.model.marriage.*; //import org.ksmart.marriage.common.model.AuditDetails; //import org.ksmart.marriage.common.model.Document; @@ -22,48 +23,66 @@ public class MarriageApplicationDetail { @JsonProperty("dateofreport") private Long dateOfReport; - @JsonProperty("dateofbirth") - private Long dateOfBirth; + @JsonProperty("dateofmarriage") + private Long dateOfMarriage; - @JsonProperty("timeofbirth") - private Long timeOfBirth; - @Size(max = 20) - @JsonProperty("am_pm") - private String ampm; @Size(max = 1000) - @JsonProperty("firstname_en") + @JsonProperty("firstname_bride_en") private String firstNameEn; @Size(max = 1000) - @JsonProperty("firstname_ml") + @JsonProperty("firstname_bride_ml") private String firstNameMl; @Size(max = 1000) - @JsonProperty("middlename_en") + @JsonProperty("middlename_bride_en") private String middleNameEn; @Size(max = 1000) - @JsonProperty("middlename_ml") + @JsonProperty("middlename_bride_ml") private String middleNameMl; @Size(max = 1000) - @JsonProperty("lastname_en") + @JsonProperty("lastname_bride_en") private String lastNameEn; @Size(max = 1000) - @JsonProperty("lastname_ml") + @JsonProperty("lastname_bride_ml") private String lastNameMl; + + + @Size(max = 1000) + @JsonProperty("firstname_groom_en") + private String firstNameGroomEn; + + @Size(max = 1000) + @JsonProperty("firstname_groom_ml") + private String firstNameGroomMl; + + @Size(max = 1000) + @JsonProperty("middlename_groom_en") + private String middleNameGroomEn; + + @Size(max = 1000) + @JsonProperty("middlename_groom_ml") + private String middleNameGroomMl; + + @Size(max = 1000) + @JsonProperty("lastname_groom_en") + private String lastNameGroomEn; + + @Size(max = 1000) + @JsonProperty("lastname_groom_ml") + private String lastNameGroomMl; + + @Size(max = 64) @JsonProperty("tenantid") private String tenantId; - @Size(max = 1000) - @JsonProperty("gender") - private String gender; - @Size(max = 2500) @JsonProperty("remarks_en") private String remarksEn; @@ -84,37 +103,7 @@ public class MarriageApplicationDetail { @JsonProperty("esign_user_desig_code") private String esignUserDesigCode; - @JsonProperty("is_adopted") - private Boolean isAdopted; - - @JsonProperty("is_abandoned") - private Boolean isAbandoned; - - @JsonProperty("is_multiple_birth") - private Boolean isMultipleBirth; - - @JsonProperty("is_father_info_missing") - private Boolean isFatherInfoMissing; - - @JsonProperty("is_mother_info_missing") - private Boolean isMotherInfoMissing; - - @JsonProperty("no_of_alive_birth") - private Integer noOfAliveBirth; - - @Size(max = 64) - @JsonProperty("multiplebirthdetid") - private String multipleBirthDetailsIid; - @JsonProperty("is_born_outside") - private Boolean isBornOutside; - - @Size(max = 64) - @JsonProperty("ot_passportno") - private String passportNo; - - @JsonProperty("ot_dateofarrival") - private Long dateOfArrival; @Size(max = 64) @JsonProperty("applicationtype") @@ -134,6 +123,8 @@ public class MarriageApplicationDetail { @JsonProperty("file_date") private Long fileDate; + @JsonProperty("file_status") + private Long fileStatus; @Size(max = 64) @JsonProperty("applicationno") @@ -150,10 +141,7 @@ public class MarriageApplicationDetail { @JsonProperty("action") private String action; - @JsonProperty("assignee") - private List assignee; - private String comment; //@JsonProperty("wfDocuments") @@ -163,23 +151,9 @@ public class MarriageApplicationDetail { @JsonProperty("status") private String status; - @JsonProperty("birthPlace") - private MarriagePlace birthPlace; - - @JsonProperty("birthFather") - private MarriageFatherInfo birthFatherInfo; - - @JsonProperty("birthMother") - private MarriageMotherInfo birthMotherInfo; - - @JsonProperty("birthPermanent") - private MarriagePermanentAddress birthPermanentAddress; - - @JsonProperty("birthPresent") - private MarriagePresentAddress birthPresentAddress; - @JsonProperty("birthStatistical") - private MarriageStatisticalInformation birthStatisticalInformation; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; //@JsonProperty("auditDetails") //private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java index fe725325f6a..7bc5dd42094 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.response.ResponseInfo; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; //import org.ksmart.marriage.marriageregistry.model.BirthCertificate; @@ -26,7 +27,7 @@ public class MarriageApplicationResponse { @JsonProperty("BirthDetails") @Valid - private List birthDetails; + private List marriageApplicationDetailsDetails; // @JsonProperty("BirthCertificate") // @Valid @@ -37,10 +38,12 @@ public class MarriageApplicationResponse { private int count; public MarriageApplicationResponse addBirthApplication(MarriageApplicationDetail birthDetail) { - if (birthDetails == null) { - birthDetails = new ArrayList<>(); + if (marriageApplicationDetailsDetails == null) { + marriageApplicationDetailsDetails = new ArrayList<>(); } - birthDetails.add(birthDetail); + marriageApplicationDetailsDetails.add(birthDetail); return this; } + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java new file mode 100644 index 00000000000..6eee1c1fe19 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java @@ -0,0 +1,33 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.request.RequestInfo; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.springframework.validation.annotation.Validated; + +import javax.validation.Valid; +import java.util.List; + +@Validated +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageDetailsRequest { + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + @JsonProperty("MarriageDetails") + @Valid + private List marriageDetails; + + public MarriageDetailsRequest addBirthDetails(MarriageApplicationDetail birthDetail) { + if (marriageDetails == null) { + marriageDetails = null; + } + return this; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index f24b68cffb6..07c3f89d157 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -3,17 +3,50 @@ import lombok.extern.slf4j.Slf4j; //import org.ksmart.marriage.common.producer.BndProducer; +import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +//import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; -//import org.ksmart.marriage.common.producer.MarriageProducer; import org.springframework.stereotype.Repository; -import java.util.ArrayList; import java.util.List; @Slf4j @Repository public class MarriageApplicationRepository { + private final MarriageProducer producer; + + private final MarriageApplicationConfiguration marriageApplicationConfiguration; + + private final MarriageDetailsEnrichment marriageDetailsEnrichment; + private final JdbcTemplate jdbcTemplate; + + @Autowired + public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment) { + this.producer = producer; + this.marriageApplicationConfiguration = marriageApplicationConfiguration; + this.marriageDetailsEnrichment = marriageDetailsEnrichment; + this.jdbcTemplate = jdbcTemplate; + + } + + + public List saveMarriageDetails(MarriageDetailsRequest request) { + + marriageDetailsEnrichment.enrichCreate(request); + producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + return request.getMarriageDetails(); + } + + public List updateMarriageDetails(MarriageDetailsRequest request) { + marriageDetailsEnrichment.enrichCreate(request); + producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); + return request.getMarriageDetails(); + } //private final org.ksmart.birth.common.producer.MarriageProducer producer; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index bb385eeb07f..5470ca809fb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -2,10 +2,35 @@ import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.springframework.stereotype.Service; +import java.util.List; + @Slf4j @Service public class MarriageApplicationService { + private final MarriageApplicationRepository repository; + + + + + public MarriageApplicationService(MarriageApplicationRepository repository) { + this.repository = repository; + } + + public List saveMarriageDetails(MarriageDetailsRequest request) { + + + + + // workflowIntegrator.callWorkFlow(request); + return repository.saveMarriageDetails(request); + } + public List updateMarriageDetails(MarriageDetailsRequest request) { + return repository.updateMarriageDetails(request); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/ResponseInfoFactory.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/ResponseInfoFactory.java new file mode 100644 index 00000000000..f1e269368fc --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/ResponseInfoFactory.java @@ -0,0 +1,25 @@ +package org.ksmart.marriage.utils; + +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.response.ResponseInfo; +import org.springframework.stereotype.Component; + +@Component +public class ResponseInfoFactory { + + public ResponseInfo createResponseInfoFromRequestInfo(final RequestInfo requestInfo, final Boolean success) { + + final String apiId = requestInfo != null ? requestInfo.getApiId() : ""; + final String ver = requestInfo != null ? requestInfo.getVer() : ""; + Long ts = null; + if(requestInfo!=null) + ts = requestInfo.getTs(); + final String resMsgId = "uief87324"; + final String msgId = requestInfo != null ? requestInfo.getMsgId() : ""; + final String responseStatus = success ? "successful" : "failed"; + + return ResponseInfo.builder().apiId(apiId).ver(ver).ts(ts).resMsgId(resMsgId).msgId(msgId).resMsgId(resMsgId) + .status(responseStatus).build(); + } + +} diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index d6d3b9066d4..19d1fff12bf 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,17 +7,17 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage spring.datasource.username=postgres -spring.datasource.password=ikm123456 +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage spring.flyway.user=postgres -spring.flyway.password=ikm123456 +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true spring.flyway.locations=classpath:/db/migration/main -spring.flyway.enabled=false +spring.flyway.enabled=true # KAFKA SERVER CONFIGURATIONS @@ -41,6 +41,8 @@ spring.kafka.producer.batch_size_config=16384 spring.kafka.producer.linger_ms_config=1 spring.kafka.producer.buffer_memory_config=33554432 #org.egov.detailed.tracing.enabled = false +persister.save.marriage.application.topic=save-marriage-application-topic +persister.update.marriage.application.topic=update-marriage-application-topic #kafka topics for save and update birth #persister.save.birth.cert.topic=save-birth-cert-topic From 6fe85a27d51f7899d0e4fe9ba7c74d229e017a2a Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 2 Feb 2023 12:44:49 +0530 Subject: [PATCH 004/420] update added marriage --- .../src/main/resources/marriage.yml | 17 +++++++++++++---- .../MarriageApplicationConfiguration.java | 4 ++-- .../enrichment/MarriageDetailsEnrichment.java | 10 ++++++++++ .../MarriageApplicationRepository.java | 2 +- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index c47b0f6c114..b1b2a4390e1 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -47,7 +47,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.remarks_ml - - jsonPath: $.MarriageDetails.*. + - jsonPath: $.MarriageDetails.*.aadharno - jsonPath: $.MarriageDetails.*.esign_user_code @@ -83,8 +83,17 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedby - - query: UPDATE public.eg_marriage_details - dateofreport=?, dateofmarriage=?, firstname_bride_en=?, firstname_bride_ml=?, middlename_bride_en=?, middlename_bride_ml=?, lastname_bride_en=?, lastname_bride_ml=?, firstname_groom_en=?, firstname_groom_ml=?, middlename_groom_en=?, middlename_groom_ml=?, lastname_groom_en=?, lastname_groom_ml=?, tenantid=?, remarks_en=?, remarks_ml=?, aadharno=?, esign_user_code=?, esign_user_desig_code=?, applicationtype=?, businessservice=?, workflowcode=?, fm_fileno=?, file_date=?, file_status=?, applicationno=?, registrationno=?, registration_date=?, action=?, status=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=? + + + - version: 1.0 + description: Persists update marriage details in cr_marriage table + fromTopic: update-marriage-application-topic + isTransaction: true + queryMaps: + + - query: UPDATE public.eg_marriage_details SET dateofreport=?, dateofmarriage=?, firstname_bride_en=?, firstname_bride_ml=?, middlename_bride_en=?, middlename_bride_ml=?, lastname_bride_en=?, lastname_bride_ml=?, firstname_groom_en=?, firstname_groom_ml=?, + middlename_groom_en=?, middlename_groom_ml=?, lastname_groom_en=?, lastname_groom_ml=?, tenantid=?, remarks_en=?, remarks_ml=?, aadharno=?, esign_user_code=?, esign_user_desig_code=?, applicationtype=?, businessservice=?, workflowcode=?, fm_fileno=?, + file_date=?, file_status=?, applicationno=?, registrationno=?, registration_date=?, action=?, status=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=? WHERE id=?; basePath: MarriageDetails.* jsonMaps: @@ -123,7 +132,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.remarks_ml - - jsonPath: $.MarriageDetails.*. + - jsonPath: $.MarriageDetails.*.aadharno - jsonPath: $.MarriageDetails.*.esign_user_code diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index bdb85150214..a9aec2d4b08 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -14,9 +14,9 @@ public class MarriageApplicationConfiguration { @Value("${persister.save.marriage.application.topic}") - private String SaveMarriageApplicationTopic; + private String saveMarriageApplicationTopic; @Value("${persister.update.marriage.application.topic}") - private String UpdateMarriageApplicationTopic; + private String updateMarriageApplicationTopic; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index c39b8e659fe..cc48ff67db0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -27,6 +27,16 @@ public void enrichCreate(MarriageDetailsRequest request) { }); + + } + public void enrichUpdate(MarriageDetailsRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); + + request.getMarriageDetails() + .forEach(birth -> birth.setAuditDetails(auditDetails)); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 07c3f89d157..cae0117f086 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -43,7 +43,7 @@ public List saveMarriageDetails(MarriageDetailsReques } public List updateMarriageDetails(MarriageDetailsRequest request) { - marriageDetailsEnrichment.enrichCreate(request); + marriageDetailsEnrichment.enrichUpdate(request); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); return request.getMarriageDetails(); } From b2ff416b8b4e48a4c336e17504a1edeb0bc17e21 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 6 Feb 2023 10:22:44 +0530 Subject: [PATCH 005/420] Search added marriage --- .../MarriageApplicationController.java | 26 +++++-- .../marriage/MarriageApplicationResponse.java | 8 +- .../MarriageApplicationSearchCriteria.java | 31 +------- .../MarriageApplicationRepository.java | 17 ++++- .../querybuilder/BaseBirthQuery.java | 73 +++++++++++++++++++ .../MarriageApplicationQueryBuilder.java | 32 ++++++++ .../repository/rowmapper/BaseRowMapper.java | 19 +++++ .../MarriageApplicationRowMapper.java | 64 ++++++++++++++++ .../service/MarriageApplicationService.java | 5 ++ 9 files changed, 233 insertions(+), 42 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index da78982b1ab..200c04e6986 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -4,16 +4,15 @@ import lombok.extern.slf4j.Slf4j; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationResponse; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import javax.validation.Valid; import java.util.List; //import org.ksmart.marriage.marriageregistry.model.BirthCertificate; //import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; @@ -41,7 +40,7 @@ public MarriageApplicationController(MarriageApplicationService crBirthService, public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { List marriageDetails=crMarriageService.saveMarriageDetails(request); MarriageApplicationResponse response= MarriageApplicationResponse.builder() - .marriageApplicationDetailsDetails(marriageDetails) + .marriageApplicationDetails(marriageDetails) .responseInfo( responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),true)) @@ -50,8 +49,20 @@ public ResponseEntity saveMarriageDetails(@RequestB } @PostMapping(value = { "/_update"}) public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { - List birthDetails = crMarriageService.updateMarriageDetails(request); - return new ResponseEntity<>(birthDetails, HttpStatus.OK); + List marriageDetails = crMarriageService.updateMarriageDetails(request); + return new ResponseEntity<>(marriageDetails, HttpStatus.OK); + } + + @PostMapping(value = { "/_search"}) + public ResponseEntity listByHospitalId(@RequestBody MarriageDetailsRequest request, + @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { + List marriageDetailsDetails = crMarriageService.searchMarriageDetails(criteria); + MarriageApplicationResponse response = MarriageApplicationResponse.builder() + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), + Boolean.TRUE)) + .marriageApplicationDetails(marriageDetailsDetails) + .build(); + return ResponseEntity.ok(response); } // @PostMapping(value = {"/_update"}) // public ResponseEntity updateBirthDetails(@RequestBody MarriageDetailsRequest request) { @@ -104,4 +115,5 @@ public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsReque // } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java index 7bc5dd42094..0784f863a36 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java @@ -27,7 +27,7 @@ public class MarriageApplicationResponse { @JsonProperty("BirthDetails") @Valid - private List marriageApplicationDetailsDetails; + private List marriageApplicationDetails; // @JsonProperty("BirthCertificate") // @Valid @@ -38,10 +38,10 @@ public class MarriageApplicationResponse { private int count; public MarriageApplicationResponse addBirthApplication(MarriageApplicationDetail birthDetail) { - if (marriageApplicationDetailsDetails == null) { - marriageApplicationDetailsDetails = new ArrayList<>(); + if (marriageApplicationDetails == null) { + marriageApplicationDetails = new ArrayList<>(); } - marriageApplicationDetailsDetails.add(birthDetail); + marriageApplicationDetails.add(birthDetail); return this; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java index 00e3fc8f79d..eb30686451b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java @@ -18,39 +18,10 @@ public class MarriageApplicationSearchCriteria { private String tenantId; @JsonProperty("id") - private String id; // birthapplicant id + private String id; @JsonProperty("applicationNo") private String applicationNo; - @JsonProperty("registrationNo") - private String registrationNo; - @JsonProperty("fileCode") - private String fileCode; - - @JsonProperty("fromDate") - private Long fromDate; // report date - - @JsonProperty("toDate") - private Long toDate; // report date - - @JsonProperty("fromDateFile") - private Long fromDateFile; // file date - - @JsonProperty("toDateFile") - private Long toDateFile; // file date - - @JsonProperty("aadhaarNo") - private String aadhaarNo; - - @JsonProperty("offset") - private Integer offset; - - @JsonProperty("limit") - private Integer limit; - - @JsonProperty("dateOfBirth") - @Valid - private String dateOfBirth; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index cae0117f086..5579ac2aa42 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -8,11 +8,15 @@ import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; //import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; +import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; +import java.util.ArrayList; import java.util.List; @Slf4j @@ -23,15 +27,19 @@ public class MarriageApplicationRepository { private final MarriageApplicationConfiguration marriageApplicationConfiguration; private final MarriageDetailsEnrichment marriageDetailsEnrichment; + private final MarriageApplicationQueryBuilder marriageQueryBuilder; + private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; @Autowired - public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment) { + public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageDetailsEnrichment = marriageDetailsEnrichment; this.jdbcTemplate = jdbcTemplate; + this.marriageQueryBuilder = marriageQueryBuilder; + this.marriageApplicationRowMapper = marriageApplicationRowMapper; } @@ -48,6 +56,13 @@ public List updateMarriageDetails(MarriageDetailsRequ return request.getMarriageDetails(); } + public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getBirthApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + return result; + } + //private final org.ksmart.birth.common.producer.MarriageProducer producer; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java new file mode 100644 index 00000000000..f2d03793c56 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java @@ -0,0 +1,73 @@ +package org.ksmart.marriage.marriageapplication.repository.querybuilder; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +@Component +public class BaseBirthQuery { + void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, + List paramValues) { + + if (startDate != null || endDate != null) { + addWhereClause(paramValues, query); + query.append(" ("); + + if (startDate != null) { + query.append(column) + .append(" >= ? "); + paramValues.add(startDate); + } + + if (endDate != null) { + if (startDate != null) { + query.append(" AND "); + } + + query.append(column) + .append(" <= ? "); + paramValues.add(endDate); + } + + query.append(") "); + } + } + + void addFilters(String column, List ids, StringBuilder query, List paramValues) { + if (CollectionUtils.isNotEmpty(ids)) { + addWhereClause(paramValues, query); + query.append(column) + .append(" IN (") + .append(getStatementParameters(ids.size())) + .append(") "); + ids.forEach(paramValues::add); + } + } + + void addFilter(String column, String value, StringBuilder query, List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + } + } + + void addWhereClause(List values, StringBuilder query) { + if (CollectionUtils.isEmpty(values)) { + query.append(" WHERE "); + } else { + query.append(" AND "); + } + } + + private String getStatementParameters(int count) { + return Collections.nCopies(count, "(?)") + .stream() + .collect(Collectors.joining(", ")); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java new file mode 100644 index 00000000000..7e6a4c2a841 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -0,0 +1,32 @@ +package org.ksmart.marriage.marriageapplication.repository.querybuilder; + + +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.springframework.stereotype.Component; + +import javax.validation.constraints.NotNull; +import java.util.List; +@Component +public class MarriageApplicationQueryBuilder extends BaseBirthQuery { + private static final String QUERY = new StringBuilder() + .append("SELECT mrg.id, mrg.dateofreport, mrg.dateofmarriage, mrg.firstname_bride_en, mrg.firstname_bride_ml,") + .append("mrg.middlename_bride_en, mrg.middlename_bride_ml, mrg.lastname_bride_en, mrg.lastname_bride_ml, mrg.firstname_groom_en, mrg.firstname_groom_ml,") + .append("mrg.middlename_groom_en, mrg.middlename_groom_ml, mrg.lastname_groom_en, mrg.lastname_groom_ml, mrg.tenantid, mrg.remarks_en, mrg.remarks_ml, mrg.aadharno, ") + .append("mrg.esign_user_code, mrg.esign_user_desig_code, mrg.applicationtype, mrg.businessservice, mrg.workflowcode, mrg.fm_fileno, mrg.file_date, mrg.file_status,") + .append("mrg.applicationtype, mrg.businessservice, mrg.workflowcode, mrg.fm_fileno, mrg.file_date, mrg.applicationno, mrg.registrationno,") + .append("mrg.applicationno, mrg.registrationno, mrg.registration_date, mrg.action, mrg.status, mrg.createdtime, mrg.createdby, mrg.lastmodifiedtime, mrg.lastmodifiedby") + .append(" FROM public.eg_marriage_details mrg").toString(); + + + public String getBirthApplicationSearchQuery(@NotNull MarriageApplicationSearchCriteria criteria, + @NotNull List preparedStmtValues, Boolean isCount) { + StringBuilder query = new StringBuilder(QUERY); + + addFilter("mrg.id", criteria.getId(), query, preparedStmtValues); + addFilter("mrg.tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("mrg.applicationno", criteria.getApplicationNo(), query, preparedStmtValues); + + return query.toString(); + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java new file mode 100644 index 00000000000..ae40418e384 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java @@ -0,0 +1,19 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.common.model.AuditDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +interface BaseRowMapper { + + default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { + return AuditDetails.builder() + .createdBy(rs.getString("createdby")) + .createdTime(Long.valueOf(rs.getLong("createdtime"))) + .lastModifiedBy(rs.getString("lastmodifiedby")) + .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) + .build(); + } + +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java new file mode 100644 index 00000000000..66195f3ac1b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -0,0 +1,64 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ResultSetExtractor; +import org.springframework.stereotype.Component; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +@Component +public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper{ + + @Override + public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null + List result = new ArrayList<>(); + while (rs.next()) { + result.add(MarriageApplicationDetail.builder() + .id(rs.getString("id")) + .dateOfReport(Long.valueOf(rs.getLong("dateofreport"))) + .dateOfMarriage(Long.valueOf(rs.getLong("dateofmarriage"))) + .firstNameEn(rs.getString("firstname_bride_en")) + .firstNameMl(rs.getString("firstname_bride_ml")) + .middleNameEn(rs.getString("middlename_bride_en")) + .middleNameMl(rs.getString("middlename_bride_ml")) + .lastNameEn(rs.getString("lastname_bride_en")) + .lastNameMl(rs.getString("lastname_bride_ml")) + .firstNameGroomEn(rs.getString("firstname_groom_en")) + .firstNameGroomMl(rs.getString("firstname_groom_ml")) + .middleNameGroomEn(rs.getString("middlename_groom_en")) + .middleNameGroomMl(rs.getString("middlename_groom_ml")) + .lastNameGroomEn(rs.getString("lastname_groom_en")) + .lastNameGroomMl(rs.getString("lastname_groom_ml")) + .tenantId(rs.getString("tenantid")) + .remarksEn(rs.getString("remarks_en")) + .remarksMl(rs.getString("remarks_ml")) + .remarksMl(rs.getString("aadharno")) + .esignUserCode(rs.getString("esign_user_code")) + .esignUserDesigCode(rs.getString("esign_user_desig_code")) + //.noOfAliveBirth(Integer.valueOf(rs.getString("no_of_alive_birth"))) + //.dateOfArrival(Long.valueOf(rs.getString("ot_dateofarrival"))) + .applicationType(rs.getString("applicationtype")) + .businessService(rs.getString("businessservice")) + .workFlowCode(rs.getString("workflowcode")) + .fmFileNo(rs.getString("fm_fileno")) + .fileDate(Long.valueOf(rs.getString("file_date"))) + .applicationNo(rs.getString("applicationno")) + .registrationNo(rs.getString("registrationno")) + .registrationDate(Long.valueOf(rs.getString("registration_date"))) + .action(rs.getString("action")) + .status(rs.getString("status")) + .auditDetails(getAuditDetails(rs)) + .build()); + + } + + return result; + } +} + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 5470ca809fb..a3153f56b15 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -3,6 +3,7 @@ import lombok.extern.slf4j.Slf4j; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.springframework.stereotype.Service; @@ -33,4 +34,8 @@ public List saveMarriageDetails(MarriageDetailsReques public List updateMarriageDetails(MarriageDetailsRequest request) { return repository.updateMarriageDetails(request); } + + public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { + return repository.searchMarriageDetails(criteria); + } } From ada927fa7b412868b3f4b0bf35e1de7d97d4a600 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Fri, 24 Feb 2023 14:42:59 +0530 Subject: [PATCH 006/420] migration --- .../enrichment/MarriageDetailsEnrichment.java | 8 +- .../model/MarriageApplicationDetail.java | 188 ++++++----- .../model/marriage/BrideDetails.java | 309 ++++++++++++++++++ .../model/marriage/GroomDetails.java | 305 +++++++++++++++++ .../marriage/PermanentAdressDetails.java | 89 +++++ .../model/marriage/PresentAddressDetails.java | 89 +++++ .../model/marriage/WitnessDetails.java | 49 +++ .../MarriageApplicationRowMapper.java | 72 ++-- .../src/main/resources/application.properties | 4 +- ...V20221228114820__marriage_services_ddl.sql | 284 ++++++++++++++-- 10 files changed, 1232 insertions(+), 165 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index cc48ff67db0..257d3d64e7c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -20,9 +20,9 @@ public void enrichCreate(MarriageDetailsRequest request) { AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); request.getMarriageDetails().forEach(marriage -> { - marriage.setId(UUID.randomUUID().toString()); + // marriage.setId(UUID.randomUUID().toString()); - marriage.setAuditDetails(auditDetails); + // marriage.setAuditDetails(auditDetails); }); @@ -35,8 +35,8 @@ public void enrichUpdate(MarriageDetailsRequest request) { User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); - request.getMarriageDetails() - .forEach(birth -> birth.setAuditDetails(auditDetails)); +// request.getMarriageDetails() +// .forEach(birth -> birth.setAuditDetails(auditDetails)); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index eaa2f53c15e..f3ec630dd3a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -16,147 +16,161 @@ @NoArgsConstructor @Builder public class MarriageApplicationDetail { - @Size(max = 64) - @JsonProperty("id") - private String id; - @JsonProperty("dateofreport") - private Long dateOfReport; + @JsonProperty("marraigeDOM") + private Long dateofmarriage; - @JsonProperty("dateofmarriage") - private Long dateOfMarriage; + @JsonProperty("marraigeDOR") + private Long dateofreporting; - @Size(max = 1000) - @JsonProperty("firstname_bride_en") - private String firstNameEn; + @Size(max = 64) + @JsonProperty("marraigeDistrictid") + private String districtid; - @Size(max = 1000) - @JsonProperty("firstname_bride_ml") - private String firstNameMl; + @Size(max = 64) + @JsonProperty("marraigeLBtype") + private String lbtype; - @Size(max = 1000) - @JsonProperty("middlename_bride_en") - private String middleNameEn; + + @Size(max = 64) + private String tenantid; + + @Size(max = 64) + @JsonProperty("marraigePlacetype") + private String placetype; @Size(max = 1000) - @JsonProperty("middlename_bride_ml") - private String middleNameMl; + @JsonProperty("marraigePlacename") + private String placename; + + @Size(max = 64) + @JsonProperty("marraigeWardCode") + private String ward_code; @Size(max = 1000) - @JsonProperty("lastname_bride_en") - private String lastNameEn; + @JsonProperty("marriageStreetEn") + private String street_name_en; @Size(max = 1000) - @JsonProperty("lastname_bride_ml") - private String lastNameMl; + @JsonProperty("marriageStreetMal") + private String street_name_ml; - @Size(max = 1000) - @JsonProperty("firstname_groom_en") - private String firstNameGroomEn; + @Size(max = 64) + @JsonProperty("marraigeTalukID") + private String talukid; - @Size(max = 1000) - @JsonProperty("firstname_groom_ml") - private String firstNameGroomMl; + @Size(max = 64) + @JsonProperty("marraigeVillageName") + private String village_name; @Size(max = 1000) - @JsonProperty("middlename_groom_en") - private String middleNameGroomEn; + @JsonProperty("marriageLandmark") + private String landmark; @Size(max = 1000) - @JsonProperty("middlename_groom_ml") - private String middleNameGroomMl; + @JsonProperty("marriageLocalityEn") + private String locality_en; @Size(max = 1000) - @JsonProperty("lastname_groom_en") - private String lastNameGroomEn; + @JsonProperty("marriageLocalityMal") + private String locality_ml; - @Size(max = 1000) - @JsonProperty("lastname_groom_ml") - private String lastNameGroomMl; + @Size(max = 64) + @JsonProperty("marraigeType") + private String marriage_type; @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; + @JsonProperty("marriagePlaceothers") + private String placeothers; - @Size(max = 2500) - @JsonProperty("remarks_en") - private String remarksEn; + @Size(max = 200) + @JsonProperty("othMarriageType") + private String oth_marriage_type; - @Size(max = 2500) - @JsonProperty("remarks_ml") - private String remarksMl; + @Size(max = 1000) + @JsonProperty("marraigeOthersSpecify") + private String othersspecify; @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; + @JsonProperty("WitnessDetails") + private String adharno; - @Size(max = 64) - @JsonProperty("esign_user_code") - private String esignUserCode; + @Size(max = 200) + @JsonProperty("witnessNameEn") + private String name_en; - @Size(max = 64) - @JsonProperty("esign_user_desig_code") - private String esignUserDesigCode; + @Size(max = 200) + @JsonProperty("witnessNameMal") + private String name_mal; - @Size(max = 64) - @JsonProperty("applicationtype") - private String applicationType; - @Size(max = 64) - @JsonProperty("businessservice") - private String businessService; + @JsonProperty("witnessAge") + private Integer age; - @Size(max = 64) - @JsonProperty("workflowcode") - private String workFlowCode; + @Size(max = 200) + @JsonProperty("witnessAddresSEn") + private String address_en; + + @Size(max = 200) + @JsonProperty("witnessAddressMal") + private String address_mal; + + @Size(max = 150) + @JsonProperty("witnessMobile") + private String mobile; + + + @JsonProperty("witnessISmessageReceived") + private Boolean is_message_received; + + + + + @JsonProperty("witnessISEsigned") + private Boolean is_esigned; - @Size(max = 64) - @JsonProperty("fm_fileno") - private String fmFileNo; - @JsonProperty("file_date") - private Long fileDate; - @JsonProperty("file_status") - private Long fileStatus; - @Size(max = 64) - @JsonProperty("applicationno") - private String applicationNo; @Size(max = 64) - @JsonProperty("registrationno") - private String registrationNo; + @JsonProperty("marraigeApplicationType") + private String applicationtype; - @JsonProperty("registration_date") - private Long registrationDate; + @Size(max = 64) + @JsonProperty("marraigeBusinessService") + private String businessservice; @Size(max = 64) - @JsonProperty("action") - private String action; + @JsonProperty("marraigeWorkflowCode") + private String workflowcode; + @Size(max = 64) + @JsonProperty("marraigeFileNo") + private String fileno; - //@JsonProperty("wfDocuments") - //private List wfDocuments; + @JsonProperty("marraigeFileDate") + private long file_date; @Size(max = 64) - @JsonProperty("status") - private String status; + @JsonProperty("marraigeFileStatus") + private String file_status; + @Size(max = 64) + @JsonProperty("marraigeAction") + private String action; - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - - //@JsonProperty("auditDetails") - //private AuditDetails auditDetails; + @Size(max = 64) + @JsonProperty("marraigeStatus") + private String status; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java new file mode 100644 index 00000000000..0f8fc6454f3 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -0,0 +1,309 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.Size; + +public class BrideDetails { + + @Size(max = 64) + @JsonProperty("brideResidentShip") + private String residentship; + + @Size(max = 15) + @JsonProperty("brideAdharNo") + private String adharno; + + + + @Size(max = 1000) + @JsonProperty("bridePassportNo") + private String passportno; + + @Size(max = 64) + @JsonProperty("brideSocialSecurityNo") + private String socialsecurityno; + + @Size(max = 200) + @JsonProperty("brideFirstnameEn") + private String firstname_en; + + @Size(max = 200) + @JsonProperty("brideFirstnameMal") + private String firstname_mal; + + @Size(max = 200) + @JsonProperty("brideMiddlenameEn") + private String middlename_en; + + @Size(max = 200) + @JsonProperty("brideMiddlenameMal") + private String middlename_mal; + + + + @Size(max = 200) + @JsonProperty("brideLastnameEn") + private String lastname_en; + + @Size(max = 200) + @JsonProperty("brideLastnameMal") + private String lastname_mal; + + @Size(max = 150) + @JsonProperty("brideMobile") + private String mobile; + + @Size(max = 300) + @JsonProperty("brideEmailid") + private String emailid; + + @Size(max = 20) + @JsonProperty("brideGender") + private String gender; + + + @JsonProperty("brideDOB") + private long dateofbirth; + + + + @JsonProperty("brideAge") + private Integer age; + + @Size(max = 64) + @JsonProperty("brideParentGuardian") + private String parent_guardian; + + @Size(max = 200) + @JsonProperty("brideFathernameEn") + private String fathername_en; + + @Size(max = 200) + @JsonProperty("brideFathernameMal") + private String fathername_mal; + + @Size(max = 200) + @JsonProperty("brideMothernameEn") + private String mothername_en; + + @Size(max = 200) + @JsonProperty("brideMothernameMal") + private String mothername_mal; + + @Size(max = 15) + @JsonProperty("brideFatherAdharNo") + private String father_adharno; + + @Size(max = 15) + @JsonProperty("brideMotherAdharNo") + private String mother_adharno; + + + + @Size(max = 200) + @JsonProperty("brideGuardiannameEn") + private String guardianname_en; + + @Size(max = 200) + @JsonProperty("brideGuardiannameMal") + private String guardianname_mal; + + @Size(max = 15) + @JsonProperty("brideGardianAdhar") + private String guardian_adhar; + + @Size(max = 200) + @JsonProperty("permanentHouseNo") + private String houseno; + + @Size(max = 2500) + @JsonProperty("permanentHouseNameEn") + private String housename_no_en; + + + + @Size(max = 2500) + @JsonProperty("permanentHouseNameMal") + private String housename_no_ml; + + @Size(max = 64) + @JsonProperty("permanentVillageId") + private String villageid; + + @Size(max = 1000) + @JsonProperty("permanentVillageName") + private String village_name; + + @Size(max = 64) + @JsonProperty("permanentTalukID") + private String talukid; + + @Size(max = 1000) + @JsonProperty("permanentTalukName") + private String taluk_name; + + @Size(max = 64) + @JsonProperty("permanentWardCode") + private String ward_code; + + + + + @JsonProperty("permanentDoorNO") + private Integer doorno; + + @Size(max = 1000) + @JsonProperty("permanentLocalityEn") + private String locality_en; + + @Size(max = 1000) + @JsonProperty("permanentLocalityMal") + private String locality_ml; + + @Size(max = 2000) + @JsonProperty("permanentStreetNameEn") + private String street_name_en; + + @Size(max = 2000) + @JsonProperty("permanentStreetNameMal") + private String street_name_ml; + + + @Size(max = 64) + @JsonProperty("permanentDistrictId") + private String districtid; + + + @Size(max = 64) + @JsonProperty("permanentStateId") + private String stateid; + + @Size(max = 64) + @JsonProperty("permanentPOid") + private String poid; + + @Size(max = 10) + @JsonProperty("permanentPin") + private String pinno; + + @Size(max = 64) + @JsonProperty("permanentCountryId") + private String countryid; + + + + + @Size(max = 200) + @JsonProperty("presentHouseNo") + private String presentHouseNo; + + @Size(max = 2500) + @JsonProperty("presentHouseNameEn") + private String presentHouseNameEn; + + + + @Size(max = 2500) + @JsonProperty("presentHouseNameMal") + private String presentHouseNameMal; + + @Size(max = 64) + @JsonProperty("presentVillageId") + private String presentVillageId; + + @Size(max = 1000) + @JsonProperty("presentVillageName") + private String presentVillageName; + + @Size(max = 64) + @JsonProperty("presentTalukID") + private String presentTalukID; + + @Size(max = 1000) + @JsonProperty("presentTalukName") + private String presentTalukName; + + @Size(max = 64) + @JsonProperty("presentWardCode") + private String presentWardCode; + + + + + @JsonProperty("presentDoorNO") + private Integer presentDoorNO; + + @Size(max = 1000) + @JsonProperty("presentLocalityEn") + private String presentLocalityEn; + + @Size(max = 1000) + @JsonProperty("presentLocalityMal") + private String presentLocalityMal; + + @Size(max = 2000) + @JsonProperty("presentStreetNameEn") + private String presentStreetNameEn; + + @Size(max = 2000) + @JsonProperty("presentStreetNameMal") + private String presentStreetNameMal; + + + @Size(max = 64) + @JsonProperty("presentDistrictId") + private String presentDistrictId; + + + + + @Size(max = 64) + @JsonProperty("presentStateId") + private String presentStateId; + + @Size(max = 64) + @JsonProperty("presentPOid") + private String presentPOid; + + @Size(max = 10) + @JsonProperty("presentPin") + private String presentPin; + + @Size(max = 64) + @JsonProperty("presentCountryId") + private String presentCountryId; + + + + + + @Size(max = 200) + @JsonProperty("brideProfessionEn") + private String profession_en; + + @Size(max = 200) + @JsonProperty("brideProfessionMal") + private String profession_mal; + + @Size(max = 64) + @JsonProperty("brideMaritalstatusID") + private String maritalstatusid; + + + + @JsonProperty("brideSpouseLiving") + private Boolean is_spouse_living; + + + @JsonProperty("brideNoOfSpouse") + private Boolean no_of_spouse_living; + + + @Size(max = 150) + @JsonProperty("bridePhotoUrl") + private String photo_url; + + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java new file mode 100644 index 00000000000..b8d9939e8d0 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -0,0 +1,305 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.Size; + +public class GroomDetails { + @Size(max = 64) + @JsonProperty("groomResidentShip") + private String residentship; + + @Size(max = 15) + @JsonProperty("groomAdharNo") + private String adharno; + + + + @Size(max = 1000) + @JsonProperty("groomPassportNo") + private String passportno; + + @Size(max = 64) + @JsonProperty("groomSocialSecurityNo") + private String socialsecurityno; + + @Size(max = 200) + @JsonProperty("groomFirstnameEn") + private String firstname_en; + + @Size(max = 200) + @JsonProperty("groomFirstnameMal") + private String firstname_mal; + + @Size(max = 200) + @JsonProperty("groomMiddlenameEn") + private String middlename_en; + + @Size(max = 200) + @JsonProperty("groomMiddlenameMal") + private String middlename_mal; + + + + @Size(max = 200) + @JsonProperty("groomLastnameEn") + private String lastname_en; + + @Size(max = 200) + @JsonProperty("groomLastnameMal") + private String lastname_mal; + + @Size(max = 150) + @JsonProperty("groomMobile") + private String mobile; + + @Size(max = 300) + @JsonProperty("groomEmailid") + private String emailid; + + @Size(max = 20) + @JsonProperty("groomGender") + private String gender; + + + @JsonProperty("groomDOB") + private long dateofbirth; + + + + @JsonProperty("groomAge") + private Integer age; + + @Size(max = 64) + @JsonProperty("groomParentGuardian") + private String parent_guardian; + + @Size(max = 200) + @JsonProperty("groomFathernameEn") + private String fathername_en; + + @Size(max = 200) + @JsonProperty("groomFathernameMal") + private String fathername_mal; + + @Size(max = 200) + @JsonProperty("groomMothernameEn") + private String mothername_en; + + @Size(max = 200) + @JsonProperty("groomMothernameMal") + private String mothername_mal; + + @Size(max = 15) + @JsonProperty("groomFatherAdharNo") + private String father_adharno; + + @Size(max = 15) + @JsonProperty("groomMotherAdharNo") + private String mother_adharno; + + + + @Size(max = 200) + @JsonProperty("groomGuardiannameEn") + private String guardianname_en; + + @Size(max = 200) + @JsonProperty("groomGuardiannameMal") + private String guardianname_mal; + + @Size(max = 15) + @JsonProperty("groomGardianAdhar") + private String guardian_adhar; + + + @Size(max = 200) + @JsonProperty("groomProfessionEn") + private String profession_en; + + + @Size(max = 200) + @JsonProperty("permanentHouseNo") + private String houseno; + + @Size(max = 2500) + @JsonProperty("permanentHouseNameEn") + private String housename_no_en; + + + + @Size(max = 2500) + @JsonProperty("permanentHouseNameMal") + private String housename_no_ml; + + @Size(max = 64) + @JsonProperty("permanentVillageId") + private String villageid; + + @Size(max = 1000) + @JsonProperty("permanentVillageName") + private String village_name; + + @Size(max = 64) + @JsonProperty("permanentTalukID") + private String talukid; + + @Size(max = 1000) + @JsonProperty("permanentTalukName") + private String taluk_name; + + @Size(max = 64) + @JsonProperty("permanentWardCode") + private String ward_code; + + + + + @JsonProperty("permanentDoorNO") + private Integer doorno; + + @Size(max = 1000) + @JsonProperty("permanentLocalityEn") + private String locality_en; + + @Size(max = 1000) + @JsonProperty("permanentLocalityMal") + private String locality_ml; + + @Size(max = 2000) + @JsonProperty("permanentStreetNameEn") + private String street_name_en; + + @Size(max = 2000) + @JsonProperty("permanentStreetNameMal") + private String street_name_ml; + + + @Size(max = 64) + @JsonProperty("permanentDistrictId") + private String districtid; + + + @Size(max = 64) + @JsonProperty("permanentStateId") + private String stateid; + + @Size(max = 64) + @JsonProperty("permanentPOid") + private String poid; + + @Size(max = 10) + @JsonProperty("permanentPin") + private String pinno; + + @Size(max = 64) + @JsonProperty("permanentCountryId") + private String countryid; + + + + + @Size(max = 200) + @JsonProperty("presentHouseNo") + private String presentHouseNo; + + @Size(max = 2500) + @JsonProperty("presentHouseNameEn") + private String presentHouseNameEn; + + + + @Size(max = 2500) + @JsonProperty("presentHouseNameMal") + private String presentHouseNameMal; + + @Size(max = 64) + @JsonProperty("presentVillageId") + private String presentVillageId; + + @Size(max = 1000) + @JsonProperty("presentVillageName") + private String presentVillageName; + + @Size(max = 64) + @JsonProperty("presentTalukID") + private String presentTalukID; + + @Size(max = 1000) + @JsonProperty("presentTalukName") + private String presentTalukName; + + @Size(max = 64) + @JsonProperty("presentWardCode") + private String presentWardCode; + + + + + @JsonProperty("presentDoorNO") + private Integer presentDoorNO; + + @Size(max = 1000) + @JsonProperty("presentLocalityEn") + private String presentLocalityEn; + + @Size(max = 1000) + @JsonProperty("presentLocalityMal") + private String presentLocalityMal; + + @Size(max = 2000) + @JsonProperty("presentStreetNameEn") + private String presentStreetNameEn; + + @Size(max = 2000) + @JsonProperty("presentStreetNameMal") + private String presentStreetNameMal; + + + @Size(max = 64) + @JsonProperty("presentDistrictId") + private String presentDistrictId; + + + + + @Size(max = 64) + @JsonProperty("presentStateId") + private String presentStateId; + + @Size(max = 64) + @JsonProperty("presentPOid") + private String presentPOid; + + @Size(max = 10) + @JsonProperty("presentPin") + private String presentPin; + + @Size(max = 64) + @JsonProperty("presentCountryId") + private String presentCountryId; + + @Size(max = 200) + @JsonProperty("groomProfessionMal") + private String profession_mal; + + @Size(max = 64) + @JsonProperty("groomMaritalstatusID") + private String maritalstatusid; + + + + @JsonProperty("groomSpouseLiving") + private Boolean is_spouse_living; + + + @JsonProperty("groomNoOfSpouse") + private Boolean no_of_spouse_living; + + + @Size(max = 150) + @JsonProperty("groomPhotoUrl") + private String photo_url; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java new file mode 100644 index 00000000000..89bcb88a820 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java @@ -0,0 +1,89 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.Size; + +public class PermanentAdressDetails { + @Size(max = 200) + @JsonProperty("permanentHouseNo") + private String houseno; + + @Size(max = 2500) + @JsonProperty("permanentHouseNameEn") + private String housename_no_en; + + + + @Size(max = 2500) + @JsonProperty("permanentHouseNameMal") + private String housename_no_ml; + + @Size(max = 64) + @JsonProperty("permanentVillageId") + private String villageid; + + @Size(max = 1000) + @JsonProperty("permanentVillageName") + private String village_name; + + @Size(max = 64) + @JsonProperty("permanentTalukID") + private String talukid; + + @Size(max = 1000) + @JsonProperty("permanentTalukName") + private String taluk_name; + + @Size(max = 64) + @JsonProperty("permanentWardCode") + private String ward_code; + + + + + @JsonProperty("permanentDoorNO") + private Integer doorno; + + @Size(max = 1000) + @JsonProperty("permanentLocalityEn") + private String locality_en; + + @Size(max = 1000) + @JsonProperty("permanentLocalityMal") + private String locality_ml; + + @Size(max = 2000) + @JsonProperty("permanentStreetNameEn") + private String street_name_en; + + @Size(max = 2000) + @JsonProperty("permanentStreetNameMal") + private String street_name_ml; + + + @Size(max = 64) + @JsonProperty("permanentDistrictId") + private String districtid; + + + + + @Size(max = 64) + @JsonProperty("permanentStateId") + private String stateid; + + @Size(max = 64) + @JsonProperty("permanentPOid") + private String poid; + + @Size(max = 10) + @JsonProperty("permanentPin") + private String pinno; + + @Size(max = 64) + @JsonProperty("permanentCountryId") + private String countryid; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java new file mode 100644 index 00000000000..d95416b9546 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java @@ -0,0 +1,89 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.Size; + +public class PresentAddressDetails { + @Size(max = 200) + @JsonProperty("presentHouseNo") + private String houseno; + + @Size(max = 2500) + @JsonProperty("presentHouseNameEn") + private String housename_no_en; + + + + @Size(max = 2500) + @JsonProperty("presentHouseNameMal") + private String housename_no_ml; + + @Size(max = 64) + @JsonProperty("presentVillageId") + private String villageid; + + @Size(max = 1000) + @JsonProperty("presentVillageName") + private String village_name; + + @Size(max = 64) + @JsonProperty("presentTalukID") + private String talukid; + + @Size(max = 1000) + @JsonProperty("presentTalukName") + private String taluk_name; + + @Size(max = 64) + @JsonProperty("presentWardCode") + private String ward_code; + + + + + @JsonProperty("presentDoorNO") + private Integer doorno; + + @Size(max = 1000) + @JsonProperty("presentLocalityEn") + private String locality_en; + + @Size(max = 1000) + @JsonProperty("presentLocalityMal") + private String locality_ml; + + @Size(max = 2000) + @JsonProperty("presentStreetNameEn") + private String street_name_en; + + @Size(max = 2000) + @JsonProperty("presentStreetNameMal") + private String street_name_ml; + + + @Size(max = 64) + @JsonProperty("presentDistrictId") + private String districtid; + + + + + @Size(max = 64) + @JsonProperty("presentStateId") + private String stateid; + + @Size(max = 64) + @JsonProperty("presentPOid") + private String poid; + + @Size(max = 10) + @JsonProperty("presentPin") + private String pinno; + + @Size(max = 64) + @JsonProperty("presentCountryId") + private String countryid; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java new file mode 100644 index 00000000000..e54209dd79b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -0,0 +1,49 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.Size; + +public class WitnessDetails { + @Size(max = 15) + @JsonProperty("WitnessDetails") + private String adharno; + + @Size(max = 200) + @JsonProperty("witnessNameEn") + private String name_en; + + + + @Size(max = 200) + @JsonProperty("witnessNameMal") + private String name_mal; + + + @JsonProperty("witnessAge") + private Integer age; + + @Size(max = 200) + @JsonProperty("witnessAddresSEn") + private String address_en; + + @Size(max = 200) + @JsonProperty("witnessAddressMal") + private String address_mal; + + @Size(max = 150) + @JsonProperty("witnessMobile") + private String mobile; + + + @JsonProperty("witnessISmessageReceived") + private Boolean is_message_received; + + + + + @JsonProperty("witnessISEsigned") + private Boolean is_esigned; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 66195f3ac1b..538f823a65e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -17,42 +17,42 @@ public class MarriageApplicationRowMapper implements ResultSetExtractor extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null List result = new ArrayList<>(); while (rs.next()) { - result.add(MarriageApplicationDetail.builder() - .id(rs.getString("id")) - .dateOfReport(Long.valueOf(rs.getLong("dateofreport"))) - .dateOfMarriage(Long.valueOf(rs.getLong("dateofmarriage"))) - .firstNameEn(rs.getString("firstname_bride_en")) - .firstNameMl(rs.getString("firstname_bride_ml")) - .middleNameEn(rs.getString("middlename_bride_en")) - .middleNameMl(rs.getString("middlename_bride_ml")) - .lastNameEn(rs.getString("lastname_bride_en")) - .lastNameMl(rs.getString("lastname_bride_ml")) - .firstNameGroomEn(rs.getString("firstname_groom_en")) - .firstNameGroomMl(rs.getString("firstname_groom_ml")) - .middleNameGroomEn(rs.getString("middlename_groom_en")) - .middleNameGroomMl(rs.getString("middlename_groom_ml")) - .lastNameGroomEn(rs.getString("lastname_groom_en")) - .lastNameGroomMl(rs.getString("lastname_groom_ml")) - .tenantId(rs.getString("tenantid")) - .remarksEn(rs.getString("remarks_en")) - .remarksMl(rs.getString("remarks_ml")) - .remarksMl(rs.getString("aadharno")) - .esignUserCode(rs.getString("esign_user_code")) - .esignUserDesigCode(rs.getString("esign_user_desig_code")) - //.noOfAliveBirth(Integer.valueOf(rs.getString("no_of_alive_birth"))) - //.dateOfArrival(Long.valueOf(rs.getString("ot_dateofarrival"))) - .applicationType(rs.getString("applicationtype")) - .businessService(rs.getString("businessservice")) - .workFlowCode(rs.getString("workflowcode")) - .fmFileNo(rs.getString("fm_fileno")) - .fileDate(Long.valueOf(rs.getString("file_date"))) - .applicationNo(rs.getString("applicationno")) - .registrationNo(rs.getString("registrationno")) - .registrationDate(Long.valueOf(rs.getString("registration_date"))) - .action(rs.getString("action")) - .status(rs.getString("status")) - .auditDetails(getAuditDetails(rs)) - .build()); +// result.add(MarriageApplicationDetail.builder() +// .id(rs.getString("id")) +// .dateOfReport(Long.valueOf(rs.getLong("dateofreport"))) +// .dateOfMarriage(Long.valueOf(rs.getLong("dateofmarriage"))) +// .firstNameEn(rs.getString("firstname_bride_en")) +// .firstNameMl(rs.getString("firstname_bride_ml")) +// .middleNameEn(rs.getString("middlename_bride_en")) +// .middleNameMl(rs.getString("middlename_bride_ml")) +// .lastNameEn(rs.getString("lastname_bride_en")) +// .lastNameMl(rs.getString("lastname_bride_ml")) +// .firstNameGroomEn(rs.getString("firstname_groom_en")) +// .firstNameGroomMl(rs.getString("firstname_groom_ml")) +// .middleNameGroomEn(rs.getString("middlename_groom_en")) +// .middleNameGroomMl(rs.getString("middlename_groom_ml")) +// .lastNameGroomEn(rs.getString("lastname_groom_en")) +// .lastNameGroomMl(rs.getString("lastname_groom_ml")) +// .tenantId(rs.getString("tenantid")) +// .remarksEn(rs.getString("remarks_en")) +// .remarksMl(rs.getString("remarks_ml")) +// .remarksMl(rs.getString("aadharno")) +// .esignUserCode(rs.getString("esign_user_code")) +// .esignUserDesigCode(rs.getString("esign_user_desig_code")) +// //.noOfAliveBirth(Integer.valueOf(rs.getString("no_of_alive_birth"))) +// //.dateOfArrival(Long.valueOf(rs.getString("ot_dateofarrival"))) +// .applicationType(rs.getString("applicationtype")) +// .businessService(rs.getString("businessservice")) +// .workFlowCode(rs.getString("workflowcode")) +// .fmFileNo(rs.getString("fm_fileno")) +// .fileDate(Long.valueOf(rs.getString("file_date"))) +// .applicationNo(rs.getString("applicationno")) +// .registrationNo(rs.getString("registrationno")) +// .registrationDate(Long.valueOf(rs.getString("registration_date"))) +// .action(rs.getString("action")) +// .status(rs.getString("status")) +// .auditDetails(getAuditDetails(rs)) +// .build()); } diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 19d1fff12bf..f9c8bd5803f 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,12 +5,12 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage7 spring.datasource.username=postgres spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage7 spring.flyway.user=postgres spring.flyway.password=123 spring.flyway.table=public diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql index 8b41ccdd977..8f873e33103 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql @@ -4,46 +4,47 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_details ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofreport bigint, - dateofmarriage bigint, - firstname_bride_en character varying(200) COLLATE pg_catalog."default", - firstname_bride_ml character varying(200) COLLATE pg_catalog."default", - middlename_bride_en character varying(200) COLLATE pg_catalog."default", - middlename_bride_ml character varying(200) COLLATE pg_catalog."default", - lastname_bride_en character varying(200) COLLATE pg_catalog."default", - lastname_bride_ml character varying(200) COLLATE pg_catalog."default", - firstname_groom_en character varying(200) COLLATE pg_catalog."default", - firstname_groom_ml character varying(200) COLLATE pg_catalog."default", - middlename_groom_en character varying(200) COLLATE pg_catalog."default", - middlename_groom_ml character varying(200) COLLATE pg_catalog."default", - lastname_groom_en character varying(200) COLLATE pg_catalog."default", - lastname_groom_ml character varying(200) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default" NOT NULL, - remarks_en character varying(2500) COLLATE pg_catalog."default", - remarks_ml character varying(2500) COLLATE pg_catalog."default", - aadharno character varying(15) COLLATE pg_catalog."default", - esign_user_code character varying(64) COLLATE pg_catalog."default", - esign_user_desig_code character varying(64) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - fm_fileno character varying(64) COLLATE pg_catalog."default", - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default", - applicationno character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + lbtype character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + tenantid character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + placetype character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + placeothers character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + placeid character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + placename_en character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + street_name_en character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + street_name_ml character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + placename_mal character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + ward_code character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + talukid character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + village_name character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + marriage_type character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + oth_marriage_type character varying(200) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + landmark character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + locality_en character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + locality_ml character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + othersspecify character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + fileno character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + file_date bigint, + file_status character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + applicationnumber character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + registrationno character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + status character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_details_applicationno_key UNIQUE (applicationno), - CONSTRAINT eg_marriage_details_fm_fileno_ukey UNIQUE (fm_fileno, tenantid), - CONSTRAINT eg_marriage_details_registrationno_ukey1 UNIQUE (registrationno, tenantid) + CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), + CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) ); @@ -51,3 +52,214 @@ CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid ON public.eg_marriage_details USING btree (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; + + -- Table: public.bride_details + + -- DROP TABLE IF EXISTS public.bride_details; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + NOT VALID + ); + + +-- Table: public.eg_marriage.groom_details + +-- DROP TABLE IF EXISTS public.eg_marriage.groom_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_groom_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_groom_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +-- Table: public.marriage_permanent_address_details + +-- DROP TABLE IF EXISTS public.marriage_permanent_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + + + +-- Table: public.marriage_present_address_details + +-- DROP TABLE IF EXISTS public.marriage_present_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + + +-- Table: public.witness_details + +-- DROP TABLE IF EXISTS public.witness_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_message_received boolean, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) + + + + + From 4358904e213106d36d9290aeb58ee631339215ee Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 28 Feb 2023 10:26:21 +0530 Subject: [PATCH 007/420] marriage --- .../common/Idgen/IdGenerationRequest.java | 22 +++++ .../common/Idgen/IdGenerationResponse.java | 21 +++++ .../marriage/common/Idgen/IdRequest.java | 28 ++++++ .../marriage/common/Idgen/IdResponse.java | 15 ++++ .../MarriageApplicationConfiguration.java | 5 +- .../MarriageApplicationController.java | 4 +- .../marriage/MarriageApplicationResponse.java | 6 +- .../repository/IdGenRepository.java | 89 +++++++++++++++++++ .../repository/ServiceRequestRepository.java | 41 +++++++++ 9 files changed, 225 insertions(+), 6 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdGenerationRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdGenerationResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/IdGenRepository.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/ServiceRequestRepository.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdGenerationRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdGenerationRequest.java new file mode 100644 index 00000000000..9a395034670 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdGenerationRequest.java @@ -0,0 +1,22 @@ +package org.ksmart.marriage.common.Idgen; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.egov.common.contract.request.RequestInfo; + +import java.util.List; +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class IdGenerationRequest { + + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + private List idRequests; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdGenerationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdGenerationResponse.java new file mode 100644 index 00000000000..e7b2f8a0e79 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdGenerationResponse.java @@ -0,0 +1,21 @@ +package org.ksmart.marriage.common.Idgen; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.egov.common.contract.response.ResponseInfo; + +import java.util.List; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class IdGenerationResponse { + + private ResponseInfo responseInfo; + + private List idResponses; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdRequest.java new file mode 100644 index 00000000000..f8e10d6fd56 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdRequest.java @@ -0,0 +1,28 @@ +package org.ksmart.marriage.common.Idgen; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotNull; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class IdRequest { + + @JsonProperty("idName") + @NotNull + private String idName; + + @NotNull + @JsonProperty("tenantId") + private String tenantId; + + @JsonProperty("format") + private String format; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdResponse.java new file mode 100644 index 00000000000..3f3b14a7cdf --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdResponse.java @@ -0,0 +1,15 @@ +package org.ksmart.marriage.common.Idgen; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class IdResponse { + + private String id; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index a9aec2d4b08..c35fbcd2960 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -12,7 +12,10 @@ @Component public class MarriageApplicationConfiguration { - + @Value("${egov.idgen.host}") + private String idGenHost; + @Value("${egov.idgen.path}") + private String idGenPath; @Value("${persister.save.marriage.application.topic}") private String saveMarriageApplicationTopic; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index 200c04e6986..c2d3140c510 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -30,8 +30,8 @@ public class MarriageApplicationController { private final ResponseInfoFactory responseInfoFactory; - public MarriageApplicationController(MarriageApplicationService crBirthService, ResponseInfoFactory responseInfoFactory) { - this.crMarriageService = crBirthService; + public MarriageApplicationController( MarriageApplicationService crMarriageService, ResponseInfoFactory responseInfoFactory) { + this.crMarriageService = crMarriageService; this.responseInfoFactory = responseInfoFactory; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java index 0784f863a36..c8cf96642d4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java @@ -25,7 +25,7 @@ public class MarriageApplicationResponse { @JsonProperty("ResponseInfo") private ResponseInfo responseInfo; - @JsonProperty("BirthDetails") + @JsonProperty("MarriageDetails") @Valid private List marriageApplicationDetails; @@ -37,11 +37,11 @@ public class MarriageApplicationResponse { @JsonProperty("Count") private int count; - public MarriageApplicationResponse addBirthApplication(MarriageApplicationDetail birthDetail) { + public MarriageApplicationResponse addBirthApplication(MarriageApplicationDetail details) { if (marriageApplicationDetails == null) { marriageApplicationDetails = new ArrayList<>(); } - marriageApplicationDetails.add(birthDetail); + marriageApplicationDetails.add(details); return this; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/IdGenRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/IdGenRepository.java new file mode 100644 index 00000000000..f2120c6b139 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/IdGenRepository.java @@ -0,0 +1,89 @@ +package org.ksmart.marriage.marriageapplication.repository; + + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.Idgen.IdGenerationRequest; +import org.ksmart.marriage.common.Idgen.IdGenerationResponse; +import org.ksmart.marriage.common.Idgen.IdRequest; +import org.ksmart.marriage.common.Idgen.IdResponse; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; +import org.springframework.util.CollectionUtils; +import org.springframework.web.client.RestTemplate; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +@Repository +public class IdGenRepository { + + @Autowired + private RestTemplate restTemplate; + + @Autowired + private MarriageApplicationConfiguration config; + + @Autowired + @Qualifier("objectMapperBnd") + private ObjectMapper mapper; + + @Autowired + private ServiceRequestRepository restRepo; + + public IdGenerationResponse getId(RequestInfo requestInfo, String tenantId, String name, String format, int count) { + + List reqList = new ArrayList<>(); + for (int i = 0; i < count; i++) { + reqList.add(IdRequest.builder().idName(name).format(format).tenantId(tenantId).build()); + } + IdGenerationRequest req = IdGenerationRequest.builder().idRequests(reqList).requestInfo(requestInfo).build(); + IdGenerationResponse response = null; +// try { + response = restTemplate.postForObject( config.getIdGenHost()+ config.getIdGenPath(), req, IdGenerationResponse.class); +// } catch (HttpClientErrorException e) { +// throw new ServiceCallException(e.getResponseBodyAsString()); +// } catch (Exception e) { +// Map map = new HashMap<>(); +// map.put(e.getCause().getClass().getName(),e.getMessage()); +// throw new CustomException(map); +// } + return response; + } + + + public List getIdList(RequestInfo requestInfo, String tenantId, String idName, String idformat, + Integer count) { + List reqList = new ArrayList<>(); + for (int i = 0; i < count; i++) { + reqList.add(IdRequest.builder() + .idName(idName) + .format(idformat) + .tenantId(tenantId) + .build()); + } + + IdGenerationRequest request = IdGenerationRequest.builder() + .idRequests(reqList) + .requestInfo(requestInfo) + .build(); + StringBuilder uri = new StringBuilder(config.getIdGenHost()).append(config.getIdGenPath()); + IdGenerationResponse response = mapper.convertValue(restRepo.fetchResult(uri, request), + IdGenerationResponse.class); + + List idResponses = response.getIdResponses(); + + if (CollectionUtils.isEmpty(idResponses)) { + throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); + } + + return idResponses.stream() + .map(IdResponse::getId) + .collect(Collectors.toList()); + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/ServiceRequestRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/ServiceRequestRepository.java new file mode 100644 index 00000000000..f7a375017d6 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/ServiceRequestRepository.java @@ -0,0 +1,41 @@ +package org.ksmart.marriage.marriageapplication.repository; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import lombok.extern.slf4j.Slf4j; +import org.egov.tracer.model.ServiceCallException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestTemplate; + +import java.util.Map; + +@Repository +@Slf4j +public class ServiceRequestRepository { + + @Autowired + private RestTemplate restTemplate; + + @Autowired + @Qualifier("objectMapperBnd") + private ObjectMapper mapper; + + public Object fetchResult(StringBuilder uri, Object request) { + mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + Object response = null; + log.info("URI: "+uri.toString()); + try { + log.info("Request: "+mapper.writeValueAsString(request)); + response = restTemplate.postForObject(uri.toString(), request, Map.class); + }catch(HttpClientErrorException e) { + log.error("External Service threw an Exception: ",e); + throw new ServiceCallException(e.getResponseBodyAsString()); + }catch(Exception e) { + log.error("Exception while fetching from searcher: ",e); + } + return response; + } +} From ea6413285f345bb7edd2f8a94c9d9b7b2ba3fdab Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Fri, 3 Mar 2023 13:58:34 +0530 Subject: [PATCH 008/420] migration added --- .../marriage-services/.vscode/settings.json | 3 + ...V20230323114820__marriage_services_ddl.sql | 265 ++++++++++++++++++ 2 files changed, 268 insertions(+) create mode 100644 municipal-services/marriage-services/.vscode/settings.json create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql diff --git a/municipal-services/marriage-services/.vscode/settings.json b/municipal-services/marriage-services/.vscode/settings.json new file mode 100644 index 00000000000..7b016a89fba --- /dev/null +++ b/municipal-services/marriage-services/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.compile.nullAnalysis.mode": "automatic" +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql new file mode 100644 index 00000000000..910ed503f59 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql @@ -0,0 +1,265 @@ +-- Table: public.eg_marriage_details + +-- DROP TABLE IF EXISTS public.eg_marriage_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeothers character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + placename_mal character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + othersspecify character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + fileno character varying(64) COLLATE pg_catalog."default", + file_date bigint, + file_status character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), + CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) + ); + + +CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid + ON public.eg_marriage_details USING btree + (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) + TABLESPACE pg_default; + + -- Table: public.bride_details + + -- DROP TABLE IF EXISTS public.bride_details; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + NOT VALID + ); + + +-- Table: public.eg_marriage.groom_details + +-- DROP TABLE IF EXISTS public.eg_marriage.groom_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_groom_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_groom_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +-- Table: public.marriage_permanent_address_details + +-- DROP TABLE IF EXISTS public.marriage_permanent_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + + + +-- Table: public.marriage_present_address_details + +-- DROP TABLE IF EXISTS public.marriage_present_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + + +-- Table: public.witness_details + +-- DROP TABLE IF EXISTS public.witness_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_message_received boolean, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) + + + + + From 12e7c7268152053abedf697f23075a207b61a1e9 Mon Sep 17 00:00:00 2001 From: Lekshmy B L <94520731+lekshmybl@users.noreply.github.com> Date: Fri, 3 Mar 2023 14:13:58 +0530 Subject: [PATCH 009/420] Update V20221228114820__marriage_services_ddl.sql --- ...V20221228114820__marriage_services_ddl.sql | 295 +++--------------- 1 file changed, 45 insertions(+), 250 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql index 8f873e33103..4fd4598f01e 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql @@ -4,262 +4,57 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_details ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - lbtype character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - tenantid character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - placetype character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - placeothers character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - placeid character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - placename_en character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - street_name_en character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - street_name_ml character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - placename_mal character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - ward_code character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - talukid character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - village_name character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - marriage_type character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - oth_marriage_type character varying(200) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - landmark character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - locality_en character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - locality_ml character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - othersspecify character varying(1000) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - fileno character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - applicationnumber character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - registrationno character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, - status character varying(64) COLLATE pg_catalog."default" DEFAULT 'null'::character varying, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofreport bigint, + dateofmarriage bigint, + firstname_bride_en character varying(200) COLLATE pg_catalog."default", + firstname_bride_ml character varying(200) COLLATE pg_catalog."default", + middlename_bride_en character varying(200) COLLATE pg_catalog."default", + middlename_bride_ml character varying(200) COLLATE pg_catalog."default", + lastname_bride_en character varying(200) COLLATE pg_catalog."default", + lastname_bride_ml character varying(200) COLLATE pg_catalog."default", + firstname_groom_en character varying(200) COLLATE pg_catalog."default", + firstname_groom_ml character varying(200) COLLATE pg_catalog."default", + middlename_groom_en character varying(200) COLLATE pg_catalog."default", + middlename_groom_ml character varying(200) COLLATE pg_catalog."default", + lastname_groom_en character varying(200) COLLATE pg_catalog."default", + lastname_groom_ml character varying(200) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default" NOT NULL, + remarks_en character varying(2500) COLLATE pg_catalog."default", + remarks_ml character varying(2500) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", + esign_user_code character varying(64) COLLATE pg_catalog."default", + esign_user_desig_code character varying(64) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + fm_fileno character varying(64) COLLATE pg_catalog."default", + file_date bigint, + file_status character varying(64) COLLATE pg_catalog."default", + applicationno character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), - CONSTRAINT eg_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), - CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) - ); + CONSTRAINT eg_marriage_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_details_applicationno_key UNIQUE (applicationno), + CONSTRAINT eg_marriage_details_fm_fileno_ukey UNIQUE (fm_fileno, tenantid), + CONSTRAINT eg_marriage_details_registrationno_ukey1 UNIQUE (registrationno, tenantid) + ) - -CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid - ON public.eg_marriage_details USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; - -- Table: public.bride_details - - -- DROP TABLE IF EXISTS public.bride_details; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - NOT VALID - ); - - --- Table: public.eg_marriage.groom_details - --- DROP TABLE IF EXISTS public.eg_marriage.groom_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_groom_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_groom_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); --- Table: public.marriage_permanent_address_details - --- DROP TABLE IF EXISTS public.marriage_permanent_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - - - --- Table: public.marriage_present_address_details - --- DROP TABLE IF EXISTS public.marriage_present_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - - --- Table: public.witness_details - --- DROP TABLE IF EXISTS public.witness_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - is_message_received boolean, - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -) - - - +ALTER TABLE IF EXISTS public.eg_marriage_details + OWNER to postgres; +-- Index: idx_eg_birth_details_tenantid +-- DROP INDEX IF EXISTS public.idx_eg_marriage_details_tenantid; +CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid + ON public.eg_marriage_details USING btree + (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) + TABLESPACE pg_default; From 31115324aa14f2e6c8d6431aaaeeff7e756ffcb0 Mon Sep 17 00:00:00 2001 From: Lekshmy Date: Fri, 3 Mar 2023 14:17:32 +0530 Subject: [PATCH 010/420] migration --- .../src/main/resources/application.properties | 8 ++++---- ...V20230323114820__marriage_services_ddl.sql | 20 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index f9c8bd5803f..0e0671b9fb0 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,14 +5,14 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage7 +spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage7 +spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql index 910ed503f59..df40d098975 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql @@ -1,8 +1,8 @@ --- Table: public.eg_marriage_details +-- Table: public.eg_marriage_dtls --- DROP TABLE IF EXISTS public.eg_marriage_details; +-- DROP TABLE IF EXISTS public.eg_marriage_dtls -CREATE TABLE IF NOT EXISTS public.eg_marriage_details +CREATE TABLE IF NOT EXISTS public.eg_marriage_dtls ( id character varying(64) COLLATE pg_catalog."default" NOT NULL, dateofmarriage bigint, @@ -48,8 +48,8 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_details ); -CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid - ON public.eg_marriage_details USING btree +CREATE INDEX IF NOT EXISTS idx_eg_marriage_dtls_tenantid + ON public.eg_marriage_dtls USING btree (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) TABLESPACE pg_default; @@ -98,7 +98,7 @@ CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid lastmodifiedby character varying(64) COLLATE pg_catalog."default", CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION NOT VALID @@ -150,7 +150,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details lastmodifiedby character varying(64) COLLATE pg_catalog."default", CONSTRAINT eg_marriage_groom_details_pkey PRIMARY KEY (id), CONSTRAINT eg_marriage_groom_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ); @@ -186,7 +186,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details lastmodifiedby character varying(64) COLLATE pg_catalog."default", CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ); @@ -225,7 +225,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details lastmodifiedby character varying(64) COLLATE pg_catalog."default", CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ); @@ -254,7 +254,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details lastmodifiedby character varying(64) COLLATE pg_catalog."default", CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ) From b5d137d265e70f8ec50a58e2feb70a744d9f7b75 Mon Sep 17 00:00:00 2001 From: ikmkerala <107991882+ikmkerala@users.noreply.github.com> Date: Fri, 3 Mar 2023 16:45:30 +0530 Subject: [PATCH 011/420] Delete V20230323114820__marriage_services_ddl.sql --- ...V20230323114820__marriage_services_ddl.sql | 265 ------------------ 1 file changed, 265 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql deleted file mode 100644 index df40d098975..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql +++ /dev/null @@ -1,265 +0,0 @@ --- Table: public.eg_marriage_dtls - --- DROP TABLE IF EXISTS public.eg_marriage_dtls - -CREATE TABLE IF NOT EXISTS public.eg_marriage_dtls -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeothers character varying(64) COLLATE pg_catalog."default", - placeid character varying(1000) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - placename_mal character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - othersspecify character varying(1000) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - fileno character varying(64) COLLATE pg_catalog."default", - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default", - applicationnumber character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), - CONSTRAINT eg_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), - CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) - ); - - -CREATE INDEX IF NOT EXISTS idx_eg_marriage_dtls_tenantid - ON public.eg_marriage_dtls USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) - TABLESPACE pg_default; - - -- Table: public.bride_details - - -- DROP TABLE IF EXISTS public.bride_details; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - NOT VALID - ); - - --- Table: public.eg_marriage.groom_details - --- DROP TABLE IF EXISTS public.eg_marriage.groom_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_groom_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_groom_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); --- Table: public.marriage_permanent_address_details - --- DROP TABLE IF EXISTS public.marriage_permanent_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - - - --- Table: public.marriage_present_address_details - --- DROP TABLE IF EXISTS public.marriage_present_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - - --- Table: public.witness_details - --- DROP TABLE IF EXISTS public.witness_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - is_message_received boolean, - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_dtls (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -) - - - - - From 47c050fe9b373a0435bfcb3aea83db7b835395a3 Mon Sep 17 00:00:00 2001 From: Lekshmy Date: Fri, 3 Mar 2023 18:09:52 +0530 Subject: [PATCH 012/420] migration --- .../migration/main/V20230228254532__migration_changes_ddl.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230228254532__migration_changes_ddl.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230228254532__migration_changes_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230228254532__migration_changes_ddl.sql new file mode 100644 index 00000000000..0eb1d2dc014 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230228254532__migration_changes_ddl.sql @@ -0,0 +1,2 @@ +delete from marriage_services_schema; +DROP table public.eg_marriage_details; \ No newline at end of file From 6537fb90d9379faa8b34f5bceac268d4e517ee70 Mon Sep 17 00:00:00 2001 From: Lekshmy Date: Fri, 3 Mar 2023 18:16:35 +0530 Subject: [PATCH 013/420] migration --- ...V20230323114820__marriage_services_ddl.sql | 264 ++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql new file mode 100644 index 00000000000..977fc788a37 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql @@ -0,0 +1,264 @@ +-- Table: public.eg_marriage_details + +-- DROP TABLE IF EXISTS public.eg_marriage_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeothers character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + placename_mal character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + othersspecify character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + fileno character varying(64) COLLATE pg_catalog."default", + file_date bigint, + file_status character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), + CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) + ); + + +CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid + ON public.eg_marriage_details USING btree + (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) + TABLESPACE pg_default; + + -- Table: public.bride_details + + -- DROP TABLE IF EXISTS public.bride_details; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + NOT VALID + ); + + +-- Table: public.eg_marriage.groom_details + +-- DROP TABLE IF EXISTS public.eg_marriage.groom_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_groom_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_groom_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +-- Table: public.marriage_permanent_address_details + +-- DROP TABLE IF EXISTS public.marriage_permanent_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + + + +-- Table: public.marriage_present_address_details + +-- DROP TABLE IF EXISTS public.marriage_present_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + + +-- Table: public.witness_details + +-- DROP TABLE IF EXISTS public.witness_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_message_received boolean, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) + + + + From 015bc42443204c1cc7f4b91f5ff3ca2b47687724 Mon Sep 17 00:00:00 2001 From: ikmkerala <107991882+ikmkerala@users.noreply.github.com> Date: Sat, 4 Mar 2023 11:09:54 +0530 Subject: [PATCH 014/420] Delete V20221228114820__marriage_services_ddl.sql --- ...V20221228114820__marriage_services_ddl.sql | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql deleted file mode 100644 index 4fd4598f01e..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20221228114820__marriage_services_ddl.sql +++ /dev/null @@ -1,60 +0,0 @@ --- Table: public.eg_marriage_details - --- DROP TABLE IF EXISTS public.eg_marriage_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofreport bigint, - dateofmarriage bigint, - firstname_bride_en character varying(200) COLLATE pg_catalog."default", - firstname_bride_ml character varying(200) COLLATE pg_catalog."default", - middlename_bride_en character varying(200) COLLATE pg_catalog."default", - middlename_bride_ml character varying(200) COLLATE pg_catalog."default", - lastname_bride_en character varying(200) COLLATE pg_catalog."default", - lastname_bride_ml character varying(200) COLLATE pg_catalog."default", - firstname_groom_en character varying(200) COLLATE pg_catalog."default", - firstname_groom_ml character varying(200) COLLATE pg_catalog."default", - middlename_groom_en character varying(200) COLLATE pg_catalog."default", - middlename_groom_ml character varying(200) COLLATE pg_catalog."default", - lastname_groom_en character varying(200) COLLATE pg_catalog."default", - lastname_groom_ml character varying(200) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default" NOT NULL, - remarks_en character varying(2500) COLLATE pg_catalog."default", - remarks_ml character varying(2500) COLLATE pg_catalog."default", - aadharno character varying(15) COLLATE pg_catalog."default", - esign_user_code character varying(64) COLLATE pg_catalog."default", - esign_user_desig_code character varying(64) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - fm_fileno character varying(64) COLLATE pg_catalog."default", - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default", - applicationno character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_details_applicationno_key UNIQUE (applicationno), - CONSTRAINT eg_marriage_details_fm_fileno_ukey UNIQUE (fm_fileno, tenantid), - CONSTRAINT eg_marriage_details_registrationno_ukey1 UNIQUE (registrationno, tenantid) - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_marriage_details - OWNER to postgres; --- Index: idx_eg_birth_details_tenantid - --- DROP INDEX IF EXISTS public.idx_eg_marriage_details_tenantid; - -CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid - ON public.eg_marriage_details USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) - TABLESPACE pg_default; From fe2cfb97c7f6e361b203c702bc1ad88fe064f974 Mon Sep 17 00:00:00 2001 From: ikmkerala <107991882+ikmkerala@users.noreply.github.com> Date: Sat, 4 Mar 2023 11:10:02 +0530 Subject: [PATCH 015/420] Delete V20230228254532__migration_changes_ddl.sql --- .../migration/main/V20230228254532__migration_changes_ddl.sql | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230228254532__migration_changes_ddl.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230228254532__migration_changes_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230228254532__migration_changes_ddl.sql deleted file mode 100644 index 0eb1d2dc014..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230228254532__migration_changes_ddl.sql +++ /dev/null @@ -1,2 +0,0 @@ -delete from marriage_services_schema; -DROP table public.eg_marriage_details; \ No newline at end of file From c39f14d66e35340093d87a6d0436400325455cce Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 4 Mar 2023 13:54:47 +0530 Subject: [PATCH 016/420] fix --- .../egov-persister/.vscode/settings.json | 3 + .../src/main/resources/application.properties | 4 +- .../src/main/resources/marriage.yml | 155 +++++------------- municipal-services/marriage-services/pom.xml | 2 +- .../MarriageApplicationConfiguration.java | 11 +- .../MarriageApplicationController.java | 5 +- .../enrichment/MarriageDetailsEnrichment.java | 4 +- .../model/MarriageApplicationDetail.java | 31 +++- .../model/marriage/BrideDetails.java | 7 +- .../model/marriage/GroomDetails.java | 7 +- .../marriage/PermanentAdressDetails.java | 7 +- .../model/marriage/PresentAddressDetails.java | 7 +- .../model/marriage/WitnessDetails.java | 7 +- .../MarriageApplicationRepository.java | 4 +- .../src/main/resources/application.properties | 8 + ...V20230323114820__marriage_services_ddl.sql | 18 +- 16 files changed, 129 insertions(+), 151 deletions(-) create mode 100644 core-services/egov-persister/.vscode/settings.json diff --git a/core-services/egov-persister/.vscode/settings.json b/core-services/egov-persister/.vscode/settings.json new file mode 100644 index 00000000000..7b016a89fba --- /dev/null +++ b/core-services/egov-persister/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.compile.nullAnalysis.mode": "automatic" +} \ No newline at end of file diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 585d89bba83..d6a08ad63a1 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,5 +1,5 @@ spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage spring.datasource.username=postgres spring.datasource.password=123 @@ -10,7 +10,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage spring.flyway.user=postgres spring.flyway.password=123 spring.flyway.table=public diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index b1b2a4390e1..d544b1462b5 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -2,141 +2,62 @@ serviceMaps: serviceName: marriage-services mappings: - version: 1.0 - description: Persists save marriage details in cr_marriage table + description: Persists save marriage details in marriage table fromTopic: save-marriage-application-topic isTransaction: true queryMaps: - query: INSERT INTO public.eg_marriage_details( - id, dateofreport, dateofmarriage, firstname_bride_en, firstname_bride_ml, middlename_bride_en, middlename_bride_ml, lastname_bride_en, lastname_bride_ml, firstname_groom_en, firstname_groom_ml, middlename_groom_en, middlename_groom_ml, lastname_groom_en, lastname_groom_ml, tenantid, remarks_en, remarks_ml, aadharno, esign_user_code, esign_user_desig_code, applicationtype, businessservice, workflowcode, fm_fileno, file_date, file_status, applicationno, registrationno, registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeothers, placeid, placename_en, + street_name_en, street_name_ml, placename_mal, ward_code, talukid, village_name, marriage_type, oth_marriage_type, + landmark, locality_en, locality_ml, othersspecify, applicationtype, businessservice, workflowcode, fileno, file_date, + file_status, applicationnumber, registrationno, + registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.dateofreport + - jsonPath: $.MarriageDetails.*.marraigeDOM - - jsonPath: $.MarriageDetails.*.dateofmarriage + - jsonPath: $.MarriageDetails.*.marraigeDOR - - jsonPath: $.MarriageDetails.*.firstname_bride_en + - jsonPath: $.MarriageDetails.*.districtid - - jsonPath: $.MarriageDetails.*.firstname_bride_ml - - - jsonPath: $.MarriageDetails.*.middlename_bride_en - - - jsonPath: $.MarriageDetails.*.middlename_bride_ml - - - jsonPath: $.MarriageDetails.*.lastname_bride_en - - - jsonPath: $.MarriageDetails.*.lastname_bride_ml - - - jsonPath: $.MarriageDetails.*.firstname_groom_en - - - jsonPath: $.MarriageDetails.*.firstname_groom_ml - - - jsonPath: $.MarriageDetails.*.middlename_groom_en - - - jsonPath: $.MarriageDetails.*.middlename_groom_ml - - - jsonPath: $.MarriageDetails.*.lastname_groom_en - - - jsonPath: $.MarriageDetails.*.lastname_groom_ml + - jsonPath: $.MarriageDetails.*.lbtype - jsonPath: $.MarriageDetails.*.tenantid - - jsonPath: $.MarriageDetails.*.remarks_en - - - jsonPath: $.MarriageDetails.*.remarks_ml - - - jsonPath: $.MarriageDetails.*.aadharno - - - jsonPath: $.MarriageDetails.*.esign_user_code + - jsonPath: $.MarriageDetails.*.marraigePlacetype - - jsonPath: $.MarriageDetails.*.esign_user_desig_code + - jsonPath: $.MarriageDetails.*.marriagePlaceothers - - jsonPath: $.MarriageDetails.*.applicationtype - - - jsonPath: $.MarriageDetails.*.businessservice + - jsonPath: $.MarriageDetails.*.placeid - - jsonPath: $.MarriageDetails.*.workflowcode + - jsonPath: $.MarriageDetails.*.placename_en - - jsonPath: $.MarriageDetails.*.fm_fileno + - jsonPath: $.MarriageDetails.*.marriageStreetEn - - jsonPath: $.MarriageDetails.*.file_date + - jsonPath: $.MarriageDetails.*.marriageStreetMal - - jsonPath: $.MarriageDetails.*.file_status + - jsonPath: $.MarriageDetails.*.placename_mal - - jsonPath: $.MarriageDetails.*.applicationno + - jsonPath: $.MarriageDetails.*.ward_code - - jsonPath: $.MarriageDetails.*.registrationno - - - jsonPath: $.MarriageDetails.*.registration_date + - jsonPath: $.MarriageDetails.*.talukid - - jsonPath: $.MarriageDetails.*.action + - jsonPath: $.MarriageDetails.*.village_name - - jsonPath: $.MarriageDetails.*.status + - jsonPath: $.MarriageDetails.*.marriage_type - - jsonPath: $.MarriageDetails.*.auditDetails.createdtime + - jsonPath: $.MarriageDetails.*.oth_marriage_type - - jsonPath: $.MarriageDetails.*.auditDetails.createdby + - jsonPath: $.MarriageDetails.*.marriageLandmark - - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedtime + - jsonPath: $.MarriageDetails.*.marriageLocalityEn - - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedby + - jsonPath: $.MarriageDetails.*.marriageLocalityMal - - - - version: 1.0 - description: Persists update marriage details in cr_marriage table - fromTopic: update-marriage-application-topic - isTransaction: true - queryMaps: - - - query: UPDATE public.eg_marriage_details SET dateofreport=?, dateofmarriage=?, firstname_bride_en=?, firstname_bride_ml=?, middlename_bride_en=?, middlename_bride_ml=?, lastname_bride_en=?, lastname_bride_ml=?, firstname_groom_en=?, firstname_groom_ml=?, - middlename_groom_en=?, middlename_groom_ml=?, lastname_groom_en=?, lastname_groom_ml=?, tenantid=?, remarks_en=?, remarks_ml=?, aadharno=?, esign_user_code=?, esign_user_desig_code=?, applicationtype=?, businessservice=?, workflowcode=?, fm_fileno=?, - file_date=?, file_status=?, applicationno=?, registrationno=?, registration_date=?, action=?, status=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=? - WHERE id=?; - basePath: MarriageDetails.* - jsonMaps: - - - jsonPath: $.MarriageDetails.*.dateofreport - - - jsonPath: $.MarriageDetails.*.dateofmarriage - - - jsonPath: $.MarriageDetails.*.firstname_bride_en - - - jsonPath: $.MarriageDetails.*.firstname_bride_ml - - - jsonPath: $.MarriageDetails.*.middlename_bride_en - - - jsonPath: $.MarriageDetails.*.middlename_bride_ml - - - jsonPath: $.MarriageDetails.*.lastname_bride_en - - - jsonPath: $.MarriageDetails.*.lastname_bride_ml - - - jsonPath: $.MarriageDetails.*.firstname_groom_en - - - jsonPath: $.MarriageDetails.*.firstname_groom_ml - - - jsonPath: $.MarriageDetails.*.middlename_groom_en - - - jsonPath: $.MarriageDetails.*.middlename_groom_ml - - - jsonPath: $.MarriageDetails.*.lastname_groom_en - - - jsonPath: $.MarriageDetails.*.lastname_groom_ml - - - jsonPath: $.MarriageDetails.*.tenantid - - - jsonPath: $.MarriageDetails.*.remarks_en - - - jsonPath: $.MarriageDetails.*.remarks_ml - - - jsonPath: $.MarriageDetails.*.aadharno - - - jsonPath: $.MarriageDetails.*.esign_user_code - - - jsonPath: $.MarriageDetails.*.esign_user_desig_code + - jsonPath: $.MarriageDetails.*.marraigeType - jsonPath: $.MarriageDetails.*.applicationtype @@ -144,31 +65,29 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.workflowcode - - jsonPath: $.MarriageDetails.*.fm_fileno + - jsonPath: $.MarriageDetails.*.fileno - - jsonPath: $.MarriageDetails.*.file_date + - jsonPath: $.MarriageDetails.*.marraigeFileDate - - jsonPath: $.MarriageDetails.*.file_status + - jsonPath: $.MarriageDetails.*.marraigeFileStatus - - jsonPath: $.MarriageDetails.*.applicationno + - jsonPath: $.MarriageDetails.*.applicationnumber - jsonPath: $.MarriageDetails.*.registrationno - jsonPath: $.MarriageDetails.*.registration_date - - jsonPath: $.MarriageDetails.*.action - - - jsonPath: $.MarriageDetails.*.status + - jsonPath: $.MarriageDetails.*.marraigeAction - - jsonPath: $.MarriageDetails.*.auditDetails.createdtime + - jsonPath: $.MarriageDetails.*.marraigeStatus - - jsonPath: $.MarriageDetails.*.auditDetails.createdby + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedtime + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastmodifiedby + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy diff --git a/municipal-services/marriage-services/pom.xml b/municipal-services/marriage-services/pom.xml index a599d53603f..3dd79f86bea 100644 --- a/municipal-services/marriage-services/pom.xml +++ b/municipal-services/marriage-services/pom.xml @@ -13,7 +13,7 @@ 1.8 ${java.version} ${java.version} - 1.18.8 + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index c35fbcd2960..5f68f141cea 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -16,10 +16,11 @@ public class MarriageApplicationConfiguration { private String idGenHost; @Value("${egov.idgen.path}") private String idGenPath; - @Value("${persister.save.marriage.application.topic}") - private String saveMarriageApplicationTopic; + @Value("${persister.save.marriage.application.topic}") + private String saveMarriageApplicationTopic; - - @Value("${persister.update.marriage.application.topic}") - private String updateMarriageApplicationTopic; +// @Value("persister.save.marriage.application.topic") +// private String saveMarriageApplicationTopic; + @Value("${persister.update.marriage.application.topic}") + private String updateMarriageApplicationTopic; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index c2d3140c510..da0df2e0a0d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -1,7 +1,7 @@ package org.ksmart.marriage.marriageapplication.controller; -import lombok.extern.slf4j.Slf4j; +// import lombok.extern.slf4j.Slf4j; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationResponse; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; @@ -12,6 +12,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; +import lombok.extern.slf4j.Slf4j; + import javax.validation.Valid; import java.util.List; //import org.ksmart.marriage.marriageregistry.model.BirthCertificate; @@ -25,6 +27,7 @@ @Slf4j @RestController @RequestMapping("/cr/marriage") + public class MarriageApplicationController { private final MarriageApplicationService crMarriageService; private final ResponseInfoFactory responseInfoFactory; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 257d3d64e7c..cf3b7cd98c8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -20,9 +20,9 @@ public void enrichCreate(MarriageDetailsRequest request) { AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); request.getMarriageDetails().forEach(marriage -> { - // marriage.setId(UUID.randomUUID().toString()); + marriage.setId(UUID.randomUUID().toString()); - // marriage.setAuditDetails(auditDetails); + marriage.setAuditDetails(auditDetails); }); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index f3ec630dd3a..e6dcd1c7184 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -17,6 +17,10 @@ @Builder public class MarriageApplicationDetail { + @Size(max = 64) + @JsonProperty("id") + private String id; + @JsonProperty("marraigeDOM") private Long dateofmarriage; @@ -26,15 +30,16 @@ public class MarriageApplicationDetail { @Size(max = 64) - @JsonProperty("marraigeDistrictid") + @JsonProperty("districtid") private String districtid; @Size(max = 64) - @JsonProperty("marraigeLBtype") + @JsonProperty("lbtype") private String lbtype; @Size(max = 64) + @JsonProperty("tenantid") private String tenantid; @Size(max = 64) @@ -140,23 +145,22 @@ public class MarriageApplicationDetail { @Size(max = 64) - @JsonProperty("marraigeApplicationType") + @JsonProperty("applicationtype") private String applicationtype; @Size(max = 64) - @JsonProperty("marraigeBusinessService") + @JsonProperty("businessservice") private String businessservice; @Size(max = 64) - @JsonProperty("marraigeWorkflowCode") + @JsonProperty("workflowcode") private String workflowcode; @Size(max = 64) - @JsonProperty("marraigeFileNo") + @JsonProperty("fileno") private String fileno; - @JsonProperty("marraigeFileDate") private long file_date; @@ -172,6 +176,19 @@ public class MarriageApplicationDetail { @JsonProperty("marraigeStatus") private String status; + @Size(max = 64) + @JsonProperty("applicationnumber") + private String applicationnumber; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + + @JsonProperty("brideDetails") + private BrideDetails brideDetails; + + @JsonProperty("groomDetails") + private GroomDetails groomDetails; + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index 0f8fc6454f3..0bc3ddf94dd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -1,9 +1,14 @@ package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; import javax.validation.constraints.Size; - +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder public class BrideDetails { @Size(max = 64) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index b8d9939e8d0..43159556432 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -1,9 +1,14 @@ package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; import javax.validation.constraints.Size; - +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder public class GroomDetails { @Size(max = 64) @JsonProperty("groomResidentShip") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java index 89bcb88a820..97242efb64a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java @@ -1,9 +1,14 @@ package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; import javax.validation.constraints.Size; - +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder public class PermanentAdressDetails { @Size(max = 200) @JsonProperty("permanentHouseNo") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java index d95416b9546..0a533d853bf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java @@ -1,9 +1,14 @@ package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; import javax.validation.constraints.Size; - +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder public class PresentAddressDetails { @Size(max = 200) @JsonProperty("presentHouseNo") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index e54209dd79b..7cc8295306d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -1,9 +1,14 @@ package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; import javax.validation.constraints.Size; - +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder public class WitnessDetails { @Size(max = 15) @JsonProperty("WitnessDetails") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 5579ac2aa42..be84d006b9b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageapplication.repository; -import lombok.extern.slf4j.Slf4j; +// import lombok.extern.slf4j.Slf4j; //import org.ksmart.marriage.common.producer.BndProducer; import org.ksmart.marriage.common.producer.MarriageProducer; @@ -16,6 +16,8 @@ import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; +import lombok.extern.slf4j.Slf4j; + import java.util.ArrayList; import java.util.List; diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 0e0671b9fb0..524fdd3eb61 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,12 +5,20 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver +<<<<<<< HEAD spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage +======= +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage +>>>>>>> 0fc6655483 (changes added) spring.datasource.username=postgres spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# +<<<<<<< HEAD spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage +======= +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage +>>>>>>> 0fc6655483 (changes added) spring.flyway.user=postgres spring.flyway.password=ikm spring.flyway.table=public diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql index 977fc788a37..0ef685af865 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql @@ -37,15 +37,15 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_details registration_date bigint, action character varying(64) COLLATE pg_catalog."default", status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), - CONSTRAINT eg_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), - CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) - ); + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), + CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) + ); CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid From 0fe149e1820078367f4c2a25d494ebc535e19699 Mon Sep 17 00:00:00 2001 From: ikmkerala <107991882+ikmkerala@users.noreply.github.com> Date: Sat, 4 Mar 2023 14:53:45 +0530 Subject: [PATCH 017/420] Update application.properties --- .../src/main/resources/application.properties | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 524fdd3eb61..49fb68a408f 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,27 +5,19 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -<<<<<<< HEAD spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage -======= -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage ->>>>>>> 0fc6655483 (changes added) spring.datasource.username=postgres spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -<<<<<<< HEAD spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage -======= -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage ->>>>>>> 0fc6655483 (changes added) spring.flyway.user=postgres spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true spring.flyway.locations=classpath:/db/migration/main -spring.flyway.enabled=true +spring.flyway.enabled=false # KAFKA SERVER CONFIGURATIONS From 4c900ff5a11bc964c91b196658cb65fa5d64f841 Mon Sep 17 00:00:00 2001 From: ikmkerala <107991882+ikmkerala@users.noreply.github.com> Date: Sat, 4 Mar 2023 15:26:34 +0530 Subject: [PATCH 018/420] Update application.properties --- .../marriage-services/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 49fb68a408f..0e0671b9fb0 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -17,7 +17,7 @@ spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true spring.flyway.locations=classpath:/db/migration/main -spring.flyway.enabled=false +spring.flyway.enabled=true # KAFKA SERVER CONFIGURATIONS From 1991a5bfc751225f7b71ddedb30719d8ccf54396 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 8 Mar 2023 12:10:42 +0530 Subject: [PATCH 019/420] fix --- .../src/main/resources/marriage.yml | 432 +++++++++++++++++- .../enrichment/MarriageDetailsEnrichment.java | 10 +- .../model/MarriageApplicationDetail.java | 43 +- .../model/marriage/BrideDetails.java | 171 +------ .../model/marriage/GroomDetails.java | 167 +------ .../model/marriage/MarriageFatherInfo.java | 67 --- .../model/marriage/MarriageMotherInfo.java | 67 --- .../marriage/MarriagePermanentAddress.java | 128 ------ .../marriage/MarriagePresentAddress.java | 126 ----- .../MarriageStatisticalInformation.java | 169 ------- .../marriage/PermanentAdressDetails.java | 10 +- .../model/marriage/PresentAddressDetails.java | 6 + .../model/marriage/WitnessDetails.java | 21 +- .../repository/IdGenRepository.java | 89 ---- .../repository/ServiceRequestRepository.java | 41 -- .../rowmapper/BrideDetailsRowMapper.java | 52 +++ .../rowmapper/GroomDetailsRowMapper.java | 48 ++ .../MarriageApplicationRowMapper.java | 82 ++-- .../rowmapper/PermanentAddressRowMapper.java | 37 ++ .../rowmapper/PresentAddressRowMapper.java | 34 ++ .../rowmapper/WitnessDetailsRowMapper.java | 27 ++ .../src/main/resources/application.properties | 9 +- 22 files changed, 738 insertions(+), 1098 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/IdGenRepository.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/ServiceRequestRepository.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index d544b1462b5..10c051f945a 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -21,11 +21,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marraigeDOR - - jsonPath: $.MarriageDetails.*.districtid + - jsonPath: $.MarriageDetails.*.marraigeDistrictid - - jsonPath: $.MarriageDetails.*.lbtype + - jsonPath: $.MarriageDetails.*.marraigeLBtype - - jsonPath: $.MarriageDetails.*.tenantid + - jsonPath: $.MarriageDetails.*.marraigeTenantid - jsonPath: $.MarriageDetails.*.marraigePlacetype @@ -33,23 +33,23 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.placeid - - jsonPath: $.MarriageDetails.*.placename_en + - jsonPath: $.MarriageDetails.*.marraigePlacenameEn - jsonPath: $.MarriageDetails.*.marriageStreetEn - jsonPath: $.MarriageDetails.*.marriageStreetMal - - jsonPath: $.MarriageDetails.*.placename_mal + - jsonPath: $.MarriageDetails.*.marraigePlacenameMal - - jsonPath: $.MarriageDetails.*.ward_code + - jsonPath: $.MarriageDetails.*.marraigeWardCode - - jsonPath: $.MarriageDetails.*.talukid + - jsonPath: $.MarriageDetails.*.marraigeTalukID - - jsonPath: $.MarriageDetails.*.village_name + - jsonPath: $.MarriageDetails.*.marraigeVillageName - - jsonPath: $.MarriageDetails.*.marriage_type + - jsonPath: $.MarriageDetails.*.marraigeType - - jsonPath: $.MarriageDetails.*.oth_marriage_type + - jsonPath: $.MarriageDetails.*.othMarriageType - jsonPath: $.MarriageDetails.*.marriageLandmark @@ -57,15 +57,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageLocalityMal - - jsonPath: $.MarriageDetails.*.marraigeType + - jsonPath: $.MarriageDetails.*.marraigeOthersSpecify - - jsonPath: $.MarriageDetails.*.applicationtype + - jsonPath: $.MarriageDetails.*.marraigeApplicationType - - jsonPath: $.MarriageDetails.*.businessservice + - jsonPath: $.MarriageDetails.*.marraigeBusinessService - - jsonPath: $.MarriageDetails.*.workflowcode + - jsonPath: $.MarriageDetails.*.marraigeWorkflowCode - - jsonPath: $.MarriageDetails.*.fileno + - jsonPath: $.MarriageDetails.*.marraigeFileNo - jsonPath: $.MarriageDetails.*.marraigeFileDate @@ -91,5 +91,407 @@ serviceMaps: + - query: INSERT INTO public.eg_marriage_bride_details( + id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, + lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, + father_adharno, mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, profession_en, profession_mal, maritalstatusid, + is_spouse_living, no_of_spouse_living, marriageid, photo_url, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.BrideDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideDetails.id + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGardianAdhar + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideProfessionEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideProfessionMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideSpouseLiving + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.BrideDetails.photo_url + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - query : INSERT INTO public.eg_marriage_groom_details( + id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, + lastname_en, lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, + mothername_mal, father_adharno, mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, profession_en, profession_mal, + maritalstatusid, is_spouse_living, no_of_spouse_living, marriageid, photo_url, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.GroomDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomDetails.id + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAdharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAdharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAdharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGardianAdhar + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomProfessionEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomProfessionMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomSpouseLiving + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomPhotoUrl + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - query : INSERT INTO public.eg_marriage_permanent_address_details( + id, houseno, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, + ward_code, doorno, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, + pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.PermanentAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNo + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageName + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukID + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukName + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCode + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDoorNO + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOid + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPin + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryId + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + + - query: INSERT INTO public.eg_marriage_present_address_details( + id, houseno, housename_no_en, housename_no_ml, villageid, village_name, + talukid, taluk_name, ward_code, doorno, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, + poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.PresentAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.id + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNo + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageName + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukID + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukName + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentWardCode + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDoorNO + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDistrictId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStateId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPOid + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPin + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentCountryId + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + + - query : INSERT INTO public.eg_marriage_witness_details( + id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_message_received, + is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.WitnessDetail + jsonMaps: + - jsonPath: $.MarriageDetails.*.WitnessDetail.id + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAdharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessNameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessNameMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAge + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAddresSEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAddressMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessMobile + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessISmessageReceived + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessISEsigned + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + + + + + + - version: 1.0 + description: Persists save marriage details in marriage table + fromTopic: update-marriage-application-topic + isTransaction: true + queryMaps: + + + - query: UPDATE public.eg_marriage_details + SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeothers=?, + placeid=?, placename_en=?, street_name_en=?, street_name_ml=?, placename_mal=?, ward_code=?, talukid=?, village_name=?, + marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, othersspecify=?, applicationtype=?, businessservice=?, + workflowcode=?, fileno=?, file_date=?, file_status=?, applicationnumber=?, registrationno=?, registration_date=?, action=?, status=?, + lastmodifiedtime=?, lastmodifiedby=? + WHERE id=?; + + basePath: MarriageDetails.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.marraigeDOM + + - jsonPath: $.MarriageDetails.*.marraigeDOR + + - jsonPath: $.MarriageDetails.*.districtid + + - jsonPath: $.MarriageDetails.*.lbtype + + - jsonPath: $.MarriageDetails.*.tenantid + + - jsonPath: $.MarriageDetails.*.marraigePlacetype + + - jsonPath: $.MarriageDetails.*.marriagePlaceothers + + - jsonPath: $.MarriageDetails.*.placeid + + - jsonPath: $.MarriageDetails.*.placename_en + + - jsonPath: $.MarriageDetails.*.marriageStreetEn + + - jsonPath: $.MarriageDetails.*.marriageStreetMal + + - jsonPath: $.MarriageDetails.*.placename_mal + + - jsonPath: $.MarriageDetails.*.ward_code + + - jsonPath: $.MarriageDetails.*.talukid + + - jsonPath: $.MarriageDetails.*.village_name + + - jsonPath: $.MarriageDetails.*.marriage_type + + - jsonPath: $.MarriageDetails.*.oth_marriage_type + + - jsonPath: $.MarriageDetails.*.marriageLandmark + + - jsonPath: $.MarriageDetails.*.marriageLocalityEn + + - jsonPath: $.MarriageDetails.*.marriageLocalityMal + + - jsonPath: $.MarriageDetails.*.marraigeType + + - jsonPath: $.MarriageDetails.*.applicationtype + + - jsonPath: $.MarriageDetails.*.businessservice + + - jsonPath: $.MarriageDetails.*.workflowcode + + - jsonPath: $.MarriageDetails.*.fileno + + - jsonPath: $.MarriageDetails.*.marraigeFileDate + + - jsonPath: $.MarriageDetails.*.marraigeFileStatus + + - jsonPath: $.MarriageDetails.*.applicationnumber + + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.registration_date + + - jsonPath: $.MarriageDetails.*.marraigeAction + + - jsonPath: $.MarriageDetails.*.marraigeStatus + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.id diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index cf3b7cd98c8..015ca035c58 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -23,7 +23,11 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.setId(UUID.randomUUID().toString()); marriage.setAuditDetails(auditDetails); - + marriage.getBrideDetails().setId(UUID.randomUUID().toString()); + marriage.getGroomDetails().setId(UUID.randomUUID().toString()); + marriage.getPermanent().setId(UUID.randomUUID().toString()); + marriage.getPresent().setId(UUID.randomUUID().toString()); + marriage.getWitness().setId(UUID.randomUUID().toString()); }); @@ -35,8 +39,8 @@ public void enrichUpdate(MarriageDetailsRequest request) { User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); -// request.getMarriageDetails() -// .forEach(birth -> birth.setAuditDetails(auditDetails)); + request.getMarriageDetails() + .forEach(marriage -> marriage.setAuditDetails(auditDetails)); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index e6dcd1c7184..b5a166062a1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -47,8 +47,11 @@ public class MarriageApplicationDetail { private String placetype; @Size(max = 1000) - @JsonProperty("marraigePlacename") - private String placename; + @JsonProperty("marraigePlacenameEn") + private String placenameEn; + @Size(max = 1000) + @JsonProperty("marraigePlacenameMal") + private String placenameMl; @Size(max = 64) @JsonProperty("marraigeWardCode") @@ -62,8 +65,6 @@ public class MarriageApplicationDetail { @JsonProperty("marriageStreetMal") private String street_name_ml; - - @Size(max = 64) @JsonProperty("marraigeTalukID") private String talukid; @@ -88,7 +89,6 @@ public class MarriageApplicationDetail { @JsonProperty("marraigeType") private String marriage_type; - @Size(max = 64) @JsonProperty("marriagePlaceothers") private String placeothers; @@ -109,8 +109,6 @@ public class MarriageApplicationDetail { @JsonProperty("witnessNameEn") private String name_en; - - @Size(max = 200) @JsonProperty("witnessNameMal") private String name_mal; @@ -131,33 +129,27 @@ public class MarriageApplicationDetail { @JsonProperty("witnessMobile") private String mobile; - @JsonProperty("witnessISmessageReceived") private Boolean is_message_received; - - - @JsonProperty("witnessISEsigned") private Boolean is_esigned; - - @Size(max = 64) - @JsonProperty("applicationtype") + @JsonProperty("marraigeApplicationType") private String applicationtype; @Size(max = 64) - @JsonProperty("businessservice") + @JsonProperty("marraigeBusinessService") private String businessservice; @Size(max = 64) - @JsonProperty("workflowcode") + @JsonProperty("marraigeWorkflowCode") private String workflowcode; @Size(max = 64) - @JsonProperty("fileno") + @JsonProperty("marraigeFileNo") private String fileno; @@ -175,6 +167,11 @@ public class MarriageApplicationDetail { @Size(max = 64) @JsonProperty("marraigeStatus") private String status; + @Size(max = 1000) + @JsonProperty("placeid") + private String placeid; + + @Size(max = 64) @JsonProperty("applicationnumber") @@ -182,13 +179,21 @@ public class MarriageApplicationDetail { @JsonProperty("auditDetails") private AuditDetails auditDetails; - @JsonProperty("brideDetails") + @JsonProperty("BrideDetails") private BrideDetails brideDetails; - @JsonProperty("groomDetails") + @JsonProperty("GroomDetails") private GroomDetails groomDetails; + @JsonProperty("PermanentAddressDetails") + private PermanentAdressDetails permanent; + @JsonProperty("PresentAddressDetails") + private PresentAddressDetails present ; + @JsonProperty("WitnessDetail") + private WitnessDetails witness; +// @JsonProperty("WitnessDetails") +// private WitnessDetails witness; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index 0bc3ddf94dd..500e7b2403f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -11,6 +11,9 @@ @Builder public class BrideDetails { + @Size(max = 64) + @JsonProperty("id") + private String id; @Size(max = 64) @JsonProperty("brideResidentShip") private String residentship; @@ -118,170 +121,6 @@ public class BrideDetails { @JsonProperty("brideGardianAdhar") private String guardian_adhar; - @Size(max = 200) - @JsonProperty("permanentHouseNo") - private String houseno; - - @Size(max = 2500) - @JsonProperty("permanentHouseNameEn") - private String housename_no_en; - - - - @Size(max = 2500) - @JsonProperty("permanentHouseNameMal") - private String housename_no_ml; - - @Size(max = 64) - @JsonProperty("permanentVillageId") - private String villageid; - - @Size(max = 1000) - @JsonProperty("permanentVillageName") - private String village_name; - - @Size(max = 64) - @JsonProperty("permanentTalukID") - private String talukid; - - @Size(max = 1000) - @JsonProperty("permanentTalukName") - private String taluk_name; - - @Size(max = 64) - @JsonProperty("permanentWardCode") - private String ward_code; - - - - - @JsonProperty("permanentDoorNO") - private Integer doorno; - - @Size(max = 1000) - @JsonProperty("permanentLocalityEn") - private String locality_en; - - @Size(max = 1000) - @JsonProperty("permanentLocalityMal") - private String locality_ml; - - @Size(max = 2000) - @JsonProperty("permanentStreetNameEn") - private String street_name_en; - - @Size(max = 2000) - @JsonProperty("permanentStreetNameMal") - private String street_name_ml; - - - @Size(max = 64) - @JsonProperty("permanentDistrictId") - private String districtid; - - - @Size(max = 64) - @JsonProperty("permanentStateId") - private String stateid; - - @Size(max = 64) - @JsonProperty("permanentPOid") - private String poid; - - @Size(max = 10) - @JsonProperty("permanentPin") - private String pinno; - - @Size(max = 64) - @JsonProperty("permanentCountryId") - private String countryid; - - - - - @Size(max = 200) - @JsonProperty("presentHouseNo") - private String presentHouseNo; - - @Size(max = 2500) - @JsonProperty("presentHouseNameEn") - private String presentHouseNameEn; - - - - @Size(max = 2500) - @JsonProperty("presentHouseNameMal") - private String presentHouseNameMal; - - @Size(max = 64) - @JsonProperty("presentVillageId") - private String presentVillageId; - - @Size(max = 1000) - @JsonProperty("presentVillageName") - private String presentVillageName; - - @Size(max = 64) - @JsonProperty("presentTalukID") - private String presentTalukID; - - @Size(max = 1000) - @JsonProperty("presentTalukName") - private String presentTalukName; - - @Size(max = 64) - @JsonProperty("presentWardCode") - private String presentWardCode; - - - - - @JsonProperty("presentDoorNO") - private Integer presentDoorNO; - - @Size(max = 1000) - @JsonProperty("presentLocalityEn") - private String presentLocalityEn; - - @Size(max = 1000) - @JsonProperty("presentLocalityMal") - private String presentLocalityMal; - - @Size(max = 2000) - @JsonProperty("presentStreetNameEn") - private String presentStreetNameEn; - - @Size(max = 2000) - @JsonProperty("presentStreetNameMal") - private String presentStreetNameMal; - - - @Size(max = 64) - @JsonProperty("presentDistrictId") - private String presentDistrictId; - - - - - @Size(max = 64) - @JsonProperty("presentStateId") - private String presentStateId; - - @Size(max = 64) - @JsonProperty("presentPOid") - private String presentPOid; - - @Size(max = 10) - @JsonProperty("presentPin") - private String presentPin; - - @Size(max = 64) - @JsonProperty("presentCountryId") - private String presentCountryId; - - - - @Size(max = 200) @JsonProperty("brideProfessionEn") @@ -309,6 +148,10 @@ public class BrideDetails { @JsonProperty("bridePhotoUrl") private String photo_url; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index 43159556432..cbf2b9f1531 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -10,6 +10,9 @@ @NoArgsConstructor @Builder public class GroomDetails { + @Size(max = 64) + @JsonProperty("id") + private String id; @Size(max = 64) @JsonProperty("groomResidentShip") private String residentship; @@ -123,167 +126,6 @@ public class GroomDetails { private String profession_en; - @Size(max = 200) - @JsonProperty("permanentHouseNo") - private String houseno; - - @Size(max = 2500) - @JsonProperty("permanentHouseNameEn") - private String housename_no_en; - - - - @Size(max = 2500) - @JsonProperty("permanentHouseNameMal") - private String housename_no_ml; - - @Size(max = 64) - @JsonProperty("permanentVillageId") - private String villageid; - - @Size(max = 1000) - @JsonProperty("permanentVillageName") - private String village_name; - - @Size(max = 64) - @JsonProperty("permanentTalukID") - private String talukid; - - @Size(max = 1000) - @JsonProperty("permanentTalukName") - private String taluk_name; - - @Size(max = 64) - @JsonProperty("permanentWardCode") - private String ward_code; - - - - - @JsonProperty("permanentDoorNO") - private Integer doorno; - - @Size(max = 1000) - @JsonProperty("permanentLocalityEn") - private String locality_en; - - @Size(max = 1000) - @JsonProperty("permanentLocalityMal") - private String locality_ml; - - @Size(max = 2000) - @JsonProperty("permanentStreetNameEn") - private String street_name_en; - - @Size(max = 2000) - @JsonProperty("permanentStreetNameMal") - private String street_name_ml; - - - @Size(max = 64) - @JsonProperty("permanentDistrictId") - private String districtid; - - - @Size(max = 64) - @JsonProperty("permanentStateId") - private String stateid; - - @Size(max = 64) - @JsonProperty("permanentPOid") - private String poid; - - @Size(max = 10) - @JsonProperty("permanentPin") - private String pinno; - - @Size(max = 64) - @JsonProperty("permanentCountryId") - private String countryid; - - - - - @Size(max = 200) - @JsonProperty("presentHouseNo") - private String presentHouseNo; - - @Size(max = 2500) - @JsonProperty("presentHouseNameEn") - private String presentHouseNameEn; - - - - @Size(max = 2500) - @JsonProperty("presentHouseNameMal") - private String presentHouseNameMal; - - @Size(max = 64) - @JsonProperty("presentVillageId") - private String presentVillageId; - - @Size(max = 1000) - @JsonProperty("presentVillageName") - private String presentVillageName; - - @Size(max = 64) - @JsonProperty("presentTalukID") - private String presentTalukID; - - @Size(max = 1000) - @JsonProperty("presentTalukName") - private String presentTalukName; - - @Size(max = 64) - @JsonProperty("presentWardCode") - private String presentWardCode; - - - - - @JsonProperty("presentDoorNO") - private Integer presentDoorNO; - - @Size(max = 1000) - @JsonProperty("presentLocalityEn") - private String presentLocalityEn; - - @Size(max = 1000) - @JsonProperty("presentLocalityMal") - private String presentLocalityMal; - - @Size(max = 2000) - @JsonProperty("presentStreetNameEn") - private String presentStreetNameEn; - - @Size(max = 2000) - @JsonProperty("presentStreetNameMal") - private String presentStreetNameMal; - - - @Size(max = 64) - @JsonProperty("presentDistrictId") - private String presentDistrictId; - - - - - @Size(max = 64) - @JsonProperty("presentStateId") - private String presentStateId; - - @Size(max = 64) - @JsonProperty("presentPOid") - private String presentPOid; - - @Size(max = 10) - @JsonProperty("presentPin") - private String presentPin; - - @Size(max = 64) - @JsonProperty("presentCountryId") - private String presentCountryId; - @Size(max = 200) @JsonProperty("groomProfessionMal") private String profession_mal; @@ -306,5 +148,8 @@ public class GroomDetails { @JsonProperty("groomPhotoUrl") private String photo_url; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java deleted file mode 100644 index 4df2f335c23..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageFatherInfo.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - - @Getter - @Setter - @AllArgsConstructor - @NoArgsConstructor - @Builder - - public class MarriageFatherInfo { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 64) - @JsonProperty("ot_passportno") - private String passportNo; - - @Size(max = 300) - @JsonProperty("emailid") - private String emailId; - - @Size(max = 12) - @JsonProperty("mobileno") - private String mobileNo; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @Size(max = 64) - @JsonProperty("bio_adopt") - private String bioAdopt; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java deleted file mode 100644 index 3752795785d..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageMotherInfo.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class MarriageMotherInfo { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 1000) - @JsonProperty("firstname_en") - private String firstNameEn; - - @Size(max = 1000) - @JsonProperty("firstname_ml") - private String firstNameMl; - - @Size(max = 1000) - @JsonProperty("middlename_en") - private String middleNameEn; - - @Size(max = 1000) - @JsonProperty("middlename_ml") - private String middleNameMl; - - @Size(max = 1000) - @JsonProperty("lastname_en") - private String lastNameEn; - - @Size(max = 1000) - @JsonProperty("lastname_ml") - private String lastNameMl; - - @Size(max = 15) - @JsonProperty("aadharno") - private String aadharNo; - - @Size(max = 64) - @JsonProperty("ot_passportno") - private String passportNo; - - @Size(max = 300) - @JsonProperty("emailid") - private String emailId; - - @Size(max = 12) - @JsonProperty("mobileno") - private String mobileNo; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @Size(max = 64) - @JsonProperty("bio_adopt") - private String bioAdopt; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java deleted file mode 100644 index ec6037d1128..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePermanentAddress.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class MarriagePermanentAddress { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 64) - @JsonProperty("resdnce_addr_type") - private String resdnceAddrType; - - @Size(max = 250) - @JsonProperty("res_asso_no") - private String resAssoNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2500) - @JsonProperty("ot_address1_en") - private String otAddress1En; - - @Size(max = 2500) - @JsonProperty("ot_address1_ml") - private String otAddress1Ml; - - @Size(max = 2500) - @JsonProperty("ot_address2_en") - private String otAddress2En; - - @Size(max = 2500) - @JsonProperty("ot_address2_ml") - private String otAddress2Ml; - - @Size(max = 64) - @JsonProperty("villageid") - private String villageId; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 64) - @JsonProperty("talukid") - private String talukId; - - @Size(max = 64) - @JsonProperty("districtid") - private String districtId; - - @Size(max = 64) - @JsonProperty("stateid") - private String stateId; - - @Size(max = 64) - @JsonProperty("poid") - private String poId; - - @Size(max = 10) - @JsonProperty("pinno") - private String pinNo; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_en") - private String otStateRegionProvinceEn; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_ml") - private String otStateRegionProvinceMl; - - @Size(max = 64) - @JsonProperty("countryid") - private String countryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @JsonProperty("same_as_present") - private Integer sameAsPresent; - - @Size(max = 64) - @JsonProperty("bio_adopt") - private String bioAdopt; - - @Size(max = 1000) - @JsonProperty("res_asso_no_ml") - private String resAssoNoMl; - - @Size(max = 1000) - @JsonProperty("taluk_name") - private String talukName; - - @Size(max = 1000) - @JsonProperty("village_name") - private String villageName; - - @Size(max = 64) - @JsonProperty("ward_code") - private String wardCode; - - @JsonProperty("doorno") - private String doorNo; - - @Size(max = 10) - @JsonProperty("subno") - private String subNo; - - @Size(max = 10) - @JsonProperty("ot_zipcode") - private String otZipcode; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java deleted file mode 100644 index 15ea5a5f362..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePresentAddress.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@ToString -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class MarriagePresentAddress { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 64) - @JsonProperty("resdnce_addr_type") - private String resdnceAddrType; - - @Size(max = 250) - @JsonProperty("res_asso_no") - private String resAssoNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 2500) - @JsonProperty("ot_address1_en") - private String otAddress1En; - - @Size(max = 2500) - @JsonProperty("ot_address1_ml") - private String otAddress1Ml; - - @Size(max = 2500) - @JsonProperty("ot_address2_en") - private String otAddress2En; - - @Size(max = 2500) - @JsonProperty("ot_address2_ml") - private String otAddress2Ml; - - @Size(max = 64) - @JsonProperty("villageid") - private String villageId; - - @Size(max = 64) - @JsonProperty("tenantid") - private String tenantId; - - @Size(max = 64) - @JsonProperty("talukid") - private String talukId; - - @Size(max = 64) - @JsonProperty("districtid") - private String districtId; - - @Size(max = 64) - @JsonProperty("stateid") - private String stateId; - - @Size(max = 64) - @JsonProperty("poid") - private String poId; - - @Size(max = 10) - @JsonProperty("pinno") - private String pinNo; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_en") - private String otStateRegionProvinceEn; - - @Size(max = 2500) - @JsonProperty("ot_state_region_province_ml") - private String otStateRegionProvinceMl; - - @Size(max = 64) - @JsonProperty("countryid") - private String countryId; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @Size(max = 64) - @JsonProperty("bio_adopt") - private String bioAdopt; - - @Size(max = 1000) - @JsonProperty("res_asso_no_ml") - private String resAssoNoMl; - - @Size(max = 1000) - @JsonProperty("taluk_name") - private String talukName; - - @Size(max = 1000) - @JsonProperty("village_name") - private String villageName; - - @Size(max = 64) - @JsonProperty("ward_code") - private String wardCode; - - @JsonProperty("doorno") - private String doorNo; - - @Size(max = 10) - @JsonProperty("subno") - private String subNo; - - @Size(max = 10) - @JsonProperty("ot_zipcode") - private String otZipcode; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java deleted file mode 100644 index 343a8072c42..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageStatisticalInformation.java +++ /dev/null @@ -1,169 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class MarriageStatisticalInformation { - - @Size(max = 64) - @JsonProperty("id") - private String id; - - @JsonProperty("weight_of_child") - private Long weightOfChild; - - @JsonProperty("height_of_child") - private Long heightOfChild; - - @JsonProperty("duration_of_pregnancy_in_week") - private Integer durationOfPregnancyInWeek; - - @Size(max = 64) - @JsonProperty("nature_of_medical_attention") - private String natureOfMedicalAttention; - - @Size(max = 64) - @JsonProperty("way_of_pregnancy") - private String wayOfPregnancy; - - @Size(max = 64) - @JsonProperty("delivery_method") - private String deliveryMethod; - - @Size(max = 1000) - @JsonProperty("deliverytypeothers_en") - private String deliveryTypeOthersEn; - - @Size(max = 1000) - @JsonProperty("deliverytypeothers_ml") - private String deliveryTypeOthersMl; - - @Size(max = 64) - @JsonProperty("religionid") - private String religionId; - - @Size(max = 64) - @JsonProperty("father_nationalityid") - private String fatherNationalityId; - - @Size(max = 64) - @JsonProperty("father_educationid") - private String fatherEducationId; - - @Size(max = 64) - @JsonProperty("father_education_subid") - private String fatherEducationSubId; - - @Size(max = 64) - @JsonProperty("father_proffessionid") - private String fatherProffessionId; - - @Size(max = 64) - @JsonProperty("mother_educationid") - private String motherEducationId; - - @Size(max = 64) - @JsonProperty("mother_education_subid") - private String motherEducationSubId; - - @Size(max = 64) - @JsonProperty("mother_proffessionid") - private String motherProffessionId; - - @Size(max = 64) - @JsonProperty("mother_nationalityid") - private String motherNationalityId; - - @JsonProperty("mother_dateofmarriage") - private Long motherDateOfMarriage; - - @JsonProperty("mother_age_marriage") - private Integer motherAgeMarriage; - - @JsonProperty("mother_dateofbirth") - private Long motherDateOfBirth; - - @JsonProperty("mother_age_delivery") - private Integer motherAgeDelivery; - - @JsonProperty("mother_no_of_birth_given") - private Integer motherNoOfBirthGiven; - - @JsonProperty("mother_no_of_children_alive") - private Integer motherNoFfChildrenAlive; - - @Size(max = 64) - @JsonProperty("mother_maritalstatusid") - private String motherMaritalStatusId; - - @JsonProperty("mother_unmarried") - private Integer motherUnmarried; - - @JsonProperty("mother_res_lbid") - private Integer motherResLbId; - - @JsonProperty("mother_res_lb_code") - private Integer motherResLbCode; - - @JsonProperty("mother_res_place_type_id") - private Integer motherResPlaceTypeId; - - @JsonProperty("mother_res_lb_type_id") - private Integer motherResLbTypeId; - - @JsonProperty("mother_res_district_id") - private Integer motherResDistrictId; - - @JsonProperty("mother_res_state_id") - private Integer motherResStateId; - - @JsonProperty("mother_res_country_id") - private Integer motherResCountryId; - - @Size(max = 64) - @JsonProperty("mother_resdnce_addr_type") - private String motherResdnceAddrType; - - @Size(max = 64) - @JsonProperty("mother_resdnce_tenentid") - private String motherResdnceTenentId; - - @Size(max = 64) - @JsonProperty("mother_resdnce_placetype") - private String motherResdncePlaceType; - - @Size(max = 2500) - @JsonProperty("mother_resdnce_place_en") - private String motherResdncePlaceEn; - - @Size(max = 2500) - @JsonProperty("mother_resdnce_place_ml") - private String motherResdncePlaceMl; - - @Size(max = 64) - @JsonProperty("mother_resdnce_lbtype") - private String motherResdnceLbType; - - @Size(max = 64) - @JsonProperty("mother_resdnce_districtid") - private String motherResdnceDistrictId; - - @Size(max = 64) - @JsonProperty("mother_resdnce_stateid") - private String motherResdnceStateId; - - @Size(max = 64) - @JsonProperty("mother_resdnce_countryid") - private String motherResdnceCountryId; - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java index 97242efb64a..faa347b9252 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java @@ -10,6 +10,9 @@ @NoArgsConstructor @Builder public class PermanentAdressDetails { + @Size(max = 64) + @JsonProperty("id") + private String id; @Size(max = 200) @JsonProperty("permanentHouseNo") private String houseno; @@ -18,8 +21,6 @@ public class PermanentAdressDetails { @JsonProperty("permanentHouseNameEn") private String housename_no_en; - - @Size(max = 2500) @JsonProperty("permanentHouseNameMal") private String housename_no_ml; @@ -48,7 +49,7 @@ public class PermanentAdressDetails { @JsonProperty("permanentDoorNO") - private Integer doorno; + private Integer doorno; @Size(max = 1000) @JsonProperty("permanentLocalityEn") @@ -89,6 +90,9 @@ public class PermanentAdressDetails { @Size(max = 64) @JsonProperty("permanentCountryId") private String countryid; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java index 0a533d853bf..eed11f9cabd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java @@ -10,6 +10,9 @@ @NoArgsConstructor @Builder public class PresentAddressDetails { + @Size(max = 64) + @JsonProperty("id") + private String id; @Size(max = 200) @JsonProperty("presentHouseNo") private String houseno; @@ -90,5 +93,8 @@ public class PresentAddressDetails { @JsonProperty("presentCountryId") private String countryid; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index 7cc8295306d..013f420868b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -10,8 +10,12 @@ @NoArgsConstructor @Builder public class WitnessDetails { + + @Size(max = 64) + @JsonProperty("id") + private String id; @Size(max = 15) - @JsonProperty("WitnessDetails") + @JsonProperty("witnessAdharNo") private String adharno; @Size(max = 200) @@ -19,7 +23,6 @@ public class WitnessDetails { private String name_en; - @Size(max = 200) @JsonProperty("witnessNameMal") private String name_mal; @@ -44,11 +47,19 @@ public class WitnessDetails { @JsonProperty("witnessISmessageReceived") private Boolean is_message_received; - - - @JsonProperty("witnessISEsigned") private Boolean is_esigned; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + } + + + + + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/IdGenRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/IdGenRepository.java deleted file mode 100644 index f2120c6b139..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/IdGenRepository.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.ksmart.marriage.marriageapplication.repository; - - -import com.fasterxml.jackson.databind.ObjectMapper; -import org.egov.common.contract.request.RequestInfo; -import org.egov.tracer.model.CustomException; -import org.ksmart.marriage.common.Idgen.IdGenerationRequest; -import org.ksmart.marriage.common.Idgen.IdGenerationResponse; -import org.ksmart.marriage.common.Idgen.IdRequest; -import org.ksmart.marriage.common.Idgen.IdResponse; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; -import org.springframework.util.CollectionUtils; -import org.springframework.web.client.RestTemplate; - -import java.util.ArrayList; -import java.util.List; -import java.util.stream.Collectors; - -@Repository -public class IdGenRepository { - - @Autowired - private RestTemplate restTemplate; - - @Autowired - private MarriageApplicationConfiguration config; - - @Autowired - @Qualifier("objectMapperBnd") - private ObjectMapper mapper; - - @Autowired - private ServiceRequestRepository restRepo; - - public IdGenerationResponse getId(RequestInfo requestInfo, String tenantId, String name, String format, int count) { - - List reqList = new ArrayList<>(); - for (int i = 0; i < count; i++) { - reqList.add(IdRequest.builder().idName(name).format(format).tenantId(tenantId).build()); - } - IdGenerationRequest req = IdGenerationRequest.builder().idRequests(reqList).requestInfo(requestInfo).build(); - IdGenerationResponse response = null; -// try { - response = restTemplate.postForObject( config.getIdGenHost()+ config.getIdGenPath(), req, IdGenerationResponse.class); -// } catch (HttpClientErrorException e) { -// throw new ServiceCallException(e.getResponseBodyAsString()); -// } catch (Exception e) { -// Map map = new HashMap<>(); -// map.put(e.getCause().getClass().getName(),e.getMessage()); -// throw new CustomException(map); -// } - return response; - } - - - public List getIdList(RequestInfo requestInfo, String tenantId, String idName, String idformat, - Integer count) { - List reqList = new ArrayList<>(); - for (int i = 0; i < count; i++) { - reqList.add(IdRequest.builder() - .idName(idName) - .format(idformat) - .tenantId(tenantId) - .build()); - } - - IdGenerationRequest request = IdGenerationRequest.builder() - .idRequests(reqList) - .requestInfo(requestInfo) - .build(); - StringBuilder uri = new StringBuilder(config.getIdGenHost()).append(config.getIdGenPath()); - IdGenerationResponse response = mapper.convertValue(restRepo.fetchResult(uri, request), - IdGenerationResponse.class); - - List idResponses = response.getIdResponses(); - - if (CollectionUtils.isEmpty(idResponses)) { - throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); - } - - return idResponses.stream() - .map(IdResponse::getId) - .collect(Collectors.toList()); - } - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/ServiceRequestRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/ServiceRequestRepository.java deleted file mode 100644 index f7a375017d6..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/ServiceRequestRepository.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.ksmart.marriage.marriageapplication.repository; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; -import lombok.extern.slf4j.Slf4j; -import org.egov.tracer.model.ServiceCallException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.RestTemplate; - -import java.util.Map; - -@Repository -@Slf4j -public class ServiceRequestRepository { - - @Autowired - private RestTemplate restTemplate; - - @Autowired - @Qualifier("objectMapperBnd") - private ObjectMapper mapper; - - public Object fetchResult(StringBuilder uri, Object request) { - mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); - Object response = null; - log.info("URI: "+uri.toString()); - try { - log.info("Request: "+mapper.writeValueAsString(request)); - response = restTemplate.postForObject(uri.toString(), request, Map.class); - }catch(HttpClientErrorException e) { - log.error("External Service threw an Exception: ",e); - throw new ServiceCallException(e.getResponseBodyAsString()); - }catch(Exception e) { - log.error("Exception while fetching from searcher: ",e); - } - return response; - } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java new file mode 100644 index 00000000000..167707f3ce4 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -0,0 +1,52 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface BrideDetailsRowMapper { + default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ + + return BrideDetails.builder() + .id(rs.getString("id")) + .residentship(rs.getString("residentship")) + .adharno(rs.getString("adharno")) + .passportno(rs.getString("passportno")) + .socialsecurityno(rs.getString("socialsecurityno")) + .fathername_en(rs.getString("firstname_en")) + .fathername_mal(rs.getString("firstname_mal")) + .middlename_en(rs.getString("middlename_en")) + .middlename_mal(rs.getString("middlename_mal")) + .lastname_en(rs.getString("lastname_en")) + .lastname_mal(rs.getString("lastname_mal")) + .mobile(rs.getString("mobile")) + .emailid(rs.getString("emailid")) + .gender(rs.getString("gender")) + .dateofbirth(rs.getLong("dateofbirth")) + .age(rs.getInt("age")) + .parent_guardian(rs.getString("parent_guardian")) + .fathername_en(rs.getString("fathername_en")) + .fathername_mal(rs.getString("fathername_mal")) + .mothername_en(rs.getString("mothername_en")) + .mothername_mal(rs.getString("mothername_mal")) + .father_adharno(rs.getString("father_adharno")) + .mother_adharno(rs.getString("mother_adharno")) + .guardianname_en(rs.getString("guardianname_en")) + .guardianname_mal(rs.getString("guardianname_mal")) + .guardian_adhar(rs.getString("guardian_adhar")) + .profession_en(rs.getString("profession_en")) + .profession_mal(rs.getString("profession_mal")) + .maritalstatusid(rs.getString("maritalstatusid")) + .is_spouse_living(Boolean.valueOf(rs.getString("is_spouse_living"))) + .no_of_spouse_living(Boolean.valueOf(rs.getString("no_of_spouse_living"))) + //marriageid + .photo_url(rs.getString("photo_url")) + .marriageid(rs.getString("marriageid")) + .build(); + + + + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java new file mode 100644 index 00000000000..29144111b4e --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -0,0 +1,48 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.GroomDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface GroomDetailsRowMapper { + default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ + + return GroomDetails.builder() + .id(rs.getString("id")) + .residentship(rs.getString("residentship")) + .adharno(rs.getString("adharno")) + .passportno(rs.getString("passportno")) + .socialsecurityno(rs.getString("socialsecurityno")) + .fathername_en(rs.getString("firstname_en")) + .fathername_mal(rs.getString("firstname_mal")) + .middlename_en(rs.getString("middlename_en")) + .middlename_mal(rs.getString("middlename_mal")) + .lastname_en(rs.getString("lastname_en")) + .lastname_mal(rs.getString("lastname_mal")) + .mobile(rs.getString("mobile")) + .emailid(rs.getString("emailid")) + .gender(rs.getString("gender")) + .dateofbirth(rs.getLong("dateofbirth")) + .age(rs.getInt("age")) + .parent_guardian(rs.getString("parent_guardian")) + .fathername_en(rs.getString("fathername_en")) + .fathername_mal(rs.getString("fathername_mal")) + .mothername_en(rs.getString("mothername_en")) + .mothername_mal(rs.getString("mothername_mal")) + .father_adharno(rs.getString("father_adharno")) + .mother_adharno(rs.getString("mother_adharno")) + .guardianname_en(rs.getString("guardianname_en")) + .guardianname_mal(rs.getString("guardianname_mal")) + .guardian_adhar(rs.getString("guardian_adhar")) + .profession_en(rs.getString("profession_en")) + .profession_mal(rs.getString("profession_mal")) + .maritalstatusid(rs.getString("maritalstatusid")) + .is_spouse_living(Boolean.valueOf(rs.getString("is_spouse_living"))) + .no_of_spouse_living(Boolean.valueOf(rs.getString("no_of_spouse_living"))) + .marriageid(rs.getString("marriageid")) + .photo_url(rs.getString("photo_url")) + + .build(); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 538f823a65e..46b7d161429 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -11,51 +11,59 @@ import java.util.ArrayList; import java.util.List; @Component -public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper{ +public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper,PermanentAddressRowMapper,PresentAddressRowMapper{ @Override public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null List result = new ArrayList<>(); while (rs.next()) { -// result.add(MarriageApplicationDetail.builder() -// .id(rs.getString("id")) -// .dateOfReport(Long.valueOf(rs.getLong("dateofreport"))) -// .dateOfMarriage(Long.valueOf(rs.getLong("dateofmarriage"))) -// .firstNameEn(rs.getString("firstname_bride_en")) -// .firstNameMl(rs.getString("firstname_bride_ml")) -// .middleNameEn(rs.getString("middlename_bride_en")) -// .middleNameMl(rs.getString("middlename_bride_ml")) -// .lastNameEn(rs.getString("lastname_bride_en")) -// .lastNameMl(rs.getString("lastname_bride_ml")) -// .firstNameGroomEn(rs.getString("firstname_groom_en")) -// .firstNameGroomMl(rs.getString("firstname_groom_ml")) -// .middleNameGroomEn(rs.getString("middlename_groom_en")) -// .middleNameGroomMl(rs.getString("middlename_groom_ml")) -// .lastNameGroomEn(rs.getString("lastname_groom_en")) -// .lastNameGroomMl(rs.getString("lastname_groom_ml")) -// .tenantId(rs.getString("tenantid")) -// .remarksEn(rs.getString("remarks_en")) -// .remarksMl(rs.getString("remarks_ml")) -// .remarksMl(rs.getString("aadharno")) -// .esignUserCode(rs.getString("esign_user_code")) -// .esignUserDesigCode(rs.getString("esign_user_desig_code")) -// //.noOfAliveBirth(Integer.valueOf(rs.getString("no_of_alive_birth"))) -// //.dateOfArrival(Long.valueOf(rs.getString("ot_dateofarrival"))) -// .applicationType(rs.getString("applicationtype")) -// .businessService(rs.getString("businessservice")) -// .workFlowCode(rs.getString("workflowcode")) -// .fmFileNo(rs.getString("fm_fileno")) -// .fileDate(Long.valueOf(rs.getString("file_date"))) -// .applicationNo(rs.getString("applicationno")) -// .registrationNo(rs.getString("registrationno")) -// .registrationDate(Long.valueOf(rs.getString("registration_date"))) -// .action(rs.getString("action")) -// .status(rs.getString("status")) -// .auditDetails(getAuditDetails(rs)) -// .build()); + result.add(MarriageApplicationDetail.builder() + .id(rs.getString("id")) + .dateofreporting(rs.getLong("dateofreporting")) + .dateofmarriage(rs.getLong("dateofmarriage")) + .districtid(rs.getString("districtid")) + .lbtype(rs.getString("lbtype")) + .tenantid(rs.getString("tenantid")) + .placetype(rs.getString("placetype")) + .placeothers(rs.getString("placeothers")) + .placeid(rs.getString("placeid")) + .placenameEn(rs.getString("placename_en")) + .placenameMl(rs.getString("placename_mal")) + .street_name_en(rs.getString("street_name_en")) + .street_name_ml(rs.getString("street_name_ml")) + .ward_code(rs.getString("ward_code")) + .talukid(rs.getString("talukid")) + .village_name(rs.getString("village_name")) + .marriage_type(rs.getString("marriage_type")) + .oth_marriage_type(rs.getString("oth_marriage_type")) + .landmark(rs.getString("landmark")) + .locality_en(rs.getString("locality_en")) + .locality_ml(rs.getString("locality_ml")) + .othersspecify(rs.getString("othersspecify")) + .applicationtype(rs.getString("applicationtype")) + .businessservice(rs.getString("businessservice")) + .workflowcode(rs.getString("workflowcode")) + .fileno(rs.getString("fileno")) + .file_date(rs.getLong("file_date")) + .file_status(rs.getString("file_status")) + .applicationnumber(rs.getString("applicationnumber")) + //registrationno + //registrstiondate + .action(rs.getString("action")) + .status(rs.getString("status")) + .brideDetails(getBrideDetails(rs)) + .groomDetails(getgroomDetails(rs)) + .permanent(getPermanentAddress(rs)) + .present(getPresentAddress(rs)) + // .witnessDetails(getWitnessDetails(rs)) + .auditDetails(getAuditDetails(rs)) + + .build()); + } + return result; } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java new file mode 100644 index 00000000000..0b41d8730fb --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java @@ -0,0 +1,37 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.PermanentAdressDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface PermanentAddressRowMapper { + default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ + + return PermanentAdressDetails.builder() + .id(rs.getString("id")) + .houseno(rs.getString("houseno")) + .housename_no_en(rs.getString("housename_no_en")) + .housename_no_ml(rs.getString("housename_no_ml")) + .villageid(rs.getString("villageid")) + .village_name(rs.getString("village_name")) + .talukid(rs.getString("talukid")) + .taluk_name(rs.getString("taluk_name")) + .ward_code(rs.getString("ward_code")) + .doorno(rs.getInt("doorno")) + .locality_en(rs.getString("locality_en")) + .locality_ml(rs.getString("locality_ml")) + .street_name_en(rs.getString("street_name_en")) + .street_name_ml(rs.getString("street_name_ml")) + .districtid(rs.getString("districtid")) + .stateid(rs.getString("stateid")) + .poid(rs.getString("poid")) + .pinno(rs.getString("pinno")) + .countryid(rs.getString("countryid")) + .marriageid(rs.getString("marriageid")) + + .build(); + + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java new file mode 100644 index 00000000000..11ccf59d2f0 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java @@ -0,0 +1,34 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.PermanentAdressDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface PresentAddressRowMapper { + default PresentAddressDetails getPresentAddress (ResultSet rs) throws SQLException{ + + return PresentAddressDetails.builder() + .id(rs.getString("id")) + .houseno(rs.getString("houseno")) + .housename_no_en(rs.getString("housename_no_en")) + .housename_no_ml(rs.getString("housename_no_ml")) + .villageid(rs.getString("villageid")) + .village_name(rs.getString("village_name")) + .talukid(rs.getString("talukid")) + .taluk_name(rs.getString("taluk_name")) + .ward_code(rs.getString("ward_code")) + .doorno(rs.getInt("doorno")) + .locality_en(rs.getString("locality_en")) + .locality_ml(rs.getString("locality_ml")) + .street_name_en(rs.getString("street_name_en")) + .street_name_ml(rs.getString("street_name_ml")) + .districtid(rs.getString("districtid")) + .stateid(rs.getString("stateid")) + .poid(rs.getString("poid")) + .pinno(rs.getString("pinno")) + .countryid(rs.getString("countryid")) + .marriageid(rs.getString("marriageid")) .build(); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java new file mode 100644 index 00000000000..43aaeb05d26 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -0,0 +1,27 @@ +//package org.ksmart.marriage.marriageapplication.repository.rowmapper; +// +//import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; +// +//import java.sql.ResultSet; +//import java.sql.SQLException; +// +//public interface WitnessDetailsRowMapper { +// default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { +// +// return WitnessDetails.builder() +// .id(rs.getString("id")) +// .adharno(rs.getString("adharno")) +// .name_en(rs.getString("name_en")) +// .name_mal(rs.getString("name_mal")) +// .age(rs.getInt("age")) +// .address_en(rs.getString("address_en")) +// .address_mal(rs.getString("address_mal")) +// .mobile(rs.getString("mobile")) +// .is_message_received(Boolean.valueOf(rs.getString("is_message_received"))) +// .is_esigned(Boolean.valueOf(rs.getString("is_esigned"))) +// .marriageid(rs.getString("marriageid")) +// .build(); +// } +// +// +//} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 0e0671b9fb0..aab87cf98aa 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,14 +5,15 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage + +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true From 5d934f809cc7dbe8d4840f52ca16b6b38feb21a3 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 8 Mar 2023 15:13:45 +0530 Subject: [PATCH 020/420] update --- .../src/main/resources/marriage.yml | 374 ++++++++++++++++-- .../model/MarriageApplicationDetail.java | 49 +-- .../model/marriage/MarriagePlace.java | 211 ---------- 3 files changed, 347 insertions(+), 287 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 10c051f945a..7bf3ae1963b 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -416,82 +416,380 @@ serviceMaps: - query: UPDATE public.eg_marriage_details - SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeothers=?, - placeid=?, placename_en=?, street_name_en=?, street_name_ml=?, placename_mal=?, ward_code=?, talukid=?, village_name=?, - marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, othersspecify=?, applicationtype=?, businessservice=?, - workflowcode=?, fileno=?, file_date=?, file_status=?, applicationnumber=?, registrationno=?, registration_date=?, action=?, status=?, - lastmodifiedtime=?, lastmodifiedby=? - WHERE id=?; + SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeothers=?, placeid=?, + placename_en=?, street_name_en=?, street_name_ml=?, placename_mal=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, + oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, othersspecify=?, applicationtype=?, businessservice=?, workflowcode=?, + fileno=?, file_date=?, file_status=?, applicationnumber=?, registrationno=?, registration_date=?, action=?, status=?, + lastmodifiedtime=?, lastmodifiedby=? + WHERE id=?; basePath: MarriageDetails.* jsonMaps: + - jsonPath: $.MarriageDetails.*.marraigeDOM + + - jsonPath: $.MarriageDetails.*.marraigeDOR + + - jsonPath: $.MarriageDetails.*.marraigeDistrictid + + - jsonPath: $.MarriageDetails.*.marraigeLBtype + + - jsonPath: $.MarriageDetails.*.marraigeTenantid + + - jsonPath: $.MarriageDetails.*.marraigePlacetype + + - jsonPath: $.MarriageDetails.*.marriagePlaceothers + + - jsonPath: $.MarriageDetails.*.placeid + + - jsonPath: $.MarriageDetails.*.marraigePlacenameEn + + - jsonPath: $.MarriageDetails.*.marriageStreetEn + + - jsonPath: $.MarriageDetails.*.marriageStreetMal + + - jsonPath: $.MarriageDetails.*.marraigePlacenameMal + + - jsonPath: $.MarriageDetails.*.marraigeWardCode + + - jsonPath: $.MarriageDetails.*.marraigeTalukID + + - jsonPath: $.MarriageDetails.*.marraigeVillageName + + - jsonPath: $.MarriageDetails.*.marraigeType + + - jsonPath: $.MarriageDetails.*.othMarriageType + + - jsonPath: $.MarriageDetails.*.marriageLandmark + + - jsonPath: $.MarriageDetails.*.marriageLocalityEn + + - jsonPath: $.MarriageDetails.*.marriageLocalityMal + + - jsonPath: $.MarriageDetails.*.marraigeOthersSpecify + + - jsonPath: $.MarriageDetails.*.marraigeApplicationType + + - jsonPath: $.MarriageDetails.*.marraigeBusinessService + + - jsonPath: $.MarriageDetails.*.marraigeWorkflowCode + + - jsonPath: $.MarriageDetails.*.marraigeFileNo + + - jsonPath: $.MarriageDetails.*.marraigeFileDate + + - jsonPath: $.MarriageDetails.*.marraigeFileStatus + + - jsonPath: $.MarriageDetails.*.applicationnumber + + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.registration_date + + - jsonPath: $.MarriageDetails.*.marraigeAction + + - jsonPath: $.MarriageDetails.*.marraigeStatus + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + - query : UPDATE public.eg_marriage_bride_details + SET residentship=?, adharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_mal=?, middlename_en=?, middlename_mal=?, + lastname_en=?, lastname_mal=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, fathername_mal=?, + mothername_en=?, mothername_mal=?, father_adharno=?, mother_adharno=?, guardianname_en=?, guardianname_mal=?, guardian_adhar=?, + profession_en=?, profession_mal=?, maritalstatusid=?, is_spouse_living=?, no_of_spouse_living=?, photo_url=?, + lastmodifiedtime=?, lastmodifiedby=? + WHERE marriageid=?; + basePath: MarriageDetails.*.BrideDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGardianAdhar + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideProfessionEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideProfessionMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideSpouseLiving + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + + + - jsonPath: $.MarriageDetails.*.BrideDetails.photo_url + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + - - jsonPath: $.MarriageDetails.*.marraigeDOM + - query : UPDATE public.eg_marriage_groom_details + SET residentship=?, adharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_mal=?, middlename_en=?, + middlename_mal=?, lastname_en=?, lastname_mal=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, + fathername_mal=?, mothername_en=?, mothername_mal=?, father_adharno=?, mother_adharno=?, guardianname_en=?, guardianname_mal=?, + guardian_adhar=?, profession_en=?, profession_mal=?, maritalstatusid=?, is_spouse_living=?, no_of_spouse_living=?, + photo_url=?, lastmodifiedtime=?, lastmodifiedby=? + WHERE marriageid=?; + basePath: MarriageDetails.*.GroomDetails + jsonMaps: - - jsonPath: $.MarriageDetails.*.marraigeDOR + - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip - - jsonPath: $.MarriageDetails.*.districtid + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAdharNo - - jsonPath: $.MarriageDetails.*.lbtype + - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn - - jsonPath: $.MarriageDetails.*.tenantid + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMal - - jsonPath: $.MarriageDetails.*.marraigePlacetype + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn - - jsonPath: $.MarriageDetails.*.marriagePlaceothers + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMal - - jsonPath: $.MarriageDetails.*.placeid + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn - - jsonPath: $.MarriageDetails.*.placename_en + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMal - - jsonPath: $.MarriageDetails.*.marriageStreetEn + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile - - jsonPath: $.MarriageDetails.*.marriageStreetMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid - - jsonPath: $.MarriageDetails.*.placename_mal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender - - jsonPath: $.MarriageDetails.*.ward_code + - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB - - jsonPath: $.MarriageDetails.*.talukid + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge - - jsonPath: $.MarriageDetails.*.village_name + - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian - - jsonPath: $.MarriageDetails.*.marriage_type + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn - - jsonPath: $.MarriageDetails.*.oth_marriage_type + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMal - - jsonPath: $.MarriageDetails.*.marriageLandmark + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn - - jsonPath: $.MarriageDetails.*.marriageLocalityEn + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMal - - jsonPath: $.MarriageDetails.*.marriageLocalityMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAdharNo - - jsonPath: $.MarriageDetails.*.marraigeType + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAdharNo - - jsonPath: $.MarriageDetails.*.applicationtype + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn - - jsonPath: $.MarriageDetails.*.businessservice + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMal - - jsonPath: $.MarriageDetails.*.workflowcode + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGardianAdhar - - jsonPath: $.MarriageDetails.*.fileno + - jsonPath: $.MarriageDetails.*.GroomDetails.groomProfessionEn - - jsonPath: $.MarriageDetails.*.marraigeFileDate + - jsonPath: $.MarriageDetails.*.GroomDetails.groomProfessionMal - - jsonPath: $.MarriageDetails.*.marraigeFileStatus + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID - - jsonPath: $.MarriageDetails.*.applicationnumber + - jsonPath: $.MarriageDetails.*.GroomDetails.groomSpouseLiving - - jsonPath: $.MarriageDetails.*.registrationno + - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse - - jsonPath: $.MarriageDetails.*.registration_date - - jsonPath: $.MarriageDetails.*.marraigeAction + - jsonPath: $.MarriageDetails.*.GroomDetails.groomPhotoUrl - - jsonPath: $.MarriageDetails.*.marraigeStatus + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + + - query : UPDATE public.eg_marriage_permanent_address_details + SET houseno=?, housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, + ward_code=?, doorno=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, + countryid=?, lastmodifiedtime=?, lastmodifiedby=? + WHERE marriageid=? ; + + basePath: MarriageDetails.*.PermanentAddressDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNo + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageName + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukID + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukName + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCode + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDoorNO + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOid + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPin + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryId - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.id + + + - query : UPDATE public.eg_marriage_present_address_details + SET houseno=?, housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, doorno=?, + locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, + lastmodifiedtime=?, lastmodifiedby=? + WHERE marriageid=?; + + + basePath: MarriageDetails.*.PresentAddressDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNo + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageName + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukID + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukName + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentWardCode + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDoorNO + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDistrictId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStateId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPOid + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPin + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentCountryId + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + + - jsonPath: $.MarriageDetails.*.id + + + + - query : UPDATE public.eg_marriage_witness_details + SET adharno=?, name_en=?, name_mal=?, age=?, address_en=?, address_mal=?, mobile=?, is_message_received=?, is_esigned=?, + lastmodifiedtime=?, lastmodifiedby=? + WHERE marriageid=?; + basePath: MarriageDetails.*.WitnessDetail + jsonMaps: + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAdharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessNameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessNameMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAge + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAddresSEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAddressMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessMobile + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessISmessageReceived + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessISEsigned + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index b5a166062a1..c16cfd3fa79 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -30,16 +30,16 @@ public class MarriageApplicationDetail { @Size(max = 64) - @JsonProperty("districtid") + @JsonProperty("marraigeDistrictid") private String districtid; @Size(max = 64) - @JsonProperty("lbtype") + @JsonProperty("marraigeLBtype") private String lbtype; @Size(max = 64) - @JsonProperty("tenantid") + @JsonProperty("marraigeTenantid") private String tenantid; @Size(max = 64) @@ -57,6 +57,7 @@ public class MarriageApplicationDetail { @JsonProperty("marraigeWardCode") private String ward_code; + @Size(max = 1000) @JsonProperty("marriageStreetEn") private String street_name_en; @@ -101,41 +102,6 @@ public class MarriageApplicationDetail { @JsonProperty("marraigeOthersSpecify") private String othersspecify; - @Size(max = 15) - @JsonProperty("WitnessDetails") - private String adharno; - - @Size(max = 200) - @JsonProperty("witnessNameEn") - private String name_en; - - @Size(max = 200) - @JsonProperty("witnessNameMal") - private String name_mal; - - - @JsonProperty("witnessAge") - private Integer age; - - @Size(max = 200) - @JsonProperty("witnessAddresSEn") - private String address_en; - - @Size(max = 200) - @JsonProperty("witnessAddressMal") - private String address_mal; - - @Size(max = 150) - @JsonProperty("witnessMobile") - private String mobile; - - @JsonProperty("witnessISmessageReceived") - private Boolean is_message_received; - - @JsonProperty("witnessISEsigned") - private Boolean is_esigned; - - @Size(max = 64) @JsonProperty("marraigeApplicationType") private String applicationtype; @@ -153,6 +119,13 @@ public class MarriageApplicationDetail { private String fileno; + @Size(max = 64) + @JsonProperty("registrationno") + private String registrationno; + + @JsonProperty("registration_date") + private Long registrationDate; + @JsonProperty("marraigeFileDate") private long file_date; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java deleted file mode 100644 index a717b596aa6..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriagePlace.java +++ /dev/null @@ -1,211 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.Size; - -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class MarriagePlace { - @Size(max = 64) - @JsonProperty("id") - private String id; - - @Size(max = 64) - @JsonProperty("birthdtlid") - private String birthDtlId; - - @Size(max = 64) - @JsonProperty("placeofbirthid") - private String placeOfBirthId; - - @Size(max = 64) - @JsonProperty("hospitalid") - private String hospitalId; - - @Size(max = 64) - @JsonProperty("vehicletypeid") - private String vehicleTypeId; - - @Size(max = 64) - @JsonProperty("vehicle_registration_no") - private String vehicleRegistrationNo; - - @Size(max = 1000) - @JsonProperty("vehicle_from_en") - private String vehicleFromEn; - - @Size(max = 1000) - @JsonProperty("vehicle_to_en") - private String vehicleToEn; - - @Size(max = 1000) - @JsonProperty("vehicle_from_ml") - private String vehicleFromMl; - - @Size(max = 1000) - @JsonProperty("vehicle_to_ml") - private String vehicleToMl; - - @Size(max = 1000) - @JsonProperty("vehicle_other_en") - private String vehicleOtherEn; - - @Size(max = 1000) - @JsonProperty("vehicle_other_ml") - private String vehicleOtherMl; - - @Size(max = 1000) - @JsonProperty("vehicle_admit_hospital_en") - private String vehicleAdmitHospitalEn; - - @Size(max = 1000) - @JsonProperty("vehicle_admit_hospital_ml") - private String vehicleAdmitHospitalMl; - - @Size(max = 64) - @JsonProperty("public_place_id") - private String publicPlaceId; - - @Size(max = 2000) - @JsonProperty("ho_householder_en") - private String hoHouseHolderEn; - - @Size(max = 2000) - @JsonProperty("ho_householder_ml") - private String hoHouseHolderMl; - - @Size(max = 200) - @JsonProperty("ho_buildingno") - private String hoBuildingNo; - - @Size(max = 250) - @JsonProperty("ho_res_asso_no") - private String hoResAssoNo; - - @Size(max = 200) - @JsonProperty("ho_houseno") - private String hoHousenNo; - - @Size(max = 2500) - @JsonProperty("housename_en") - private String houseNameEn; - - @Size(max = 2500) - @JsonProperty("housename_ml") - private String houseNameMl; - - @Size(max = 64) - @JsonProperty("ho_villageid") - private String hoVillageId; - - @Size(max = 64) - @JsonProperty("ho_talukid") - private String hoTalukId; - - @Size(max = 64) - @JsonProperty("ho_districtid") - private String hoDistrictId; - - @Size(max = 64) - @JsonProperty("ho_stateid") - private String hoStateId; - - @Size(max = 200) - @JsonProperty("ho_poid") - private String hoPoId; - - @Size(max = 10) - @JsonProperty("ho_pinno") - private String hoPinNo; - - @Size(max = 64) - @JsonProperty("ho_countryid") - private String hoCountryId; - - @Size(max = 64) - @JsonProperty("ward_id") - private String wardId; - - @Size(max = 2000) - @JsonProperty("oth_details_en") - private String othDetailsEn; - - @Size(max = 2000) - @JsonProperty("oth_details_ml") - private String othDetailsMl; - - @Size(max = 64) - @JsonProperty("institution_type_id") - private String institutionTypeId; - - @Size(max = 64) - @JsonProperty("institution_id") - private String institutionId; - - @Size(max = 64) - @JsonProperty("auth_officer_id") - private String authOfficerId; - - @Size(max = 64) - @JsonProperty("auth_officer_desig_id") - private String authOfficerDesigId; - - @Size(max = 2000) - @JsonProperty("oth_auth_officer_name") - private String othAuthOfficerName; - - @Size(max = 2000) - @JsonProperty("oth_auth_officer_desig") - private String othAuthOfficerDesig; - - @Size(max = 1000) - @JsonProperty("informantsname_en") - private String informantsNameEn; - - @Size(max = 1000) - @JsonProperty("informantsname_ml") - private String informantsNameMl; - - @Size(max = 2000) - @JsonProperty("informantsaddress_en") - private String informantsAddressEn; - - @Size(max = 2000) - @JsonProperty("informantsaddress_ml") - private String informantsAddressMl; - - @Size(max = 12) - @JsonProperty("informants_mobileno") - private String informantsMobileNo; - - @Size(max = 20) - @JsonProperty("informants_aadhaar_no") - private String informantsAadhaarNo; - - @JsonProperty("is_born_outside") - private Boolean isBornOutside; - - @JsonProperty("ho_doorno") - private Boolean hoDoorno; - - @Size(max = 10) - @JsonProperty("ho_subno") - private String hoSubno; - - @Size(max = 1000) - @JsonProperty("vehicle_haltplace") - private String vehicleHaltplace; - - @Size(max = 64) - @JsonProperty("vehicle_hospitalid") - private String vehicleHospitalid; - - @Size(max = 64) - @JsonProperty("informant_addressline2") - private String informantAddressline2; -} From b11bb03dac30acbf92e1612f74507196b24e9ae3 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 9 Mar 2023 20:47:18 +0530 Subject: [PATCH 021/420] applicationNo idgen --- .../marriage/common/Idgen/IdRequest.java | 7 + .../common/repository/IdGenRepository.java | 150 ++++++++++ .../repository/ServiceRequestRepository.java | 41 +++ .../common/services/MdmsLocationService.java | 72 +++++ .../common/services/MdmsTenantService.java | 149 ++++++++++ .../MarriageApplicationConfiguration.java | 6 + .../enrichment/MarriageDetailsEnrichment.java | 67 ++++- .../MarriageApplicationQueryBuilder.java | 4 + .../ksmart/marriage/utils/IDGenerator.java | 139 +++++++++ .../marriage/utils/MarriageConstants.java | 99 +++++++ .../org/ksmart/marriage/utils/MdmsUtil.java | 264 ++++++++++++++++++ .../marriage/utils/enums/ErrorCodes.java | 23 ++ .../src/main/resources/application.properties | 9 +- 13 files changed, 1024 insertions(+), 6 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/ServiceRequestRepository.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsLocationService.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsTenantService.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MdmsUtil.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/enums/ErrorCodes.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdRequest.java index f8e10d6fd56..d7afa317113 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/Idgen/IdRequest.java @@ -25,4 +25,11 @@ public class IdRequest { @JsonProperty("format") private String format; + @JsonProperty("moduleCode") + @NotNull + private String moduleCode; + + @JsonProperty("fnType") + @NotNull + private String fnType; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java new file mode 100644 index 00000000000..81b4f524689 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java @@ -0,0 +1,150 @@ +package org.ksmart.marriage.common.repository; + + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; +import org.egov.tracer.model.ServiceCallException; +import org.ksmart.marriage.common.Idgen.IdGenerationRequest; +import org.ksmart.marriage.common.Idgen.IdGenerationResponse; +import org.ksmart.marriage.common.Idgen.IdRequest; +import org.ksmart.marriage.common.Idgen.IdResponse; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; +import org.springframework.util.CollectionUtils; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestTemplate; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Repository +public class IdGenRepository { + + @Autowired + private RestTemplate restTemplate; + + @Autowired + private MarriageApplicationConfiguration config; + + @Autowired + @Qualifier("objectMapperBnd") + private ObjectMapper mapper; + + @Autowired + private ServiceRequestRepository restRepo; + +// public IdGenerationResponse getIdOld(RequestInfo requestInfo, String tenantId, String name, String format, int count) { +// +// List reqList = new ArrayList<>(); +// for (int i = 0; i < count; i++) { +// reqList.add(IdRequest.builder().idName(name) +// .format(format) +// .tenantId(tenantId).build()); +// } +// IdGenerationRequest req = IdGenerationRequest.builder().idRequests(reqList).requestInfo(requestInfo).build(); +// IdGenerationResponse response = null; +// try { +// response = restTemplate.postForObject( config.getIdGenHost()+ config.getIdGenPath(), req, IdGenerationResponse.class); +// } catch (HttpClientErrorException e) { +// throw new ServiceCallException(e.getResponseBodyAsString()); +// } catch (Exception e) { +// Map map = new HashMap<>(); +// map.put(e.getCause().getClass().getName(),e.getMessage()); +// throw new CustomException(map); +// } +// return response; +// } + +// public IdGenerationResponse getId(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { +// +// List reqList = new ArrayList<>(); +// for (int i = 0; i < count; i++) { +// reqList.add(IdRequest.builder().idName(idName) +// .tenantId(tenantId) +// .moduleCode(moduleCode) +// .fnType(fnType) +// .build()); +// } +// IdGenerationRequest req = IdGenerationRequest.builder().idRequests(reqList).requestInfo(requestInfo).build(); +// IdGenerationResponse response = null; +// try { +// response = restTemplate.postForObject( config.getIdGenHost()+ config.getIdGenPath(), req, IdGenerationResponse.class); +// } catch (HttpClientErrorException e) { +// throw new ServiceCallException(e.getResponseBodyAsString()); +// } catch (Exception e) { +// Map map = new HashMap<>(); +// map.put(e.getCause().getClass().getName(),e.getMessage()); +// throw new CustomException(map); +// } +// return response; +// } + + +// public List getIdListOld(RequestInfo requestInfo, String tenantId, String idName, String idformat, Integer count) { +// List reqList = new ArrayList<>(); +// for (int i = 0; i < count; i++) { +// reqList.add(IdRequest.builder() +// .idName(idName) +// .format(idformat) +// .tenantId(tenantId) +// .build()); +// } +// +// IdGenerationRequest request = IdGenerationRequest.builder() +// .idRequests(reqList) +// .requestInfo(requestInfo) +// .build(); +// StringBuilder uri = new StringBuilder(config.getIdGenHost()).append(config.getIdGenPath()); +// IdGenerationResponse response = mapper.convertValue(restRepo.fetchResult(uri, request), +// IdGenerationResponse.class); +// +// List idResponses = response.getIdResponses(); +// +// if (CollectionUtils.isEmpty(idResponses)) { +// throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); +// } +// +// return idResponses.stream() +// .map(IdResponse::getId) +// .collect(Collectors.toList()); +// } + + public List getIdList(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { + List reqList = new ArrayList<>(); + for (int i = 0; i < count; i++) { + reqList.add(IdRequest.builder() + .idName(idName) + .tenantId(tenantId) + .moduleCode(moduleCode) + .fnType(fnType) + .build()); + } + + IdGenerationRequest request = IdGenerationRequest.builder() + .idRequests(reqList) + .requestInfo(requestInfo) + .build(); + StringBuilder uri = new StringBuilder(config.getIdGenHost()).append(config.getIdGenPath()); + System.out.println("req :"+request); + IdGenerationResponse response = mapper.convertValue(restRepo.fetchResult(uri, request), + IdGenerationResponse.class); + + List idResponses = response.getIdResponses(); + + if (CollectionUtils.isEmpty(idResponses)) { + throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); + } + + return idResponses.stream() + .map(IdResponse::getId) + .collect(Collectors.toList()); + } + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/ServiceRequestRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/ServiceRequestRepository.java new file mode 100644 index 00000000000..26b63943be8 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/ServiceRequestRepository.java @@ -0,0 +1,41 @@ +package org.ksmart.marriage.common.repository; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import lombok.extern.slf4j.Slf4j; +import org.egov.tracer.model.ServiceCallException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestTemplate; + +import java.util.Map; + +@Repository +@Slf4j +public class ServiceRequestRepository { + + @Autowired + private RestTemplate restTemplate; + + @Autowired + @Qualifier("objectMapperBnd") + private ObjectMapper mapper; + + public Object fetchResult(StringBuilder uri, Object request) { + mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + Object response = null; + log.info("URI: "+uri.toString()); + try { + log.info("Request: "+mapper.writeValueAsString(request)); + response = restTemplate.postForObject(uri.toString(), request, Map.class); + }catch(HttpClientErrorException e) { + log.error("External Service threw an Exception: ",e); + throw new ServiceCallException(e.getResponseBodyAsString()); + }catch(Exception e) { + log.error("Exception while fetching from searcher: ",e); + } + return response; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsLocationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsLocationService.java new file mode 100644 index 00000000000..fd567fc145c --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsLocationService.java @@ -0,0 +1,72 @@ +package org.ksmart.marriage.common.services; + +import lombok.extern.slf4j.Slf4j; +//import org.ksmart.birth.utils.BirthConstants; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +public class MdmsLocationService { + + +// private List getHospitalCode(Object mdmsData) { +// return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_HOSPITALS_CODE_JSONPATH); +// } +// +// private List getInstitutionCode(Object mdmsData) { +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_INSTITUTIONS_CODE_JSONPATH); +// } +// +// private List getBoundaryCode(Object mdmsData) { +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_INSTITUTIONS_CODE_JSONPATH); +// } +// +// public String getHospitalNameEn(Object mdmsData, String hospitalId) { +// List hospitals = getHospitalCode(mdmsData); +// int index = hospitals.indexOf(hospitalId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_HOSPITALS_CODES_JSONPATH+"["+index+"].hospitalName"); +// } +// +// public String getHospitalNameMl(Object mdmsData, String hospitalId) { +// List hospitals = getHospitalCode(mdmsData); +// int index = hospitals.indexOf(hospitalId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_HOSPITALS_CODES_JSONPATH+"["+index+"].hospitalNamelocal"); +// } +// +// public String getHospitalAddressEn(Object mdmsData, String hospitalId) { +// List hospitals = getHospitalCode(mdmsData); +// int index = hospitals.indexOf(hospitalId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_HOSPITALS_CODES_JSONPATH+"["+index+"].address"); +// } +// +// public String getHospitalAddressMl(Object mdmsData, String hospitalId) { +// List tenants = getHospitalCode(mdmsData); +// int index = tenants.indexOf(hospitalId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_HOSPITALS_CODES_JSONPATH+"["+index+"].addressLocal"); +// } +// +// public String getInstitutionNameEn(Object mdmsData, String institutionId) { +// List tenants = getInstitutionCode(mdmsData); +// int index = tenants.indexOf(institutionId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_INSTITUTIONS_CODES_JSONPATH+"["+index+"].institutionName"); +// } +// +// public String getInstitutionNameMl(Object mdmsData, String institutionId) { +// List tenants = getInstitutionCode(mdmsData); +// int index = tenants.indexOf(institutionId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_INSTITUTIONS_CODES_JSONPATH+"["+index+"].institutionNamelocal"); +// } +// +// public String getInstitutionAddressEn(Object mdmsData, String institutionId) { +// List tenants = getInstitutionCode(mdmsData); +// int index = tenants.indexOf(institutionId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_INSTITUTIONS_CODES_JSONPATH+"["+index+"].address"); +// } +// +// public String getInstitutionAddressMl(Object mdmsData, String institutionId) { +// List tenants = getInstitutionCode(mdmsData); +// int index = tenants.indexOf(institutionId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_INSTITUTIONS_CODES_JSONPATH+"["+index+"].addressLocal"); +// } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsTenantService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsTenantService.java new file mode 100644 index 00000000000..e92c5f69838 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsTenantService.java @@ -0,0 +1,149 @@ +package org.ksmart.marriage.common.services; + +import com.jayway.jsonpath.JsonPath; +import org.ksmart.marriage.utils.MarriageConstants; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class MdmsTenantService { + + private List getTenantCodes(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH); + } + +// private List getLbTypeCodes(Object mdmsData) { +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_LBTYPE_CODE_JSONPATH); +// } +// +// private List getTalukCodes(Object mdmsData) { +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TALUK_CODE_JSONPATH); +// } +// +// private List getDistrictCodes(Object mdmsData) { +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_DISTRICT_CODE_JSONPATH); +// } +// +// private List getStateCodes(Object mdmsData) { +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_STATE_CODE_JSONPATH); +// } +// +// private List getCountryCodes(Object mdmsData) { +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_COUNTRY_CODE_JSONPATH); +// } +// +// public String getTenantName(Object mdmsData, String tenantId) { +// List tenants = getTenantCodes(mdmsData); +// int index = tenants.indexOf(tenantId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].name"); +// } +// +// public String getTenantLbType(Object mdmsData, String tenantId) { +// List tenants = getTenantCodes(mdmsData); +// int index = tenants.indexOf(tenantId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.lbtypecode"); +// } +// +// public String getTenantTaluk(Object mdmsData, String tenantId) { +// List tenants = getTenantCodes(mdmsData); +// int index = tenants.indexOf(tenantId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.talukcode"); +// } +// +// public String getTenantDistrict(Object mdmsData, String tenantId) { +// List tenants = getTenantCodes(mdmsData); +// int index = tenants.indexOf(tenantId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.distCodeStr"); +// } +// +// public String getTenantState(Object mdmsData, String tenantId) { +// List tenants = getTenantCodes(mdmsData); +// int index = tenants.indexOf(tenantId); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.statecode"); +// } + + public String getTenantIdGenCode(Object mdmsData, String tenantId) { + List tenants = getTenantCodes(mdmsData); + int index = tenants.indexOf(tenantId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.idgencode"); + } + + public String getTenantLetterCode(Object mdmsData, String tenantId) { + List tenants = getTenantCodes(mdmsData); + int index = tenants.indexOf(tenantId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.code"); + } +// public String getLbTypeNameEn(Object mdmsData, String code) { +// List tenants = getLbTypeCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].name"); +// } +// public String getPostOfficeNameEn(Object mdmsData, String code) { +// List tenants = getTalukCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].name"); +// } +// +// public String getPostOfficePinCode(Object mdmsData, String code) { +// List tenants = getTalukCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].pincode"); +// } +// public String getTalukNameEn(Object mdmsData, String code) { +// List tenants = getTalukCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TALUK_JSONPATH+"["+index+"].name"); +// } +// +// public String getDistrictNameEn(Object mdmsData, String code) { +// List tenants = getDistrictCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_DISTRICT_JSONPATH+"["+index+"].name"); +// } +// +// public String getStateNameEn(Object mdmsData, String code) { +// List tenants = getStateCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_STATE_JSONPATH+"["+index+"].name"); +// } +// +// public String getCountryNameEn(Object mdmsData, String code) { +// List tenants = getCountryCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_COUNTRY_JSONPATH+"["+index+"].name"); +// } +// public String getLbTypeNameMl(Object mdmsData, String code) { +// List tenants = getLbTypeCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].namelocal"); +// } +// public String getPostOfficeNameMl(Object mdmsData, String code) { +// List tenants = getTalukCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].namelocal"); +// } +// public String getTalukNameMl(Object mdmsData, String code) { +// List tenants = getTalukCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_TALUK_JSONPATH+"["+index+"].namelocal"); +// } +// +// public String getDistrictNameMl(Object mdmsData, String code) { +// List tenants = getDistrictCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_DISTRICT_JSONPATH+"["+index+"].namelocal"); +// } +// +// public String getStateNameMl(Object mdmsData, String code) { +// List tenants = getStateCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_STATE_JSONPATH+"["+index+"].namelocal"); +// } +// +// public String getCountryNameMl(Object mdmsData, String code) { +// List tenants = getCountryCodes(mdmsData); +// int index = tenants.indexOf(code); +// return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_COUNTRY_JSONPATH+"["+index+"].namelocal"); +// } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index 5f68f141cea..bb8dc7e38dc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -23,4 +23,10 @@ public class MarriageApplicationConfiguration { // private String saveMarriageApplicationTopic; @Value("${persister.update.marriage.application.topic}") private String updateMarriageApplicationTopic; + + @Value("${egov.idgen.marriagehapp.name}") + private String marriageApplNumberIdName; + + @Value("${egov.idgen.marriageapplnum.name}") + private String marriageApplNumberIdgenName; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 015ca035c58..03b94e5832d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -1,18 +1,33 @@ package org.ksmart.marriage.marriageapplication.enrichment; +import org.apache.commons.collections4.CollectionUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; +import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.common.repository.IdGenRepository; import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.utils.IDGenerator; +import org.ksmart.marriage.utils.MarriageConstants; +import org.ksmart.marriage.utils.enums.ErrorCodes; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.IdGenerator; +import java.util.List; +import java.util.ListIterator; import java.util.UUID; @Component public class MarriageDetailsEnrichment implements BaseEnrichment { @Autowired - MarriageApplicationConfiguration config; + MarriageApplicationConfiguration config; + @Autowired + IdGenRepository idGenRepository; + @Autowired + IDGenerator idGenerator; + public void enrichCreate(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); @@ -28,11 +43,49 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getPermanent().setId(UUID.randomUUID().toString()); marriage.getPresent().setId(UUID.randomUUID().toString()); marriage.getWitness().setId(UUID.randomUUID().toString()); - + }); + setApplicationNumbers(request); + + } + + private void setApplicationNumbers(MarriageDetailsRequest request) { + RequestInfo requestInfo = request.getRequestInfo(); + List marriageDetails = request.getMarriageDetails(); + String tenantId = marriageDetails.get(0) + .getTenantid(); + List filecodes = getIds(requestInfo, + tenantId, + config.getMarriageApplNumberIdName(), + request.getMarriageDetails().get(0).getApplicationtype(), + "AK", + marriageDetails.size()); + validateFileCodes(filecodes, marriageDetails.size()); + ListIterator itr = filecodes.listIterator(); + request.getMarriageDetails() + .forEach(marriage -> { + marriage.setApplicationnumber(itr.next()); + }); } + + + + +// private void setApplicationNumbers(MarriageDetailsRequest request) { +// Long currentTime = Long.valueOf(System.currentTimeMillis()); +// String id = idGenerator.setIDGeneratorStill(request, MarriageConstants.FUN_MODULE_NEW,MarriageConstants.APP_NUMBER_CAPTION); +// request.getMarriageDetails() +// .forEach(marriage -> { +// marriage.setApplicationnumber(id); +// marriage. +// setDateofreporting(currentTime); +// }); +// } + + + public void enrichUpdate(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); @@ -43,4 +96,14 @@ public void enrichUpdate(MarriageDetailsRequest request) { .forEach(marriage -> marriage.setAuditDetails(auditDetails)); } + private List getIds(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { + return idGenRepository.getIdList(requestInfo, tenantId, idName, moduleCode, fnType, count); + } + + private void validateFileCodes(List fileCodes, int count) { + if (CollectionUtils.isEmpty(fileCodes)) { + throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), "No file code(s) returned from idgen service"); + } + + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 7e6a4c2a841..7fd1cd1931d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -28,5 +28,9 @@ public String getBirthApplicationSearchQuery(@NotNull MarriageApplicationSearchC return query.toString(); } + public String getNextIDQuery() { + StringBuilder query = new StringBuilder("select fn_next_id(?,?,?)"); + return query.toString(); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java new file mode 100644 index 00000000000..0cf360e00f1 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java @@ -0,0 +1,139 @@ +package org.ksmart.marriage.utils; + + +import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.common.services.MdmsTenantService; +////import org.ksmart.birth.newbirth.repository.querybuilder.NewBirthQueryBuilder; +//import org.ksmart.birth.web.model.newbirth.NewBirthDetailRequest; +//import org.ksmart.birth.web.model.stillbirth.StillBirthDetailRequest; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; +import java.util.Map; + +@Component +@Slf4j +public class IDGenerator { + + private final MdmsUtil mdmsUtil; + private final MdmsTenantService mdmsTenantService; + private final JdbcTemplate jdbcTemplate; + private final MarriageApplicationQueryBuilder queryBuilder; + + + @Autowired + public IDGenerator(MdmsUtil mdmsUtil, MdmsTenantService mdmsTenantService, + JdbcTemplate jdbcTemplate, MarriageApplicationQueryBuilder queryBuilder) { + this.mdmsTenantService = mdmsTenantService; + this.mdmsUtil = mdmsUtil; + this.jdbcTemplate = jdbcTemplate; + + this.queryBuilder = queryBuilder; + } + + /** + * Sets the ApplicationNumber for given KsmartBirthDetailsRequest + * + * @param request KsmartBirthDetailsRequest which is to be created + */ + public String setIDGenerator(MarriageDetailsRequest request, String moduleCode, String idType) { + int Year = Calendar.getInstance().get(Calendar.YEAR); + String tenantId = request.getMarriageDetails().get(0).getTenantid(); + String nextID = getNewID(tenantId, moduleCode, idType, Year); + + // mdms call for tenand idgencode and lbtypecode + Object mdmsData = mdmsUtil.mdmsCall(request.getRequestInfo()); + + String idgenCode = mdmsTenantService.getTenantIdGenCode(mdmsData,tenantId); + String lbTypeCode = mdmsTenantService.getTenantLetterCode(mdmsData,tenantId); + + String idGenerated = new StringBuilder().append(idType) + .append("-") + .append(nextID) + .append("-") + .append(String.valueOf(Year)) + .append("-") + .append(moduleCode) + .append("-") + .append(lbTypeCode.charAt(0)) + .append("-") + .append(idgenCode) + .append("-") + .append(MarriageConstants.STATE_CODE).toString(); + return idGenerated; + } + +// public String setIDGeneratorStill(StillBirthDetailRequest request, String moduleCode, String idType) { +// int Year = Calendar.getInstance().get(Calendar.YEAR); +// String tenantId = request.getBirthDetails().get(0).getTenantId(); +// String nextID = getNewID(tenantId, Year, moduleCode, idType); +// +// // mdms call for tenand idgencode and lbtypecode +// Object mdmsData = mdmsUtil.mdmsCall(request.getRequestInfo()); +// +// String idgenCode = mdmsTenantService.getTenantIdGenCode(mdmsData,tenantId); +// String lbTypeCode = mdmsTenantService.getTenantLetterCode(mdmsData,tenantId); +// +// String idGenerated = new StringBuilder().append(idType) +// .append("-") +// .append(nextID) +// .append("-") +// .append(String.valueOf(Year)) +// .append("-") +// .append(moduleCode) +// .append("-") +// .append(lbTypeCode.charAt(0)) +// .append("-") +// .append(idgenCode) +// .append("-") +// .append(BirthConstants.STATE_CODE).toString(); +// return idGenerated; +// } +// + + public String setIDGeneratorStill(MarriageDetailsRequest request, String moduleCode, String idType) { + int Year = Calendar.getInstance().get(Calendar.YEAR); + String tenantId = request.getMarriageDetails().get(0).getTenantid(); + String nextID = getNewID(tenantId, moduleCode, idType ,Year); + + // mdms call for tenand idgencode and lbtypecode + Object mdmsData = mdmsUtil.mdmsCall(request.getRequestInfo()); + + String idgenCode = mdmsTenantService.getTenantIdGenCode(mdmsData,tenantId); + String lbTypeCode = mdmsTenantService.getTenantLetterCode(mdmsData,tenantId); + + String idGenerated = new StringBuilder().append(idType) + .append("-") + .append(nextID) + .append("-") + .append(String.valueOf(Year)) + .append("-") + .append(moduleCode) + .append("-") + .append(lbTypeCode.charAt(0)) + .append("-") + .append(idgenCode) + .append("-") + .append(MarriageConstants.STATE_CODE).toString(); + return idGenerated; + } + + public String getNewID( String idType , String moduleCode ,String tenantId, int Year) { + + List preparedStmtValues = new ArrayList<>(); + preparedStmtValues.add(idType); + preparedStmtValues.add(moduleCode); + preparedStmtValues.add(tenantId); + preparedStmtValues.add(Year); + String query = queryBuilder.getNextIDQuery(); + List> nextID = jdbcTemplate.queryForList(query, preparedStmtValues.toArray()); + String finalid = String.valueOf(nextID.get(0).get("fn_next_id")); + return finalid; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java new file mode 100644 index 00000000000..04508a0dcf3 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -0,0 +1,99 @@ +package org.ksmart.marriage.utils; + +public class MarriageConstants { + +// public static final String CR_MDMS_TENANT = "kl"; +// public static final String CR_MDMS_MODULE = "birth-death-service"; +// public static final String COMMON_MDMS_MODULE = "common-masters"; +// public static final String LOCATION_MDMS_MODULE = "egov-location"; +// public static final String TENANTS_MODULE = "tenant"; +// public static final String CR_MDMS_BIRTH_JSONPATH = "$.MdmsRes.birth-death-service"; +// public static final String MDMS_COMMON_JSONPATH = "$.MdmsRes.common-masters"; +// public static final String MDMS_TENANT_JSONPATH = "$.MdmsRes.tenant"; +// public static final String CR_MDMS_TENANTS = "tenants"; +// public static final String CR_MDMS_QUALIFICATION = "Qualification"; +// public static final String CR_MDMS_PROFESSION = "Profession"; +// public static final String COMMON_MDMS_RELIGION = "Religion"; +// public static final String COMMON_MDMS_TALUK = "Taluk"; +// public static final String COMMON_MDMS_STATE = "State"; +// public static final String COMMON_MDMS_COUNTRY = "Country"; +// public static final String COMMON_MDMS_INSTITUTION= "Institution"; +// public static final String LOCATION_MDMS_HOSPITAL = "hospitalList"; +// public static final String LOCATION_MDMS_INSTITUTION = "institutionList"; +// public static final String COMMON_MDMS_MEDICAL_ATTENTION_TYPE= "MedicalAttentionType"; +// public static final String COMMON_MDMS_VILLAGE = "Village"; +// public static final String COMMON_MDMS_DISTRICT = "District"; +// public static final String COMMON_MDMS_POSTOFFICE = "PostOffice"; +// public static final String COMMON_MDMS_LBTYPE = "LBType"; +// public static final String COMMON_MDMS_PLACEMASTER = "PlaceMaster"; +// public static final String CR_MDMS_INSTITUTIONTYPE = "InstitutionType"; +// public static final String CR_MDMS_DELIVERYMETHOD = "DeliveryMethod"; + public static final String CR_MDMS_TENANTS_CODE_JSONPATH = "$.MdmsRes.tenant.tenants[*].code"; + public static final String CR_MDMS_TENANTS_JSONPATH = "$.MdmsRes.tenant.tenants"; +// public static final String CR_MDMS_HOSPITALS_CODE_JSONPATH = "$.MdmsRes.egov-location.hospitalList[*].code"; +// public static final String CR_MDMS_HOSPITALS_CODES_JSONPATH = "$.MdmsRes.egov-location.hospitalList"; +// public static final String CR_MDMS_INSTITUTIONS_CODE_JSONPATH = "$.MdmsRes.egov-location.institutionList[*].code"; +// public static final String CR_MDMS_BOUNDARY_CODE_JSONPATH = "$.MdmsRes.egov-location.TenantBoundary[*].code"; +// public static final String CR_MDMS_INSTITUTIONS_CODES_JSONPATH = "$.MdmsRes.egov-location.institutionList"; +// public static final String CR_MDMS_TENANTS_DIST_CODE_JSONPATH = "$.MdmsRes.tenant.tenants[*].city.distCodeStr"; +// public static final String CR_MDMS_PROFESSION_CODE_JSONPATH = "$.MdmsRes.birth-death-service.Profession[*].code"; +// public static final String CR_MDMS_QUALIFICATION_CODE_JSONPATH = "$.MdmsRes.birth-death-service.Qualification[*].code"; +// public static final String CR_MDMS_RELIGION_CODE_JSONPATH = "$.MdmsRes.common-masters.Religion[*].code"; +// public static final String CR_MDMS_TALUK_CODE_JSONPATH = "$.MdmsRes.common-masters.Taluk[*].code"; +// public static final String CR_MDMS_TALUK_JSONPATH = "$.MdmsRes.common-masters.Taluk"; +// public static final String CR_MDMS_STATE_CODE_JSONPATH = "$.MdmsRes.common-masters.State[*].code"; +// public static final String CR_MDMS_STATE_JSONPATH = "$.MdmsRes.common-masters.State"; +// public static final String CR_MDMS_COUNTRY_CODE_JSONPATH = "$.MdmsRes.common-masters.Country[*].code"; +// public static final String CR_MDMS_COUNTRY_JSONPATH = "$.MdmsRes.common-masters.Country"; +// public static final String CR_MDMS_INSTITUTION_CODE_JSONPATH = "$.MdmsRes.birth-death-service.Institution[*].code"; +// public static final String CR_MDMS_MEDICAL_ATTENTION_TYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.MedicalAttentionType[*].code"; +// public static final String CR_MDMS_VILLAGE_CODE_JSONPATH = "$.MdmsRes.common-masters.Village[*].code"; +// public static final String CR_MDMS_DISTRICT_CODE_JSONPATH = "$.MdmsRes.common-masters.District[*].code"; +// public static final String CR_MDMS_DISTRICT_JSONPATH = "$.MdmsRes.common-masters.District"; +// public static final String CR_MDMS_POSTOFFICE_CODE_JSONPATH = "$.MdmsRes.common-masters.PostOffice[*].code"; +// public static final String CR_MDMS_POSTOFFICE_JSONPATH = "$.MdmsRes.common-masters.PostOffice"; +// public static final String CR_MDMS_INTITUTIONTYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.InstitutionType[*].code"; +// public static final String CR_MDMS_DELIVERYMETHOD_CODE_JSONPATH = "$.MdmsRes.birth-death-service.DeliveryMethod[*].code"; +// public static final String CR_MDMS_LBTYPE_JSONPATH = "$.MdmsRes.common-masters.LBType"; +// public static final String CR_MDMS_LBTYPE_CODE_JSONPATH = "$.MdmsRes.common-masters.LBType[*].code"; +// public static final String CR_MDMS_PLACEMASTER_CODE_JSONPATH = "$.MdmsRes.common-masters.PlaceMaster[*].code"; +// public static final String CR_RESIDENCE_PLACE_TYPE_OUTSIDE = "CR_OUTSIDE_INDIA"; +// public static final String BIRTH_PLACE_HOSPITAL = "HOSPITAL"; +// public static final String BIRTH_PLACE_INSTITUTION = "INSTITUTION"; +// public static final String BIRTH_PLACE_HOME= "HOME"; +// public static final String BIRTH_PLACE_VEHICLE = "VEHICLE"; +// public static final String BIRTH_PLACE_PUBLIC = "PUBLIC_PLACES"; +// public static final String BIRTH_PLACE_OTHERS_COUNTRY = "OTHERS_COUNTRY"; +// public static final String CR_MDMS_TENANT_BOUNDARY_CODE = "TenantBoundary"; +// public static final String CR_MDMS_EGOV_LOCATION_MASTERS_CODE = "egov-location"; + + //error constants +// public static final String INVALID_TENANT_ID_MDMS_KEY = "INVALID TENANTID"; +// public static final String INVALID_TENANT_ID_MDMS_MSG = "No data found for this tenantID"; +// +// public static final String LB_TYPE_CORPORATION = "LB_TYPE_CORPORATION"; +// +// public static final String LB_TYPE_MUNICIPALITY = "LB_TYPE_MUNICIPALITY"; +// +// public static final String LB_TYPE_CORPORATION_CAPTION = "C"; +// +// public static final String LB_TYPE_MUNICIPALITY_CAPTION = "M"; + + public static final String APP_NUMBER_CAPTION = "AK"; + + // public static final String FILE_NUMBER_CAPTION = "FM"; + + //public static final String REGY_NUMBER_CAPTION = "RG"; + + // public static final String CERT_NUMBER_CAPTION = "CT"; + + public static final String FUN_MODULE_NEW = "CRMR"; + + public static final String STATE_CODE = "KL"; + + public static final String COUNTRY_CODE = "COUNTRY_INDIA"; + + public static final String STATE_CODE_SMALL = "kl"; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MdmsUtil.java new file mode 100644 index 00000000000..6844b2faf87 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MdmsUtil.java @@ -0,0 +1,264 @@ +package org.ksmart.marriage.utils; + +import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; +import org.egov.mdms.model.MasterDetail; +import org.egov.mdms.model.MdmsCriteria; +import org.egov.mdms.model.MdmsCriteriaReq; +import org.egov.mdms.model.ModuleDetail; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +@Slf4j +@Component +public class MdmsUtil { + + @Autowired + private RestTemplate restTemplate; + + @Value("${egov.mdms.host}") + private String mdmsHost; + + @Value("${egov.mdms.search.endpoint}") + private String mdmsUrl; + + @Value("${egov.mdms.module.name}") + private String moduleName; + + + public Object mdmsCall(RequestInfo requestInfo) { + // Call MDMS microservice with MdmsCriteriaReq as params + + MdmsCriteriaReq mdmsCriteriaReq = getMdmsRequest(requestInfo); + String mdmsUri = String.format("%s%s", mdmsHost, mdmsUrl); + Object result = null; + try { + result = restTemplate.postForObject(mdmsUri, mdmsCriteriaReq, Map.class); + } catch (Exception e) { + log.error("Exception occurred while fetching MDMS data: ", e); + } + return result; + } +// public Object mdmsCallForLocation (RequestInfo requestInfo, String tenantId) { +// // Call MDMS microservice with MdmsCriteriaReq as params +// +// MdmsCriteriaReq mdmsCriteriaReq = getLocRequest(requestInfo, tenantId); +// String mdmsUri = String.format("%s%s", mdmsHost, mdmsUrl); +// Object result = null; +// try { +// result = restTemplate.postForObject(mdmsUri, mdmsCriteriaReq, Map.class); +// } catch (Exception e) { +// log.error("Exception occurred while fetching MDMS data: ", e); +// } +// return result; +// } +// +// private MdmsCriteriaReq getLocRequest(RequestInfo requestInfo, String tenantId) { +// +// List moduleDetails = new LinkedList<>(); +// +// moduleDetails.addAll(getBoundaryDetails()); +// +// //Prepare MDMS Criteria wih all modules in birth-death services and common services +// +// MdmsCriteria mdmsCriteria = MdmsCriteria.builder() +// .moduleDetails(moduleDetails) +// .tenantId(tenantId) +// .build(); +// //Return MDMS criteria request for calling MDMS microservice +// return MdmsCriteriaReq.builder() +// .mdmsCriteria(mdmsCriteria) +// .requestInfo(requestInfo) +// .build(); +// } +// + private MdmsCriteriaReq getMdmsRequest(RequestInfo requestInfo) { + + List moduleDetails = new LinkedList<>(); + + List moduleDetailsLoc = new LinkedList<>(); + + //Add all modules of birth-death services + //moduleDetails.addAll(getCRModuleDetails()); + + //Add all modules of common services + // moduleDetails.addAll(getCommonModuleDetails()); + + //moduleDetails.addAll(getTenantModuleDetails()); + + //Prepare MDMS Criteria wih all modules in birth-death services and common services + + MdmsCriteria mdmsCriteria = MdmsCriteria.builder() + .moduleDetails(moduleDetails) + // .tenantId(BirthConstants.CR_MDMS_TENANT) + .build(); + //Return MDMS criteria request for calling MDMS microservice + return MdmsCriteriaReq.builder() + .mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo) + .build(); + } +// +// public List getBoundaryDetails() { +// // master details for Boundary +// +//// List crMasterDetails = new LinkedList<>(); +//// +//// List masterHospital = Collections.singletonList(MasterDetail.builder() +//// .name(BirthConstants.LOCATION_MDMS_HOSPITAL) +//// .build()); +//// crMasterDetails.addAll(masterHospital); +//// +//// List masterInstitution = Collections.singletonList(MasterDetail.builder() +//// .name(BirthConstants.LOCATION_MDMS_INSTITUTION) +//// .build()); +//// crMasterDetails.addAll(masterInstitution); +//// +//// ModuleDetail crModuleDetail = ModuleDetail.builder() +//// .masterDetails(crMasterDetails) +//// .moduleName(BirthConstants.LOCATION_MDMS_MODULE) +//// .build(); +// +// return Collections.singletonList(crModuleDetail); + + // } + +// public List getCRModuleDetails() { +// // master details for CR module +// +// List crMasterDetails = new LinkedList<>(); +// +// // +// List masterProfession = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_PROFESSION) +// .build()); +// crMasterDetails.addAll(masterProfession); +// +// // Add Module Qualification +// List masterQualification = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_QUALIFICATION) +// .build()); +// crMasterDetails.addAll(masterQualification); +// +// // Add Module Medical Attention Type +// List masterMedicalAttentionType = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_MEDICAL_ATTENTION_TYPE) +// .build()); +// crMasterDetails.addAll(masterMedicalAttentionType); +// +// // Add Module InstitutionType +// List masterInstitutionType = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_INSTITUTIONTYPE) +// .build()); +// crMasterDetails.addAll(masterInstitutionType); +// +// // Add Module DeliveryMethod +// List masterDeliveryMethod = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_DELIVERYMETHOD) +// .build()); +// crMasterDetails.addAll(masterDeliveryMethod); +// +// +// //Add masters to modules +// ModuleDetail crModuleDetail = ModuleDetail.builder() +// .masterDetails(crMasterDetails) +// .moduleName(BirthConstants.CR_MDMS_MODULE) +// .build(); +// +// return Collections.singletonList(crModuleDetail); +// +// } +// +// public List getCommonModuleDetails() { +// // master details for Common module +// +// List commonMasterDetails = new LinkedList<>(); +// // Add Module Religion +// List masterReligion = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_RELIGION) +// .build()); +// +// commonMasterDetails.addAll(masterReligion); +// // Add Module Taluk +// List masterTaluk = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_TALUK) +// .build()); +// +// commonMasterDetails.addAll(masterTaluk); +// // Add Module State +// List masterState = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_STATE) +// .build()); +// commonMasterDetails.addAll(masterState); +// // Add Module Country +// List masterCountry = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_COUNTRY) +// .build()); +// commonMasterDetails.addAll(masterCountry); +// +// +// // Add Module Village +// List masterVillage = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_VILLAGE) +// .build()); +// commonMasterDetails.addAll(masterVillage); +// +// // Add Module District +// List masterDistrict = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_DISTRICT) +// .build()); +// commonMasterDetails.addAll(masterDistrict); +// +// // Add Module Postoffice +// List masterPostOffice = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_POSTOFFICE) +// .build()); +// commonMasterDetails.addAll(masterPostOffice); +// +// // Add Module LbType +// List masterLbType = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_LBTYPE) +// .build()); +// commonMasterDetails.addAll(masterLbType); +// +// // Add Module PlaceMaster +// List masterBirthPlace = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_PLACEMASTER) +// .build()); +// commonMasterDetails.addAll(masterBirthPlace); +// +// ModuleDetail commonModuleDetail = ModuleDetail.builder() +// .masterDetails(commonMasterDetails) +// .moduleName(BirthConstants.COMMON_MDMS_MODULE) +// .build(); +// +// return Collections.singletonList(commonModuleDetail); +// +// } +// +// public List getTenantModuleDetails() { +// // master details for Tenant module +// moduleName = "tenant"; +// List tenantDetails = new LinkedList<>(); +// +// List masterTenants = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_TENANTS) +// .build()); +// tenantDetails.addAll(masterTenants); +// +// ModuleDetail tenantModuleDetail = ModuleDetail.builder() +// .masterDetails(tenantDetails) +// .moduleName(BirthConstants.TENANTS_MODULE) +// .build(); +// +// return Collections.singletonList(tenantModuleDetail); +// +// } +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/enums/ErrorCodes.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/enums/ErrorCodes.java new file mode 100644 index 00000000000..77f4c4db2e5 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/enums/ErrorCodes.java @@ -0,0 +1,23 @@ +package org.ksmart.marriage.utils.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public enum ErrorCodes { + + // Birth Details + MARRIAGE_DETAILS_REQUIRED("REQUIRED"), + MARRIAGE_DETAILS_NOT_FOUND("NOT_FOUND"), + MARRIAGE_DETAILS_INVALID_SEARCH_CRITERIA("INVALID_CRITERIA"), + MARRIAGE_DETAILS_INVALID_UPDATE("INVALID_UPDATE"), + MDMS_DATA_ERROR("MDMS_DATA_ERROR"), + INVALID_SEARCH("INVALID_SEARCH"), + // Idgen Service + IDGEN_ERROR("IDGEN_ERROR"); + private String code; + + + +} diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index aab87cf98aa..56d94c0f791 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -82,12 +82,13 @@ egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition #birth and death idFormat config -egov.idgen.birthapplnum.name=birth_cert.receipt.id +egov.idgen.marriageapplnum.name=birth_cert.receipt.id egov.idgen.birthapplnum.format=BR-CB-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] -# Ksmart Birth Application No -egov.idgen.birthapp.name=applicationno -egov.idgen.birthapp.format=BR-APLN-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] +# Ksmart marriage Application No +#egov.idgen.marriagehapp.name=mr.applicationno +egov.idgen.marriagehapp.name=mr.applicationno +#egov.idgen.birthapp.format=BR-APLN-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] # Ksmart Birth File Number egov.idgen.birthfile.name=fm_fileno From 317a1d849eaea4d75dd31de0031c697ae8841311 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Fri, 10 Mar 2023 15:27:14 +0530 Subject: [PATCH 022/420] idgen --- .../MarriageApplicationConfiguration.java | 8 ++- .../enrichment/MarriageDetailsEnrichment.java | 53 ++++++++++++++++++- .../src/main/resources/application.properties | 8 +-- 3 files changed, 62 insertions(+), 7 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index bb8dc7e38dc..d9ee2e740d9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -27,6 +27,10 @@ public class MarriageApplicationConfiguration { @Value("${egov.idgen.marriagehapp.name}") private String marriageApplNumberIdName; - @Value("${egov.idgen.marriageapplnum.name}") - private String marriageApplNumberIdgenName; + @Value("${egov.idgen.marriagefile.name}") + private String marriageFileNumberName; + + @Value("${egov.idgen.marriagereg.name}") + private String getMarriageRegisNumberName; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 03b94e5832d..3578187964e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -46,10 +46,61 @@ public void enrichCreate(MarriageDetailsRequest request) { }); setApplicationNumbers(request); + setFileNumbers(request); + setRegistrationNumber(request); } + private void setRegistrationNumber(MarriageDetailsRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + List marriageDetails = request.getMarriageDetails(); + String tenantId = marriageDetails.get(0) + .getTenantid(); + + List filecodes = getIds(requestInfo, + tenantId, + config.getGetMarriageRegisNumberName(), + request.getMarriageDetails().get(0).getApplicationtype(), + "REG", + marriageDetails.size()); + validateFileCodes(filecodes, marriageDetails.size()); + Long currentTime = Long.valueOf(System.currentTimeMillis()); + ListIterator itr = filecodes.listIterator(); + request.getMarriageDetails() + .forEach(marriage -> { + if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { + marriage.setRegistrationno(itr.next()); + marriage.setRegistrationDate(currentTime); + } + }); + } + + private void setFileNumbers(MarriageDetailsRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + List marriageDetails = request.getMarriageDetails(); + String tenantId = marriageDetails.get(0) + .getTenantid(); + System.out.println(("request"+request)); + + List filecodes = getIds(requestInfo, + tenantId, + config.getMarriageFileNumberName(), + request.getMarriageDetails().get(0).getApplicationtype(), + "FILE", + marriageDetails.size()); + validateFileCodes(filecodes, marriageDetails.size()); + Long currentTime = Long.valueOf(System.currentTimeMillis()); + ListIterator itr = filecodes.listIterator(); + request.getMarriageDetails() + .forEach(marriage -> { + marriage.setFileno(itr.next()); + marriage.setFile_date(currentTime); + }); + } + private void setApplicationNumbers(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); List marriageDetails = request.getMarriageDetails(); @@ -59,7 +110,7 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { tenantId, config.getMarriageApplNumberIdName(), request.getMarriageDetails().get(0).getApplicationtype(), - "AK", + "APPL", marriageDetails.size()); validateFileCodes(filecodes, marriageDetails.size()); diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 56d94c0f791..cb17d923dbf 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -91,13 +91,13 @@ egov.idgen.marriagehapp.name=mr.applicationno #egov.idgen.birthapp.format=BR-APLN-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] # Ksmart Birth File Number -egov.idgen.birthfile.name=fm_fileno -egov.idgen.birthfile.format=BR-FM-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON]_[TENANT_ID] +egov.idgen.marriagefile.name=mr.fileno +#egov.idgen.birthfile.format=BR-FM-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON]_[TENANT_ID] # Ksmart Birth Registration Number -egov.idgen.birthreg.name=registrationno -egov.idgen.birthreg.format=BR-REGY-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] +egov.idgen.marriagereg.name=mr.registrationno +#egov.idgen.birthreg.format=BR-REGY-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] #mdms configurations From a748e96f5ef2776247a116e65a8c945417975de7 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 13 Mar 2023 13:15:27 +0530 Subject: [PATCH 023/420] migration_audit_added --- ...V20231015302020__marriage_services_ddl.sql | 416 ++++++++++++++++++ ...V20231312361214__marriage_services_ddl.sql | 47 ++ 2 files changed, 463 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231312361214__marriage_services_ddl.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql new file mode 100644 index 00000000000..55eb6a7794f --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql @@ -0,0 +1,416 @@ +-- Table: public.eg_marriage_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeothers character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + placename_mal character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + othersspecify character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + fileno character varying(64) COLLATE pg_catalog."default", + file_date bigint, + file_status character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" + ); + +-- FUNCTION: public.process_eg_marriage_details_audit() + +-- DROP FUNCTION IF EXISTS public.process_eg_marriage_details_audit(); + +CREATE OR REPLACE FUNCTION public.process_eg_marriage_details_audit() + RETURNS trigger + LANGUAGE 'plpgsql' + COST 100 + VOLATILE NOT LEAKPROOF +AS $BODY$ +BEGIN + IF (TG_OP = 'DELETE') THEN + INSERT INTO eg_marriage_details_audit SELECT 'D', now(), OLD.*; +RETURN OLD; +ELSIF (TG_OP = 'UPDATE') THEN + INSERT INTO eg_marriage_details_audit SELECT 'U', now(), OLD.*; +RETURN NEW; +END IF; +RETURN NULL; +END; +$BODY$; +-- Trigger: eg_marriage_details_audit + +-- DROP TRIGGER IF EXISTS eg_marriage_details_audit ON public.eg_marriage_details; + +CREATE TRIGGER eg_marriage_details_audit + BEFORE DELETE OR UPDATE + ON public.eg_marriage_details + FOR EACH ROW + EXECUTE FUNCTION public.process_eg_marriage_details_audit(); + +-- Table: public.eg_marriage_bride_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_bride_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" + ); + +-- FUNCTION: public.process_eg_marriage_bride_details_audit() + +-- DROP FUNCTION IF EXISTS public.process_eg_marriage_bride_details_audit(); + +CREATE OR REPLACE FUNCTION public.process_eg_marriage_bride_details_audit() + RETURNS trigger + LANGUAGE 'plpgsql' + COST 100 + VOLATILE NOT LEAKPROOF +AS $BODY$ +BEGIN + IF (TG_OP = 'DELETE') THEN + INSERT INTO eg_marriage_bride_details_audit SELECT 'D', now(), OLD.*; +RETURN OLD; +ELSIF (TG_OP = 'UPDATE') THEN + INSERT INTO eg_marriage_bride_details_audit SELECT 'U', now(), OLD.*; +RETURN NEW; +END IF; +RETURN NULL; +END; +$BODY$; + +-- Trigger: eg_marriage_bride_details_audit + +-- DROP TRIGGER IF EXISTS eg_marriage_bride_details_audit ON public.eg_marriage_bride_details; + +CREATE TRIGGER eg_marriage_bride_details_audit +BEFORE DELETE OR UPDATE ON public.eg_marriage_bride_details +FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_bride_details_audit(); + + + +-- Table: public.eg_marriage_groom_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_groom_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" +); +-- FUNCTION: public.process_eg_marriage_groom_details_audit() + +-- DROP FUNCTION IF EXISTS public.process_eg_marriage_groom_details_audit(); + +CREATE OR REPLACE FUNCTION public.process_eg_marriage_groom_details_audit() + RETURNS trigger + LANGUAGE 'plpgsql' + COST 100 + VOLATILE NOT LEAKPROOF +AS $BODY$ +BEGIN + IF (TG_OP = 'DELETE') THEN + INSERT INTO eg_marriage_groom_details_audit SELECT 'D', now(), OLD.*; +RETURN OLD; +ELSIF (TG_OP = 'UPDATE') THEN + INSERT INTO eg_marriage_groom_details_audit SELECT 'U', now(), OLD.*; +RETURN NEW; +END IF; +RETURN NULL; +END; +$BODY$; + +-- Trigger: eg_marriage_groom_details + +-- DROP TRIGGER IF EXISTS eg_marriage_groom_details_audit ON public.eg_marriage_groom_details; + +CREATE TRIGGER eg_marriage_groom_details_audit +BEFORE DELETE OR UPDATE ON public.eg_marriage_groom_details +FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_groom_details_audit(); + + +-- Table: public.eg_marriage_permanent_address_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" +); +-- FUNCTION: public.process_eg_marriage_permanent_address_details_audit() + +-- DROP FUNCTION IF EXISTS public.process_eg_marriage_permanent_address_details_audit(); + +CREATE OR REPLACE FUNCTION public.process_eg_marriage_permanent_address_details_audit() + RETURNS trigger + LANGUAGE 'plpgsql' + COST 100 + VOLATILE NOT LEAKPROOF +AS $BODY$ +BEGIN + IF (TG_OP = 'DELETE') THEN + INSERT INTO eg_marriage_permanent_address_details_audit SELECT 'D', now(), OLD.*; +RETURN OLD; +ELSIF (TG_OP = 'UPDATE') THEN + INSERT INTO eg_marriage_permanent_address_details_audit SELECT 'U', now(), OLD.*; +RETURN NEW; +END IF; +RETURN NULL; +END; +$BODY$; + +-- Trigger: eg_marriage_permanent_address_details_audit + +-- DROP TRIGGER IF EXISTS eg_marriage_permanent_address_details_audit ON public.eg_marriage_permanent_address_details; + +CREATE TRIGGER eg_marriage_permanent_address_details_audit +BEFORE DELETE OR UPDATE ON public.eg_marriage_permanent_address_details +FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_permanent_address_details_audit(); + + +-- Table: public.eg_marriage_present_address_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_present_address_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" +); +-- FUNCTION: public.process_eg_marriage_present_address_details_audit() + +-- DROP FUNCTION IF EXISTS public.process_eg_marriage_present_address_details_audit(); + +CREATE OR REPLACE FUNCTION public.process_eg_marriage_present_address_details_audit() + RETURNS trigger + LANGUAGE 'plpgsql' + COST 100 + VOLATILE NOT LEAKPROOF +AS $BODY$ +BEGIN + IF (TG_OP = 'DELETE') THEN + INSERT INTO eg_marriage_present_address_details_audit SELECT 'D', now(), OLD.*; +RETURN OLD; +ELSIF (TG_OP = 'UPDATE') THEN + INSERT INTO eg_marriage_present_address_details_audit SELECT 'U', now(), OLD.*; +RETURN NEW; +END IF; +RETURN NULL; +END; +$BODY$; + +-- Trigger: eg_marriage_present_address_details_audit + +-- DROP TRIGGER IF EXISTS eg_marriage_present_address_details_audit ON public.eg_marriage_present_address_details; + +CREATE TRIGGER eg_marriage_present_address_details_audit +BEFORE DELETE OR UPDATE ON public.eg_marriage_present_address_details +FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_present_address_details_audit(); + + + +-- Table: public.eg_marriage_witness_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_witness_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_message_received boolean, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" +); +-- FUNCTION: public.process_eg_marriage_witness_details_audit() + +-- DROP FUNCTION IF EXISTS public.process_eg_marriage_witness_details_audit(); + +CREATE OR REPLACE FUNCTION public.process_eg_marriage_witness_details_audit() + RETURNS trigger + LANGUAGE 'plpgsql' + COST 100 + VOLATILE NOT LEAKPROOF +AS $BODY$ +BEGIN + IF (TG_OP = 'DELETE') THEN + INSERT INTO eg_birth_mother_information_audit SELECT 'D', now(), OLD.*; +RETURN OLD; +ELSIF (TG_OP = 'UPDATE') THEN + INSERT INTO eg_birth_mother_information_audit SELECT 'U', now(), OLD.*; +RETURN NEW; +END IF; +RETURN NULL; +END; +$BODY$; + +-- Trigger: eg_marriage_witness_details_audit + +-- DROP TRIGGER IF EXISTS eg_marriage_witness_details_audit ON public.eg_marriage_witness_details; + +CREATE TRIGGER eg_marriage_witness_details_audit +BEFORE DELETE OR UPDATE ON public.eg_marriage_witness_details +FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_witness_details_audit(); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231312361214__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231312361214__marriage_services_ddl.sql new file mode 100644 index 00000000000..8eb12d3df46 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231312361214__marriage_services_ddl.sql @@ -0,0 +1,47 @@ +ALTER TABLE public.eg_marriage_details +ADD COLUMN houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN houseno_and_nameml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN religious_institution character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN public_or_privatePlace character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN public_or_privatePlacenNamePlace_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN public_or_privatePlacenNamePlace_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN religious_institution_other character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN religious_institution_otherName_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN religious_institution_otherName_ml character varying(2500) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_marriage_details_audit +ADD COLUMN houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN houseno_and_nameml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN religious_institution character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN public_or_privatePlace character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN public_or_privatePlacenNamePlace_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN public_or_privatePlacenNamePlace_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN religious_institution_other character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN religious_institution_otherName_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN religious_institution_otherName_ml character varying(2500) COLLATE pg_catalog."default"; + + + +ALTER TABLE public.eg_marriage_witness_details +ADD COLUMN w2_adharno character varying(15) COLLATE pg_catalog."default", +ADD COLUMN w2_name_en character varying(200) COLLATE pg_catalog."default", +ADD COLUMN w2_name_mal character varying(200) COLLATE pg_catalog."default", +ADD COLUMN w2_age integer, +ADD COLUMN w2_address_en character varying(200) COLLATE pg_catalog."default", +ADD COLUMN w2_address_mal character varying(200) COLLATE pg_catalog."default", +ADD COLUMN w2_mobile character varying(150) COLLATE pg_catalog."default", +ADD COLUMN w2_is_message_received boolean, +ADD COLUMN w2_is_esigned boolean; + + +ALTER TABLE public.eg_marriage_witness_details_audit +ADD COLUMN w2_adharno character varying(15) COLLATE pg_catalog."default", +ADD COLUMN w2_name_en character varying(200) COLLATE pg_catalog."default", +ADD COLUMN w2_name_mal character varying(200) COLLATE pg_catalog."default", +ADD COLUMN w2_age integer, +ADD COLUMN w2_address_en character varying(200) COLLATE pg_catalog."default", +ADD COLUMN w2_address_mal character varying(200) COLLATE pg_catalog."default", +ADD COLUMN w2_mobile character varying(150) COLLATE pg_catalog."default", +ADD COLUMN w2_is_message_received boolean, +ADD COLUMN w2_is_esigned boolean; From cc496da5ad7488c3be8d946510d6faceb90a3916 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 14 Mar 2023 15:42:38 +0530 Subject: [PATCH 024/420] added-newfeilds --- .../src/main/resources/application.properties | 4 +- .../src/main/resources/marriage.yml | 160 +++++++++++++----- .../model/MarriageApplicationDetail.java | 33 ++++ .../model/marriage/WitnessDetails.java | 57 ++++++- .../src/main/resources/application.properties | 2 + ...V20231015302020__marriage_services_ddl.sql | 4 +- 6 files changed, 207 insertions(+), 53 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index d6a08ad63a1..75e178d880a 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -4,7 +4,7 @@ spring.datasource.username=postgres spring.datasource.password=123 #Set context root -server.port = 8082 +server.port = 9082 server.context-path=/common-persist server.servlet.context-path=/common-persist @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=file:///home/neenu/Documents/ksmartproject/Marriage/KSMART/core-services/egov-persister/src/main/resources/marriage.yml +egov.persist.yml.repo.path=classpath:marriage.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 7bf3ae1963b..2577b8c972f 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -7,12 +7,13 @@ serviceMaps: isTransaction: true queryMaps: - query: INSERT INTO public.eg_marriage_details( - id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeothers, placeid, placename_en, - street_name_en, street_name_ml, placename_mal, ward_code, talukid, village_name, marriage_type, oth_marriage_type, - landmark, locality_en, locality_ml, othersspecify, applicationtype, businessservice, workflowcode, fileno, file_date, - file_status, applicationnumber, registrationno, - registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeothers, placeid, placename_en, street_name_en, + street_name_ml, placename_mal, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, + othersspecify, applicationtype, businessservice, workflowcode, fileno, file_date, file_status, applicationnumber, registrationno, + registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby, houseno_and_nameen, houseno_and_nameml, + religious_institution, public_or_privateplace, public_or_privateplacennameplace_en, public_or_privateplacennameplace_ml, + religious_institution_other, religious_institution_othername_en, religious_institution_othername_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -89,6 +90,23 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + + - jsonPath: $.MarriageDetails.*.marriageReligiousInstitution + + - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivatePlace + + - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivateNamePlaceEn + + - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivateNamePlaceMal + + - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOther + + - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOtherNameEn + + - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOtherNameMal - query: INSERT INTO public.eg_marriage_bride_details( @@ -368,40 +386,61 @@ serviceMaps: - query : INSERT INTO public.eg_marriage_witness_details( - id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_message_received, - is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_message_received, is_esigned, + marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, w2_adharno, w2_name_en, w2_name_mal, w2_age, w2_address_en, + w2_address_mal, w2_mobile, w2_is_message_received, w2_is_esigned) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetail jsonMaps: - - jsonPath: $.MarriageDetails.*.WitnessDetail.id - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetail.id - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessNameEn + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AdharNo - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessNameMal + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameEn - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAge + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameMal - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAddresSEn + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Age - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAddressMal + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddresSEn - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessMobile + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddressMal - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessISmessageReceived + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Mobile - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessISEsigned + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISmessageReceived - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISEsigned - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AdharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Age + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddresSEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddressMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Mobile + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISmessageReceived + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISEsigned - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy @@ -416,11 +455,13 @@ serviceMaps: - query: UPDATE public.eg_marriage_details - SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeothers=?, placeid=?, - placename_en=?, street_name_en=?, street_name_ml=?, placename_mal=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, - oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, othersspecify=?, applicationtype=?, businessservice=?, workflowcode=?, - fileno=?, file_date=?, file_status=?, applicationnumber=?, registrationno=?, registration_date=?, action=?, status=?, - lastmodifiedtime=?, lastmodifiedby=? + SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeothers=?, placeid=?, placename_en=?, + street_name_en=?, street_name_ml=?, placename_mal=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, oth_marriage_type=?, + landmark=?, locality_en=?, locality_ml=?, othersspecify=?, applicationtype=?, businessservice=?, workflowcode=?, fileno=?, file_date=?, + file_status=?, applicationnumber=?, registrationno=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, + lastmodifiedby=?, houseno_and_nameen=?, houseno_and_nameml=?, religious_institution=?, public_or_privateplace=?, + public_or_privateplacennameplace_en=?, public_or_privateplacennameplace_ml=?, religious_institution_other=?, + religious_institution_othername_en=?, religious_institution_othername_ml=? WHERE id=?; basePath: MarriageDetails.* @@ -493,6 +534,24 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + + - jsonPath: $.MarriageDetails.*.marriageReligiousInstitution + + - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivatePlace + + - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivateNamePlaceEn + + - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivateNamePlaceMal + + - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOther + + - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOtherNameEn + + - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOtherNameMal + - jsonPath: $.MarriageDetails.*.id - query : UPDATE public.eg_marriage_bride_details @@ -764,32 +823,53 @@ serviceMaps: - query : UPDATE public.eg_marriage_witness_details - SET adharno=?, name_en=?, name_mal=?, age=?, address_en=?, address_mal=?, mobile=?, is_message_received=?, is_esigned=?, - lastmodifiedtime=?, lastmodifiedby=? + SET adharno=?, name_en=?, name_mal=?, age=?, address_en=?, address_mal=?, mobile=?, is_message_received=?, is_esigned=?, marriageid=?, + lastmodifiedtime=?, lastmodifiedby=?, w2_adharno=?, w2_name_en=?, w2_name_mal=?, w2_age=?, w2_address_en=?, w2_address_mal=?, w2_mobile=?, + w2_is_message_received=?, w2_is_esigned=? WHERE marriageid=?; basePath: MarriageDetails.*.WitnessDetail jsonMaps: - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AdharNo - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessNameEn + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameEn - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessNameMal + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameMal - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAge + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Age - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAddresSEn + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddresSEn - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessAddressMal + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddressMal - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessMobile + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Mobile - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessISmessageReceived + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISmessageReceived - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessISEsigned + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISEsigned + + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AdharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Age + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddresSEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddressMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Mobile + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISmessageReceived + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISEsigned + - jsonPath: $.MarriageDetails.*.id diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index c16cfd3fa79..e95999347c5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -145,6 +145,39 @@ public class MarriageApplicationDetail { private String placeid; + @Size(max = 2500) + @JsonProperty("marriageHouseNoAndNameEn") + private String marriageHouseNoAndNameEn; + @Size(max = 2500) + @JsonProperty("marriageHouseNoAndNameMal") + private String marriageHouseNoAndNameMal; + + @Size(max = 1000) + @JsonProperty("marriageReligiousInstitutionOther") + private String marriageReligiousInstitutionOther; + + @Size(max = 1000) + @JsonProperty("marriagePublicOrPrivatePlace") + private String marriagePublicOrPrivatePlace; + + @Size(max = 2500) + @JsonProperty("marriagePublicOrPrivateNamePlaceEn") + private String marriagePublicOrPrivateNamePlaceEn; + @Size(max = 2500) + @JsonProperty("marriagePublicOrPrivateNamePlaceMal") + private String marriagePublicOrPrivateNamePlaceMal; + + + @Size(max = 1000) + @JsonProperty("marriageReligiousInstitution") + private String marriageReligiousInstitution; + + @Size(max = 2500) + @JsonProperty("marriageReligiousInstitutionOtherNameEn") + private String marriageReligiousInstitutionOtherNameEn; + @Size(max = 2500) + @JsonProperty("marriageReligiousInstitutionOtherNameMal") + private String marriageReligiousInstitutionOtherNameMal; @Size(max = 64) @JsonProperty("applicationnumber") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index 013f420868b..ff69ce50237 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -15,46 +15,85 @@ public class WitnessDetails { @JsonProperty("id") private String id; @Size(max = 15) - @JsonProperty("witnessAdharNo") + @JsonProperty("witness1AdharNo") private String adharno; @Size(max = 200) - @JsonProperty("witnessNameEn") + @JsonProperty("witness1NameEn") private String name_en; @Size(max = 200) - @JsonProperty("witnessNameMal") + @JsonProperty("witness1NameMal") private String name_mal; - @JsonProperty("witnessAge") + @JsonProperty("witness1Age") private Integer age; @Size(max = 200) - @JsonProperty("witnessAddresSEn") + @JsonProperty("witness1AddresSEn") private String address_en; @Size(max = 200) - @JsonProperty("witnessAddressMal") + @JsonProperty("witness1AddressMal") private String address_mal; @Size(max = 150) - @JsonProperty("witnessMobile") + @JsonProperty("witness1Mobile") private String mobile; - @JsonProperty("witnessISmessageReceived") + @JsonProperty("witness1ISmessageReceived") private Boolean is_message_received; - @JsonProperty("witnessISEsigned") + @JsonProperty("witness1ISEsigned") private Boolean is_esigned; + + + + @Size(max = 15) + @JsonProperty("witness2AdharNo") + private String w2Adharno; + + @Size(max = 200) + @JsonProperty("witness2NameEn") + private String w2Name_en; + + + @Size(max = 200) + @JsonProperty("witness2NameMal") + private String w2Name_mal; + + + @JsonProperty("witness2Age") + private Integer w2Age; + + @Size(max = 200) + @JsonProperty("witness2AddresSEn") + private String w2Address_en; + + @Size(max = 200) + @JsonProperty("witness2AddressMal") + private String w2Address_mal; + + @Size(max = 150) + @JsonProperty("witness2Mobile") + private String w2Mobile; + + + @JsonProperty("witness2ISmessageReceived") + private Boolean w2Is_message_received; + + @JsonProperty("witness2ISEsigned") + private Boolean w2Is_esigned; @Size(max = 64) @JsonProperty("marriageid") private String marriageid; + } diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index cb17d923dbf..0e55d0545c0 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -42,6 +42,8 @@ spring.kafka.producer.batch_size_config=16384 spring.kafka.producer.linger_ms_config=1 spring.kafka.producer.buffer_memory_config=33554432 #org.egov.detailed.tracing.enabled = false + + persister.save.marriage.application.topic=save-marriage-application-topic persister.update.marriage.application.topic=update-marriage-application-topic diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql index 55eb6a7794f..5a5a7dd357e 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql @@ -397,10 +397,10 @@ CREATE OR REPLACE FUNCTION public.process_eg_marriage_witness_details_audit() AS $BODY$ BEGIN IF (TG_OP = 'DELETE') THEN - INSERT INTO eg_birth_mother_information_audit SELECT 'D', now(), OLD.*; + INSERT INTO eg_marriage_witness_details_audit SELECT 'D', now(), OLD.*; RETURN OLD; ELSIF (TG_OP = 'UPDATE') THEN - INSERT INTO eg_birth_mother_information_audit SELECT 'U', now(), OLD.*; + INSERT INTO eg_marriage_witness_details_audit SELECT 'U', now(), OLD.*; RETURN NEW; END IF; RETURN NULL; From 91034f80cfb506a551250469f38c0a936a3dfe48 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 14 Mar 2023 16:01:19 +0530 Subject: [PATCH 025/420] model chage --- .../egov-persister/src/main/resources/marriage.yml | 14 +++++++------- .../model/MarriageApplicationDetail.java | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 2577b8c972f..8bf7b6f1a1f 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -62,15 +62,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marraigeApplicationType - - jsonPath: $.MarriageDetails.*.marraigeBusinessService + - jsonPath: $.MarriageDetails.*.businessService - - jsonPath: $.MarriageDetails.*.marraigeWorkflowCode + - jsonPath: $.MarriageDetails.*.workflowCode - - jsonPath: $.MarriageDetails.*.marraigeFileNo + - jsonPath: $.MarriageDetails.*.fileNo - - jsonPath: $.MarriageDetails.*.marraigeFileDate + - jsonPath: $.MarriageDetails.*.fileDate - - jsonPath: $.MarriageDetails.*.marraigeFileStatus + - jsonPath: $.MarriageDetails.*.fileStatus - jsonPath: $.MarriageDetails.*.applicationnumber @@ -78,9 +78,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.registration_date - - jsonPath: $.MarriageDetails.*.marraigeAction + - jsonPath: $.MarriageDetails.*.action - - jsonPath: $.MarriageDetails.*.marraigeStatus + - jsonPath: $.MarriageDetails.*.status - jsonPath: $.MarriageDetails.*.auditDetails.createdTime diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index e95999347c5..fdc526cef3c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -107,15 +107,15 @@ public class MarriageApplicationDetail { private String applicationtype; @Size(max = 64) - @JsonProperty("marraigeBusinessService") + @JsonProperty("businessService") private String businessservice; @Size(max = 64) - @JsonProperty("marraigeWorkflowCode") + @JsonProperty("workflowCode") private String workflowcode; @Size(max = 64) - @JsonProperty("marraigeFileNo") + @JsonProperty("fileNo") private String fileno; @@ -126,19 +126,19 @@ public class MarriageApplicationDetail { @JsonProperty("registration_date") private Long registrationDate; - @JsonProperty("marraigeFileDate") + @JsonProperty("fileDate") private long file_date; @Size(max = 64) - @JsonProperty("marraigeFileStatus") + @JsonProperty("fileStatus") private String file_status; @Size(max = 64) - @JsonProperty("marraigeAction") + @JsonProperty("action") private String action; @Size(max = 64) - @JsonProperty("marraigeStatus") + @JsonProperty("status") private String status; @Size(max = 1000) @JsonProperty("placeid") From 503ed56deccc28cdcbf4da2d8f3d4507be5155ff Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 16 Mar 2023 16:35:41 +0530 Subject: [PATCH 026/420] Marriage Search Added --- .../src/main/resources/marriage.yml | 14 +-- .../repository/builder/BaseQueryBuilder.java | 96 +++++++++++++++++++ .../builder/CommonQueryBuilder.java | 31 ++++++ .../MarriageApplicationController.java | 12 +-- .../enrichment/MarriageDetailsEnrichment.java | 20 +++- .../model/MarriageApplicationDetail.java | 5 + .../model/marriage/GroomDetails.java | 4 + .../MarriageApplicationSearchCriteria.java | 13 +++ .../marriage/MarriageDetailsRequest.java | 2 +- .../marriage/PermanentAdressDetails.java | 3 + .../model/marriage/PresentAddressDetails.java | 4 +- .../model/marriage/WitnessDetails.java | 3 + .../querybuilder/BaseBirthQuery.java | 26 +++++ .../MarriageApplicationQueryBuilder.java | 40 ++++++-- .../rowmapper/BrideDetailsRowMapper.java | 67 +++++++------ .../MarriageApplicationRowMapper.java | 92 +++++++++--------- .../rowmapper/WitnessDetailsRowMapper.java | 62 ++++++------ 17 files changed, 362 insertions(+), 132 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/BaseQueryBuilder.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 8bf7b6f1a1f..f48866ff623 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -510,15 +510,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marraigeApplicationType - - jsonPath: $.MarriageDetails.*.marraigeBusinessService + - jsonPath: $.MarriageDetails.*.businessService - - jsonPath: $.MarriageDetails.*.marraigeWorkflowCode + - jsonPath: $.MarriageDetails.*.workflowCode - - jsonPath: $.MarriageDetails.*.marraigeFileNo + - jsonPath: $.MarriageDetails.*.fileNo - - jsonPath: $.MarriageDetails.*.marraigeFileDate + - jsonPath: $.MarriageDetails.*.fileDate - - jsonPath: $.MarriageDetails.*.marraigeFileStatus + - jsonPath: $.MarriageDetails.*.fileStatus - jsonPath: $.MarriageDetails.*.applicationnumber @@ -526,9 +526,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.registration_date - - jsonPath: $.MarriageDetails.*.marraigeAction + - jsonPath: $.MarriageDetails.*.action - - jsonPath: $.MarriageDetails.*.marraigeStatus + - jsonPath: $.MarriageDetails.*.status - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/BaseQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/BaseQueryBuilder.java new file mode 100644 index 00000000000..54af6707d71 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/BaseQueryBuilder.java @@ -0,0 +1,96 @@ +package org.ksmart.marriage.common.repository.builder; + +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import java.time.Instant; +import java.time.LocalDate; +import java.time.ZoneId; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; +@Slf4j +@Component +public class BaseQueryBuilder { + void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, + List paramValues) { + + if (startDate != null || endDate != null) { + addWhereClause(paramValues, query); + query.append(" ("); + + if (startDate != null) { + query.append(column) + .append(" >= ? "); + paramValues.add(startDate); + } + + if (endDate != null) { + if (startDate != null) { + query.append(" AND "); + } + + query.append(column) + .append(" <= ? "); + paramValues.add(endDate); + } + + query.append(") "); + } + } + + void addFilters(String column, List ids, StringBuilder query, List paramValues) { + if (CollectionUtils.isNotEmpty(ids)) { + addWhereClause(paramValues, query); + query.append(column) + .append(" IN (") + .append(getStatementParameters(ids.size())) + .append(") "); + ids.forEach(paramValues::add); + } + } + + void addFilter(String column, String value, StringBuilder query, List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + } + } + + void addDateToLongFilter(String column, LocalDate value, StringBuilder query, List paramValues) { + if (value != null) { + Instant instant = value.atStartOfDay(ZoneId.systemDefault()).toInstant(); + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(instant.toEpochMilli()); + } + } + + void addLikeFilter(final String column, final String value, final StringBuilder query, final List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("LIKE ?% "); + paramValues.add(value); + } + } + + void addWhereClause(List values, StringBuilder query) { + if (CollectionUtils.isEmpty(values)) { + query.append(" WHERE "); + } else { + query.append(" AND "); + } + } + + private String getStatementParameters(int count) { + return Collections.nCopies(count, "(?)") + .stream() + .collect(Collectors.joining(", ")); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java new file mode 100644 index 00000000000..053b4fd2754 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java @@ -0,0 +1,31 @@ +package org.ksmart.marriage.common.repository.builder; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +@Slf4j +@Component +public class CommonQueryBuilder { + + private static final String QUERY_BRIDE_DETAILS = new StringBuilder() + .append("mbd.id as bd_id,mbd.residentship as bd_residentship,mbd.adharno as bd_adharno,mbd.passportno as bd_passportno,") + .append("mbd.socialsecurityno as bd_socialsecurityno,mbd.firstname_en as bd_firstname_en,mbd.firstname_mal as bd_firstname_mal,mbd.middlename_en as bd_middlename_en,") + .append("mbd.fathername_mal as bd_fathername_mal,mbd.middlename_mal as bd_middlename_mal,mbd.lastname_en as bd_lastname_en,mbd.lastname_mal as bd_lastname_mal,mbd.mobile as bd_mobile,") + .append("mbd.emailid as bd_emailid,mbd.gender as bd_gender,mbd.dateofbirth as bd_dateofbirth,mbd.age as bd_age,mbd.parent_guardian as bd_parent_guardian,mbd.fathername_en as bd_fathername_en,") + .append("mbd.mothername_en as bd_mothername_en,mbd.mothername_mal as bd_mothername_mal,mbd.father_adharno as bd_father_adharno,mbd.mother_adharno as bd_mother_adharno,") + .append("mbd.guardianname_en as bd_guardianname_en,mbd.guardianname_mal as bd_guardianname_mal,mbd.guardian_adhar as bd_guardian_adhar,mbd.profession_en as bd_profession_en,") + .append("mbd.profession_mal as bd_profession_mal,mbd.maritalstatusid as bd_maritalstatusid,mbd.is_spouse_living as bd_is_spouse_living,mbd.no_of_spouse_living as bd_no_of_spouse_living,") + .append("mbd.marriageid as bd_marriageid,mbd.photo_url as bd_photo_url,mbd.createdtime as bd_createdtime,mbd.createdby as bd_createdby,mbd.lastmodifiedtime as bd_lastmodifiedtime,mbd.lastmodifiedby as bd_lastmodifiedby").toString(); + + + public String getQueryBrideDetails() { + return QUERY_BRIDE_DETAILS; + } + + +} + + + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index da0df2e0a0d..c209c7c6114 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -39,7 +39,7 @@ public MarriageApplicationController( MarriageApplicationService crMarriageServi } - @PostMapping(value = {"/_create"}) + @PostMapping(value = {"/_createMarriage"}) public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { List marriageDetails=crMarriageService.saveMarriageDetails(request); MarriageApplicationResponse response= MarriageApplicationResponse.builder() @@ -50,20 +50,20 @@ public ResponseEntity saveMarriageDetails(@RequestB .build(); return new ResponseEntity<>(response, HttpStatus.OK); } - @PostMapping(value = { "/_update"}) + @PostMapping(value = { "/_updateMarriage"}) public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { List marriageDetails = crMarriageService.updateMarriageDetails(request); return new ResponseEntity<>(marriageDetails, HttpStatus.OK); } - @PostMapping(value = { "/_search"}) - public ResponseEntity listByHospitalId(@RequestBody MarriageDetailsRequest request, + @PostMapping(value = { "/_searchMarriage"}) + public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { - List marriageDetailsDetails = crMarriageService.searchMarriageDetails(criteria); + List marriageDetails = crMarriageService.searchMarriageDetails(criteria); MarriageApplicationResponse response = MarriageApplicationResponse.builder() .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) - .marriageApplicationDetails(marriageDetailsDetails) + .marriageApplicationDetails(marriageDetails) .build(); return ResponseEntity.ok(response); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 3578187964e..e5900bb2e52 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -38,11 +38,21 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.setId(UUID.randomUUID().toString()); marriage.setAuditDetails(auditDetails); - marriage.getBrideDetails().setId(UUID.randomUUID().toString()); - marriage.getGroomDetails().setId(UUID.randomUUID().toString()); - marriage.getPermanent().setId(UUID.randomUUID().toString()); - marriage.getPresent().setId(UUID.randomUUID().toString()); - marriage.getWitness().setId(UUID.randomUUID().toString()); + if(marriage.getBrideDetails()!=null){ + marriage.getBrideDetails().setId(UUID.randomUUID().toString()); + } + if(marriage.getGroomDetails()!=null){ + marriage.getGroomDetails().setId(UUID.randomUUID().toString()); + } + if(marriage.getPermanent()!=null){ + marriage.getPermanent().setId(UUID.randomUUID().toString()); + } + if(marriage.getPresent()!=null){ + marriage.getPresent().setId(UUID.randomUUID().toString()); + } + if(marriage.getWitness()!=null){ + marriage.getWitness().setId(UUID.randomUUID().toString()); + } }); setApplicationNumbers(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index fdc526cef3c..1a59218434e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -7,6 +7,7 @@ //import org.ksmart.marriage.common.model.AuditDetails; //import org.ksmart.marriage.common.model.Document; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.util.List; @@ -17,6 +18,7 @@ @Builder public class MarriageApplicationDetail { + @NotNull @Size(max = 64) @JsonProperty("id") private String id; @@ -102,14 +104,17 @@ public class MarriageApplicationDetail { @JsonProperty("marraigeOthersSpecify") private String othersspecify; + @NotNull @Size(max = 64) @JsonProperty("marraigeApplicationType") private String applicationtype; + @NotNull @Size(max = 64) @JsonProperty("businessService") private String businessservice; + @NotNull @Size(max = 64) @JsonProperty("workflowCode") private String workflowcode; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index cbf2b9f1531..3a60ecb7042 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Getter @Setter @@ -10,6 +11,7 @@ @NoArgsConstructor @Builder public class GroomDetails { + @NotNull @Size(max = 64) @JsonProperty("id") private String id; @@ -148,6 +150,8 @@ public class GroomDetails { @JsonProperty("groomPhotoUrl") private String photo_url; + + @NotNull @Size(max = 64) @JsonProperty("marriageid") private String marriageid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java index eb30686451b..a39865f0d5d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java @@ -22,6 +22,19 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("applicationNo") private String applicationNo; + @JsonProperty("sortBy") + private SortBy sortBy; + public enum SortBy { + applicationNumber, + tenantId + } + @JsonProperty("sortOrder") + private SortOrder sortOrder; + + public enum SortOrder { + ASC, + DESC + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java index 6eee1c1fe19..89e7bf970c5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java @@ -24,7 +24,7 @@ public class MarriageDetailsRequest { @Valid private List marriageDetails; - public MarriageDetailsRequest addBirthDetails(MarriageApplicationDetail birthDetail) { + public MarriageDetailsRequest addMarriageDetails(MarriageApplicationDetail marriageDetail) { if (marriageDetails == null) { marriageDetails = null; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java index faa347b9252..964732632aa 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Getter @Setter @@ -10,6 +11,7 @@ @NoArgsConstructor @Builder public class PermanentAdressDetails { + @NotNull @Size(max = 64) @JsonProperty("id") private String id; @@ -90,6 +92,7 @@ public class PermanentAdressDetails { @Size(max = 64) @JsonProperty("permanentCountryId") private String countryid; + @NotNull @Size(max = 64) @JsonProperty("marriageid") private String marriageid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java index eed11f9cabd..06bd7f7f00b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Getter @Setter @@ -10,6 +11,7 @@ @NoArgsConstructor @Builder public class PresentAddressDetails { + @NotNull @Size(max = 64) @JsonProperty("id") private String id; @@ -92,7 +94,7 @@ public class PresentAddressDetails { @Size(max = 64) @JsonProperty("presentCountryId") private String countryid; - + @NotNull @Size(max = 64) @JsonProperty("marriageid") private String marriageid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index ff69ce50237..d718adb3a8b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Getter @Setter @@ -11,6 +12,7 @@ @Builder public class WitnessDetails { + @NotNull @Size(max = 64) @JsonProperty("id") private String id; @@ -87,6 +89,7 @@ public class WitnessDetails { @JsonProperty("witness2ISEsigned") private Boolean w2Is_esigned; + @NotNull @Size(max = 64) @JsonProperty("marriageid") private String marriageid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java index f2d03793c56..d67ff21fdff 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java @@ -2,6 +2,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.springframework.stereotype.Component; import java.util.Collections; @@ -70,4 +71,29 @@ private String getStatementParameters(int count) { .stream() .collect(Collectors.joining(", ")); } + void addOrderByColumns(String column, MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder orderBy){ + addOrderClause(orderBy); + if(!StringUtils.isEmpty(column)){ + addOrderClause(orderBy); + orderBy.append(column); + addAscDesc(valueSort, orderBy); + } + } + void addOrderClause(StringBuilder orderBy) { + if (orderBy.length() == 0) { + orderBy.append(" ORDER BY "); + } else { + orderBy.append(" "); + } + } + + void addAscDesc(MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder query){ + if(valueSort == null) + query.append(" ASC, "); + else if(valueSort == MarriageApplicationSearchCriteria.SortOrder.ASC) + query.append(" ASC, "); + else + query.append(" DESC, "); + } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 7fd1cd1931d..75bae24a4dc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -1,31 +1,57 @@ package org.ksmart.marriage.marriageapplication.repository.querybuilder; +import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; import javax.validation.constraints.NotNull; import java.util.List; @Component public class MarriageApplicationQueryBuilder extends BaseBirthQuery { + @Autowired + CommonQueryBuilder commonQueryBuilder; + private static final String QUERY = new StringBuilder() - .append("SELECT mrg.id, mrg.dateofreport, mrg.dateofmarriage, mrg.firstname_bride_en, mrg.firstname_bride_ml,") - .append("mrg.middlename_bride_en, mrg.middlename_bride_ml, mrg.lastname_bride_en, mrg.lastname_bride_ml, mrg.firstname_groom_en, mrg.firstname_groom_ml,") - .append("mrg.middlename_groom_en, mrg.middlename_groom_ml, mrg.lastname_groom_en, mrg.lastname_groom_ml, mrg.tenantid, mrg.remarks_en, mrg.remarks_ml, mrg.aadharno, ") - .append("mrg.esign_user_code, mrg.esign_user_desig_code, mrg.applicationtype, mrg.businessservice, mrg.workflowcode, mrg.fm_fileno, mrg.file_date, mrg.file_status,") - .append("mrg.applicationtype, mrg.businessservice, mrg.workflowcode, mrg.fm_fileno, mrg.file_date, mrg.applicationno, mrg.registrationno,") - .append("mrg.applicationno, mrg.registrationno, mrg.registration_date, mrg.action, mrg.status, mrg.createdtime, mrg.createdby, mrg.lastmodifiedtime, mrg.lastmodifiedby") - .append(" FROM public.eg_marriage_details mrg").toString(); + .append("SELECT mrg.id as ma_id,mrg.dateofmarriage as ma_dateofmarriage,mrg.dateofreporting as ma_dateofreporting,mrg.districtid as ma_districtid,") + .append("mrg.lbtype as ma_lbtype,mrg.tenantid as ma_tenantid,mrg.placetype as ma_placetype,mrg.placeothers as ma_placeothers,mrg.placeid as ma_placeid,") + .append("mrg.placename_en as ma_placename_en,mrg.street_name_en as ma_street_name_en,mrg.street_name_ml as ma_street_name_ml,") + .append("mrg.placename_mal as ma_placename_mal,mrg.ward_code as ma_ward_code,mrg.talukid as ma_talukid,mrg.village_name as ma_village_name,mrg.marriage_type as ma_marriage_type,") + .append("mrg.oth_marriage_type as ma_oth_marriage_type,mrg.landmark as ma_landmark,mrg.locality_en as ma_locality_en,mrg.locality_ml as ma_locality_ml,mrg.othersspecify as ma_othersspecify,") + .append("mrg.applicationtype as ma_applicationtype,mrg.businessservice as ma_businessservice,mrg.workflowcode as ma_workflowcode,mrg.fileno as ma_fileno,") + .append("mrg.file_date as ma_file_date,mrg.file_status as ma_file_status,mrg.applicationnumber as ma_applicationnumber,mrg.registrationno as ma_registrationno,mrg.registration_date as ma_registration_date,") + .append("mrg.action as ma_action,mrg.status as ma_status,mrg.createdtime,mrg.createdby,mrg.lastmodifiedtime ,mrg.lastmodifiedby ,mrg.houseno_and_nameen as ma_houseno_and_nameen,") + .append("mrg.houseno_and_nameml as ma_houseno_and_nameml,mrg.religious_institution as ma_religious_institution,mrg.public_or_privateplace as ma_public_or_privateplace,mrg.public_or_privateplacennameplace_en as ma_public_or_privateplacennameplace_en,") + .append("mrg.public_or_privateplacennameplace_ml as ma_public_or_privateplacennameplace_ml,mrg.religious_institution_other as ma_religious_institution_other,") + .append("mrg.religious_institution_othername_en as ma_religious_institution_othername_en,mrg.religious_institution_othername_ml as ma_religious_institution_othername_ml").toString(); + + private static final String QUERYCONDITION = new StringBuilder() + .append(" FROM public.eg_marriage_details mrg LEFT JOIN eg_marriage_bride_details mbd ON mbd.marriageid = mrg.id").toString(); + public String getBirthApplicationSearchQuery(@NotNull MarriageApplicationSearchCriteria criteria, @NotNull List preparedStmtValues, Boolean isCount) { StringBuilder query = new StringBuilder(QUERY); + query.append(",").append(commonQueryBuilder.getQueryBrideDetails()) + //.append(",") + + .append(QUERYCONDITION).toString(); + + StringBuilder orderBy = new StringBuilder(); addFilter("mrg.id", criteria.getId(), query, preparedStmtValues); addFilter("mrg.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("mrg.applicationno", criteria.getApplicationNo(), query, preparedStmtValues); + if (StringUtils.isEmpty(criteria.getSortBy())) + addOrderByColumns("mrg.createdtime",null, orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenantId) + addOrderByColumns("mrg.tenantid",criteria.getSortOrder(), orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.applicationNumber) + addOrderByColumns("mrg.applicationno",criteria.getSortOrder(),orderBy); return query.toString(); } public String getNextIDQuery() { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 167707f3ce4..88360f77633 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -9,40 +9,39 @@ public interface BrideDetailsRowMapper { default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ return BrideDetails.builder() - .id(rs.getString("id")) - .residentship(rs.getString("residentship")) - .adharno(rs.getString("adharno")) - .passportno(rs.getString("passportno")) - .socialsecurityno(rs.getString("socialsecurityno")) - .fathername_en(rs.getString("firstname_en")) - .fathername_mal(rs.getString("firstname_mal")) - .middlename_en(rs.getString("middlename_en")) - .middlename_mal(rs.getString("middlename_mal")) - .lastname_en(rs.getString("lastname_en")) - .lastname_mal(rs.getString("lastname_mal")) - .mobile(rs.getString("mobile")) - .emailid(rs.getString("emailid")) - .gender(rs.getString("gender")) - .dateofbirth(rs.getLong("dateofbirth")) - .age(rs.getInt("age")) - .parent_guardian(rs.getString("parent_guardian")) - .fathername_en(rs.getString("fathername_en")) - .fathername_mal(rs.getString("fathername_mal")) - .mothername_en(rs.getString("mothername_en")) - .mothername_mal(rs.getString("mothername_mal")) - .father_adharno(rs.getString("father_adharno")) - .mother_adharno(rs.getString("mother_adharno")) - .guardianname_en(rs.getString("guardianname_en")) - .guardianname_mal(rs.getString("guardianname_mal")) - .guardian_adhar(rs.getString("guardian_adhar")) - .profession_en(rs.getString("profession_en")) - .profession_mal(rs.getString("profession_mal")) - .maritalstatusid(rs.getString("maritalstatusid")) - .is_spouse_living(Boolean.valueOf(rs.getString("is_spouse_living"))) - .no_of_spouse_living(Boolean.valueOf(rs.getString("no_of_spouse_living"))) - //marriageid - .photo_url(rs.getString("photo_url")) - .marriageid(rs.getString("marriageid")) + .id(rs.getString("bd_id")) + .residentship(rs.getString("bd_residentship")) + .adharno(rs.getString("bd_adharno")) + .passportno(rs.getString("bd_passportno")) + .socialsecurityno(rs.getString("bd_socialsecurityno")) + .firstname_en(rs.getString("bd_firstname_en")) + .firstname_mal(rs.getString("bd_firstname_mal")) + .middlename_en(rs.getString("bd_middlename_en")) + .middlename_mal(rs.getString("bd_middlename_mal")) + .lastname_en(rs.getString("bd_lastname_en")) + .lastname_mal(rs.getString("bd_lastname_mal")) + .mobile(rs.getString("bd_mobile")) + .emailid(rs.getString("bd_emailid")) + .gender(rs.getString("bd_gender")) + .dateofbirth(rs.getLong("bd_dateofbirth")) + .age(rs.getInt("bd_age")) + .parent_guardian(rs.getString("bd_parent_guardian")) + .fathername_en(rs.getString("bd_fathername_en")) + .fathername_mal(rs.getString("bd_fathername_mal")) + .mothername_en(rs.getString("bd_mothername_en")) + .mothername_mal(rs.getString("bd_mothername_mal")) + .father_adharno(rs.getString("bd_father_adharno")) + .mother_adharno(rs.getString("bd_mother_adharno")) + .guardianname_en(rs.getString("bd_guardianname_en")) + .guardianname_mal(rs.getString("bd_guardianname_mal")) + .guardian_adhar(rs.getString("bd_guardian_adhar")) + .profession_en(rs.getString("bd_profession_en")) + .profession_mal(rs.getString("bd_profession_mal")) + .maritalstatusid(rs.getString("bd_maritalstatusid")) + .is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) + .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) + .photo_url(rs.getString("bd_photo_url")) + .marriageid(rs.getString("bd_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 46b7d161429..1a499922845 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -11,62 +11,66 @@ import java.util.ArrayList; import java.util.List; @Component -public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper,PermanentAddressRowMapper,PresentAddressRowMapper{ +public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper,PermanentAddressRowMapper,PresentAddressRowMapper,WitnessDetailsRowMapper{ @Override public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null List result = new ArrayList<>(); while (rs.next()) { result.add(MarriageApplicationDetail.builder() - .id(rs.getString("id")) - .dateofreporting(rs.getLong("dateofreporting")) - .dateofmarriage(rs.getLong("dateofmarriage")) - .districtid(rs.getString("districtid")) - .lbtype(rs.getString("lbtype")) - .tenantid(rs.getString("tenantid")) - .placetype(rs.getString("placetype")) - .placeothers(rs.getString("placeothers")) - .placeid(rs.getString("placeid")) - .placenameEn(rs.getString("placename_en")) - .placenameMl(rs.getString("placename_mal")) - .street_name_en(rs.getString("street_name_en")) - .street_name_ml(rs.getString("street_name_ml")) - .ward_code(rs.getString("ward_code")) - .talukid(rs.getString("talukid")) - .village_name(rs.getString("village_name")) - .marriage_type(rs.getString("marriage_type")) - .oth_marriage_type(rs.getString("oth_marriage_type")) - .landmark(rs.getString("landmark")) - .locality_en(rs.getString("locality_en")) - .locality_ml(rs.getString("locality_ml")) - .othersspecify(rs.getString("othersspecify")) - .applicationtype(rs.getString("applicationtype")) - .businessservice(rs.getString("businessservice")) - .workflowcode(rs.getString("workflowcode")) - .fileno(rs.getString("fileno")) - .file_date(rs.getLong("file_date")) - .file_status(rs.getString("file_status")) - .applicationnumber(rs.getString("applicationnumber")) - //registrationno - //registrstiondate - .action(rs.getString("action")) - .status(rs.getString("status")) + .id(rs.getString("ma_id")) + .dateofreporting(rs.getLong("ma_dateofreporting")) + .dateofmarriage(rs.getLong("ma_dateofmarriage")) + .districtid(rs.getString("ma_districtid")) + .lbtype(rs.getString("ma_lbtype")) + .tenantid(rs.getString("ma_tenantid")) + .placetype(rs.getString("ma_placetype")) + .placeothers(rs.getString("ma_placeothers")) + .placeid(rs.getString("ma_placeid")) + .placenameEn(rs.getString("ma_placename_en")) + .placenameMl(rs.getString("ma_placename_mal")) + .street_name_en(rs.getString("ma_street_name_en")) + .street_name_ml(rs.getString("ma_street_name_ml")) + .ward_code(rs.getString("ma_ward_code")) + .talukid(rs.getString("ma_talukid")) + .village_name(rs.getString("ma_village_name")) + .marriage_type(rs.getString("ma_marriage_type")) + .oth_marriage_type(rs.getString("ma_oth_marriage_type")) + .landmark(rs.getString("ma_landmark")) + .locality_en(rs.getString("ma_locality_en")) + .locality_ml(rs.getString("ma_locality_ml")) + .othersspecify(rs.getString("ma_othersspecify")) + .applicationtype(rs.getString("ma_applicationtype")) + .businessservice(rs.getString("ma_businessservice")) + .workflowcode(rs.getString("ma_workflowcode")) + .fileno(rs.getString("ma_fileno")) + .file_date(rs.getLong("ma_file_date")) + .file_status(rs.getString("ma_file_status")) + .applicationnumber(rs.getString("ma_applicationnumber")) + .registrationDate(rs.getLong("ma_registration_date")) + .registrationno(rs.getString("ma_registrationno")) + .action(rs.getString("ma_action")) + .status(rs.getString("ma_status")) + .marriageHouseNoAndNameEn(rs.getString("ma_houseno_and_nameen")) + .marriageHouseNoAndNameMal(rs.getString("ma_houseno_and_nameml")) + .marriageReligiousInstitution(rs.getString("ma_religious_institution")) + .marriagePublicOrPrivateNamePlaceEn(rs.getString("ma_public_or_privateplacennameplace_en")) + .marriagePublicOrPrivateNamePlaceMal(rs.getString("ma_public_or_privateplacennameplace_ml")) + .marriagePublicOrPrivatePlace(rs.getString("ma_public_or_privateplace")) + .marriageReligiousInstitutionOther(rs.getString("ma_religious_institution_other")) + .marriageReligiousInstitutionOtherNameEn(rs.getString("ma_religious_institution_othername_en")) + .marriageReligiousInstitutionOtherNameMal(rs.getString("ma_religious_institution_othername_ml")) .brideDetails(getBrideDetails(rs)) - .groomDetails(getgroomDetails(rs)) - .permanent(getPermanentAddress(rs)) - .present(getPresentAddress(rs)) - // .witnessDetails(getWitnessDetails(rs)) +// .groomDetails(getgroomDetails(rs)) +// .permanent(getPermanentAddress(rs)) +// .present(getPresentAddress(rs)) +// .witness(getWitnessDetails(rs)) .auditDetails(getAuditDetails(rs)) .build()); - - } return result; } -} - - - +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index 43aaeb05d26..e709bea7765 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -1,27 +1,35 @@ -//package org.ksmart.marriage.marriageapplication.repository.rowmapper; -// -//import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; -// -//import java.sql.ResultSet; -//import java.sql.SQLException; -// -//public interface WitnessDetailsRowMapper { -// default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { -// -// return WitnessDetails.builder() -// .id(rs.getString("id")) -// .adharno(rs.getString("adharno")) -// .name_en(rs.getString("name_en")) -// .name_mal(rs.getString("name_mal")) -// .age(rs.getInt("age")) -// .address_en(rs.getString("address_en")) -// .address_mal(rs.getString("address_mal")) -// .mobile(rs.getString("mobile")) -// .is_message_received(Boolean.valueOf(rs.getString("is_message_received"))) -// .is_esigned(Boolean.valueOf(rs.getString("is_esigned"))) -// .marriageid(rs.getString("marriageid")) -// .build(); -// } -// -// -//} \ No newline at end of file +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface WitnessDetailsRowMapper { + default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { + + return WitnessDetails.builder() + .id(rs.getString("id")) + .adharno(rs.getString("adharno")) + .name_en(rs.getString("name_en")) + .name_mal(rs.getString("name_mal")) + .age(rs.getInt("age")) + .address_en(rs.getString("address_en")) + .address_mal(rs.getString("address_mal")) + .mobile(rs.getString("mobile")) + .is_message_received(Boolean.valueOf(rs.getString("is_message_received"))) + .is_esigned(Boolean.valueOf(rs.getString("is_esigned"))) + .marriageid(rs.getString("marriageid")) + .w2Adharno(rs.getString("w2_adharno")) + .w2Age(Integer.valueOf(rs.getString("w2_age"))) + .w2Name_en(rs.getString("w2_name_en")) + .w2Address_mal(rs.getString("w2_name_mal")) + .w2Address_en(rs.getString("w2_address_en")) + .w2Name_mal(rs.getString("w2_address_mal")) + .w2Mobile(rs.getString("w2_mobile")) + .w2Is_esigned(Boolean.valueOf(rs.getString("w2_is_esigned"))) + .w2Is_message_received(Boolean.valueOf(rs.getString("w2_is_message_received"))) + .build(); + } + +} \ No newline at end of file From da4f9433be6b7fb55dac8d48a13dc86d43025cd4 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Fri, 17 Mar 2023 09:47:13 +0530 Subject: [PATCH 027/420] mode --- core-services/egov-persister/src/main/resources/marriage.yml | 4 ++-- .../marriageapplication/model/MarriageApplicationDetail.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index f48866ff623..e281ced7e42 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -60,7 +60,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marraigeOthersSpecify - - jsonPath: $.MarriageDetails.*.marraigeApplicationType + - jsonPath: $.MarriageDetails.*.applicationType - jsonPath: $.MarriageDetails.*.businessService @@ -508,7 +508,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marraigeOthersSpecify - - jsonPath: $.MarriageDetails.*.marraigeApplicationType + - jsonPath: $.MarriageDetails.*.applicationType - jsonPath: $.MarriageDetails.*.businessService diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index 1a59218434e..c7e938557be 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -106,7 +106,7 @@ public class MarriageApplicationDetail { @NotNull @Size(max = 64) - @JsonProperty("marraigeApplicationType") + @JsonProperty("applicationType") private String applicationtype; @NotNull From 19094e3d9c6a30cfc892c1966a3e8b6eb5d6c4e1 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Fri, 17 Mar 2023 15:47:08 +0530 Subject: [PATCH 028/420] search using id completed --- .../src/main/resources/marriage.yml | 53 ++++++++------- .../builder/CommonQueryBuilder.java | 47 +++++++++++++ .../model/MarriageApplicationDetail.java | 26 ++++---- .../MarriageApplicationQueryBuilder.java | 19 +++++- .../rowmapper/GroomDetailsRowMapper.java | 66 +++++++++---------- .../MarriageApplicationRowMapper.java | 8 +-- .../rowmapper/PermanentAddressRowMapper.java | 40 +++++------ .../rowmapper/PresentAddressRowMapper.java | 40 +++++------ .../rowmapper/WitnessDetailsRowMapper.java | 40 +++++------ 9 files changed, 199 insertions(+), 140 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index e281ced7e42..4de1edd4f8b 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -18,37 +18,37 @@ serviceMaps: jsonMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.marraigeDOM + - jsonPath: $.MarriageDetails.*.marriageDOM - - jsonPath: $.MarriageDetails.*.marraigeDOR + - jsonPath: $.MarriageDetails.*.marriageDOR - - jsonPath: $.MarriageDetails.*.marraigeDistrictid + - jsonPath: $.MarriageDetails.*.marriageDistrictid - - jsonPath: $.MarriageDetails.*.marraigeLBtype + - jsonPath: $.MarriageDetails.*.marriageLBtype - - jsonPath: $.MarriageDetails.*.marraigeTenantid + - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.marraigePlacetype + - jsonPath: $.MarriageDetails.*.marriagePlacetype - jsonPath: $.MarriageDetails.*.marriagePlaceothers - jsonPath: $.MarriageDetails.*.placeid - - jsonPath: $.MarriageDetails.*.marraigePlacenameEn + - jsonPath: $.MarriageDetails.*.marriagePlacenameEn - jsonPath: $.MarriageDetails.*.marriageStreetEn - jsonPath: $.MarriageDetails.*.marriageStreetMal - - jsonPath: $.MarriageDetails.*.marraigePlacenameMal + - jsonPath: $.MarriageDetails.*.marriagePlacenameMal - - jsonPath: $.MarriageDetails.*.marraigeWardCode + - jsonPath: $.MarriageDetails.*.marriageWardCode - - jsonPath: $.MarriageDetails.*.marraigeTalukID + - jsonPath: $.MarriageDetails.*.marriageTalukID - - jsonPath: $.MarriageDetails.*.marraigeVillageName + - jsonPath: $.MarriageDetails.*.marriageVillageName - - jsonPath: $.MarriageDetails.*.marraigeType + - jsonPath: $.MarriageDetails.*.marriageType - jsonPath: $.MarriageDetails.*.othMarriageType @@ -58,7 +58,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageLocalityMal - - jsonPath: $.MarriageDetails.*.marraigeOthersSpecify + - jsonPath: $.MarriageDetails.*.marriageOthersSpecify - jsonPath: $.MarriageDetails.*.applicationType @@ -466,37 +466,37 @@ serviceMaps: basePath: MarriageDetails.* jsonMaps: - - jsonPath: $.MarriageDetails.*.marraigeDOM + - jsonPath: $.MarriageDetails.*.marriageDOM - - jsonPath: $.MarriageDetails.*.marraigeDOR + - jsonPath: $.MarriageDetails.*.marriageDOR - - jsonPath: $.MarriageDetails.*.marraigeDistrictid + - jsonPath: $.MarriageDetails.*.marriageDistrictid - - jsonPath: $.MarriageDetails.*.marraigeLBtype + - jsonPath: $.MarriageDetails.*.marriageLBtype - - jsonPath: $.MarriageDetails.*.marraigeTenantid + - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.marraigePlacetype + - jsonPath: $.MarriageDetails.*.marriagePlacetype - jsonPath: $.MarriageDetails.*.marriagePlaceothers - jsonPath: $.MarriageDetails.*.placeid - - jsonPath: $.MarriageDetails.*.marraigePlacenameEn + - jsonPath: $.MarriageDetails.*.marriagePlacenameEn - jsonPath: $.MarriageDetails.*.marriageStreetEn - jsonPath: $.MarriageDetails.*.marriageStreetMal - - jsonPath: $.MarriageDetails.*.marraigePlacenameMal + - jsonPath: $.MarriageDetails.*.marriagePlacenameMal - - jsonPath: $.MarriageDetails.*.marraigeWardCode + - jsonPath: $.MarriageDetails.*.marriageWardCode - - jsonPath: $.MarriageDetails.*.marraigeTalukID + - jsonPath: $.MarriageDetails.*.marriageTalukID - - jsonPath: $.MarriageDetails.*.marraigeVillageName + - jsonPath: $.MarriageDetails.*.marriageVillageName - - jsonPath: $.MarriageDetails.*.marraigeType + - jsonPath: $.MarriageDetails.*.marriageType - jsonPath: $.MarriageDetails.*.othMarriageType @@ -506,7 +506,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageLocalityMal - - jsonPath: $.MarriageDetails.*.marraigeOthersSpecify + - jsonPath: $.MarriageDetails.*.marriageOthersSpecify - jsonPath: $.MarriageDetails.*.applicationType @@ -763,7 +763,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.id diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java index 053b4fd2754..cc2bb9fe86f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java @@ -1,6 +1,7 @@ package org.ksmart.marriage.common.repository.builder; import lombok.extern.slf4j.Slf4j; +import org.apache.kafka.common.protocol.types.Field; import org.springframework.stereotype.Component; @Slf4j @@ -18,11 +19,57 @@ public class CommonQueryBuilder { .append("mbd.marriageid as bd_marriageid,mbd.photo_url as bd_photo_url,mbd.createdtime as bd_createdtime,mbd.createdby as bd_createdby,mbd.lastmodifiedtime as bd_lastmodifiedtime,mbd.lastmodifiedby as bd_lastmodifiedby").toString(); + private static final String QUERY_GROOM_DETAILS = new StringBuilder() + .append("mrd.id as gd_id,mrd.residentship as gd_residentship,mrd.adharno as gd_adharno,mrd.passportno as gd_passportno,mrd.socialsecurityno as gd_socialsecurityno,mrd.firstname_en as gd_firstname_en,mrd.firstname_mal as gd_firstname_mal,") + .append("mrd.middlename_en as gd_middlename_en,mrd.middlename_mal as gd_middlename_mal,mrd.lastname_en as gd_lastname_en,mrd.lastname_mal as gd_lastname_mal,mrd.mobile as gd_mobile,mrd.emailid as gd_emailid,mrd.gender as gd_gender,") + .append("mrd.dateofbirth as gd_dateofbirth,mrd.age as gd_age,mrd.parent_guardian as gd_parent_guardian,mrd.fathername_en as gd_fathername_en,mrd.fathername_mal as gd_fathername_mal,mrd.mothername_en as gd_mothername_en,") + .append("mrd.mothername_mal as gd_mothername_mal,mrd.father_adharno as gd_father_adharno,mrd.mother_adharno as gd_mother_adharno,mrd.guardianname_en as gd_guardianname_en,mrd.guardianname_mal as gd_guardianname_mal,") + .append("mrd.profession_en as gd_profession_en,mrd.profession_mal as gd_profession_mal,mrd.maritalstatusid as gd_maritalstatusid,mrd.guardian_adhar as gd_guardian_adhar,") + .append("mrd.is_spouse_living as gd_is_spouse_living,mrd.no_of_spouse_living as gd_no_of_spouse_living,mrd.marriageid as gd_marriageid,mrd.photo_url as gd_photo_url") + .toString(); + + private static final String QUERY_PRESENTADDRESS_DETAILS = new StringBuilder() + .append("mpress.id as pes_id,mpress.houseno as pes_houseno,mpress.housename_no_en as pes_housename_no_en,mpress.housename_no_ml as pes_housename_no_ml,mpress.villageid as pes_villageid,mpress.village_name as pes_village_name,") + .append("mpress.talukid as pes_talukid,mpress.taluk_name as pes_taluk_name,mpress.ward_code as pes_ward_code,mpress.doorno as pes_doorno,mpress.locality_en as pes_locality_en,mpress.locality_ml as pes_locality_ml,mpress.street_name_en as pes_street_name_en,") + .append("mpress.street_name_ml as pes_street_name_ml,mpress.districtid as pes_districtid,mpress.stateid as pes_stateid,mpress.poid as pes_poid,mpress.pinno as pes_pinno,mpress.countryid as pes_countryid,mpress.marriageid as pes_marriageid") + .toString(); + + + private static final String QUERY_PERMANENTADDRESS_DETAILS = new StringBuilder() + .append("mper.id as per_id,mper.houseno as per_houseno,mper.housename_no_en as per_housename_no_en,mper.housename_no_ml as per_housename_no_ml,mper.villageid as per_villageid,mper.village_name as per_village_name,") + .append("mper.talukid as per_talukid,mper.taluk_name as per_taluk_name,mper.ward_code as per_ward_code,mper.doorno as per_doorno,mper.locality_en as per_locality_en,mper.locality_ml as per_locality_ml,mper.street_name_en as per_street_name_en,") + .append("mper.street_name_ml as per_street_name_ml,mper.districtid as per_districtid,mper.stateid as per_stateid,mper.poid as per_poid,mper.pinno as per_pinno,mper.countryid as per_countryid,mper.marriageid as per_marriageid") + .toString(); + + private static final String QUERY_WITNESS_DETAILS = new StringBuilder() + .append("mwd.id as wd_id,mwd.adharno as wd_adharno,mwd.name_en as wd_name_en,mwd.name_mal as wd_name_mal,mwd.age as wd_age,mwd.address_en as wd_address_en,mwd.address_mal as wd_address_mal,mwd.mobile as wd_mobile,mwd.is_message_received as wd_is_message_received,") + .append("mwd.is_esigned as wd_is_esigned,mwd.marriageid as wd_marriageid,mwd.w2_adharno as wd_w2_adharno,mwd.w2_name_en as wd_w2_name_en,mwd.w2_name_mal as wd_w2_name_mal,mwd.w2_age as wd_w2_age,mwd.w2_address_en as wd_w2_address_en,") + .append("mwd.w2_address_mal as wd_w2_address_mal,mwd.w2_mobile as wd_w2_mobile,mwd.w2_is_message_received as wd_w2_is_message_received,mwd.w2_is_esigned as wd_w2_is_esigned") + .toString(); + public String getQueryBrideDetails() { + return QUERY_BRIDE_DETAILS; } + public String getGroomDetails(){ + + return QUERY_GROOM_DETAILS; + } + public String getPresentAddressDetails(){ + return QUERY_PRESENTADDRESS_DETAILS; + } + + public String getPermanentAddressDetails(){ + + return QUERY_PERMANENTADDRESS_DETAILS; + } + + public String getWitnessDetails(){ + + return QUERY_WITNESS_DETAILS; + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index c7e938557be..fd4e6f0bb26 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -23,40 +23,40 @@ public class MarriageApplicationDetail { @JsonProperty("id") private String id; - @JsonProperty("marraigeDOM") + @JsonProperty("marriageDOM") private Long dateofmarriage; - @JsonProperty("marraigeDOR") + @JsonProperty("marriageDOR") private Long dateofreporting; @Size(max = 64) - @JsonProperty("marraigeDistrictid") + @JsonProperty("marriageDistrictid") private String districtid; @Size(max = 64) - @JsonProperty("marraigeLBtype") + @JsonProperty("marriageLBtype") private String lbtype; @Size(max = 64) - @JsonProperty("marraigeTenantid") + @JsonProperty("marriageTenantid") private String tenantid; @Size(max = 64) - @JsonProperty("marraigePlacetype") + @JsonProperty("marriagePlacetype") private String placetype; @Size(max = 1000) - @JsonProperty("marraigePlacenameEn") + @JsonProperty("marriagePlacenameEn") private String placenameEn; @Size(max = 1000) - @JsonProperty("marraigePlacenameMal") + @JsonProperty("marriagePlacenameMal") private String placenameMl; @Size(max = 64) - @JsonProperty("marraigeWardCode") + @JsonProperty("marriageWardCode") private String ward_code; @@ -69,11 +69,11 @@ public class MarriageApplicationDetail { private String street_name_ml; @Size(max = 64) - @JsonProperty("marraigeTalukID") + @JsonProperty("marriageTalukID") private String talukid; @Size(max = 64) - @JsonProperty("marraigeVillageName") + @JsonProperty("marriageVillageName") private String village_name; @Size(max = 1000) @@ -89,7 +89,7 @@ public class MarriageApplicationDetail { private String locality_ml; @Size(max = 64) - @JsonProperty("marraigeType") + @JsonProperty("marriageType") private String marriage_type; @Size(max = 64) @@ -101,7 +101,7 @@ public class MarriageApplicationDetail { private String oth_marriage_type; @Size(max = 1000) - @JsonProperty("marraigeOthersSpecify") + @JsonProperty("marriageOthersSpecify") private String othersspecify; @NotNull diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 75bae24a4dc..4f66299a490 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -28,7 +28,13 @@ public class MarriageApplicationQueryBuilder extends BaseBirthQuery { .append("mrg.religious_institution_othername_en as ma_religious_institution_othername_en,mrg.religious_institution_othername_ml as ma_religious_institution_othername_ml").toString(); private static final String QUERYCONDITION = new StringBuilder() - .append(" FROM public.eg_marriage_details mrg LEFT JOIN eg_marriage_bride_details mbd ON mbd.marriageid = mrg.id").toString(); + .append(" FROM public.eg_marriage_details mrg LEFT JOIN eg_marriage_bride_details mbd ON mbd.marriageid = mrg.id") + .append(" LEFT JOIN eg_marriage_groom_details mrd ON mrd.marriageid = mrg.id") + .append(" LEFT JOIN eg_marriage_present_address_details mpress ON mpress.marriageid = mrg.id") + .append(" LEFT JOIN eg_marriage_permanent_address_details mper ON mper.marriageid = mrg.id") + .append(" LEFT JOIN eg_marriage_witness_details mwd ON mwd.marriageid = mrg.id") + + .toString(); @@ -36,9 +42,16 @@ public String getBirthApplicationSearchQuery(@NotNull MarriageApplicationSearchC @NotNull List preparedStmtValues, Boolean isCount) { StringBuilder query = new StringBuilder(QUERY); query.append(",").append(commonQueryBuilder.getQueryBrideDetails()) - //.append(",") + .append(",") + .append(commonQueryBuilder.getGroomDetails()) + .append(",") + .append(commonQueryBuilder.getPresentAddressDetails()) + .append(",") + .append(commonQueryBuilder.getPermanentAddressDetails()) + .append(",") + .append(commonQueryBuilder.getWitnessDetails()) - .append(QUERYCONDITION).toString(); + .append(QUERYCONDITION).toString(); StringBuilder orderBy = new StringBuilder(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 29144111b4e..bba0b2df6e7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -9,39 +9,39 @@ public interface GroomDetailsRowMapper { default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ return GroomDetails.builder() - .id(rs.getString("id")) - .residentship(rs.getString("residentship")) - .adharno(rs.getString("adharno")) - .passportno(rs.getString("passportno")) - .socialsecurityno(rs.getString("socialsecurityno")) - .fathername_en(rs.getString("firstname_en")) - .fathername_mal(rs.getString("firstname_mal")) - .middlename_en(rs.getString("middlename_en")) - .middlename_mal(rs.getString("middlename_mal")) - .lastname_en(rs.getString("lastname_en")) - .lastname_mal(rs.getString("lastname_mal")) - .mobile(rs.getString("mobile")) - .emailid(rs.getString("emailid")) - .gender(rs.getString("gender")) - .dateofbirth(rs.getLong("dateofbirth")) - .age(rs.getInt("age")) - .parent_guardian(rs.getString("parent_guardian")) - .fathername_en(rs.getString("fathername_en")) - .fathername_mal(rs.getString("fathername_mal")) - .mothername_en(rs.getString("mothername_en")) - .mothername_mal(rs.getString("mothername_mal")) - .father_adharno(rs.getString("father_adharno")) - .mother_adharno(rs.getString("mother_adharno")) - .guardianname_en(rs.getString("guardianname_en")) - .guardianname_mal(rs.getString("guardianname_mal")) - .guardian_adhar(rs.getString("guardian_adhar")) - .profession_en(rs.getString("profession_en")) - .profession_mal(rs.getString("profession_mal")) - .maritalstatusid(rs.getString("maritalstatusid")) - .is_spouse_living(Boolean.valueOf(rs.getString("is_spouse_living"))) - .no_of_spouse_living(Boolean.valueOf(rs.getString("no_of_spouse_living"))) - .marriageid(rs.getString("marriageid")) - .photo_url(rs.getString("photo_url")) + .id(rs.getString("gd_id")) + .residentship(rs.getString("gd_residentship")) + .adharno(rs.getString("gd_adharno")) + .passportno(rs.getString("gd_passportno")) + .socialsecurityno(rs.getString("gd_socialsecurityno")) + .fathername_en(rs.getString("gd_firstname_en")) + .fathername_mal(rs.getString("gd_firstname_mal")) + .middlename_en(rs.getString("gd_middlename_en")) + .middlename_mal(rs.getString("gd_middlename_mal")) + .lastname_en(rs.getString("gd_lastname_en")) + .lastname_mal(rs.getString("gd_lastname_mal")) + .mobile(rs.getString("gd_mobile")) + .emailid(rs.getString("gd_emailid")) + .gender(rs.getString("gd_gender")) + .dateofbirth(rs.getLong("gd_dateofbirth")) + .age(rs.getInt("gd_age")) + .parent_guardian(rs.getString("gd_parent_guardian")) + .fathername_en(rs.getString("gd_fathername_en")) + .fathername_mal(rs.getString("gd_fathername_mal")) + .mothername_en(rs.getString("gd_mothername_en")) + .mothername_mal(rs.getString("gd_mothername_mal")) + .father_adharno(rs.getString("gd_father_adharno")) + .mother_adharno(rs.getString("gd_mother_adharno")) + .guardianname_en(rs.getString("gd_guardianname_en")) + .guardianname_mal(rs.getString("gd_guardianname_mal")) + .guardian_adhar(rs.getString("gd_guardian_adhar")) + .profession_en(rs.getString("gd_profession_en")) + .profession_mal(rs.getString("gd_profession_mal")) + .maritalstatusid(rs.getString("gd_maritalstatusid")) + .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) + .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) + .marriageid(rs.getString("gd_marriageid")) + .photo_url(rs.getString("gd_photo_url")) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 1a499922845..d90df1f1de8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -61,10 +61,10 @@ public List extractData(ResultSet rs) throws SQLExcep .marriageReligiousInstitutionOtherNameEn(rs.getString("ma_religious_institution_othername_en")) .marriageReligiousInstitutionOtherNameMal(rs.getString("ma_religious_institution_othername_ml")) .brideDetails(getBrideDetails(rs)) -// .groomDetails(getgroomDetails(rs)) -// .permanent(getPermanentAddress(rs)) -// .present(getPresentAddress(rs)) -// .witness(getWitnessDetails(rs)) + .groomDetails(getgroomDetails(rs)) + .permanent(getPermanentAddress(rs)) + .present(getPresentAddress(rs)) + .witness(getWitnessDetails(rs)) .auditDetails(getAuditDetails(rs)) .build()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java index 0b41d8730fb..68988f17df2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java @@ -9,26 +9,26 @@ public interface PermanentAddressRowMapper { default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ return PermanentAdressDetails.builder() - .id(rs.getString("id")) - .houseno(rs.getString("houseno")) - .housename_no_en(rs.getString("housename_no_en")) - .housename_no_ml(rs.getString("housename_no_ml")) - .villageid(rs.getString("villageid")) - .village_name(rs.getString("village_name")) - .talukid(rs.getString("talukid")) - .taluk_name(rs.getString("taluk_name")) - .ward_code(rs.getString("ward_code")) - .doorno(rs.getInt("doorno")) - .locality_en(rs.getString("locality_en")) - .locality_ml(rs.getString("locality_ml")) - .street_name_en(rs.getString("street_name_en")) - .street_name_ml(rs.getString("street_name_ml")) - .districtid(rs.getString("districtid")) - .stateid(rs.getString("stateid")) - .poid(rs.getString("poid")) - .pinno(rs.getString("pinno")) - .countryid(rs.getString("countryid")) - .marriageid(rs.getString("marriageid")) + .id(rs.getString("per_id")) + .houseno(rs.getString("per_houseno")) + .housename_no_en(rs.getString("per_housename_no_en")) + .housename_no_ml(rs.getString("per_housename_no_ml")) + .villageid(rs.getString("per_villageid")) + .village_name(rs.getString("per_village_name")) + .talukid(rs.getString("per_talukid")) + .taluk_name(rs.getString("per_taluk_name")) + .ward_code(rs.getString("per_ward_code")) + .doorno(rs.getInt("per_doorno")) + .locality_en(rs.getString("per_locality_en")) + .locality_ml(rs.getString("per_locality_ml")) + .street_name_en(rs.getString("per_street_name_en")) + .street_name_ml(rs.getString("per_street_name_ml")) + .districtid(rs.getString("per_districtid")) + .stateid(rs.getString("per_stateid")) + .poid(rs.getString("per_poid")) + .pinno(rs.getString("per_pinno")) + .countryid(rs.getString("per_countryid")) + .marriageid(rs.getString("per_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java index 11ccf59d2f0..7f561f6ad0c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java @@ -10,25 +10,25 @@ public interface PresentAddressRowMapper { default PresentAddressDetails getPresentAddress (ResultSet rs) throws SQLException{ return PresentAddressDetails.builder() - .id(rs.getString("id")) - .houseno(rs.getString("houseno")) - .housename_no_en(rs.getString("housename_no_en")) - .housename_no_ml(rs.getString("housename_no_ml")) - .villageid(rs.getString("villageid")) - .village_name(rs.getString("village_name")) - .talukid(rs.getString("talukid")) - .taluk_name(rs.getString("taluk_name")) - .ward_code(rs.getString("ward_code")) - .doorno(rs.getInt("doorno")) - .locality_en(rs.getString("locality_en")) - .locality_ml(rs.getString("locality_ml")) - .street_name_en(rs.getString("street_name_en")) - .street_name_ml(rs.getString("street_name_ml")) - .districtid(rs.getString("districtid")) - .stateid(rs.getString("stateid")) - .poid(rs.getString("poid")) - .pinno(rs.getString("pinno")) - .countryid(rs.getString("countryid")) - .marriageid(rs.getString("marriageid")) .build(); + .id(rs.getString("pes_id")) + .houseno(rs.getString("pes_houseno")) + .housename_no_en(rs.getString("pes_housename_no_en")) + .housename_no_ml(rs.getString("pes_housename_no_ml")) + .villageid(rs.getString("pes_villageid")) + .village_name(rs.getString("pes_village_name")) + .talukid(rs.getString("pes_talukid")) + .taluk_name(rs.getString("pes_taluk_name")) + .ward_code(rs.getString("pes_ward_code")) + .doorno(rs.getInt("pes_doorno")) + .locality_en(rs.getString("pes_locality_en")) + .locality_ml(rs.getString("pes_locality_ml")) + .street_name_en(rs.getString("pes_street_name_en")) + .street_name_ml(rs.getString("pes_street_name_ml")) + .districtid(rs.getString("pes_districtid")) + .stateid(rs.getString("pes_stateid")) + .poid(rs.getString("pes_poid")) + .pinno(rs.getString("pes_pinno")) + .countryid(rs.getString("pes_countryid")) + .marriageid(rs.getString("pes_marriageid")) .build(); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index e709bea7765..8c3bc921b8e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -9,26 +9,26 @@ public interface WitnessDetailsRowMapper { default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { return WitnessDetails.builder() - .id(rs.getString("id")) - .adharno(rs.getString("adharno")) - .name_en(rs.getString("name_en")) - .name_mal(rs.getString("name_mal")) - .age(rs.getInt("age")) - .address_en(rs.getString("address_en")) - .address_mal(rs.getString("address_mal")) - .mobile(rs.getString("mobile")) - .is_message_received(Boolean.valueOf(rs.getString("is_message_received"))) - .is_esigned(Boolean.valueOf(rs.getString("is_esigned"))) - .marriageid(rs.getString("marriageid")) - .w2Adharno(rs.getString("w2_adharno")) - .w2Age(Integer.valueOf(rs.getString("w2_age"))) - .w2Name_en(rs.getString("w2_name_en")) - .w2Address_mal(rs.getString("w2_name_mal")) - .w2Address_en(rs.getString("w2_address_en")) - .w2Name_mal(rs.getString("w2_address_mal")) - .w2Mobile(rs.getString("w2_mobile")) - .w2Is_esigned(Boolean.valueOf(rs.getString("w2_is_esigned"))) - .w2Is_message_received(Boolean.valueOf(rs.getString("w2_is_message_received"))) + .id(rs.getString("wd_id")) + .adharno(rs.getString("wd_adharno")) + .name_en(rs.getString("wd_name_en")) + .name_mal(rs.getString("wd_name_mal")) + .age(rs.getInt("wd_age")) + .address_en(rs.getString("wd_address_en")) + .address_mal(rs.getString("wd_address_mal")) + .mobile(rs.getString("wd_mobile")) + .is_message_received(Boolean.valueOf(rs.getString("wd_is_message_received"))) + .is_esigned(Boolean.valueOf(rs.getString("wd_is_esigned"))) + .marriageid(rs.getString("wd_marriageid")) + .w2Adharno(rs.getString("wd_w2_adharno")) + .w2Age(Integer.valueOf(rs.getString("wd_w2_age"))) + .w2Name_en(rs.getString("wd_w2_name_en")) + .w2Address_mal(rs.getString("wd_w2_name_mal")) + .w2Address_en(rs.getString("wd_w2_address_en")) + .w2Name_mal(rs.getString("wd_w2_address_mal")) + .w2Mobile(rs.getString("wd_w2_mobile")) + .w2Is_esigned(Boolean.valueOf(rs.getString("wd_w2_is_esigned"))) + .w2Is_message_received(Boolean.valueOf(rs.getString("wd_w2_is_message_received"))) .build(); } From 73659d901901bec15aa7184fd4a6899f75e078c2 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 18 Mar 2023 10:34:26 +0530 Subject: [PATCH 029/420] search --- .../marriage/MarriageApplicationSearchCriteria.java | 11 ++++++++++- .../querybuilder/MarriageApplicationQueryBuilder.java | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java index a39865f0d5d..5e5a21cf704 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java @@ -22,11 +22,20 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("applicationNo") private String applicationNo; + + @JsonProperty("registrationNo") + private String registrationNo; + + @JsonProperty("fileNo") + private String fileNo; @JsonProperty("sortBy") private SortBy sortBy; public enum SortBy { applicationNumber, - tenantId + tenantId, + registrationNo, + fileNo + } @JsonProperty("sortOrder") private SortOrder sortOrder; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 4f66299a490..156ecb5648d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -58,6 +58,9 @@ public String getBirthApplicationSearchQuery(@NotNull MarriageApplicationSearchC addFilter("mrg.id", criteria.getId(), query, preparedStmtValues); addFilter("mrg.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("mrg.applicationno", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("mrg.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + addFilter("mrg.fileno", criteria.getFileNo(),query,preparedStmtValues); + if (StringUtils.isEmpty(criteria.getSortBy())) addOrderByColumns("mrg.createdtime",null, orderBy); @@ -65,6 +68,10 @@ else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenant addOrderByColumns("mrg.tenantid",criteria.getSortOrder(), orderBy); else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.applicationNumber) addOrderByColumns("mrg.applicationno",criteria.getSortOrder(),orderBy); + else if (criteria.getSortBy()== MarriageApplicationSearchCriteria.SortBy.registrationNo) + addOrderByColumns("mrg.registrationno",criteria.getSortOrder(),orderBy); + else if (criteria.getSortBy()== MarriageApplicationSearchCriteria.SortBy.fileNo) + addOrderByColumns("mrg.fileno",criteria.getSortOrder(),orderBy); return query.toString(); } public String getNextIDQuery() { From 6a07ade13af27822818110d769e69ce6acf71a11 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 20 Mar 2023 13:43:52 +0530 Subject: [PATCH 030/420] Register migration Added --- .../src/main/resources/marriage.yml | 13 +- .../enrichment/MarriageDetailsEnrichment.java | 5 + .../marriage/PermanentAdressDetails.java | 4 + .../model/marriage/PresentAddressDetails.java | 5 + .../MarriageApplicationQueryBuilder.java | 4 +- .../rowmapper/PresentAddressRowMapper.java | 3 +- ...V20232010541214__marriage_services_ddl.sql | 13 + ...V20232012561412__marriage_services_ddl.sql | 323 ++++++++++++++++++ 8 files changed, 363 insertions(+), 7 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232010541214__marriage_services_ddl.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 4de1edd4f8b..5cd8e701ee0 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -276,8 +276,8 @@ serviceMaps: - query : INSERT INTO public.eg_marriage_permanent_address_details( id, houseno, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, doorno, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, - pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby , bride_groom) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.PermanentAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id @@ -328,12 +328,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.brideGroom + + - query: INSERT INTO public.eg_marriage_present_address_details( id, houseno, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, doorno, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, - poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby , bride_groom) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.PresentAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.PresentAddressDetails.id @@ -384,6 +387,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.brideGroom + - query : INSERT INTO public.eg_marriage_witness_details( id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_message_received, is_esigned, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index e5900bb2e52..4e4290b7f73 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -46,9 +46,14 @@ public void enrichCreate(MarriageDetailsRequest request) { } if(marriage.getPermanent()!=null){ marriage.getPermanent().setId(UUID.randomUUID().toString()); + marriage.getPermanent().setBrideGroom("BRIDE"); + marriage.getPermanent().setBrideGroom("GROOM"); + } if(marriage.getPresent()!=null){ marriage.getPresent().setId(UUID.randomUUID().toString()); + marriage.getPresent().setBrideGroom("BRIDE"); + marriage.getPresent().setBrideGroom("GROOM"); } if(marriage.getWitness()!=null){ marriage.getWitness().setId(UUID.randomUUID().toString()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java index 964732632aa..4964bacac75 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java @@ -96,6 +96,10 @@ public class PermanentAdressDetails { @Size(max = 64) @JsonProperty("marriageid") private String marriageid; + @NotNull + @Size(max = 64) + @JsonProperty("brideGroom") + private String brideGroom; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java index 06bd7f7f00b..6e47278f4ab 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java @@ -99,4 +99,9 @@ public class PresentAddressDetails { @JsonProperty("marriageid") private String marriageid; + @NotNull + @Size(max = 64) + @JsonProperty("brideGroom") + private String brideGroom; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 156ecb5648d..4f355634934 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -68,9 +68,9 @@ else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenant addOrderByColumns("mrg.tenantid",criteria.getSortOrder(), orderBy); else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.applicationNumber) addOrderByColumns("mrg.applicationno",criteria.getSortOrder(),orderBy); - else if (criteria.getSortBy()== MarriageApplicationSearchCriteria.SortBy.registrationNo) + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.registrationNo) addOrderByColumns("mrg.registrationno",criteria.getSortOrder(),orderBy); - else if (criteria.getSortBy()== MarriageApplicationSearchCriteria.SortBy.fileNo) + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.fileNo) addOrderByColumns("mrg.fileno",criteria.getSortOrder(),orderBy); return query.toString(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java index 7f561f6ad0c..ea83e6932d3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java @@ -29,6 +29,7 @@ default PresentAddressDetails getPresentAddress (ResultSet rs) throws SQLExcepti .poid(rs.getString("pes_poid")) .pinno(rs.getString("pes_pinno")) .countryid(rs.getString("pes_countryid")) - .marriageid(rs.getString("pes_marriageid")) .build(); + .marriageid(rs.getString("pes_marriageid")) + .build(); } } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232010541214__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232010541214__marriage_services_ddl.sql new file mode 100644 index 00000000000..088823f78ac --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232010541214__marriage_services_ddl.sql @@ -0,0 +1,13 @@ +ALTER TABLE public.eg_marriage_permanent_address_details +ADD COLUMN bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL; + +ALTER TABLE public.eg_marriage_permanent_address_details_audit +ADD COLUMN bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL; + + + +ALTER TABLE public.eg_marriage_present_address_details +ADD COLUMN bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL; + +ALTER TABLE public.eg_marriage_present_address_details_audit +ADD COLUMN bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql new file mode 100644 index 00000000000..b5446ed9735 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql @@ -0,0 +1,323 @@ +-- Table: public.eg_register_marriage_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeothers character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + placename_mal character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + othersspecify character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + fileno character varying(64) COLLATE pg_catalog."default", + file_date bigint, + file_status character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", + houseno_and_nameml character varying(2500) COLLATE pg_catalog."default", + religious_institution character varying(1000) COLLATE pg_catalog."default", + public_or_privateplace character varying(1000) COLLATE pg_catalog."default", + public_or_privateplacennameplace_en character varying(2500) COLLATE pg_catalog."default", + public_or_privateplacennameplace_ml character varying(2500) COLLATE pg_catalog."default", + religious_institution_other character varying(1000) COLLATE pg_catalog."default", + religious_institution_othername_en character varying(2500) COLLATE pg_catalog."default", + religious_institution_othername_ml character varying(2500) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_register_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), + CONSTRAINT eg_register_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) +) + +TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_details + OWNER to postgres; +-- Index: idx_eg_register_marriage_details_tenantid + +-- DROP INDEX IF EXISTS public.idx_eg_register_marriage_details_tenantid; + +CREATE INDEX IF NOT EXISTS idx_eg_register_marriage_details_tenantid + ON public.eg_register_marriage_details USING btree + (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) + TABLESPACE pg_default; + + + + +-- Table: public.eg_register_marriage_bride_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_bride_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) + +TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_bride_details + OWNER to postgres; + + + +-- Table: public.eg_register_marriage_groom_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_groom_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + profession_en character varying(200) COLLATE pg_catalog."default", + profession_mal character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_groom_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_groom_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) + +TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_groom_details + OWNER to postgres; + + + + +-- Table: public.eg_register_marriage_permanent_address_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) + +TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details + OWNER to postgres; + + + + + +-- Table: public.eg_register_marriage_present_address_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + houseno character varying(200) COLLATE pg_catalog."default", + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + doorno integer, + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) + +TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details + OWNER to postgres; + + + + +-- Table: public.eg_register_marriage_witness_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_message_received boolean, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + w2_adharno character varying(15) COLLATE pg_catalog."default", + w2_name_en character varying(200) COLLATE pg_catalog."default", + w2_name_mal character varying(200) COLLATE pg_catalog."default", + w2_age integer, + w2_address_en character varying(200) COLLATE pg_catalog."default", + w2_address_mal character varying(200) COLLATE pg_catalog."default", + w2_mobile character varying(150) COLLATE pg_catalog."default", + w2_is_message_received boolean, + w2_is_esigned boolean, + CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +) + +TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details + OWNER to postgres; \ No newline at end of file From b0f57437a94e40bd574caa772567d8dba24151e1 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 20 Mar 2023 16:51:07 +0530 Subject: [PATCH 031/420] Register migration Added --- .../src/main/resources/marriage.yml | 3 + ...V20232012561412__marriage_services_ddl.sql | 255 +++++++++--------- 2 files changed, 125 insertions(+), 133 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 5cd8e701ee0..d0e998ed079 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -877,3 +877,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISEsigned - jsonPath: $.MarriageDetails.*.id + + + diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql index b5446ed9735..ccf5a9ba74e 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql @@ -11,49 +11,33 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details lbtype character varying(64) COLLATE pg_catalog."default", tenantid character varying(64) COLLATE pg_catalog."default", placetype character varying(64) COLLATE pg_catalog."default", - placeothers character varying(64) COLLATE pg_catalog."default", - placeid character varying(1000) COLLATE pg_catalog."default", + placeid character varying(64) COLLATE pg_catalog."default", placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + housenameno_en character varying(1000) COLLATE pg_catalog."default", + housenameno_ml character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", street_name_en character varying(1000) COLLATE pg_catalog."default", street_name_ml character varying(1000) COLLATE pg_catalog."default", - placename_mal character varying(1000) COLLATE pg_catalog."default", ward_code character varying(64) COLLATE pg_catalog."default", talukid character varying(64) COLLATE pg_catalog."default", village_name character varying(64) COLLATE pg_catalog."default", marriage_type character varying(64) COLLATE pg_catalog."default", oth_marriage_type character varying(200) COLLATE pg_catalog."default", landmark character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - othersspecify character varying(1000) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - fileno character varying(64) COLLATE pg_catalog."default", - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default", - applicationnumber character varying(64) COLLATE pg_catalog."default", registrationno character varying(64) COLLATE pg_catalog."default", registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", + registrtion_status character varying(64) COLLATE pg_catalog."default", createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", - houseno_and_nameml character varying(2500) COLLATE pg_catalog."default", - religious_institution character varying(1000) COLLATE pg_catalog."default", - public_or_privateplace character varying(1000) COLLATE pg_catalog."default", - public_or_privateplacennameplace_en character varying(2500) COLLATE pg_catalog."default", - public_or_privateplacennameplace_ml character varying(2500) COLLATE pg_catalog."default", - religious_institution_other character varying(1000) COLLATE pg_catalog."default", - religious_institution_othername_en character varying(2500) COLLATE pg_catalog."default", - religious_institution_othername_ml character varying(2500) COLLATE pg_catalog."default", + ack_no character varying(64) COLLATE pg_catalog."default", + is_migrated boolean, + migrated_date bigint, CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), - CONSTRAINT eg_register_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), - CONSTRAINT eg_register_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) + CONSTRAINT eg_register_marriage_place_details_ack_no_fkey UNIQUE (ack_no) ) TABLESPACE pg_default; @@ -76,7 +60,7 @@ CREATE INDEX IF NOT EXISTS idx_eg_register_marriage_details_tenantid -- DROP TABLE IF EXISTS public.eg_register_marriage_bride_details; -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_details +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details ( id character varying(64) COLLATE pg_catalog."default" NOT NULL, residentship character varying(64) COLLATE pg_catalog."default", @@ -84,11 +68,11 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_details passportno character varying(1000) COLLATE pg_catalog."default", socialsecurityno character varying(64) COLLATE pg_catalog."default", firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", mobile character varying(150) COLLATE pg_catalog."default", emailid character varying(300) COLLATE pg_catalog."default", gender character varying(20) COLLATE pg_catalog."default", @@ -96,21 +80,19 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_details age integer, parent_guardian character varying(64) COLLATE pg_catalog."default", fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", father_adharno character varying(15) COLLATE pg_catalog."default", mother_adharno character varying(15) COLLATE pg_catalog."default", guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, no_of_spouse_living boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, @@ -128,65 +110,6 @@ ALTER TABLE IF EXISTS public.eg_register_marriage_bride_details OWNER to postgres; - --- Table: public.eg_register_marriage_groom_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_groom_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_groom_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_groom_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_groom_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -) - -TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_register_marriage_groom_details - OWNER to postgres; - - - - -- Table: public.eg_register_marriage_permanent_address_details -- DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; @@ -194,15 +117,14 @@ ALTER TABLE IF EXISTS public.eg_register_marriage_groom_details CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details ( id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", villageid character varying(64) COLLATE pg_catalog."default", village_name character varying(1000) COLLATE pg_catalog."default", talukid character varying(64) COLLATE pg_catalog."default", taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, locality_en character varying(1000) COLLATE pg_catalog."default", locality_ml character varying(1000) COLLATE pg_catalog."default", street_name_en character varying(2000) COLLATE pg_catalog."default", @@ -210,14 +132,17 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details districtid character varying(64) COLLATE pg_catalog."default", stateid character varying(64) COLLATE pg_catalog."default", poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", pinno character varying(10) COLLATE pg_catalog."default", countryid character varying(64) COLLATE pg_catalog."default", marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE @@ -240,31 +165,34 @@ ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + same_as_permanent boolean, createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE @@ -297,19 +225,11 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details is_message_received boolean, is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - w2_adharno character varying(15) COLLATE pg_catalog."default", - w2_name_en character varying(200) COLLATE pg_catalog."default", - w2_name_mal character varying(200) COLLATE pg_catalog."default", - w2_age integer, - w2_address_en character varying(200) COLLATE pg_catalog."default", - w2_address_mal character varying(200) COLLATE pg_catalog."default", - w2_mobile character varying(150) COLLATE pg_catalog."default", - w2_is_message_received boolean, - w2_is_esigned boolean, CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE @@ -320,4 +240,73 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details TABLESPACE pg_default; ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details - OWNER to postgres; \ No newline at end of file + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + registrationno character varying(25) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + filestoreid character varying(256) COLLATE pg_catalog."default", + status character varying(25) COLLATE pg_catalog."default", + additionaldetail jsonb, + embeddedurl character varying(64) COLLATE pg_catalog."default", + dateofissue bigint, + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_certificate_request_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_certificate_request_fkey FOREIGN KEY (registrydetailsid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE CASCADE + ON DELETE CASCADE +); + +ALTER TABLE IF EXISTS public.eg_marriage_certificate + OWNER to postgres; + + + CREATE TABLE eg_register_marriage_document( + id character varying(128), + tenantid character varying(128), + document_name character varying(128), + document_type character varying(128), + document_description character varying(140), + filestoreid character varying(1024), + document_link character varying(1024), + file_type character varying(20), + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id), + CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid,document_type,document_name,marriageid,bride_groom,active) + ); + + CREATE TABLE eg_register_marriage_document_audit( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(128), + tenantid character varying(128), + document_name character varying(128), + document_type character varying(128), + document_description character varying(140), + filestoreid character varying(1024), + document_link character varying(1024), + file_type character varying(20), + file_size bigint, + document_uuid character varying(128), + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint + ); \ No newline at end of file From 0060a5fc791658712cddebae8509bb3a6b100a7b Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 21 Mar 2023 13:35:59 +0530 Subject: [PATCH 032/420] migration --- .../src/main/resources/marriage.yml | 247 ++---------------- ...V20232110351412__marriage_services_ddl.sql | 103 ++++++++ 2 files changed, 121 insertions(+), 229 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index d0e998ed079..004f843daf5 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -7,13 +7,11 @@ serviceMaps: isTransaction: true queryMaps: - query: INSERT INTO public.eg_marriage_details( - id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeothers, placeid, placename_en, street_name_en, - street_name_ml, placename_mal, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, - othersspecify, applicationtype, businessservice, workflowcode, fileno, file_date, file_status, applicationnumber, registrationno, - registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby, houseno_and_nameen, houseno_and_nameml, - religious_institution, public_or_privateplace, public_or_privateplacennameplace_en, public_or_privateplacennameplace_ml, - religious_institution_other, religious_institution_othername_en, religious_institution_othername_ml) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, street_name_en, + street_name_ml, placename_mal, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, + locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationno, registration_date, action, status, + createdtime, createdby, lastmodifiedtime, lastmodifiedby, houseno_and_nameen, houseno_and_nameml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -30,8 +28,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriagePlacetype - - jsonPath: $.MarriageDetails.*.marriagePlaceothers - - jsonPath: $.MarriageDetails.*.placeid - jsonPath: $.MarriageDetails.*.marriagePlacenameEn @@ -58,20 +54,12 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageLocalityMal - - jsonPath: $.MarriageDetails.*.marriageOthersSpecify - - jsonPath: $.MarriageDetails.*.applicationType - jsonPath: $.MarriageDetails.*.businessService - jsonPath: $.MarriageDetails.*.workflowCode - - jsonPath: $.MarriageDetails.*.fileNo - - - jsonPath: $.MarriageDetails.*.fileDate - - - jsonPath: $.MarriageDetails.*.fileStatus - - jsonPath: $.MarriageDetails.*.applicationnumber - jsonPath: $.MarriageDetails.*.registrationno @@ -94,27 +82,14 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal - - jsonPath: $.MarriageDetails.*.marriageReligiousInstitution - - - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivatePlace - - - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivateNamePlaceEn - - - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivateNamePlaceMal - - - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOther - - - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOtherNameEn - - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOtherNameMal - - - query: INSERT INTO public.eg_marriage_bride_details( - id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, - lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, - father_adharno, mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, profession_en, profession_mal, maritalstatusid, - is_spouse_living, no_of_spouse_living, marriageid, photo_url, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + - query: INSERT INTO public.eg_marriage_bride_groom_details( + id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, + lastname_en, lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, + mothername_mal, father_adharno, mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, maritalstatusid, no_of_spouse_living, + marriageid, photo_url, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.id @@ -169,14 +144,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideGardianAdhar - - jsonPath: $.MarriageDetails.*.BrideDetails.brideProfessionEn - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideProfessionMal - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID - - jsonPath: $.MarriageDetails.*.BrideDetails.brideSpouseLiving - - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse - jsonPath: $.MarriageDetails.*.id @@ -191,12 +160,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - query : INSERT INTO public.eg_marriage_groom_details( - id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, - lastname_en, lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, - mothername_mal, father_adharno, mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, profession_en, profession_mal, - maritalstatusid, is_spouse_living, no_of_spouse_living, marriageid, photo_url, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + - query: INSERT INTO public.eg_marriage_bride_groom_details( + id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, + lastname_en, lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, + mothername_mal, father_adharno, mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, maritalstatusid, no_of_spouse_living, + marriageid, photo_url, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.id @@ -251,14 +221,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomGardianAdhar - - jsonPath: $.MarriageDetails.*.GroomDetails.groomProfessionEn - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomProfessionMal - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID - - jsonPath: $.MarriageDetails.*.GroomDetails.groomSpouseLiving - - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse - jsonPath: $.MarriageDetails.*.id @@ -273,181 +237,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - query : INSERT INTO public.eg_marriage_permanent_address_details( - id, houseno, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, - ward_code, doorno, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, - pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby , bride_groom) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.PermanentAddressDetails - jsonMaps: - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNo - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEn - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMal - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageId - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageName - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukID - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukName - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCode - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDoorNO - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEn - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMal - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEn - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMal - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictId - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateId - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOid - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPin - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryId - - - jsonPath: $.MarriageDetails.*.id - - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.brideGroom - - - - - query: INSERT INTO public.eg_marriage_present_address_details( - id, houseno, housename_no_en, housename_no_ml, villageid, village_name, - talukid, taluk_name, ward_code, doorno, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, - poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby , bride_groom) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.PresentAddressDetails - jsonMaps: - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.id - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNo - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageName - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukID - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukName - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentWardCode - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDoorNO - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDistrictId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStateId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPOid - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPin - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentCountryId - - - jsonPath: $.MarriageDetails.*.id - - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.brideGroom - - - - query : INSERT INTO public.eg_marriage_witness_details( - id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_message_received, is_esigned, - marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, w2_adharno, w2_name_en, w2_name_mal, w2_age, w2_address_en, - w2_address_mal, w2_mobile, w2_is_message_received, w2_is_esigned) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.WitnessDetail - jsonMaps: - - - jsonPath: $.MarriageDetails.*.WitnessDetail.id - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AdharNo - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameEn - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameMal - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Age - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddresSEn - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddressMal - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Mobile - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISmessageReceived - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISEsigned - - - jsonPath: $.MarriageDetails.*.id - - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AdharNo - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameEn - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameMal - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Age - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddresSEn - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddressMal - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Mobile - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISmessageReceived - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISEsigned - - - diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql new file mode 100644 index 00000000000..b999d3b9504 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql @@ -0,0 +1,103 @@ +ALTER TABLE IF EXISTS public.eg_marriage_bride_details +RENAME TO eg_marriage_bride_groom_details; + +ALTER TABLE IF EXISTS public.eg_marriage_bride_details_audit +RENAME TO eg_marriage_bride_groom_details_audit; + +DROP TABLE public.eg_marriage_groom_details; +DROP TABLE public.eg_marriage_groom_details_audit; + +ALTER TABLE public.eg_marriage_details +DROP COLUMN public_or_privateplace, +DROP COLUMN public_or_privateplacennameplace_en, +DROP COLUMN public_or_privateplacennameplace_ml, +DROP COLUMN religious_institution_other, +DROP COLUMN religious_institution_othername_en, +DROP COLUMN religious_institution_othername_ml, +DROP COLUMN religious_institution, +DROP COLUMN fileno, +DROP COLUMN file_date, +DROP COLUMN file_status, +DROP COLUMN othersspecify, +DROP COLUMN placeothers; + +ALTER TABLE public.eg_marriage_details_audit +DROP COLUMN public_or_privateplace, +DROP COLUMN public_or_privateplacennameplace_en, +DROP COLUMN public_or_privateplacennameplace_ml, +DROP COLUMN religious_institution_other, +DROP COLUMN religious_institution_othername_en, +DROP COLUMN religious_institution_othername_ml, +DROP COLUMN religious_institution, +DROP COLUMN fileno, +DROP COLUMN file_date, +DROP COLUMN file_status, +DROP COLUMN othersspecify, +DROP COLUMN placeothers; + +ALTER TABLE public.eg_marriage_bride_groom_details +DROP COLUMN profession_en, +DROP COLUMN profession_mal, +DROP COLUMN is_spouse_living; + + +ALTER TABLE public.eg_marriage_bride_groom_details_audit +DROP COLUMN profession_en, +DROP COLUMN profession_mal, +DROP COLUMN is_spouse_living; + +ALTER TABLE public.eg_marriage_present_address_details +ADD COLUMN same_as_permanent boolean, +ADD COLUMN tenantid character varying(64) COLLATE pg_catalog."default", +DROP COLUMN houseno, +DROP COLUMN doorno; + +ALTER TABLE public.eg_marriage_present_address_details_audit +ADD COLUMN same_as_permanent boolean, +ADD COLUMN tenantid character varying(64) COLLATE pg_catalog."default", +DROP COLUMN houseno, +DROP COLUMN doorno; + + +ALTER TABLE public.eg_marriage_permanent_address_details +ADD COLUMN tenantid character varying(64) COLLATE pg_catalog."default", +DROP COLUMN houseno, +DROP COLUMN doorno; + +ALTER TABLE public.eg_marriage_permanent_address_details_audit +ADD COLUMN tenantid character varying(64) COLLATE pg_catalog."default", +DROP COLUMN houseno, +DROP COLUMN doorno; + +ALTER TABLE public.eg_marriage_witness_details +ADD COLUMN serial_no bigint, +DROP COLUMN w2_adharno, +DROP COLUMN w2_name_en, +DROP COLUMN w2_name_mal, +DROP COLUMN w2_age, +DROP COLUMN w2_address_en, +DROP COLUMN w2_address_mal, +DROP COLUMN w2_mobile, +DROP COLUMN w2_is_message_received, +DROP COLUMN w2_is_esigned, +DROP COLUMN is_message_received; + + + +ALTER TABLE public.eg_marriage_witness_details_audit +ADD COLUMN serial_no bigint, +DROP COLUMN w2_adharno, +DROP COLUMN w2_name_en, +DROP COLUMN w2_name_mal, +DROP COLUMN w2_age, +DROP COLUMN w2_address_en, +DROP COLUMN w2_address_mal, +DROP COLUMN w2_mobile, +DROP COLUMN w2_is_message_received, +DROP COLUMN w2_is_esigned, +DROP COLUMN is_message_received; + + +ALTER TABLE public.eg_register_marriage_witness_details +ADD COLUMN serial_no bigint, +DROP COLUMN is_message_received; From c2ee2f2b4e952a53f67163ef01284c03d240cfbe Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 21 Mar 2023 14:05:54 +0530 Subject: [PATCH 033/420] migration --- .../src/main/resources/marriage.yml | 121 ++++++++++++++++++ .../marriage/PermanentAdressDetails.java | 8 ++ .../model/marriage/PresentAddressDetails.java | 8 ++ ...V20232113511412__marriage_services_ddl.sql | 15 +++ 4 files changed, 152 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232113511412__marriage_services_ddl.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 004f843daf5..a1feb259567 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -237,6 +237,127 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - query : INSERT INTO public.eg_marriage_permanent_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid , poname_en) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.PermanentAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageName + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukID + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukName + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCode + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEn + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMal + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateId + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOid + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPin + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryId + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.brideGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.marriageTenantid + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.poname_en + + + - query: INSERT INTO public.eg_marriage_present_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, + lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.PresentAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.id + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageName + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukID + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukName + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentWardCode + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameEn + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameMal + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDistrictId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStateId + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPOid + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPin + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentCountryId + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.brideGroom + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.same_as_permanent + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.marriageTenantid + + - jsonPath: $.MarriageDetails.*.PresentAddressDetails.poname_en + + + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java index 4964bacac75..dc4c4b58c7d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java @@ -100,6 +100,14 @@ public class PermanentAdressDetails { @Size(max = 64) @JsonProperty("brideGroom") private String brideGroom; + @Size(max = 64) + @JsonProperty("marriageTenantid") + private String tenantid; + @Size(max = 64) + @JsonProperty("poname_en") + private String poname_en; + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java index 6e47278f4ab..93c1674c181 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java @@ -103,5 +103,13 @@ public class PresentAddressDetails { @Size(max = 64) @JsonProperty("brideGroom") private String brideGroom; + @Size(max = 64) + @JsonProperty("marriageTenantid") + private String tenantid; + @Size(max = 64) + @JsonProperty("poname_en") + private String poname_en; + @JsonProperty("same_as_permanent") + private Boolean same_as_permanent; } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232113511412__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232113511412__marriage_services_ddl.sql new file mode 100644 index 00000000000..d089cbfdaa1 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232113511412__marriage_services_ddl.sql @@ -0,0 +1,15 @@ +ALTER TABLE public.eg_marriage_present_address_details +ADD COLUMN poname_en character varying(64) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_marriage_present_address_details_audit +ADD COLUMN poname_en character varying(64) COLLATE pg_catalog."default"; + + + +ALTER TABLE public.eg_marriage_permanent_address_details +ADD COLUMN poname_en character varying(64) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_marriage_permanent_address_details_audit +ADD COLUMN poname_en character varying(64) COLLATE pg_catalog."default"; From 5ca32711e87b9a7c327dd357e6ac6bae35019aea Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 22 Mar 2023 13:25:33 +0530 Subject: [PATCH 034/420] migration --- .../src/main/resources/marriage.yml | 168 ++++++++++++++-- .../enrichment/MarriageDetailsEnrichment.java | 20 +- .../model/MarriageApplicationDetail.java | 7 +- .../model/marriage/GroomDetails.java | 2 - .../marriage/PermanentAdressDetails.java | 188 +++++++++++++----- .../model/marriage/WitnessDetails.java | 52 +++-- .../MarriageApplicationRowMapper.java | 2 +- .../rowmapper/PermanentAddressRowMapper.java | 42 ++-- .../rowmapper/PresentAddressRowMapper.java | 1 - .../rowmapper/WitnessDetailsRowMapper.java | 12 +- ...V20232110351412__marriage_services_ddl.sql | 6 +- ...20232213101322__marriage_services_ddl.sql} | 57 +++--- 12 files changed, 380 insertions(+), 177 deletions(-) rename municipal-services/marriage-services/src/main/resources/db/migration/main/{V20232012561412__marriage_services_ddl.sql => V20232213101322__marriage_services_ddl.sql} (95%) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index a1feb259567..ec3ff3dbd50 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -244,39 +244,39 @@ serviceMaps: VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.PermanentAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id1 - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEn + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEnBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMal + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMalBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageId + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageIdBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageName + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageNameBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukID + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukIDBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukName + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukNameBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCode + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCodeBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEn + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEnBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMal + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMalBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEn + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEnBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMal + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMalBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictId + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictIdBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateId + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateIdBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOid + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOidBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPin + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPinBride - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryId + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryIdBride - jsonPath: $.MarriageDetails.*.id @@ -288,11 +288,72 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.brideGroom + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.brideGroom1 + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.marriageTenantidBride + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.ponameEnBride + + + - query: INSERT INTO public.eg_marriage_permanent_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid , poname_en) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.PermanentAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id2 + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEnGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMalGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageIdGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageNameGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukIDGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukNameGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCodeGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEnGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMalGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEnGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMalGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictIdGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateIdGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOidGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPinGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryIdGroom + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.brideGroom2 + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.marriageTenantidGroom + + - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.ponameEnGroom + - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.marriageTenantid - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.poname_en - query: INSERT INTO public.eg_marriage_present_address_details( @@ -354,11 +415,78 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.PresentAddressDetails.poname_en + - query: INSERT INTO public.eg_marriage_witness_details( + id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, serial_no) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.WitnessDetail + jsonMaps: + + - jsonPath: $.MarriageDetails.*.WitnessDetail.id1 + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameEn + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Age + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddresSEn + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddressMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Mobile + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISEsigned + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.WitnessDetail.serial_no1 + + - query: INSERT INTO public.eg_marriage_witness_details( + id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, serial_no) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.WitnessDetail + jsonMaps: + - jsonPath: $.MarriageDetails.*.WitnessDetail.id2 + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AdharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Age + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddresSEn + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddressMal + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Mobile + + - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISEsigned + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.WitnessDetail.serial_no2 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 4e4290b7f73..c6db58d793b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -44,21 +44,27 @@ public void enrichCreate(MarriageDetailsRequest request) { if(marriage.getGroomDetails()!=null){ marriage.getGroomDetails().setId(UUID.randomUUID().toString()); } - if(marriage.getPermanent()!=null){ - marriage.getPermanent().setId(UUID.randomUUID().toString()); - marriage.getPermanent().setBrideGroom("BRIDE"); - marriage.getPermanent().setBrideGroom("GROOM"); - } + marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); + marriage.getPermanentBride().setId2(UUID.randomUUID().toString()); + + marriage.getPermanentBride().setBrideGroom1("BRIDE"); + marriage.getPermanentBride().setBrideGroom2("GROOM"); + + if(marriage.getPresent()!=null){ marriage.getPresent().setId(UUID.randomUUID().toString()); marriage.getPresent().setBrideGroom("BRIDE"); marriage.getPresent().setBrideGroom("GROOM"); } if(marriage.getWitness()!=null){ - marriage.getWitness().setId(UUID.randomUUID().toString()); - } + marriage.getWitness().setId1(UUID.randomUUID().toString()); + marriage.getWitness().setId2(UUID.randomUUID().toString()); + + marriage.getWitness().setSerial_no1(1); + marriage.getWitness().setSerial_no2(2); + } }); setApplicationNumbers(request); setFileNumbers(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index fd4e6f0bb26..65438c58c4e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -9,7 +9,6 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; -import java.util.List; @Getter @Setter @@ -149,7 +148,6 @@ public class MarriageApplicationDetail { @JsonProperty("placeid") private String placeid; - @Size(max = 2500) @JsonProperty("marriageHouseNoAndNameEn") private String marriageHouseNoAndNameEn; @@ -196,15 +194,14 @@ public class MarriageApplicationDetail { @JsonProperty("GroomDetails") private GroomDetails groomDetails; @JsonProperty("PermanentAddressDetails") - private PermanentAdressDetails permanent; + private PermanentAdressDetails permanentBride; @JsonProperty("PresentAddressDetails") private PresentAddressDetails present ; @JsonProperty("WitnessDetail") private WitnessDetails witness; -// @JsonProperty("WitnessDetails") -// private WitnessDetails witness; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index 3a60ecb7042..9790e21680e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -23,8 +23,6 @@ public class GroomDetails { @JsonProperty("groomAdharNo") private String adharno; - - @Size(max = 1000) @JsonProperty("groomPassportNo") private String passportno; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java index dc4c4b58c7d..c068a112ef9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java @@ -13,101 +13,191 @@ public class PermanentAdressDetails { @NotNull @Size(max = 64) - @JsonProperty("id") - private String id; + @JsonProperty("id1") + private String id1; + @Size(max = 200) - @JsonProperty("permanentHouseNo") - private String houseno; + @JsonProperty("permanentHouseNoBride") + private String housenoBride; @Size(max = 2500) - @JsonProperty("permanentHouseNameEn") - private String housename_no_en; + @JsonProperty("permanentHouseNameEnBride") + private String housename_no_enBride; @Size(max = 2500) - @JsonProperty("permanentHouseNameMal") - private String housename_no_ml; + @JsonProperty("permanentHouseNameMalBride") + private String housename_no_mlBride; @Size(max = 64) - @JsonProperty("permanentVillageId") - private String villageid; + @JsonProperty("permanentVillageIdBride") + private String villageidBride; @Size(max = 1000) - @JsonProperty("permanentVillageName") - private String village_name; + @JsonProperty("permanentVillageNameBride") + private String village_nameBride; @Size(max = 64) - @JsonProperty("permanentTalukID") - private String talukid; + @JsonProperty("permanentTalukIDBride") + private String talukidBride; @Size(max = 1000) - @JsonProperty("permanentTalukName") - private String taluk_name; + @JsonProperty("permanentTalukNameBride") + private String taluk_nameBride; @Size(max = 64) - @JsonProperty("permanentWardCode") - private String ward_code; - - - + @JsonProperty("permanentWardCodeBride") + private String ward_codeBride; - @JsonProperty("permanentDoorNO") - private Integer doorno; + @JsonProperty("permanentDoorNOBride") + private Integer doornoBride; @Size(max = 1000) - @JsonProperty("permanentLocalityEn") - private String locality_en; + @JsonProperty("permanentLocalityEnBride") + private String locality_enBride; @Size(max = 1000) - @JsonProperty("permanentLocalityMal") - private String locality_ml; + @JsonProperty("permanentLocalityMalBride") + private String locality_mlBride; @Size(max = 2000) - @JsonProperty("permanentStreetNameEn") - private String street_name_en; + @JsonProperty("permanentStreetNameEnBride") + private String street_name_enBride; @Size(max = 2000) - @JsonProperty("permanentStreetNameMal") - private String street_name_ml; + @JsonProperty("permanentStreetNameMalBride") + private String street_name_mlBride; @Size(max = 64) - @JsonProperty("permanentDistrictId") - private String districtid; + @JsonProperty("permanentDistrictIdBride") + private String districtidBride; @Size(max = 64) - @JsonProperty("permanentStateId") - private String stateid; + @JsonProperty("permanentStateIdBride") + private String stateidBride; @Size(max = 64) - @JsonProperty("permanentPOid") - private String poid; + @JsonProperty("permanentPOidBride") + private String poidBride; @Size(max = 10) - @JsonProperty("permanentPin") - private String pinno; + @JsonProperty("permanentPinBride") + private String pinnoBride; @Size(max = 64) - @JsonProperty("permanentCountryId") - private String countryid; + @JsonProperty("permanentCountryIdBride") + private String countryidBride; @NotNull @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; + @JsonProperty("marriageidBride") + private String marriageidBride; @NotNull @Size(max = 64) - @JsonProperty("brideGroom") - private String brideGroom; + @JsonProperty("brideGroom1") + private String brideGroom1; + @Size(max = 64) + @JsonProperty("marriageTenantidBride") + private String tenantidBride; + @Size(max = 64) + @JsonProperty("ponameEnBride") + private String poname_enBride; + + + + + @NotNull + @Size(max = 64) + @JsonProperty("id2") + private String id2; + @Size(max = 200) + @JsonProperty("permanentHouseNoGroom") + private String housenoGroom; + + @Size(max = 2500) + @JsonProperty("permanentHouseNameEnGroom") + private String housename_no_enGroom; + + @Size(max = 2500) + @JsonProperty("permanentHouseNameMalGroom") + private String housename_no_mlGroom; + + @Size(max = 64) + @JsonProperty("permanentVillageIdGroom") + private String villageidGroom; + + @Size(max = 1000) + @JsonProperty("permanentVillageNameGroom") + private String village_nameGroom; + + @Size(max = 64) + @JsonProperty("permanentTalukIDGroom") + private String talukidGroom; + + @Size(max = 1000) + @JsonProperty("permanentTalukNameGroom") + private String taluk_nameGroom; + @Size(max = 64) - @JsonProperty("marriageTenantid") - private String tenantid; + @JsonProperty("permanentWardCodeGroom") + private String ward_codeGroom; + + @JsonProperty("permanentDoorNOGroom") + private Integer doornoGroom; + + @Size(max = 1000) + @JsonProperty("permanentLocalityEnGroom") + private String locality_enGroom; + + @Size(max = 1000) + @JsonProperty("permanentLocalityMalGroom") + private String locality_mlGroom; + + @Size(max = 2000) + @JsonProperty("permanentStreetNameEnGroom") + private String street_name_enGroom; + + @Size(max = 2000) + @JsonProperty("permanentStreetNameMalGroom") + private String street_name_mlGroom; + + @Size(max = 64) - @JsonProperty("poname_en") - private String poname_en; + @JsonProperty("permanentDistrictIdGroom") + private String districtidGroom; + @Size(max = 64) + @JsonProperty("permanentStateIdGroom") + private String stateidGroom; + + @Size(max = 64) + @JsonProperty("permanentPOidGroom") + private String poidGroom; + + @Size(max = 10) + @JsonProperty("permanentPinGroom") + private String pinnoGroom; + + @Size(max = 64) + @JsonProperty("permanentCountryIdGroom") + private String countryidGroom; + @NotNull + @Size(max = 64) + @JsonProperty("marriageidGroom") + private String marriageidGroom; + @NotNull + @Size(max = 64) + @JsonProperty("brideGroom2") + private String brideGroom2; + @Size(max = 64) + @JsonProperty("marriageTenantidGroom") + private String tenantidGroom; + @Size(max = 64) + @JsonProperty("ponameEnGroom") + private String poname_enGroom; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index d718adb3a8b..4a73ac71245 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -14,9 +14,14 @@ public class WitnessDetails { @NotNull @Size(max = 64) - @JsonProperty("id") - private String id; - @Size(max = 15) + @JsonProperty("id1") + private String id1; + + @NotNull + @Size(max = 64) + @JsonProperty("id2") + private String id2; + @Size(max = 15) @JsonProperty("witness1AdharNo") private String adharno; @@ -45,55 +50,46 @@ public class WitnessDetails { @JsonProperty("witness1Mobile") private String mobile; - - @JsonProperty("witness1ISmessageReceived") - private Boolean is_message_received; - @JsonProperty("witness1ISEsigned") private Boolean is_esigned; - - + @NotNull + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + @JsonProperty("serial_no1") + private Integer serial_no1; + @JsonProperty("serial_no2") + private Integer serial_no2; @Size(max = 15) @JsonProperty("witness2AdharNo") - private String w2Adharno; + private String witness2AdharNo; @Size(max = 200) @JsonProperty("witness2NameEn") - private String w2Name_en; - + private String witness2NameEn; @Size(max = 200) @JsonProperty("witness2NameMal") - private String w2Name_mal; + private String witness2NameMal; @JsonProperty("witness2Age") - private Integer w2Age; + private Integer witness2Age; @Size(max = 200) @JsonProperty("witness2AddresSEn") - private String w2Address_en; + private String witness2AddresSEn; @Size(max = 200) @JsonProperty("witness2AddressMal") - private String w2Address_mal; + private String witness2AddressMal; @Size(max = 150) @JsonProperty("witness2Mobile") - private String w2Mobile; - - - @JsonProperty("witness2ISmessageReceived") - private Boolean w2Is_message_received; - + private String witness2Mobile; @JsonProperty("witness2ISEsigned") - private Boolean w2Is_esigned; - @NotNull - @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; - + private Boolean witness2ISEsigned; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index d90df1f1de8..b67a3ea7ed3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -62,7 +62,7 @@ public List extractData(ResultSet rs) throws SQLExcep .marriageReligiousInstitutionOtherNameMal(rs.getString("ma_religious_institution_othername_ml")) .brideDetails(getBrideDetails(rs)) .groomDetails(getgroomDetails(rs)) - .permanent(getPermanentAddress(rs)) +// .permanent(getPermanentAddress(rs)) .present(getPresentAddress(rs)) .witness(getWitnessDetails(rs)) .auditDetails(getAuditDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java index 68988f17df2..b33e19abd35 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java @@ -9,29 +9,29 @@ public interface PermanentAddressRowMapper { default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ return PermanentAdressDetails.builder() - .id(rs.getString("per_id")) - .houseno(rs.getString("per_houseno")) - .housename_no_en(rs.getString("per_housename_no_en")) - .housename_no_ml(rs.getString("per_housename_no_ml")) - .villageid(rs.getString("per_villageid")) - .village_name(rs.getString("per_village_name")) - .talukid(rs.getString("per_talukid")) - .taluk_name(rs.getString("per_taluk_name")) - .ward_code(rs.getString("per_ward_code")) - .doorno(rs.getInt("per_doorno")) - .locality_en(rs.getString("per_locality_en")) - .locality_ml(rs.getString("per_locality_ml")) - .street_name_en(rs.getString("per_street_name_en")) - .street_name_ml(rs.getString("per_street_name_ml")) - .districtid(rs.getString("per_districtid")) - .stateid(rs.getString("per_stateid")) - .poid(rs.getString("per_poid")) - .pinno(rs.getString("per_pinno")) - .countryid(rs.getString("per_countryid")) - .marriageid(rs.getString("per_marriageid")) +// .id(rs.getString("per_id")) +// .houseno(rs.getString("per_houseno")) +// .housename_no_en(rs.getString("per_housename_no_en")) +// .housename_no_ml(rs.getString("per_housename_no_ml")) +// .villageid(rs.getString("per_villageid")) +// .village_name(rs.getString("per_village_name")) +// .talukid(rs.getString("per_talukid")) +// .taluk_name(rs.getString("per_taluk_name")) +// .ward_code(rs.getString("per_ward_code")) +// .doorno(rs.getInt("per_doorno")) +// .locality_en(rs.getString("per_locality_en")) +// .locality_ml(rs.getString("per_locality_ml")) +// .street_name_en(rs.getString("per_street_name_en")) +// .street_name_ml(rs.getString("per_street_name_ml")) +// .districtid(rs.getString("per_districtid")) +// .stateid(rs.getString("per_stateid")) +// .poid(rs.getString("per_poid")) +// .pinno(rs.getString("per_pinno")) +// .countryid(rs.getString("per_countryid")) +// .marriageid(rs.getString("per_marriageid")) .build(); - + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java index ea83e6932d3..76d87105f1d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java @@ -1,6 +1,5 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.PermanentAdressDetails; import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; import java.sql.ResultSet; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index 8c3bc921b8e..e0f0142fd24 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -9,7 +9,7 @@ public interface WitnessDetailsRowMapper { default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { return WitnessDetails.builder() - .id(rs.getString("wd_id")) +// .id(rs.getString("wd_id")) .adharno(rs.getString("wd_adharno")) .name_en(rs.getString("wd_name_en")) .name_mal(rs.getString("wd_name_mal")) @@ -17,18 +17,8 @@ default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { .address_en(rs.getString("wd_address_en")) .address_mal(rs.getString("wd_address_mal")) .mobile(rs.getString("wd_mobile")) - .is_message_received(Boolean.valueOf(rs.getString("wd_is_message_received"))) .is_esigned(Boolean.valueOf(rs.getString("wd_is_esigned"))) .marriageid(rs.getString("wd_marriageid")) - .w2Adharno(rs.getString("wd_w2_adharno")) - .w2Age(Integer.valueOf(rs.getString("wd_w2_age"))) - .w2Name_en(rs.getString("wd_w2_name_en")) - .w2Address_mal(rs.getString("wd_w2_name_mal")) - .w2Address_en(rs.getString("wd_w2_address_en")) - .w2Name_mal(rs.getString("wd_w2_address_mal")) - .w2Mobile(rs.getString("wd_w2_mobile")) - .w2Is_esigned(Boolean.valueOf(rs.getString("wd_w2_is_esigned"))) - .w2Is_message_received(Boolean.valueOf(rs.getString("wd_w2_is_message_received"))) .build(); } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql index b999d3b9504..657dd787f56 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql @@ -98,6 +98,6 @@ DROP COLUMN w2_is_esigned, DROP COLUMN is_message_received; -ALTER TABLE public.eg_register_marriage_witness_details -ADD COLUMN serial_no bigint, -DROP COLUMN is_message_received; +--ALTER TABLE public.eg_register_marriage_witness_details +--ADD COLUMN serial_no bigint, +--DROP COLUMN is_message_received; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232213101322__marriage_services_ddl.sql similarity index 95% rename from municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql rename to municipal-services/marriage-services/src/main/resources/db/migration/main/V20232213101322__marriage_services_ddl.sql index ccf5a9ba74e..75b3962aaf3 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232012561412__marriage_services_ddl.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232213101322__marriage_services_ddl.sql @@ -38,12 +38,11 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details migrated_date bigint, CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), CONSTRAINT eg_register_marriage_place_details_ack_no_fkey UNIQUE (ack_no) -) - -TABLESPACE pg_default; +); -ALTER TABLE IF EXISTS public.eg_register_marriage_details - OWNER to postgres; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_details +-- OWNER to postgres; -- Index: idx_eg_register_marriage_details_tenantid -- DROP INDEX IF EXISTS public.idx_eg_register_marriage_details_tenantid; @@ -102,12 +101,12 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION -) - -TABLESPACE pg_default; +); -ALTER TABLE IF EXISTS public.eg_register_marriage_bride_details - OWNER to postgres; +--TABLESPACE pg_default; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_bride_details +-- OWNER to postgres; -- Table: public.eg_register_marriage_permanent_address_details @@ -148,12 +147,12 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION -) +); -TABLESPACE pg_default; +--TABLESPACE pg_default; -ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details - OWNER to postgres; +--ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details +-- OWNER to postgres; @@ -198,12 +197,12 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION -) - -TABLESPACE pg_default; +); -ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details - OWNER to postgres; +--TABLESPACE pg_default; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details +-- OWNER to postgres; @@ -222,7 +221,6 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details address_en character varying(200) COLLATE pg_catalog."default", address_mal character varying(200) COLLATE pg_catalog."default", mobile character varying(150) COLLATE pg_catalog."default", - is_message_received boolean, is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, mig_chvackno character varying(64) COLLATE pg_catalog."default", @@ -230,17 +228,18 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no bigint, CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION -) - -TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details - OWNER to postgres; +); +-- +--TABLESPACE pg_default; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details +-- OWNER to postgres; CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate ( @@ -263,9 +262,9 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate ON UPDATE CASCADE ON DELETE CASCADE ); - -ALTER TABLE IF EXISTS public.eg_marriage_certificate - OWNER to postgres; +-- +--ALTER TABLE IF EXISTS public.eg_marriage_certificate +-- OWNER to postgres; CREATE TABLE eg_register_marriage_document( From c59af2547e9bc1bb8bd1ad411590bd92e97a7864 Mon Sep 17 00:00:00 2001 From: Lekshmy Date: Wed, 22 Mar 2023 16:57:02 +0530 Subject: [PATCH 035/420] marriage Tables finalize --- .../src/main/resources/application.properties | 8 +- ...30323034512__marriage_services_new_dll.sql | 38 + ...V20230323114820__marriage_services_ddl.sql | 264 ----- ...30323144512__marriage_services_new_dll.sql | 972 ++++++++++++++++++ ...V20231015302020__marriage_services_ddl.sql | 416 -------- ...V20231312361214__marriage_services_ddl.sql | 47 - ...V20232010541214__marriage_services_ddl.sql | 13 - ...V20232110351412__marriage_services_ddl.sql | 103 -- ...V20232113511412__marriage_services_ddl.sql | 15 - ...V20232213101322__marriage_services_ddl.sql | 311 ------ 10 files changed, 1014 insertions(+), 1173 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231312361214__marriage_services_ddl.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232010541214__marriage_services_ddl.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232113511412__marriage_services_ddl.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232213101322__marriage_services_ddl.sql diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 0e55d0545c0..ad0e24f1c3c 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,15 +5,15 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql new file mode 100644 index 00000000000..772c8bbc896 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS public.eg_marriage_details CASCADE; +DROP INDEX IF EXISTS public.idx_eg_marriage_details_tenantid; +DROP TABLE IF EXISTS public.eg_marriage_details_audit; +DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details; +DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details_audit; +DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details; +DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details_audit; +DROP TABLE IF EXISTS public.eg_marriage_present_address_details; +DROP TABLE IF EXISTS public.eg_marriage_present_address_details_audit; +DROP TABLE IF EXISTS public.eg_marriage_witness_details; +DROP TABLE IF EXISTS public.eg_marriage_witness_details_audit; +DROP TABLE IF EXISTS public.eg_marriage_certificate; +DROP TABLE IF EXISTS public.eg_marriage_certificate_audit; +DROP TABLE IF EXISTS public.eg_register_marriage_document; +DROP TABLE IF EXISTS public.eg_register_marriage_document_audit; +DROP TABLE IF EXISTS public.eg_register_marriage_details CASCADE; +DROP TABLE IF EXISTS public.eg_register_marriage_details_audit; +DROP TABLE IF EXISTS public.eg_register_marriage_bride_groom_details; +DROP TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit; +DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit; +DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details; +DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit; +DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; +DROP TABLE IF EXISTS public.eg_register_marriage_witness_details_audit; +DROP TABLE IF EXISTS public.eg_register_marriage_document; +DROP TABLE IF EXISTS public.eg_register_marriage_document_audit; + + + + + + +DROP FUNCTION IF EXISTS public.process_eg_marriage_bride_details_audit(); +DROP FUNCTION IF EXISTS public.process_eg_marriage_details_audit(); +DROP FUNCTION IF EXISTS public.process_eg_marriage_groom_details_audit(); +DROP FUNCTION IF EXISTS public.process_eg_marriage_permanent_address_details_audit(); +DROP FUNCTION IF EXISTS public.process_eg_marriage_present_address_details_audit(); +DROP FUNCTION IF EXISTS public.process_eg_marriage_witness_details_audit(); \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql deleted file mode 100644 index 0ef685af865..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323114820__marriage_services_ddl.sql +++ /dev/null @@ -1,264 +0,0 @@ --- Table: public.eg_marriage_details - --- DROP TABLE IF EXISTS public.eg_marriage_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeothers character varying(64) COLLATE pg_catalog."default", - placeid character varying(1000) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - placename_mal character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - othersspecify character varying(1000) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - fileno character varying(64) COLLATE pg_catalog."default", - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default", - applicationnumber character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), - CONSTRAINT eg_marriage_place_details_fm_fileno_fkey UNIQUE (fileno, tenantid), - CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) - ); - - -CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid - ON public.eg_marriage_details USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) - TABLESPACE pg_default; - - -- Table: public.bride_details - - -- DROP TABLE IF EXISTS public.bride_details; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - NOT VALID - ); - - --- Table: public.eg_marriage.groom_details - --- DROP TABLE IF EXISTS public.eg_marriage.groom_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_groom_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_groom_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); --- Table: public.marriage_permanent_address_details - --- DROP TABLE IF EXISTS public.marriage_permanent_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - - - --- Table: public.marriage_present_address_details - --- DROP TABLE IF EXISTS public.marriage_present_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - - --- Table: public.witness_details - --- DROP TABLE IF EXISTS public.witness_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - is_message_received boolean, - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -) - - - - diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql new file mode 100644 index 00000000000..e4757b6a14e --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql @@ -0,0 +1,972 @@ +-- Table: public.eg_marriage_details + +-- DROP TABLE IF EXISTS public.eg_marriage_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + houseno_and_name_en character varying(2500) COLLATE pg_catalog."default", + houseno_and_name_ml character varying(2500) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + applicationnumber character varying(64) COLLATE pg_catalog."default", + filenumber character varying(64) COLLATE pg_catalog."default", + file_date bigint, + file_status character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_marriage_place_details_filenumber_fkey UNIQUE (filenumber), + CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, applicationnumber) + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_marriage_details + OWNER to postgres; +-- Index: idx_eg_marriage_details_tenantid + +-- DROP INDEX IF EXISTS public.idx_eg_marriage_details_tenantid; + +CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid + ON public.eg_marriage_details USING btree + (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) + TABLESPACE pg_default; + +-- Table: public.eg_marriage_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + houseno_and_name_en character varying(2500) COLLATE pg_catalog."default", + houseno_and_name_ml character varying(2500) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + applicationnumber character varying(64) COLLATE pg_catalog."default", + filenumber character varying(64) COLLATE pg_catalog."default", + file_date bigint, + file_status character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default"); + +-- Table: public.eg_marriage_bride_groom_details + +-- DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_marriage_bride_groom_details + OWNER to postgres; + +-- Table: public.eg_marriage_bride_groom_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" + ); + +-- Table: public.eg_marriage_permanent_address_details + +-- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_marriage_permanent_address_details + OWNER to postgres; + +-- Table: public.eg_marriage_permanent_address_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default" + ); + +-- Table: public.eg_marriage_present_address_details + +-- DROP TABLE IF EXISTS public.eg_marriage_present_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + same_as_permanent boolean, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_marriage_present_address_details + OWNER to postgres; + +-- Table: public.eg_marriage_present_address_details_audit + +-- DROP TABLE IF EXISTS public.eg_marriage_present_address_details_audit; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + same_as_permanent boolean, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default" + ); + +-- Table: public.eg_marriage_witness_details + +-- DROP TABLE IF EXISTS public.eg_marriage_witness_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no bigint, + CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_marriage_witness_details + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no bigint + ); +-- Table: public.eg_register_marriage_document + +-- DROP TABLE IF EXISTS public.eg_register_marriage_document; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_document +( + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_document_document_fkey PRIMARY KEY (tenantid, document_type, document_name, marriageid, bride_groom, active), + CONSTRAINT eg_marriage_document_pkey UNIQUE (id) + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_marriage_document + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_document_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint); + +-- Table: public.eg_register_marriage_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(64) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + housenameno_en character varying(1000) COLLATE pg_catalog."default", + housenameno_ml character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + registrtion_status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ack_no character varying(64) COLLATE pg_catalog."default", + is_migrated boolean, + migrated_date bigint, + CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_place_details_ack_no_fkey UNIQUE (ack_no, tenantid) + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_details + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(64) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + housenameno_en character varying(1000) COLLATE pg_catalog."default", + housenameno_ml character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + registrtion_status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ack_no character varying(64) COLLATE pg_catalog."default", + is_migrated boolean, + migrated_date bigint); +-- Index: idx_eg_register_marriage_details_tenantid + +-- DROP INDEX IF EXISTS public.idx_eg_register_marriage_details_tenantid; + +CREATE INDEX IF NOT EXISTS idx_eg_register_marriage_details_tenantid + ON public.eg_register_marriage_details USING btree + (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) + TABLESPACE pg_default; + +-- Table: public.eg_register_marriage_bride_groom_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_bride_groom_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" + ); + + +-- Table: public.eg_register_marriage_permanent_address_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" + ); + + +-- Table: public.eg_register_marriage_present_address_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + same_as_permanent boolean, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + same_as_permanent boolean, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" + ); + +-- Table: public.eg_register_marriage_witness_details + +-- DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no bigint, + CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no bigint + ); + + +-- Table: public.eg_register_marriage_document + +-- DROP TABLE IF EXISTS public.eg_register_marriage_document; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document +( + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid, document_type, document_name, marriageid, bride_groom, active), + CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id) + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_register_marriage_document + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint + ); + +-- Table: public.eg_marriage_certificate + +-- DROP TABLE IF EXISTS public.eg_marriage_certificate; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + registrationno character varying(25) COLLATE pg_catalog."default", + registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, + filestoreid character varying(256) COLLATE pg_catalog."default", + status character varying(25) COLLATE pg_catalog."default", + additionaldetail jsonb, + embeddedurl character varying(64) COLLATE pg_catalog."default", + dateofissue bigint, + tenantid character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_certificate_request_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_certificate_request_fkey FOREIGN KEY (registrydetailsid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE CASCADE + ON DELETE CASCADE + ) + + TABLESPACE pg_default; + +ALTER TABLE IF EXISTS public.eg_marriage_certificate + OWNER to postgres; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + registrationno character varying(25) COLLATE pg_catalog."default", + registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, + filestoreid character varying(256) COLLATE pg_catalog."default", + status character varying(25) COLLATE pg_catalog."default", + additionaldetail jsonb, + embeddedurl character varying(64) COLLATE pg_catalog."default", + dateofissue bigint, + tenantid character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedby character varying(64) COLLATE pg_catalog."default" + ); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql deleted file mode 100644 index 5a5a7dd357e..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231015302020__marriage_services_ddl.sql +++ /dev/null @@ -1,416 +0,0 @@ --- Table: public.eg_marriage_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeothers character varying(64) COLLATE pg_catalog."default", - placeid character varying(1000) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - placename_mal character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - othersspecify character varying(1000) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - fileno character varying(64) COLLATE pg_catalog."default", - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default", - applicationnumber character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" - ); - --- FUNCTION: public.process_eg_marriage_details_audit() - --- DROP FUNCTION IF EXISTS public.process_eg_marriage_details_audit(); - -CREATE OR REPLACE FUNCTION public.process_eg_marriage_details_audit() - RETURNS trigger - LANGUAGE 'plpgsql' - COST 100 - VOLATILE NOT LEAKPROOF -AS $BODY$ -BEGIN - IF (TG_OP = 'DELETE') THEN - INSERT INTO eg_marriage_details_audit SELECT 'D', now(), OLD.*; -RETURN OLD; -ELSIF (TG_OP = 'UPDATE') THEN - INSERT INTO eg_marriage_details_audit SELECT 'U', now(), OLD.*; -RETURN NEW; -END IF; -RETURN NULL; -END; -$BODY$; --- Trigger: eg_marriage_details_audit - --- DROP TRIGGER IF EXISTS eg_marriage_details_audit ON public.eg_marriage_details; - -CREATE TRIGGER eg_marriage_details_audit - BEFORE DELETE OR UPDATE - ON public.eg_marriage_details - FOR EACH ROW - EXECUTE FUNCTION public.process_eg_marriage_details_audit(); - --- Table: public.eg_marriage_bride_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_bride_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" - ); - --- FUNCTION: public.process_eg_marriage_bride_details_audit() - --- DROP FUNCTION IF EXISTS public.process_eg_marriage_bride_details_audit(); - -CREATE OR REPLACE FUNCTION public.process_eg_marriage_bride_details_audit() - RETURNS trigger - LANGUAGE 'plpgsql' - COST 100 - VOLATILE NOT LEAKPROOF -AS $BODY$ -BEGIN - IF (TG_OP = 'DELETE') THEN - INSERT INTO eg_marriage_bride_details_audit SELECT 'D', now(), OLD.*; -RETURN OLD; -ELSIF (TG_OP = 'UPDATE') THEN - INSERT INTO eg_marriage_bride_details_audit SELECT 'U', now(), OLD.*; -RETURN NEW; -END IF; -RETURN NULL; -END; -$BODY$; - --- Trigger: eg_marriage_bride_details_audit - --- DROP TRIGGER IF EXISTS eg_marriage_bride_details_audit ON public.eg_marriage_bride_details; - -CREATE TRIGGER eg_marriage_bride_details_audit -BEFORE DELETE OR UPDATE ON public.eg_marriage_bride_details -FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_bride_details_audit(); - - - --- Table: public.eg_marriage_groom_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_groom_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_groom_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - profession_en character varying(200) COLLATE pg_catalog."default", - profession_mal character varying(200) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" -); --- FUNCTION: public.process_eg_marriage_groom_details_audit() - --- DROP FUNCTION IF EXISTS public.process_eg_marriage_groom_details_audit(); - -CREATE OR REPLACE FUNCTION public.process_eg_marriage_groom_details_audit() - RETURNS trigger - LANGUAGE 'plpgsql' - COST 100 - VOLATILE NOT LEAKPROOF -AS $BODY$ -BEGIN - IF (TG_OP = 'DELETE') THEN - INSERT INTO eg_marriage_groom_details_audit SELECT 'D', now(), OLD.*; -RETURN OLD; -ELSIF (TG_OP = 'UPDATE') THEN - INSERT INTO eg_marriage_groom_details_audit SELECT 'U', now(), OLD.*; -RETURN NEW; -END IF; -RETURN NULL; -END; -$BODY$; - --- Trigger: eg_marriage_groom_details - --- DROP TRIGGER IF EXISTS eg_marriage_groom_details_audit ON public.eg_marriage_groom_details; - -CREATE TRIGGER eg_marriage_groom_details_audit -BEFORE DELETE OR UPDATE ON public.eg_marriage_groom_details -FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_groom_details_audit(); - - --- Table: public.eg_marriage_permanent_address_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" -); --- FUNCTION: public.process_eg_marriage_permanent_address_details_audit() - --- DROP FUNCTION IF EXISTS public.process_eg_marriage_permanent_address_details_audit(); - -CREATE OR REPLACE FUNCTION public.process_eg_marriage_permanent_address_details_audit() - RETURNS trigger - LANGUAGE 'plpgsql' - COST 100 - VOLATILE NOT LEAKPROOF -AS $BODY$ -BEGIN - IF (TG_OP = 'DELETE') THEN - INSERT INTO eg_marriage_permanent_address_details_audit SELECT 'D', now(), OLD.*; -RETURN OLD; -ELSIF (TG_OP = 'UPDATE') THEN - INSERT INTO eg_marriage_permanent_address_details_audit SELECT 'U', now(), OLD.*; -RETURN NEW; -END IF; -RETURN NULL; -END; -$BODY$; - --- Trigger: eg_marriage_permanent_address_details_audit - --- DROP TRIGGER IF EXISTS eg_marriage_permanent_address_details_audit ON public.eg_marriage_permanent_address_details; - -CREATE TRIGGER eg_marriage_permanent_address_details_audit -BEFORE DELETE OR UPDATE ON public.eg_marriage_permanent_address_details -FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_permanent_address_details_audit(); - - --- Table: public.eg_marriage_present_address_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_present_address_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - houseno character varying(200) COLLATE pg_catalog."default", - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - doorno integer, - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" -); --- FUNCTION: public.process_eg_marriage_present_address_details_audit() - --- DROP FUNCTION IF EXISTS public.process_eg_marriage_present_address_details_audit(); - -CREATE OR REPLACE FUNCTION public.process_eg_marriage_present_address_details_audit() - RETURNS trigger - LANGUAGE 'plpgsql' - COST 100 - VOLATILE NOT LEAKPROOF -AS $BODY$ -BEGIN - IF (TG_OP = 'DELETE') THEN - INSERT INTO eg_marriage_present_address_details_audit SELECT 'D', now(), OLD.*; -RETURN OLD; -ELSIF (TG_OP = 'UPDATE') THEN - INSERT INTO eg_marriage_present_address_details_audit SELECT 'U', now(), OLD.*; -RETURN NEW; -END IF; -RETURN NULL; -END; -$BODY$; - --- Trigger: eg_marriage_present_address_details_audit - --- DROP TRIGGER IF EXISTS eg_marriage_present_address_details_audit ON public.eg_marriage_present_address_details; - -CREATE TRIGGER eg_marriage_present_address_details_audit -BEFORE DELETE OR UPDATE ON public.eg_marriage_present_address_details -FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_present_address_details_audit(); - - - --- Table: public.eg_marriage_witness_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_witness_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - is_message_received boolean, - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" -); --- FUNCTION: public.process_eg_marriage_witness_details_audit() - --- DROP FUNCTION IF EXISTS public.process_eg_marriage_witness_details_audit(); - -CREATE OR REPLACE FUNCTION public.process_eg_marriage_witness_details_audit() - RETURNS trigger - LANGUAGE 'plpgsql' - COST 100 - VOLATILE NOT LEAKPROOF -AS $BODY$ -BEGIN - IF (TG_OP = 'DELETE') THEN - INSERT INTO eg_marriage_witness_details_audit SELECT 'D', now(), OLD.*; -RETURN OLD; -ELSIF (TG_OP = 'UPDATE') THEN - INSERT INTO eg_marriage_witness_details_audit SELECT 'U', now(), OLD.*; -RETURN NEW; -END IF; -RETURN NULL; -END; -$BODY$; - --- Trigger: eg_marriage_witness_details_audit - --- DROP TRIGGER IF EXISTS eg_marriage_witness_details_audit ON public.eg_marriage_witness_details; - -CREATE TRIGGER eg_marriage_witness_details_audit -BEFORE DELETE OR UPDATE ON public.eg_marriage_witness_details -FOR EACH ROW EXECUTE FUNCTION public.process_eg_marriage_witness_details_audit(); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231312361214__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231312361214__marriage_services_ddl.sql deleted file mode 100644 index 8eb12d3df46..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231312361214__marriage_services_ddl.sql +++ /dev/null @@ -1,47 +0,0 @@ -ALTER TABLE public.eg_marriage_details -ADD COLUMN houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN houseno_and_nameml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN religious_institution character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN public_or_privatePlace character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN public_or_privatePlacenNamePlace_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN public_or_privatePlacenNamePlace_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN religious_institution_other character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN religious_institution_otherName_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN religious_institution_otherName_ml character varying(2500) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_marriage_details_audit -ADD COLUMN houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN houseno_and_nameml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN religious_institution character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN public_or_privatePlace character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN public_or_privatePlacenNamePlace_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN public_or_privatePlacenNamePlace_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN religious_institution_other character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN religious_institution_otherName_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN religious_institution_otherName_ml character varying(2500) COLLATE pg_catalog."default"; - - - -ALTER TABLE public.eg_marriage_witness_details -ADD COLUMN w2_adharno character varying(15) COLLATE pg_catalog."default", -ADD COLUMN w2_name_en character varying(200) COLLATE pg_catalog."default", -ADD COLUMN w2_name_mal character varying(200) COLLATE pg_catalog."default", -ADD COLUMN w2_age integer, -ADD COLUMN w2_address_en character varying(200) COLLATE pg_catalog."default", -ADD COLUMN w2_address_mal character varying(200) COLLATE pg_catalog."default", -ADD COLUMN w2_mobile character varying(150) COLLATE pg_catalog."default", -ADD COLUMN w2_is_message_received boolean, -ADD COLUMN w2_is_esigned boolean; - - -ALTER TABLE public.eg_marriage_witness_details_audit -ADD COLUMN w2_adharno character varying(15) COLLATE pg_catalog."default", -ADD COLUMN w2_name_en character varying(200) COLLATE pg_catalog."default", -ADD COLUMN w2_name_mal character varying(200) COLLATE pg_catalog."default", -ADD COLUMN w2_age integer, -ADD COLUMN w2_address_en character varying(200) COLLATE pg_catalog."default", -ADD COLUMN w2_address_mal character varying(200) COLLATE pg_catalog."default", -ADD COLUMN w2_mobile character varying(150) COLLATE pg_catalog."default", -ADD COLUMN w2_is_message_received boolean, -ADD COLUMN w2_is_esigned boolean; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232010541214__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232010541214__marriage_services_ddl.sql deleted file mode 100644 index 088823f78ac..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232010541214__marriage_services_ddl.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE public.eg_marriage_permanent_address_details -ADD COLUMN bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL; - -ALTER TABLE public.eg_marriage_permanent_address_details_audit -ADD COLUMN bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL; - - - -ALTER TABLE public.eg_marriage_present_address_details -ADD COLUMN bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL; - -ALTER TABLE public.eg_marriage_present_address_details_audit -ADD COLUMN bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql deleted file mode 100644 index 657dd787f56..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232110351412__marriage_services_ddl.sql +++ /dev/null @@ -1,103 +0,0 @@ -ALTER TABLE IF EXISTS public.eg_marriage_bride_details -RENAME TO eg_marriage_bride_groom_details; - -ALTER TABLE IF EXISTS public.eg_marriage_bride_details_audit -RENAME TO eg_marriage_bride_groom_details_audit; - -DROP TABLE public.eg_marriage_groom_details; -DROP TABLE public.eg_marriage_groom_details_audit; - -ALTER TABLE public.eg_marriage_details -DROP COLUMN public_or_privateplace, -DROP COLUMN public_or_privateplacennameplace_en, -DROP COLUMN public_or_privateplacennameplace_ml, -DROP COLUMN religious_institution_other, -DROP COLUMN religious_institution_othername_en, -DROP COLUMN religious_institution_othername_ml, -DROP COLUMN religious_institution, -DROP COLUMN fileno, -DROP COLUMN file_date, -DROP COLUMN file_status, -DROP COLUMN othersspecify, -DROP COLUMN placeothers; - -ALTER TABLE public.eg_marriage_details_audit -DROP COLUMN public_or_privateplace, -DROP COLUMN public_or_privateplacennameplace_en, -DROP COLUMN public_or_privateplacennameplace_ml, -DROP COLUMN religious_institution_other, -DROP COLUMN religious_institution_othername_en, -DROP COLUMN religious_institution_othername_ml, -DROP COLUMN religious_institution, -DROP COLUMN fileno, -DROP COLUMN file_date, -DROP COLUMN file_status, -DROP COLUMN othersspecify, -DROP COLUMN placeothers; - -ALTER TABLE public.eg_marriage_bride_groom_details -DROP COLUMN profession_en, -DROP COLUMN profession_mal, -DROP COLUMN is_spouse_living; - - -ALTER TABLE public.eg_marriage_bride_groom_details_audit -DROP COLUMN profession_en, -DROP COLUMN profession_mal, -DROP COLUMN is_spouse_living; - -ALTER TABLE public.eg_marriage_present_address_details -ADD COLUMN same_as_permanent boolean, -ADD COLUMN tenantid character varying(64) COLLATE pg_catalog."default", -DROP COLUMN houseno, -DROP COLUMN doorno; - -ALTER TABLE public.eg_marriage_present_address_details_audit -ADD COLUMN same_as_permanent boolean, -ADD COLUMN tenantid character varying(64) COLLATE pg_catalog."default", -DROP COLUMN houseno, -DROP COLUMN doorno; - - -ALTER TABLE public.eg_marriage_permanent_address_details -ADD COLUMN tenantid character varying(64) COLLATE pg_catalog."default", -DROP COLUMN houseno, -DROP COLUMN doorno; - -ALTER TABLE public.eg_marriage_permanent_address_details_audit -ADD COLUMN tenantid character varying(64) COLLATE pg_catalog."default", -DROP COLUMN houseno, -DROP COLUMN doorno; - -ALTER TABLE public.eg_marriage_witness_details -ADD COLUMN serial_no bigint, -DROP COLUMN w2_adharno, -DROP COLUMN w2_name_en, -DROP COLUMN w2_name_mal, -DROP COLUMN w2_age, -DROP COLUMN w2_address_en, -DROP COLUMN w2_address_mal, -DROP COLUMN w2_mobile, -DROP COLUMN w2_is_message_received, -DROP COLUMN w2_is_esigned, -DROP COLUMN is_message_received; - - - -ALTER TABLE public.eg_marriage_witness_details_audit -ADD COLUMN serial_no bigint, -DROP COLUMN w2_adharno, -DROP COLUMN w2_name_en, -DROP COLUMN w2_name_mal, -DROP COLUMN w2_age, -DROP COLUMN w2_address_en, -DROP COLUMN w2_address_mal, -DROP COLUMN w2_mobile, -DROP COLUMN w2_is_message_received, -DROP COLUMN w2_is_esigned, -DROP COLUMN is_message_received; - - ---ALTER TABLE public.eg_register_marriage_witness_details ---ADD COLUMN serial_no bigint, ---DROP COLUMN is_message_received; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232113511412__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232113511412__marriage_services_ddl.sql deleted file mode 100644 index d089cbfdaa1..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232113511412__marriage_services_ddl.sql +++ /dev/null @@ -1,15 +0,0 @@ -ALTER TABLE public.eg_marriage_present_address_details -ADD COLUMN poname_en character varying(64) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_marriage_present_address_details_audit -ADD COLUMN poname_en character varying(64) COLLATE pg_catalog."default"; - - - -ALTER TABLE public.eg_marriage_permanent_address_details -ADD COLUMN poname_en character varying(64) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_marriage_permanent_address_details_audit -ADD COLUMN poname_en character varying(64) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232213101322__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232213101322__marriage_services_ddl.sql deleted file mode 100644 index 75b3962aaf3..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232213101322__marriage_services_ddl.sql +++ /dev/null @@ -1,311 +0,0 @@ --- Table: public.eg_register_marriage_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeid character varying(64) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - placename_ml character varying(1000) COLLATE pg_catalog."default", - housenameno_en character varying(1000) COLLATE pg_catalog."default", - housenameno_ml character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - registrtion_status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - ack_no character varying(64) COLLATE pg_catalog."default", - is_migrated boolean, - migrated_date bigint, - CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_place_details_ack_no_fkey UNIQUE (ack_no) -); - --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_details --- OWNER to postgres; --- Index: idx_eg_register_marriage_details_tenantid - --- DROP INDEX IF EXISTS public.idx_eg_register_marriage_details_tenantid; - -CREATE INDEX IF NOT EXISTS idx_eg_register_marriage_details_tenantid - ON public.eg_register_marriage_details USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) - TABLESPACE pg_default; - - - - --- Table: public.eg_register_marriage_bride_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_bride_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - firstname_ml character varying(200) COLLATE pg_catalog."default", - middlename_ml character varying(200) COLLATE pg_catalog."default", - lastname_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - fathername_ml character varying(200) COLLATE pg_catalog."default", - mothername_ml character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_ml character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_bride_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - ---TABLESPACE pg_default; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_bride_details --- OWNER to postgres; - - --- Table: public.eg_register_marriage_permanent_address_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - ---TABLESPACE pg_default; - ---ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details --- OWNER to postgres; - - - - - --- Table: public.eg_register_marriage_present_address_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - same_as_permanent boolean, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); - ---TABLESPACE pg_default; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details --- OWNER to postgres; - - - - --- Table: public.eg_register_marriage_witness_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no bigint, - CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION -); --- ---TABLESPACE pg_default; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details --- OWNER to postgres; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - registrationno character varying(25) COLLATE pg_catalog."default", - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - filestoreid character varying(256) COLLATE pg_catalog."default", - status character varying(25) COLLATE pg_catalog."default", - additionaldetail jsonb, - embeddedurl character varying(64) COLLATE pg_catalog."default", - dateofissue bigint, - tenantid character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_certificate_request_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_certificate_request_fkey FOREIGN KEY (registrydetailsid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE CASCADE - ON DELETE CASCADE -); --- ---ALTER TABLE IF EXISTS public.eg_marriage_certificate --- OWNER to postgres; - - - CREATE TABLE eg_register_marriage_document( - id character varying(128), - tenantid character varying(128), - document_name character varying(128), - document_type character varying(128), - document_description character varying(140), - filestoreid character varying(1024), - document_link character varying(1024), - file_type character varying(20), - file_size bigint, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - active boolean, - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id), - CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid,document_type,document_name,marriageid,bride_groom,active) - ); - - CREATE TABLE eg_register_marriage_document_audit( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(128), - tenantid character varying(128), - document_name character varying(128), - document_type character varying(128), - document_description character varying(140), - filestoreid character varying(1024), - document_link character varying(1024), - file_type character varying(20), - file_size bigint, - document_uuid character varying(128), - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - active boolean, - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint - ); \ No newline at end of file From 9bf0d3125b399a847782201c965612371282ca4e Mon Sep 17 00:00:00 2001 From: Lekshmy Date: Wed, 22 Mar 2023 19:36:31 +0530 Subject: [PATCH 036/420] tables --- ...30323144512__marriage_services_new_dll.sql | 91 +++---------------- 1 file changed, 13 insertions(+), 78 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql index e4757b6a14e..ca1e75a618e 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql @@ -45,12 +45,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_details CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), CONSTRAINT eg_marriage_place_details_filenumber_fkey UNIQUE (filenumber), CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, applicationnumber) - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_marriage_details - OWNER to postgres; + ); -- Index: idx_eg_marriage_details_tenantid -- DROP INDEX IF EXISTS public.idx_eg_marriage_details_tenantid; @@ -151,12 +146,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details REFERENCES public.eg_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_marriage_bride_groom_details - OWNER to postgres; + ); -- Table: public.eg_marriage_bride_groom_details_audit @@ -238,12 +228,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details REFERENCES public.eg_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_marriage_permanent_address_details - OWNER to postgres; + ); -- Table: public.eg_marriage_permanent_address_details_audit @@ -317,12 +302,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details REFERENCES public.eg_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_marriage_present_address_details - OWNER to postgres; + ); -- Table: public.eg_marriage_present_address_details_audit @@ -386,12 +366,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details REFERENCES public.eg_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_marriage_witness_details - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit ( @@ -437,12 +412,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_document lastmodifiedtime bigint, CONSTRAINT eg_marriage_document_document_fkey PRIMARY KEY (tenantid, document_type, document_name, marriageid, bride_groom, active), CONSTRAINT eg_marriage_document_pkey UNIQUE (id) - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_marriage_document - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_marriage_document_audit ( @@ -505,12 +475,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details migrated_date bigint, CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), CONSTRAINT eg_register_marriage_place_details_ack_no_fkey UNIQUE (ack_no, tenantid) - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_register_marriage_details - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details_audit ( @@ -603,12 +568,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details_audit ( @@ -690,12 +650,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details_audit ( @@ -770,12 +725,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details_audit ( @@ -838,12 +788,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details_audit ( @@ -892,12 +837,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document lastmodifiedtime bigint, CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid, document_type, document_name, marriageid, bride_groom, active), CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id) - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_register_marriage_document - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document_audit ( @@ -945,12 +885,7 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE - ) - - TABLESPACE pg_default; - -ALTER TABLE IF EXISTS public.eg_marriage_certificate - OWNER to postgres; + ); CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate_audit ( From 1c9b6b0ea7564f605fa5bb550f919b524e1f9539 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 23 Mar 2023 10:23:44 +0530 Subject: [PATCH 037/420] migration --- ...V20230322152120__marriage_services_ddl.sql | 703 ++++++++++++++++++ 1 file changed, 703 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230322152120__marriage_services_ddl.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230322152120__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230322152120__marriage_services_ddl.sql new file mode 100644 index 00000000000..063ae33f37b --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230322152120__marriage_services_ddl.sql @@ -0,0 +1,703 @@ +-- Table: public.eg_marriage_details + +-- DROP TABLE IF EXISTS public.eg_marriage_details; + +CREATE TABLE IF NOT EXISTS public.eg_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + placename_mal character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", + houseno_and_nameml character varying(2500) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) +); +CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid + ON public.eg_marriage_details USING btree + (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) + TABLESPACE pg_default; + + + + -- Table: public.eg_marriage_bride_groom_details + + -- DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ); + + -- Table: public.eg_marriage_permanent_address_details + + -- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ); + + + -- Table: public.eg_marriage_present_address_details + + -- DROP TABLE IF EXISTS public.eg_marriage_present_address_details; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + same_as_permanent boolean, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ); + + -- Table: public.eg_marriage_witness_details + + -- DROP TABLE IF EXISTS public.eg_marriage_witness_details; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no bigint, + CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ); + + -- Table: public.eg_marriage_details_audit + + -- DROP TABLE IF EXISTS public.eg_marriage_details_audit; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_details_audit + ( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + placename_mal character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", + houseno_and_nameml character varying(2500) COLLATE pg_catalog."default" + ); + + -- Table: public.eg_marriage_bride_groom_details_audit + + -- DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details_audit; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details_audit + ( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_mal character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_mal character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_mal character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_mal character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_mal character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + photo_url character varying(150) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default" + ); + + -- Table: public.eg_marriage_permanent_address_details_audit + + -- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details_audit; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details_audit + ( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default" + ); + -- Table: public.eg_marriage_present_address_details_audit + + -- DROP TABLE IF EXISTS public.eg_marriage_present_address_details_audit; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit + ( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + same_as_permanent boolean, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default" + ); + -- Table: public.eg_marriage_witness_details_audit + + -- DROP TABLE IF EXISTS public.eg_marriage_witness_details_audit; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit + ( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no bigint + ); + -- Table: public.eg_register_marriage_details + + -- DROP TABLE IF EXISTS public.eg_register_marriage_details; + + CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(64) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + housenameno_en character varying(1000) COLLATE pg_catalog."default", + housenameno_ml character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + registrtion_status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ack_no character varying(64) COLLATE pg_catalog."default", + is_migrated boolean, + migrated_date bigint, + CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_place_details_ack_no_fkey UNIQUE (ack_no) + ); + + -- + --ALTER TABLE IF EXISTS public.eg_register_marriage_details + -- OWNER to postgres; + -- Index: idx_eg_register_marriage_details_tenantid + + -- DROP INDEX IF EXISTS public.idx_eg_register_marriage_details_tenantid; + + CREATE INDEX IF NOT EXISTS idx_eg_register_marriage_details_tenantid + ON public.eg_register_marriage_details USING btree + (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) + TABLESPACE pg_default; + + + + + -- Table: public.eg_register_marriage_bride_details + + -- DROP TABLE IF EXISTS public.eg_register_marriage_bride_details; + + CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + adharno character varying(15) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_adharno character varying(15) COLLATE pg_catalog."default", + mother_adharno character varying(15) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_adhar character varying(15) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + no_of_spouse_living boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ); + + --TABLESPACE pg_default; + -- + --ALTER TABLE IF EXISTS public.eg_register_marriage_bride_details + -- OWNER to postgres; + + + -- Table: public.eg_register_marriage_permanent_address_details + + -- DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; + + CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ); + + --TABLESPACE pg_default; + + --ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details + -- OWNER to postgres; + + + + + + -- Table: public.eg_register_marriage_present_address_details + + -- DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details; + + CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + same_as_permanent boolean, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ); + + --TABLESPACE pg_default; + -- + --ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details + -- OWNER to postgres; + + + + + -- Table: public.eg_register_marriage_witness_details + + -- DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; + + CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + adharno character varying(15) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_mal character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_mal character varying(200) COLLATE pg_catalog."default", + mobile character varying(150) COLLATE pg_catalog."default", + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no bigint, + CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION + ); + -- + --TABLESPACE pg_default; + -- + --ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details + -- OWNER to postgres; + + CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate + ( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + registrationno character varying(25) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + filestoreid character varying(256) COLLATE pg_catalog."default", + status character varying(25) COLLATE pg_catalog."default", + additionaldetail jsonb, + embeddedurl character varying(64) COLLATE pg_catalog."default", + dateofissue bigint, + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_certificate_request_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_certificate_request_fkey FOREIGN KEY (registrydetailsid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE CASCADE + ON DELETE CASCADE + ); + -- + --ALTER TABLE IF EXISTS public.eg_marriage_certificate + -- OWNER to postgres; + + + CREATE TABLE eg_register_marriage_document( + id character varying(128), + tenantid character varying(128), + document_name character varying(128), + document_type character varying(128), + document_description character varying(140), + filestoreid character varying(1024), + document_link character varying(1024), + file_type character varying(20), + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id), + CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid,document_type,document_name,marriageid,bride_groom,active) + ); + + CREATE TABLE eg_register_marriage_document_audit( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(128), + tenantid character varying(128), + document_name character varying(128), + document_type character varying(128), + document_description character varying(140), + filestoreid character varying(1024), + document_link character varying(1024), + file_type character varying(20), + file_size bigint, + document_uuid character varying(128), + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint + ); + + + + + + + From 7701d0b28f957e13d18853fb8a238094f39d4d7f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 23 Mar 2023 16:53:35 +0530 Subject: [PATCH 038/420] migration --- .../src/main/resources/marriage.yml | 40 +- .../enrichment/MarriageDetailsEnrichment.java | 12 +- .../model/MarriageApplicationDetail.java | 18 +- .../model/marriage/BrideDetails.java | 46 +- .../model/marriage/GroomDetails.java | 71 +- .../marriage/MarriageAddressDetails.java | 435 +++++++++++ .../model/marriage/WitnessDetails.java | 92 +-- .../rowmapper/BrideDetailsRowMapper.java | 6 +- .../rowmapper/GroomDetailsRowMapper.java | 6 +- .../MarriageApplicationRowMapper.java | 6 +- .../src/main/resources/application.properties | 8 +- ...V20230322152120__marriage_services_ddl.sql | 703 ------------------ ...30324134618__marriage_services_new_dll.sql | 162 ++++ 13 files changed, 726 insertions(+), 879 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230322152120__marriage_services_ddl.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230324134618__marriage_services_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index ec3ff3dbd50..d07aa184de2 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -7,11 +7,14 @@ serviceMaps: isTransaction: true queryMaps: - query: INSERT INTO public.eg_marriage_details( - id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, street_name_en, - street_name_ml, placename_mal, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, - locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationno, registration_date, action, status, - createdtime, createdby, lastmodifiedtime, lastmodifiedby, houseno_and_nameen, houseno_and_nameml) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, + houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, + oth_marriage_type, landmark, locality_en, locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, filenumber, + file_date, file_status, registrationno, registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby, + domcorreflag, placeidcorrflag, groomnamecorreflag, bridenamecorreflag, grromagecorreflag, brideagecorreflag, groomdobcorreflag, + bridedobcorreflag, groompermanentaddrcorreflag, bridepermanentaddrcorreflag, groommothercorreflag, bridemothercorreflag, groomfathercorreflag, + bridefathercorreflag, groomguardiancorreflag, bridegurdiancorreflag) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -32,12 +35,16 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriagePlacenameEn + - jsonPath: $.MarriageDetails.*.marriagePlacenameMal + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + - jsonPath: $.MarriageDetails.*.marriageStreetEn - jsonPath: $.MarriageDetails.*.marriageStreetMal - - jsonPath: $.MarriageDetails.*.marriagePlacenameMal - - jsonPath: $.MarriageDetails.*.marriageWardCode - jsonPath: $.MarriageDetails.*.marriageTalukID @@ -78,9 +85,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn - - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal @@ -498,14 +502,14 @@ serviceMaps: - query: UPDATE public.eg_marriage_details - SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeothers=?, placeid=?, placename_en=?, - street_name_en=?, street_name_ml=?, placename_mal=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, oth_marriage_type=?, - landmark=?, locality_en=?, locality_ml=?, othersspecify=?, applicationtype=?, businessservice=?, workflowcode=?, fileno=?, file_date=?, - file_status=?, applicationnumber=?, registrationno=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, - lastmodifiedby=?, houseno_and_nameen=?, houseno_and_nameml=?, religious_institution=?, public_or_privateplace=?, - public_or_privateplacennameplace_en=?, public_or_privateplacennameplace_ml=?, religious_institution_other=?, - religious_institution_othername_en=?, religious_institution_othername_ml=? - WHERE id=?; + SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeid=?, placename_en=?, + placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, + village_name=?, marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, + workflowcode=?, applicationnumber=?, filenumber=?, file_date=?, file_status=?, registrationno=?, registration_date=?, action=?, status=?, + createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=?, domcorreflag=?, placeidcorrflag=?, groomnamecorreflag=?, bridenamecorreflag=?, + grromagecorreflag=?, brideagecorreflag=?, groomdobcorreflag=?, bridedobcorreflag=?, groompermanentaddrcorreflag=?, bridepermanentaddrcorreflag=?, + groommothercorreflag=?, bridemothercorreflag=?, groomfathercorreflag=?, bridefathercorreflag=?, groomguardiancorreflag=?, bridegurdiancorreflag=? + WHERE id=?; basePath: MarriageDetails.* jsonMaps: diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index c6db58d793b..9445684f6e1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -39,10 +39,10 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.setAuditDetails(auditDetails); if(marriage.getBrideDetails()!=null){ - marriage.getBrideDetails().setId(UUID.randomUUID().toString()); + marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); } if(marriage.getGroomDetails()!=null){ - marriage.getGroomDetails().setId(UUID.randomUUID().toString()); + marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); } marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); @@ -58,8 +58,8 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getPresent().setBrideGroom("GROOM"); } if(marriage.getWitness()!=null){ - marriage.getWitness().setId1(UUID.randomUUID().toString()); - marriage.getWitness().setId2(UUID.randomUUID().toString()); + marriage.getWitness().setWitnessId1(UUID.randomUUID().toString()); + marriage.getWitness().setWitnessId2(UUID.randomUUID().toString()); marriage.getWitness().setSerial_no1(1); marriage.getWitness().setSerial_no2(2); @@ -117,8 +117,8 @@ private void setFileNumbers(MarriageDetailsRequest request) { ListIterator itr = filecodes.listIterator(); request.getMarriageDetails() .forEach(marriage -> { - marriage.setFileno(itr.next()); - marriage.setFile_date(currentTime); +// marriage.setFileno(itr.next()); +// marriage.setFile_date(currentTime); }); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index 65438c58c4e..c713c859553 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -118,9 +118,9 @@ public class MarriageApplicationDetail { @JsonProperty("workflowCode") private String workflowcode; - @Size(max = 64) - @JsonProperty("fileNo") - private String fileno; +// @Size(max = 64) +// @JsonProperty("fileNo") +// private String fileno; @Size(max = 64) @@ -130,12 +130,12 @@ public class MarriageApplicationDetail { @JsonProperty("registration_date") private Long registrationDate; - @JsonProperty("fileDate") - private long file_date; - - @Size(max = 64) - @JsonProperty("fileStatus") - private String file_status; +// @JsonProperty("fileDate") +// private long file_date; +// +// @Size(max = 64) +// @JsonProperty("fileStatus") +// private String file_status; @Size(max = 64) @JsonProperty("action") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index 500e7b2403f..3a6b6c9ea57 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; import javax.validation.constraints.Size; @Getter @@ -12,8 +13,17 @@ public class BrideDetails { @Size(max = 64) - @JsonProperty("id") - private String id; + @JsonProperty("brideId") + private String brideId; + + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; + + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + @Size(max = 64) @JsonProperty("brideResidentShip") private String residentship; @@ -22,8 +32,6 @@ public class BrideDetails { @JsonProperty("brideAdharNo") private String adharno; - - @Size(max = 1000) @JsonProperty("bridePassportNo") private String passportno; @@ -48,8 +56,6 @@ public class BrideDetails { @JsonProperty("brideMiddlenameMal") private String middlename_mal; - - @Size(max = 200) @JsonProperty("brideLastnameEn") private String lastname_en; @@ -69,13 +75,9 @@ public class BrideDetails { @Size(max = 20) @JsonProperty("brideGender") private String gender; - - @JsonProperty("brideDOB") private long dateofbirth; - - @JsonProperty("brideAge") private Integer age; @@ -107,8 +109,6 @@ public class BrideDetails { @JsonProperty("brideMotherAdharNo") private String mother_adharno; - - @Size(max = 200) @JsonProperty("brideGuardiannameEn") private String guardianname_en; @@ -122,20 +122,18 @@ public class BrideDetails { private String guardian_adhar; - @Size(max = 200) - @JsonProperty("brideProfessionEn") - private String profession_en; - - @Size(max = 200) - @JsonProperty("brideProfessionMal") - private String profession_mal; +// @Size(max = 200) +// @JsonProperty("brideProfessionEn") +// private String profession_en; +// +// @Size(max = 200) +// @JsonProperty("brideProfessionMal") +// private String profession_mal; @Size(max = 64) @JsonProperty("brideMaritalstatusID") private String maritalstatusid; - - @JsonProperty("brideSpouseLiving") private Boolean is_spouse_living; @@ -143,14 +141,12 @@ public class BrideDetails { @JsonProperty("brideNoOfSpouse") private Boolean no_of_spouse_living; - @Size(max = 150) @JsonProperty("bridePhotoUrl") private String photo_url; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; - @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index 9790e21680e..b8b2679c802 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @@ -11,77 +12,62 @@ @NoArgsConstructor @Builder public class GroomDetails { - @NotNull @Size(max = 64) - @JsonProperty("id") - private String id; + @JsonProperty("groomId") + private String groomId; + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; @Size(max = 64) @JsonProperty("groomResidentShip") private String residentship; - @Size(max = 15) @JsonProperty("groomAdharNo") private String adharno; - @Size(max = 1000) @JsonProperty("groomPassportNo") private String passportno; - @Size(max = 64) @JsonProperty("groomSocialSecurityNo") private String socialsecurityno; - @Size(max = 200) @JsonProperty("groomFirstnameEn") private String firstname_en; - @Size(max = 200) @JsonProperty("groomFirstnameMal") private String firstname_mal; - @Size(max = 200) @JsonProperty("groomMiddlenameEn") private String middlename_en; - @Size(max = 200) @JsonProperty("groomMiddlenameMal") private String middlename_mal; - - @Size(max = 200) @JsonProperty("groomLastnameEn") private String lastname_en; - @Size(max = 200) @JsonProperty("groomLastnameMal") private String lastname_mal; - @Size(max = 150) @JsonProperty("groomMobile") private String mobile; - @Size(max = 300) @JsonProperty("groomEmailid") private String emailid; - @Size(max = 20) @JsonProperty("groomGender") private String gender; - - @JsonProperty("groomDOB") private long dateofbirth; - - - @JsonProperty("groomAge") private Integer age; - @Size(max = 64) @JsonProperty("groomParentGuardian") private String parent_guardian; - @Size(max = 200) @JsonProperty("groomFathernameEn") private String fathername_en; @@ -89,11 +75,9 @@ public class GroomDetails { @Size(max = 200) @JsonProperty("groomFathernameMal") private String fathername_mal; - @Size(max = 200) @JsonProperty("groomMothernameEn") private String mothername_en; - @Size(max = 200) @JsonProperty("groomMothernameMal") private String mothername_mal; @@ -101,57 +85,40 @@ public class GroomDetails { @Size(max = 15) @JsonProperty("groomFatherAdharNo") private String father_adharno; - @Size(max = 15) @JsonProperty("groomMotherAdharNo") private String mother_adharno; - - - @Size(max = 200) @JsonProperty("groomGuardiannameEn") private String guardianname_en; - @Size(max = 200) @JsonProperty("groomGuardiannameMal") private String guardianname_mal; - @Size(max = 15) @JsonProperty("groomGardianAdhar") private String guardian_adhar; - - @Size(max = 200) - @JsonProperty("groomProfessionEn") - private String profession_en; - - - @Size(max = 200) - @JsonProperty("groomProfessionMal") - private String profession_mal; +// @Size(max = 200) +// @JsonProperty("groomProfessionEn") +// private String profession_en; +// +// +// @Size(max = 200) +// @JsonProperty("groomProfessionMal") +// private String profession_mal; @Size(max = 64) @JsonProperty("groomMaritalstatusID") private String maritalstatusid; - - - @JsonProperty("groomSpouseLiving") private Boolean is_spouse_living; - - @JsonProperty("groomNoOfSpouse") private Boolean no_of_spouse_living; - - @Size(max = 150) @JsonProperty("groomPhotoUrl") private String photo_url; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; - @NotNull - @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; - } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java new file mode 100644 index 00000000000..55935ebd9ef --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java @@ -0,0 +1,435 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.Size; + +public class MarriageAddressDetails { + + @Size(max = 64) + @JsonProperty("presentaddressCountry") + private String presentaddressCountry; + + @Size(max = 64) + @JsonProperty("presentaddressStateName") + private String presentaddressStateName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaLBName") + private String presentInsideKeralaLBName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaDistrict") + private String presentInsideKeralaDistrict; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaTaluk") + private String presentInsideKeralaTaluk; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaVillage") + private String presentInsideKeralaVillage; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameEn") + private String presentInsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameEn") + private String presentInsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameEn") + private String presentInsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameMl") + private String presentInsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameMl") + private String presentInsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameMl") + private String presentInsideKeralaHouseNameMl; + + @Size(max = 10) + @JsonProperty("presentInsideKeralaPincode") + private String presentInsideKeralaPincode; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaPostOffice") + private String presentInsideKeralaPostOffice; + + @Size(max = 64) + @JsonProperty("presentWardNo") + private String presentWardNo; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaDistrict") + private String presentOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaTaluk") + private String presentOutsideKeralaTalukName; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaVillage") + private String presentOutsideKeralaVillageName; + + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaCityVilgeEn") + private String presentOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPincode") + private String presentOutsideKeralaPincode; + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeEn") + private String presentOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeMl") + private String presentOutsideKeralaPostOfficeMl; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameEn") + private String presentOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameEn") + private String presentOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameEn") + private String presentOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameMl") + private String presentOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameMl") + private String presentOutsideKeralaStreetNameMl; + + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameMl") + private String presentOutsideKeralaHouseNameMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEn") + private String presentOutSideIndiaAdressEn; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMl") + private String presentOutSideIndiaAdressMl; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEnB") + private String presentOutSideIndiaAdressEnB; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMlB") + private String presentOutSideIndiaAdressMlB; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceEn") + private String presentOutSideIndiaProvinceEn; + + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaLocalityMl") + private String presentOutSideIndiaLocalityMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceMl") + private String presentOutSideIndiaProvinceMl; + + @Size(max = 64) + @JsonProperty("presentOutSideCountry") + private String presentOutSideCountry; + + @JsonProperty("isPrsentAddress") + private Boolean isPrsentAddress; + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaadrsVillage") + private String presentOutSideIndiaadrsVillage; + + @Size(max = 64) + @JsonProperty("presentOutSideIndiaadrsCityTown") + private String presentOutSideIndiaadrsCityTown; + + ////Db Fields////// + + @JsonProperty("isPrsentAddressInt") + private Integer isPrsentAddressInt; + @Size(max = 64) + @JsonProperty("presentUuid") + private String presentUuid; + + @Size(max = 64) + @JsonProperty("countryIdPresent") + private String countryIdPresent; + + @Size(max = 64) + @JsonProperty("stateIdPresent") + private String stateIdPresent; + + @Size(max = 64) + @JsonProperty("districtIdPresent") + private String districtIdPresent; + + @Size(max = 64) + @JsonProperty("pinNoPresent") + private String pinNoPresent; + + @Size(max = 1000) + @JsonProperty("localityEnPresent") + private String localityEnPresent; + + @Size(max = 1000) + @JsonProperty("localityMlPresent") + private String localityMlPresent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPresent") + private String streetNameEnPresent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPresent") + private String streetNameMlPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPresent") + private String houseNameNoEnPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPresent") + private String houseNameNoMlPresent; + + @Size(max = 1000) + @JsonProperty("villageNamePresent") + private String villageNamePresent; + + @Size(max = 10) + @JsonProperty("poNoPresent") + private String poNoPresent; + + @Size(max = 64) + @JsonProperty("brideGroomPresent") + private String brideGroomPresent; + ////Permanant + @Size(max = 1000) + @JsonProperty("permtaddressCountry") + private String permtaddressCountry; + + @Size(max = 64) + @JsonProperty("permtaddressStateName") + private String permtaddressStateName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrLBName") + private String permntInKeralaAdrLBName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrDistrict") + private String permntInKeralaAdrDistrict; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaCityVilgeEn") + private String permntOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrTaluk") + private String permntInKeralaAdrTaluk; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrVillage") + private String permntInKeralaAdrVillage; + + @Size(max = 1000) + @JsonProperty("permntInKeralaAdrLocalityNameEn") + private String permntInKeralaAdrLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntInKeralaAdrStreetNameEn") + private String permntInKeralaAdrStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameEn") + private String permntInKeralaAdrHouseNameEn; + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrLocalityNameMl") + private String permntInKeralaAdrLocalityNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrStreetNameMl") + private String permntInKeralaAdrStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameMl") + private String permntInKeralaAdrHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPincode") + private String permntInKeralaAdrPincode; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPostOffice") + private String permntInKeralaAdrPostOffice; + + @Size(max = 64) + @JsonProperty("permntInKeralaWardNo") + private String permntInKeralaWardNo; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaDistrict") + private String permntOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaTaluk") + private String permntOutsideKeralaTaluk; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaVillage") + private String permntOutsideKeralaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPincode") + private String permntOutsideKeralaPincode; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameEn") + private String permntOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameEn") + private String permntOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameEn") + private String permntOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameMl") + private String permntOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameMl") + private String permntOutsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameMl") + private String permntOutsideKeralaHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeEn") + private String permntOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeMl") + private String permntOutsideKeralaPostOfficeMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneEn") + private String permntOutsideIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneMl") + private String permntOutsideIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoEn") + private String permntOutsideIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoMl") + private String permntOutsideIndiaLinetwoMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaprovinceEn") + private String permntOutsideIndiaprovinceEn; + + @Size(max = 1000) + @JsonProperty("permntOutsideIndiaVillage") + private String permntOutsideIndiaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCityTown") + private String permntOutsideIndiaCityTown; + + @Size(max = 10) + @JsonProperty("permanentOutsideIndiaPostCode") + private String permanentOutsideIndiaPostCode; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCountry") + private String permntOutsideIndiaCountry; + + + ////Db Fields////// + + @Size(max = 64) + @JsonProperty("permanentUuid") + private String permanentUuid; + @Size(max = 64) + @JsonProperty("countryIdPermanent") + private String countryIdPermanent; + + @Size(max = 64) + @JsonProperty("stateIdPermanent") + private String stateIdPermanent; + + @Size(max = 64) + @JsonProperty("districtIdPermanent") + private String districtIdPermanent; + + @Size(max = 64) + @JsonProperty("pinNoPermanent") + private String pinNoPermanent; + + @Size(max = 1000) + @JsonProperty("localityEnPermanent") + private String localityEnPermanent; + + @Size(max = 1000) + @JsonProperty("localityMlPermanent") + private String localityMlPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPermanent") + private String streetNameEnPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPermanent") + private String streetNameMlPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPermanent") + private String houseNameNoEnPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPermanent") + private String houseNameNoMlPermanent; + + @Size(max = 1000) + @JsonProperty("villageNamePermanent") + private String villageNamePermanent; + + @Size(max = 10) + @JsonProperty("poNoPermanent") + private String poNoPermanent; + + @Size(max = 64) + @JsonProperty("brideGroomPermanent") + private String brideGroomPermanent; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index 4a73ac71245..6f0dd470670 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @@ -12,85 +13,70 @@ @Builder public class WitnessDetails { - @NotNull + @NotNull @Size(max = 64) - @JsonProperty("id1") - private String id1; - + @JsonProperty("witnessId1") + private String witnessId1; @NotNull @Size(max = 64) - @JsonProperty("id2") - private String id2; + @JsonProperty("witnessId2") + private String witnessId2; + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; @Size(max = 15) - @JsonProperty("witness1AdharNo") - private String adharno; - - @Size(max = 200) - @JsonProperty("witness1NameEn") - private String name_en; - - - @Size(max = 200) - @JsonProperty("witness1NameMal") - private String name_mal; - - - @JsonProperty("witness1Age") - private Integer age; - - @Size(max = 200) - @JsonProperty("witness1AddresSEn") - private String address_en; - - @Size(max = 200) - @JsonProperty("witness1AddressMal") - private String address_mal; - - @Size(max = 150) - @JsonProperty("witness1Mobile") - private String mobile; - + @JsonProperty("witness1AdharNo") + private String adharno; + @Size(max = 200) + @JsonProperty("witness1NameEn") + private String name_en; + @Size(max = 200) + @JsonProperty("witness1NameMal") + private String name_mal; + @JsonProperty("witness1Age") + private Integer age; + @Size(max = 200) + @JsonProperty("witness1AddresSEn") + private String address_en; + @Size(max = 200) + @JsonProperty("witness1AddressMal") + private String address_mal; + @Size(max = 150) + @JsonProperty("witness1Mobile") + private String mobile; @JsonProperty("witness1ISEsigned") - private Boolean is_esigned; - - @NotNull - @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; - @JsonProperty("serial_no1") - private Integer serial_no1; - @JsonProperty("serial_no2") - private Integer serial_no2; + private Boolean is_esigned; + @JsonProperty("serial_no1") + private Integer serial_no1; + @JsonProperty("serial_no2") + private Integer serial_no2; @Size(max = 15) @JsonProperty("witness2AdharNo") private String witness2AdharNo; - @Size(max = 200) @JsonProperty("witness2NameEn") private String witness2NameEn; - @Size(max = 200) @JsonProperty("witness2NameMal") private String witness2NameMal; - - @JsonProperty("witness2Age") private Integer witness2Age; - @Size(max = 200) @JsonProperty("witness2AddresSEn") private String witness2AddresSEn; - @Size(max = 200) @JsonProperty("witness2AddressMal") private String witness2AddressMal; - @Size(max = 150) @JsonProperty("witness2Mobile") private String witness2Mobile; @JsonProperty("witness2ISEsigned") - private Boolean witness2ISEsigned; - + private Boolean witness2ISEsigned; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 88360f77633..1a23c840f30 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -9,7 +9,7 @@ public interface BrideDetailsRowMapper { default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ return BrideDetails.builder() - .id(rs.getString("bd_id")) + //.id(rs.getString("bd_id")) .residentship(rs.getString("bd_residentship")) .adharno(rs.getString("bd_adharno")) .passportno(rs.getString("bd_passportno")) @@ -35,8 +35,8 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ .guardianname_en(rs.getString("bd_guardianname_en")) .guardianname_mal(rs.getString("bd_guardianname_mal")) .guardian_adhar(rs.getString("bd_guardian_adhar")) - .profession_en(rs.getString("bd_profession_en")) - .profession_mal(rs.getString("bd_profession_mal")) + // .profession_en(rs.getString("bd_profession_en")) + // .profession_mal(rs.getString("bd_profession_mal")) .maritalstatusid(rs.getString("bd_maritalstatusid")) .is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index bba0b2df6e7..1f8145a21ed 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -9,7 +9,7 @@ public interface GroomDetailsRowMapper { default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ return GroomDetails.builder() - .id(rs.getString("gd_id")) + // .id(rs.getString("gd_id")) .residentship(rs.getString("gd_residentship")) .adharno(rs.getString("gd_adharno")) .passportno(rs.getString("gd_passportno")) @@ -35,8 +35,8 @@ default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ .guardianname_en(rs.getString("gd_guardianname_en")) .guardianname_mal(rs.getString("gd_guardianname_mal")) .guardian_adhar(rs.getString("gd_guardian_adhar")) - .profession_en(rs.getString("gd_profession_en")) - .profession_mal(rs.getString("gd_profession_mal")) + // .profession_en(rs.getString("gd_profession_en")) + //.profession_mal(rs.getString("gd_profession_mal")) .maritalstatusid(rs.getString("gd_maritalstatusid")) .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index b67a3ea7ed3..e7e368d7800 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -43,9 +43,9 @@ public List extractData(ResultSet rs) throws SQLExcep .applicationtype(rs.getString("ma_applicationtype")) .businessservice(rs.getString("ma_businessservice")) .workflowcode(rs.getString("ma_workflowcode")) - .fileno(rs.getString("ma_fileno")) - .file_date(rs.getLong("ma_file_date")) - .file_status(rs.getString("ma_file_status")) + //.fileno(rs.getString("ma_fileno")) + //.file_date(rs.getLong("ma_file_date")) + // .file_status(rs.getString("ma_file_status")) .applicationnumber(rs.getString("ma_applicationnumber")) .registrationDate(rs.getLong("ma_registration_date")) .registrationno(rs.getString("ma_registrationno")) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index ad0e24f1c3c..0e55d0545c0 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,15 +5,15 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230322152120__marriage_services_ddl.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230322152120__marriage_services_ddl.sql deleted file mode 100644 index 063ae33f37b..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230322152120__marriage_services_ddl.sql +++ /dev/null @@ -1,703 +0,0 @@ --- Table: public.eg_marriage_details - --- DROP TABLE IF EXISTS public.eg_marriage_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeid character varying(1000) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - placename_mal character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - applicationnumber character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", - houseno_and_nameml character varying(2500) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), - CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, tenantid) -); -CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid - ON public.eg_marriage_details USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) - TABLESPACE pg_default; - - - - -- Table: public.eg_marriage_bride_groom_details - - -- DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - - -- Table: public.eg_marriage_permanent_address_details - - -- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - tenantid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - - - -- Table: public.eg_marriage_present_address_details - - -- DROP TABLE IF EXISTS public.eg_marriage_present_address_details; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - same_as_permanent boolean, - tenantid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - - -- Table: public.eg_marriage_witness_details - - -- DROP TABLE IF EXISTS public.eg_marriage_witness_details; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no bigint, - CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - - -- Table: public.eg_marriage_details_audit - - -- DROP TABLE IF EXISTS public.eg_marriage_details_audit; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_details_audit - ( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeid character varying(1000) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - placename_mal character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - applicationnumber character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - houseno_and_nameen character varying(2500) COLLATE pg_catalog."default", - houseno_and_nameml character varying(2500) COLLATE pg_catalog."default" - ); - - -- Table: public.eg_marriage_bride_groom_details_audit - - -- DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details_audit; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details_audit - ( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - photo_url character varying(150) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" - ); - - -- Table: public.eg_marriage_permanent_address_details_audit - - -- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details_audit; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details_audit - ( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - tenantid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default" - ); - -- Table: public.eg_marriage_present_address_details_audit - - -- DROP TABLE IF EXISTS public.eg_marriage_present_address_details_audit; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit - ( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - same_as_permanent boolean, - tenantid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default" - ); - -- Table: public.eg_marriage_witness_details_audit - - -- DROP TABLE IF EXISTS public.eg_marriage_witness_details_audit; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit - ( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no bigint - ); - -- Table: public.eg_register_marriage_details - - -- DROP TABLE IF EXISTS public.eg_register_marriage_details; - - CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeid character varying(64) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - placename_ml character varying(1000) COLLATE pg_catalog."default", - housenameno_en character varying(1000) COLLATE pg_catalog."default", - housenameno_ml character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - registrtion_status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - ack_no character varying(64) COLLATE pg_catalog."default", - is_migrated boolean, - migrated_date bigint, - CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_place_details_ack_no_fkey UNIQUE (ack_no) - ); - - -- - --ALTER TABLE IF EXISTS public.eg_register_marriage_details - -- OWNER to postgres; - -- Index: idx_eg_register_marriage_details_tenantid - - -- DROP INDEX IF EXISTS public.idx_eg_register_marriage_details_tenantid; - - CREATE INDEX IF NOT EXISTS idx_eg_register_marriage_details_tenantid - ON public.eg_register_marriage_details USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) - TABLESPACE pg_default; - - - - - -- Table: public.eg_register_marriage_bride_details - - -- DROP TABLE IF EXISTS public.eg_register_marriage_bride_details; - - CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - firstname_ml character varying(200) COLLATE pg_catalog."default", - middlename_ml character varying(200) COLLATE pg_catalog."default", - lastname_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - fathername_ml character varying(200) COLLATE pg_catalog."default", - mothername_ml character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_ml character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - no_of_spouse_living boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_bride_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - - --TABLESPACE pg_default; - -- - --ALTER TABLE IF EXISTS public.eg_register_marriage_bride_details - -- OWNER to postgres; - - - -- Table: public.eg_register_marriage_permanent_address_details - - -- DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; - - CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - - --TABLESPACE pg_default; - - --ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details - -- OWNER to postgres; - - - - - - -- Table: public.eg_register_marriage_present_address_details - - -- DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details; - - CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - same_as_permanent boolean, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - - --TABLESPACE pg_default; - -- - --ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details - -- OWNER to postgres; - - - - - -- Table: public.eg_register_marriage_witness_details - - -- DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; - - CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no bigint, - CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - -- - --TABLESPACE pg_default; - -- - --ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details - -- OWNER to postgres; - - CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate - ( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - registrationno character varying(25) COLLATE pg_catalog."default", - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - filestoreid character varying(256) COLLATE pg_catalog."default", - status character varying(25) COLLATE pg_catalog."default", - additionaldetail jsonb, - embeddedurl character varying(64) COLLATE pg_catalog."default", - dateofissue bigint, - tenantid character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_certificate_request_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_certificate_request_fkey FOREIGN KEY (registrydetailsid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE CASCADE - ON DELETE CASCADE - ); - -- - --ALTER TABLE IF EXISTS public.eg_marriage_certificate - -- OWNER to postgres; - - - CREATE TABLE eg_register_marriage_document( - id character varying(128), - tenantid character varying(128), - document_name character varying(128), - document_type character varying(128), - document_description character varying(140), - filestoreid character varying(1024), - document_link character varying(1024), - file_type character varying(20), - file_size bigint, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - active boolean, - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id), - CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid,document_type,document_name,marriageid,bride_groom,active) - ); - - CREATE TABLE eg_register_marriage_document_audit( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(128), - tenantid character varying(128), - document_name character varying(128), - document_type character varying(128), - document_description character varying(140), - filestoreid character varying(1024), - document_link character varying(1024), - file_type character varying(20), - file_size bigint, - document_uuid character varying(128), - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - active boolean, - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint - ); - - - - - - - diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230324134618__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230324134618__marriage_services_new_dll.sql new file mode 100644 index 00000000000..9fb9118279a --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230324134618__marriage_services_new_dll.sql @@ -0,0 +1,162 @@ +ALTER TABLE public.eg_marriage_permanent_address_details +ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_marriage_permanent_address_details_audit +ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_present_address_details +ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_marriage_present_address_details_audit +ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_register_marriage_permanent_address_details +ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_register_marriage_permanent_address_details_audit +ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_register_marriage_present_address_details +ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_register_marriage_present_address_details_audit +ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", +ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; + + + +ALTER TABLE public.eg_marriage_details +ADD COLUMN DOMCorreflag boolean, +ADD COLUMN placeIdCorrflag boolean, +ADD COLUMN groomNameCorreflag boolean, +ADD COLUMN brideNameCorreflag boolean, +ADD COLUMN grromAgeCorreflag boolean, +ADD COLUMN brideAgeCorreflag boolean, +ADD COLUMN groomDOBCorreflag boolean, +ADD COLUMN brideDOBCorreflag boolean, +ADD COLUMN groomPermanentAddrCorreflag boolean, +ADD COLUMN bridePermanentAddrCorreflag boolean, +ADD COLUMN groomMotherCorreflag boolean, +ADD COLUMN brideMotherCorreflag boolean, +ADD COLUMN groomFatherCorreflag boolean, +ADD COLUMN brideFatherCorreflag boolean, +ADD COLUMN groomGuardianCorreflag boolean, +ADD COLUMN brideGurdianCorreflag boolean; + + +ALTER TABLE public.eg_marriage_details_audit +ADD COLUMN DOMCorreflag boolean, +ADD COLUMN placeIdCorrflag boolean, +ADD COLUMN groomNameCorreflag boolean, +ADD COLUMN brideNameCorreflag boolean, +ADD COLUMN grromAgeCorreflag boolean, +ADD COLUMN brideAgeCorreflag boolean, +ADD COLUMN groomDOBCorreflag boolean, +ADD COLUMN brideDOBCorreflag boolean, +ADD COLUMN groomPermanentAddrCorreflag boolean, +ADD COLUMN bridePermanentAddrCorreflag boolean, +ADD COLUMN groomMotherCorreflag boolean, +ADD COLUMN brideMotherCorreflag boolean, +ADD COLUMN groomFatherCorreflag boolean, +ADD COLUMN brideFatherCorreflag boolean, +ADD COLUMN groomGuardianCorreflag boolean, +ADD COLUMN brideGurdianCorreflag boolean; + + + +ALTER TABLE public.eg_marriage_details +DROP COLUMN filenumber, +DROP COLUMN file_date, +DROP COLUMN file_status; + +--ALTER TABLE public.eg_register_marriage_details +--ADD COLUMN DOMCorreflag boolean, +--ADD COLUMN placeIdCorrflag boolean, +--ADD COLUMN groomNameCorreflag boolean, +--ADD COLUMN brideNameCorreflag boolean, +--ADD COLUMN grromAgeCorreflag boolean, +--ADD COLUMN brideAgeCorreflag boolean, +--ADD COLUMN groomDOBCorreflag boolean, +--ADD COLUMN brideDOBCorreflag boolean, +--ADD COLUMN groomPermanentAddrCorreflag boolean, +--ADD COLUMN bridePermanentAddrCorreflag boolean, +--ADD COLUMN groomMotherCorreflag boolean, +--ADD COLUMN brideMotherCorreflag boolean, +--ADD COLUMN groomFatherCorreflag boolean, +--ADD COLUMN brideFatherCorreflag boolean, +--ADD COLUMN groomGuardianCorreflag boolean, +--ADD COLUMN brideGurdianCorreflag boolean; +-- +--ALTER TABLE public.eg_register_marriage_details_audit +--ADD COLUMN DOMCorreflag boolean, +--ADD COLUMN placeIdCorrflag boolean, +--ADD COLUMN groomNameCorreflag boolean, +--ADD COLUMN brideNameCorreflag boolean, +--ADD COLUMN grromAgeCorreflag boolean, +--ADD COLUMN brideAgeCorreflag boolean, +--ADD COLUMN groomDOBCorreflag boolean, +--ADD COLUMN brideDOBCorreflag boolean, +--ADD COLUMN groomPermanentAddrCorreflag boolean, +--ADD COLUMN bridePermanentAddrCorreflag boolean, +--ADD COLUMN groomMotherCorreflag boolean, +--ADD COLUMN brideMotherCorreflag boolean, +--ADD COLUMN groomFatherCorreflag boolean, +--ADD COLUMN brideFatherCorreflag boolean, +--ADD COLUMN groomGuardianCorreflag boolean, +--ADD COLUMN brideGurdianCorreflag boolean; +-- +-- +-- From f7dbfe4ed5f60a2220c5ba5c68cd881d27f79507 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 24 Mar 2023 12:21:26 +0530 Subject: [PATCH 039/420] migration and model updation --- .../marriage/MarriageAddressDetails.java | 8 ++++ .../marriage/MarriageApplicationResponse.java | 7 +--- .../model/marriage/WitnessDetails.java | 26 +++++++++++- ...30323034512__marriage_services_new_dll.sql | 7 +--- ...30323144512__marriage_services_new_dll.sql | 40 +++++++++++++++++++ 5 files changed, 76 insertions(+), 12 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java index 55935ebd9ef..e6aaea78757 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java @@ -219,6 +219,10 @@ public class MarriageAddressDetails { @JsonProperty("villageNamePresent") private String villageNamePresent; + @Size(max = 1000) + @JsonProperty("villageIdPresent") + private String villageIdPresent; + @Size(max = 10) @JsonProperty("poNoPresent") private String poNoPresent; @@ -424,6 +428,10 @@ public class MarriageAddressDetails { @JsonProperty("villageNamePermanent") private String villageNamePermanent; + @Size(max = 1000) + @JsonProperty("villageIdPermanent") + private String villageIdPermanent; + @Size(max = 10) @JsonProperty("poNoPermanent") private String poNoPermanent; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java index c8cf96642d4..aceebe33327 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java @@ -31,19 +31,16 @@ public class MarriageApplicationResponse { // @JsonProperty("BirthCertificate") // @Valid - // private BirthCertificate birthCertificate; - +// private BirthCertificate birthCertificate; @JsonProperty("Count") private int count; - public MarriageApplicationResponse addBirthApplication(MarriageApplicationDetail details) { + public MarriageApplicationResponse addMarriageApplication(MarriageApplicationDetail details) { if (marriageApplicationDetails == null) { marriageApplicationDetails = new ArrayList<>(); } marriageApplicationDetails.add(details); return this; } - - } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index 6f0dd470670..c095df5506b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -17,64 +17,86 @@ public class WitnessDetails { @Size(max = 64) @JsonProperty("witnessId1") private String witnessId1; + @NotNull @Size(max = 64) @JsonProperty("witnessId2") private String witnessId2; + @Size(max = 64) @JsonProperty("tenentId") private String tenentId; + @Size(max = 64) @JsonProperty("marriageid") private String marriageid; + @Size(max = 15) @JsonProperty("witness1AdharNo") private String adharno; + @Size(max = 200) @JsonProperty("witness1NameEn") private String name_en; + @Size(max = 200) @JsonProperty("witness1NameMal") private String name_mal; + @JsonProperty("witness1Age") private Integer age; - @Size(max = 200) + + @Size(max = 500) @JsonProperty("witness1AddresSEn") private String address_en; - @Size(max = 200) + + @Size(max = 500) @JsonProperty("witness1AddressMal") private String address_mal; + @Size(max = 150) @JsonProperty("witness1Mobile") private String mobile; + @JsonProperty("witness1ISEsigned") private Boolean is_esigned; + @JsonProperty("serial_no1") private Integer serial_no1; + @JsonProperty("serial_no2") private Integer serial_no2; + @Size(max = 15) @JsonProperty("witness2AdharNo") private String witness2AdharNo; + @Size(max = 200) @JsonProperty("witness2NameEn") private String witness2NameEn; + @Size(max = 200) @JsonProperty("witness2NameMal") private String witness2NameMal; + @JsonProperty("witness2Age") private Integer witness2Age; + @Size(max = 200) @JsonProperty("witness2AddresSEn") private String witness2AddresSEn; + @Size(max = 200) @JsonProperty("witness2AddressMal") private String witness2AddressMal; + @Size(max = 150) @JsonProperty("witness2Mobile") private String witness2Mobile; + @JsonProperty("witness2ISEsigned") private Boolean witness2ISEsigned; + @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql index 772c8bbc896..65ff8ebedd5 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql @@ -24,10 +24,7 @@ DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; DROP TABLE IF EXISTS public.eg_register_marriage_witness_details_audit; DROP TABLE IF EXISTS public.eg_register_marriage_document; DROP TABLE IF EXISTS public.eg_register_marriage_document_audit; - - - - +DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; DROP FUNCTION IF EXISTS public.process_eg_marriage_bride_details_audit(); @@ -35,4 +32,4 @@ DROP FUNCTION IF EXISTS public.process_eg_marriage_details_audit(); DROP FUNCTION IF EXISTS public.process_eg_marriage_groom_details_audit(); DROP FUNCTION IF EXISTS public.process_eg_marriage_permanent_address_details_audit(); DROP FUNCTION IF EXISTS public.process_eg_marriage_present_address_details_audit(); -DROP FUNCTION IF EXISTS public.process_eg_marriage_witness_details_audit(); \ No newline at end of file +DROP FUNCTION IF EXISTS public.process_eg_marriage_witness_details_audit(); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql index ca1e75a618e..8c5afb0c614 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql @@ -905,3 +905,43 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate_audit createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedby character varying(64) COLLATE pg_catalog."default" ); + + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id) +); From c9fceaeb14d0e882afb9f56ed3358302552ff62b Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 24 Mar 2023 16:44:58 +0530 Subject: [PATCH 040/420] marriage registry --- .../MarriageApplicationConfiguration.java | 18 + .../enrichment/BaseEnrichment.java | 28 ++ .../MarriageRegistryEnrichment.java | 121 +++++ .../model/BrideRegistryDetails.java | 158 +++++++ .../model/GroomRegistryDetails.java | 129 +++++ .../model/MarriageRegistryAddressDetails.java | 446 ++++++++++++++++++ .../model/MarriageRegistryDetails.java | 214 +++++++++ .../model/MarriageRegistryRequest.java | 34 ++ .../model/MarriageRegistryResponse.java | 49 ++ .../model/MarriageRegistrySearchCriteria.java | 50 ++ .../model/WitnessRegistryDetails.java | 114 +++++ .../MarriageRegistryRepository.java | 77 +++ .../querybuilder/BaseMarriageQuery.java | 101 ++++ .../querybuilder/BaseQueryBuilder copy.java | 149 ++++++ .../MarriageRegistryQueryBuilder.java | 83 ++++ .../repository/rowmapper/BaseRowMapper.java | 21 + .../rowmapper/BrideRegistryRowMapper.java | 53 +++ .../rowmapper/GroomRegistryRowMapper.java | 48 ++ .../MarriageAddressRegistryRowMapper.java | 37 ++ .../rowmapper/MarriageRegistryRowMapper.java | 76 +++ .../rowmapper/WitnessDetailsRowMapper.java | 25 + .../service/MarriageRegistryService.java | 36 ++ .../src/main/resources/application.properties | 12 +- 23 files changed, 2075 insertions(+), 4 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/BaseEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryAddressDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseQueryBuilder copy.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessDetailsRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index d9ee2e740d9..dc313eb6616 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -33,4 +33,22 @@ public class MarriageApplicationConfiguration { @Value("${egov.idgen.marriagereg.name}") private String getMarriageRegisNumberName; + //Jasmine 24.03.2023 + + @Value("${persister.save.marriage.registry.topic}") + private String SaveMarriageRegistryTopic; + + @Value("${persister.update.marriage.registry.topic}") + private String UpdateMarriageRegistryTopic; + + + @Value("${egov.bnd.default.limit}") + private Integer defaultBndLimit; + + @Value("${egov.bnd.default.offset}") + private Integer defaultOffset; + + @Value("${egov.bnd.max.limit}") + private Integer maxSearchLimit; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/BaseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/BaseEnrichment.java new file mode 100644 index 00000000000..3055c453ea8 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/BaseEnrichment.java @@ -0,0 +1,28 @@ +package org.ksmart.marriage.marriageregistry.enrichment; + +import org.ksmart.marriage.common.model.AuditDetails; +/** + * Created by Jasmine + * on 24.03.2023 + */ +public interface BaseEnrichment { + default AuditDetails buildAuditDetails(String by, Boolean create) { + AuditDetails auditDetails; + + Long currentTime = Long.valueOf(System.currentTimeMillis()); + if (create) { + auditDetails = AuditDetails.builder() + .createdBy(by) + .createdTime(currentTime) + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } else { + auditDetails = AuditDetails.builder() + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } + return auditDetails; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java new file mode 100644 index 00000000000..73883dd5b65 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -0,0 +1,121 @@ +package org.ksmart.marriage.marriageregistry.enrichment; + +import org.apache.commons.collections4.CollectionUtils; +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.request.User; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.common.repository.IdGenRepository; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; +// import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; +import org.ksmart.marriage.utils.IDGenerator; +import org.ksmart.marriage.utils.MarriageConstants; +import org.ksmart.marriage.utils.enums.ErrorCodes; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.IdGenerator; + +import java.util.List; +import java.util.ListIterator; +import java.util.UUID; + +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Component +public class MarriageRegistryEnrichment implements BaseEnrichment { + @Autowired + MarriageApplicationConfiguration config; + @Autowired + IdGenRepository idGenRepository; + @Autowired + IDGenerator idGenerator; + + public void enrichCreate(MarriageRegistryRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + request.getMarriageDetails().forEach(marriage -> { + + marriage.setId(UUID.randomUUID().toString()); + marriage.setAuditDetails(auditDetails); + if(marriage.getBrideDetails()!=null){ + marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); + } + if(marriage.getGroomDetails()!=null){ + marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); + } + + marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); + marriage.getPermanentBride().setId2(UUID.randomUUID().toString()); + + marriage.getPermanentBride().setBrideGroom1("BRIDE"); + marriage.getPermanentBride().setBrideGroom2("GROOM"); + + if(marriage.getPresent()!=null){ + marriage.getPresent().setId(UUID.randomUUID().toString()); + marriage.getPresent().setBrideGroom("BRIDE"); + marriage.getPresent().setBrideGroom("GROOM"); + } + if(marriage.getWitness()!=null){ + marriage.getWitness().setWitnessId1(UUID.randomUUID().toString()); + marriage.getWitness().setWitnessId2(UUID.randomUUID().toString()); + marriage.getWitness().setSerial_no1(1); + marriage.getWitness().setSerial_no2(2); + } + }); + setRegistrationNumber(request); + + } + + private void setRegistrationNumber(MarriageRegistryRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + List marriageDetails = request.getMarriageDetails(); + String tenantId = marriageDetails.get(0) + .getTenantid(); + + List filecodes = getIds(requestInfo, + tenantId, + config.getGetMarriageRegisNumberName(), + request.getMarriageDetails().get(0).getModulecode(), + "REG", + marriageDetails.size()); + validateFileCodes(filecodes, marriageDetails.size()); + Long currentTime = Long.valueOf(System.currentTimeMillis()); + ListIterator itr = filecodes.listIterator(); + request.getMarriageDetails() + .forEach(marriage -> { + if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { + marriage.setRegistrationno(itr.next()); + marriage.setRegistrationDate(currentTime); + } + }); + } + + + + public void enrichUpdate(MarriageRegistryRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); + request.getMarriageDetails() + .forEach(marriage -> marriage.setAuditDetails(auditDetails)); + } + + private List getIds(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { + return idGenRepository.getIdList(requestInfo, tenantId, idName, moduleCode, fnType, count); + } + + private void validateFileCodes(List fileCodes, int count) { + if (CollectionUtils.isEmpty(fileCodes)) { + throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), "No file code(s) returned from idgen service"); + } + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java new file mode 100644 index 00000000000..118921d37a6 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java @@ -0,0 +1,158 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; + +import javax.validation.constraints.Size; + +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class BrideRegistryDetails { + + @Size(max = 64) + @JsonProperty("brideId") + private String brideId; + + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; + + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + + @Size(max = 64) + @JsonProperty("brideResidentShip") + private String residentship; + + @Size(max = 15) + @JsonProperty("brideAdharNo") + private String adharno; + + @Size(max = 1000) + @JsonProperty("bridePassportNo") + private String passportno; + + @Size(max = 64) + @JsonProperty("brideSocialSecurityNo") + private String socialsecurityno; + + @Size(max = 200) + @JsonProperty("brideFirstnameEn") + private String firstname_en; + + @Size(max = 200) + @JsonProperty("brideFirstnameMal") + private String firstname_mal; + + @Size(max = 200) + @JsonProperty("brideMiddlenameEn") + private String middlename_en; + + @Size(max = 200) + @JsonProperty("brideMiddlenameMal") + private String middlename_mal; + + @Size(max = 200) + @JsonProperty("brideLastnameEn") + private String lastname_en; + + @Size(max = 200) + @JsonProperty("brideLastnameMal") + private String lastname_mal; + + @Size(max = 150) + @JsonProperty("brideMobile") + private String mobile; + + @Size(max = 300) + @JsonProperty("brideEmailid") + private String emailid; + + @Size(max = 20) + @JsonProperty("brideGender") + private String gender; + @JsonProperty("brideDOB") + private long dateofbirth; + + @JsonProperty("brideAge") + private Integer age; + + @Size(max = 64) + @JsonProperty("brideParentGuardian") + private String parent_guardian; + + @Size(max = 200) + @JsonProperty("brideFathernameEn") + private String fathername_en; + + @Size(max = 200) + @JsonProperty("brideFathernameMal") + private String fathername_mal; + + @Size(max = 200) + @JsonProperty("brideMothernameEn") + private String mothername_en; + + @Size(max = 200) + @JsonProperty("brideMothernameMal") + private String mothername_mal; + + @Size(max = 15) + @JsonProperty("brideFatherAdharNo") + private String father_adharno; + + @Size(max = 15) + @JsonProperty("brideMotherAdharNo") + private String mother_adharno; + + @Size(max = 200) + @JsonProperty("brideGuardiannameEn") + private String guardianname_en; + + @Size(max = 200) + @JsonProperty("brideGuardiannameMal") + private String guardianname_mal; + + @Size(max = 15) + @JsonProperty("brideGardianAdhar") + private String guardian_adhar; + + +// @Size(max = 200) +// @JsonProperty("brideProfessionEn") +// private String profession_en; +// +// @Size(max = 200) +// @JsonProperty("brideProfessionMal") +// private String profession_mal; + + @Size(max = 64) + @JsonProperty("brideMaritalstatusID") + private String maritalstatusid; + + @JsonProperty("brideSpouseLiving") + private Boolean is_spouse_living; + + + @JsonProperty("brideNoOfSpouse") + private Boolean no_of_spouse_living; + + @Size(max = 150) + @JsonProperty("bridePhotoUrl") + private String photo_url; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + + + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java new file mode 100644 index 00000000000..0255729c512 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java @@ -0,0 +1,129 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class GroomRegistryDetails { + @Size(max = 64) + @JsonProperty("groomId") + private String groomId; + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + @Size(max = 64) + @JsonProperty("groomResidentShip") + private String residentship; + @Size(max = 15) + @JsonProperty("groomAdharNo") + private String adharno; + @Size(max = 1000) + @JsonProperty("groomPassportNo") + private String passportno; + @Size(max = 64) + @JsonProperty("groomSocialSecurityNo") + private String socialsecurityno; + @Size(max = 200) + @JsonProperty("groomFirstnameEn") + private String firstname_en; + @Size(max = 200) + @JsonProperty("groomFirstnameMal") + private String firstname_mal; + @Size(max = 200) + @JsonProperty("groomMiddlenameEn") + private String middlename_en; + @Size(max = 200) + @JsonProperty("groomMiddlenameMal") + private String middlename_mal; + + @Size(max = 200) + @JsonProperty("groomLastnameEn") + private String lastname_en; + @Size(max = 200) + @JsonProperty("groomLastnameMal") + private String lastname_mal; + @Size(max = 150) + @JsonProperty("groomMobile") + private String mobile; + @Size(max = 300) + @JsonProperty("groomEmailid") + private String emailid; + @Size(max = 20) + @JsonProperty("groomGender") + private String gender; + @JsonProperty("groomDOB") + private long dateofbirth; + @JsonProperty("groomAge") + private Integer age; + @Size(max = 64) + @JsonProperty("groomParentGuardian") + private String parent_guardian; + @Size(max = 200) + @JsonProperty("groomFathernameEn") + private String fathername_en; + + @Size(max = 200) + @JsonProperty("groomFathernameMal") + private String fathername_mal; + @Size(max = 200) + @JsonProperty("groomMothernameEn") + private String mothername_en; + @Size(max = 200) + @JsonProperty("groomMothernameMal") + private String mothername_mal; + + @Size(max = 15) + @JsonProperty("groomFatherAdharNo") + private String father_adharno; + @Size(max = 15) + @JsonProperty("groomMotherAdharNo") + private String mother_adharno; + @Size(max = 200) + @JsonProperty("groomGuardiannameEn") + private String guardianname_en; + @Size(max = 200) + @JsonProperty("groomGuardiannameMal") + private String guardianname_mal; + @Size(max = 15) + @JsonProperty("groomGardianAdhar") + private String guardian_adhar; + +// @Size(max = 200) +// @JsonProperty("groomProfessionEn") +// private String profession_en; +// +// +// @Size(max = 200) +// @JsonProperty("groomProfessionMal") +// private String profession_mal; + + @Size(max = 64) + @JsonProperty("groomMaritalstatusID") + private String maritalstatusid; + @JsonProperty("groomSpouseLiving") + private Boolean is_spouse_living; + @JsonProperty("groomNoOfSpouse") + private Boolean no_of_spouse_living; + @Size(max = 150) + @JsonProperty("groomPhotoUrl") + private String photo_url; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryAddressDetails.java new file mode 100644 index 00000000000..7d5416dd1ed --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryAddressDetails.java @@ -0,0 +1,446 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.Size; +/** + * Created by Jasmine + * on 24.03.2023 + */ +public class MarriageRegistryAddressDetails { + + @Size(max = 64) + @JsonProperty("presentaddressCountry") + private String presentaddressCountry; + + @Size(max = 64) + @JsonProperty("presentaddressStateName") + private String presentaddressStateName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaLBName") + private String presentInsideKeralaLBName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaDistrict") + private String presentInsideKeralaDistrict; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaTaluk") + private String presentInsideKeralaTaluk; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaVillage") + private String presentInsideKeralaVillage; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameEn") + private String presentInsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameEn") + private String presentInsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameEn") + private String presentInsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameMl") + private String presentInsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameMl") + private String presentInsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameMl") + private String presentInsideKeralaHouseNameMl; + + @Size(max = 10) + @JsonProperty("presentInsideKeralaPincode") + private String presentInsideKeralaPincode; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaPostOffice") + private String presentInsideKeralaPostOffice; + + @Size(max = 64) + @JsonProperty("presentWardNo") + private String presentWardNo; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaDistrict") + private String presentOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaTaluk") + private String presentOutsideKeralaTalukName; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaVillage") + private String presentOutsideKeralaVillageName; + + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaCityVilgeEn") + private String presentOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPincode") + private String presentOutsideKeralaPincode; + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeEn") + private String presentOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeMl") + private String presentOutsideKeralaPostOfficeMl; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameEn") + private String presentOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameEn") + private String presentOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameEn") + private String presentOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameMl") + private String presentOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameMl") + private String presentOutsideKeralaStreetNameMl; + + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameMl") + private String presentOutsideKeralaHouseNameMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEn") + private String presentOutSideIndiaAdressEn; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMl") + private String presentOutSideIndiaAdressMl; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEnB") + private String presentOutSideIndiaAdressEnB; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMlB") + private String presentOutSideIndiaAdressMlB; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceEn") + private String presentOutSideIndiaProvinceEn; + + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaLocalityMl") + private String presentOutSideIndiaLocalityMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceMl") + private String presentOutSideIndiaProvinceMl; + + @Size(max = 64) + @JsonProperty("presentOutSideCountry") + private String presentOutSideCountry; + + @JsonProperty("isPrsentAddress") + private Boolean isPrsentAddress; + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaadrsVillage") + private String presentOutSideIndiaadrsVillage; + + @Size(max = 64) + @JsonProperty("presentOutSideIndiaadrsCityTown") + private String presentOutSideIndiaadrsCityTown; + + ////Db Fields////// + + @JsonProperty("isPrsentAddressInt") + private Integer isPrsentAddressInt; + @Size(max = 64) + @JsonProperty("presentUuid") + private String presentUuid; + + @Size(max = 64) + @JsonProperty("countryIdPresent") + private String countryIdPresent; + + @Size(max = 64) + @JsonProperty("stateIdPresent") + private String stateIdPresent; + + @Size(max = 64) + @JsonProperty("districtIdPresent") + private String districtIdPresent; + + @Size(max = 64) + @JsonProperty("pinNoPresent") + private String pinNoPresent; + + @Size(max = 1000) + @JsonProperty("localityEnPresent") + private String localityEnPresent; + + @Size(max = 1000) + @JsonProperty("localityMlPresent") + private String localityMlPresent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPresent") + private String streetNameEnPresent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPresent") + private String streetNameMlPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPresent") + private String houseNameNoEnPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPresent") + private String houseNameNoMlPresent; + + @Size(max = 1000) + @JsonProperty("villageNamePresent") + private String villageNamePresent; + + @Size(max = 1000) + @JsonProperty("villageIdPresent") + private String villageIdPresent; + + @Size(max = 10) + @JsonProperty("poNoPresent") + private String poNoPresent; + + @Size(max = 64) + @JsonProperty("brideGroomPresent") + private String brideGroomPresent; + ////Permanant + @Size(max = 1000) + @JsonProperty("permtaddressCountry") + private String permtaddressCountry; + + @Size(max = 64) + @JsonProperty("permtaddressStateName") + private String permtaddressStateName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrLBName") + private String permntInKeralaAdrLBName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrDistrict") + private String permntInKeralaAdrDistrict; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaCityVilgeEn") + private String permntOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrTaluk") + private String permntInKeralaAdrTaluk; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrVillage") + private String permntInKeralaAdrVillage; + + @Size(max = 1000) + @JsonProperty("permntInKeralaAdrLocalityNameEn") + private String permntInKeralaAdrLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntInKeralaAdrStreetNameEn") + private String permntInKeralaAdrStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameEn") + private String permntInKeralaAdrHouseNameEn; + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrLocalityNameMl") + private String permntInKeralaAdrLocalityNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrStreetNameMl") + private String permntInKeralaAdrStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameMl") + private String permntInKeralaAdrHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPincode") + private String permntInKeralaAdrPincode; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPostOffice") + private String permntInKeralaAdrPostOffice; + + @Size(max = 64) + @JsonProperty("permntInKeralaWardNo") + private String permntInKeralaWardNo; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaDistrict") + private String permntOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaTaluk") + private String permntOutsideKeralaTaluk; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaVillage") + private String permntOutsideKeralaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPincode") + private String permntOutsideKeralaPincode; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameEn") + private String permntOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameEn") + private String permntOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameEn") + private String permntOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameMl") + private String permntOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameMl") + private String permntOutsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameMl") + private String permntOutsideKeralaHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeEn") + private String permntOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeMl") + private String permntOutsideKeralaPostOfficeMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneEn") + private String permntOutsideIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneMl") + private String permntOutsideIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoEn") + private String permntOutsideIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoMl") + private String permntOutsideIndiaLinetwoMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaprovinceEn") + private String permntOutsideIndiaprovinceEn; + + @Size(max = 1000) + @JsonProperty("permntOutsideIndiaVillage") + private String permntOutsideIndiaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCityTown") + private String permntOutsideIndiaCityTown; + + @Size(max = 10) + @JsonProperty("permanentOutsideIndiaPostCode") + private String permanentOutsideIndiaPostCode; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCountry") + private String permntOutsideIndiaCountry; + + + ////Db Fields////// + + @Size(max = 64) + @JsonProperty("permanentUuid") + private String permanentUuid; + @Size(max = 64) + @JsonProperty("countryIdPermanent") + private String countryIdPermanent; + + @Size(max = 64) + @JsonProperty("stateIdPermanent") + private String stateIdPermanent; + + @Size(max = 64) + @JsonProperty("districtIdPermanent") + private String districtIdPermanent; + + @Size(max = 64) + @JsonProperty("pinNoPermanent") + private String pinNoPermanent; + + @Size(max = 1000) + @JsonProperty("localityEnPermanent") + private String localityEnPermanent; + + @Size(max = 1000) + @JsonProperty("localityMlPermanent") + private String localityMlPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPermanent") + private String streetNameEnPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPermanent") + private String streetNameMlPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPermanent") + private String houseNameNoEnPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPermanent") + private String houseNameNoMlPermanent; + + @Size(max = 1000) + @JsonProperty("villageNamePermanent") + private String villageNamePermanent; + + @Size(max = 1000) + @JsonProperty("villageIdPermanent") + private String villageIdPermanent; + + @Size(max = 10) + @JsonProperty("poNoPermanent") + private String poNoPermanent; + + @Size(max = 64) + @JsonProperty("brideGroomPermanent") + private String brideGroomPermanent; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java new file mode 100644 index 00000000000..0796a7e1278 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java @@ -0,0 +1,214 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.*; +//import org.ksmart.marriage.common.model.AuditDetails; +//import org.ksmart.marriage.common.model.Document; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageRegistryDetails { + + @NotNull + @Size(max = 64) + @JsonProperty("id") + private String id; + + @JsonProperty("marriageDOM") + private Long dateofmarriage; + + @JsonProperty("marriageDOR") + private Long dateofreporting; + + + + @Size(max = 64) + @JsonProperty("marriageDistrictid") + private String districtid; + + @Size(max = 64) + @JsonProperty("marriageLBtype") + private String lbtype; + + + @Size(max = 64) + @JsonProperty("marriageTenantid") + private String tenantid; + + @Size(max = 64) + @JsonProperty("marriagePlacetype") + private String placetype; + + @Size(max = 1000) + @JsonProperty("marriagePlacenameEn") + private String placenameEn; + @Size(max = 1000) + @JsonProperty("marriagePlacenameMal") + private String placenameMl; + + @Size(max = 64) + @JsonProperty("marriageWardCode") + private String ward_code; + + + @Size(max = 1000) + @JsonProperty("marriageStreetEn") + private String street_name_en; + + @Size(max = 1000) + @JsonProperty("marriageStreetMal") + private String street_name_ml; + + @Size(max = 64) + @JsonProperty("marriageTalukID") + private String talukid; + + @Size(max = 64) + @JsonProperty("marriageVillageName") + private String village_name; + + @Size(max = 1000) + @JsonProperty("marriageLandmark") + private String landmark; + + @Size(max = 1000) + @JsonProperty("marriageLocalityEn") + private String locality_en; + + @Size(max = 1000) + @JsonProperty("marriageLocalityMal") + private String locality_ml; + + @Size(max = 64) + @JsonProperty("marriageType") + private String marriage_type; + + @Size(max = 64) + @JsonProperty("marriagePlaceothers") + private String placeothers; + + @Size(max = 200) + @JsonProperty("othMarriageType") + private String oth_marriage_type; + + @Size(max = 1000) + @JsonProperty("marriageOthersSpecify") + private String othersspecify; + + @NotNull + @Size(max = 64) + @JsonProperty("applicationType") + private String applicationtype; + + @NotNull + @Size(max = 64) + @JsonProperty("businessService") + private String businessservice; + + @NotNull + @Size(max = 64) + @JsonProperty("workflowCode") + private String workflowcode; + +// @Size(max = 64) +// @JsonProperty("fileNo") +// private String fileno; + + + @Size(max = 64) + @JsonProperty("registrationno") + private String registrationno; + + @JsonProperty("registration_date") + private Long registrationDate; + +// @JsonProperty("fileDate") +// private long file_date; +// +// @Size(max = 64) +// @JsonProperty("fileStatus") +// private String file_status; + + @Size(max = 64) + @JsonProperty("action") + private String action; + + @Size(max = 64) + @JsonProperty("status") + private String status; + @Size(max = 1000) + @JsonProperty("placeid") + private String placeid; + + @Size(max = 2500) + @JsonProperty("marriageHouseNoAndNameEn") + private String marriageHouseNoAndNameEn; + @Size(max = 2500) + @JsonProperty("marriageHouseNoAndNameMal") + private String marriageHouseNoAndNameMal; + + @Size(max = 1000) + @JsonProperty("marriageReligiousInstitutionOther") + private String marriageReligiousInstitutionOther; + + @Size(max = 1000) + @JsonProperty("marriagePublicOrPrivatePlace") + private String marriagePublicOrPrivatePlace; + + @Size(max = 2500) + @JsonProperty("marriagePublicOrPrivateNamePlaceEn") + private String marriagePublicOrPrivateNamePlaceEn; + @Size(max = 2500) + @JsonProperty("marriagePublicOrPrivateNamePlaceMal") + private String marriagePublicOrPrivateNamePlaceMal; + + + @Size(max = 1000) + @JsonProperty("marriageReligiousInstitution") + private String marriageReligiousInstitution; + + @Size(max = 2500) + @JsonProperty("marriageReligiousInstitutionOtherNameEn") + private String marriageReligiousInstitutionOtherNameEn; + @Size(max = 2500) + @JsonProperty("marriageReligiousInstitutionOtherNameMal") + private String marriageReligiousInstitutionOtherNameMal; + + @Size(max = 64) + @JsonProperty("applicationnumber") + private String applicationnumber; + + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + + @JsonProperty("BrideDetails") + private BrideDetails brideDetails; + + @JsonProperty("GroomDetails") + private GroomDetails groomDetails; + + @JsonProperty("PermanentAddressDetails") + private PermanentAdressDetails permanentBride; + + @JsonProperty("PresentAddressDetails") + private PresentAddressDetails present ; + + @JsonProperty("WitnessDetail") + private WitnessDetails witness; + + @JsonProperty("modulecode") + private String modulecode; + + + + +} + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java new file mode 100644 index 00000000000..2dfe1250e7f --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java @@ -0,0 +1,34 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.request.RequestInfo; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.springframework.validation.annotation.Validated; +import javax.validation.Valid; +import java.util.List; +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Validated +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageRegistryRequest { + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + @JsonProperty("MarriageDetails") + @Valid + private List marriageDetails; + + public MarriageRegistryRequest addMarriageDetails(MarriageRegistryDetails marriageDetail) { + if (marriageDetails == null) { + marriageDetails = null; + } + return this; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java new file mode 100644 index 00000000000..7398f657b6a --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java @@ -0,0 +1,49 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.response.ResponseInfo; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +//import org.ksmart.marriage.marriageregistry.model.BirthCertificate; +import org.springframework.validation.annotation.Validated; +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; +/** + * Created by Jasmine + * on 24.03.2023 + */ + +@Validated +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder + + +public class MarriageRegistryResponse { + + @JsonProperty("ResponseInfo") + private ResponseInfo responseInfo; + + @JsonProperty("MarriageDetails") + @Valid + private List marriageApplicationDetails; + +// @JsonProperty("BirthCertificate") +// @Valid +// private BirthCertificate birthCertificate; + + @JsonProperty("Count") + private int count; + + public MarriageRegistryResponse addMarriageApplication(MarriageApplicationDetail details) { + if (marriageApplicationDetails == null) { + marriageApplicationDetails = new ArrayList<>(); + } + marriageApplicationDetails.add(details); + return this; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java new file mode 100644 index 00000000000..45b9c7e141b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java @@ -0,0 +1,50 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import javax.validation.Valid; +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Data +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageRegistrySearchCriteria { + + @JsonProperty("tenantId") + private String tenantId; + + @JsonProperty("id") + private String id; + + @JsonProperty("applicationNo") + private String applicationNo; + + @JsonProperty("registrationNo") + private String registrationNo; + + @JsonProperty("fileNo") + private String fileNo; + @JsonProperty("sortBy") + private SortBy sortBy; + public enum SortBy { + applicationNumber, + tenantId, + registrationNo, + fileNo + + } + @JsonProperty("sortOrder") + private SortOrder sortOrder; + + public enum SortOrder { + ASC, + DESC + } + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java new file mode 100644 index 00000000000..c2f3be837bf --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java @@ -0,0 +1,114 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class WitnessRegistryDetails { + + @NotNull + @Size(max = 64) + @JsonProperty("witnessId1") + private String witnessId1; + + @NotNull + @Size(max = 64) + @JsonProperty("witnessId2") + private String witnessId2; + + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; + + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + + @Size(max = 15) + @JsonProperty("witness1AdharNo") + private String adharno; + + @Size(max = 200) + @JsonProperty("witness1NameEn") + private String name_en; + + @Size(max = 200) + @JsonProperty("witness1NameMal") + private String name_mal; + + @JsonProperty("witness1Age") + private Integer age; + + @Size(max = 500) + @JsonProperty("witness1AddresSEn") + private String address_en; + + @Size(max = 500) + @JsonProperty("witness1AddressMal") + private String address_mal; + + @Size(max = 150) + @JsonProperty("witness1Mobile") + private String mobile; + + @JsonProperty("witness1ISEsigned") + private Boolean is_esigned; + + @JsonProperty("serial_no1") + private Integer serial_no1; + + @JsonProperty("serial_no2") + private Integer serial_no2; + + @Size(max = 15) + @JsonProperty("witness2AdharNo") + private String witness2AdharNo; + + @Size(max = 200) + @JsonProperty("witness2NameEn") + private String witness2NameEn; + + @Size(max = 200) + @JsonProperty("witness2NameMal") + private String witness2NameMal; + + @JsonProperty("witness2Age") + private Integer witness2Age; + + @Size(max = 200) + @JsonProperty("witness2AddresSEn") + private String witness2AddresSEn; + + @Size(max = 200) + @JsonProperty("witness2AddressMal") + private String witness2AddressMal; + + @Size(max = 150) + @JsonProperty("witness2Mobile") + private String witness2Mobile; + + @JsonProperty("witness2ISEsigned") + private Boolean witness2ISEsigned; + + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + + +} + + + + + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java new file mode 100644 index 00000000000..a215a584a75 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -0,0 +1,77 @@ +package org.ksmart.marriage.marriageregistry.repository; + +import org.ksmart.marriage.common.producer.MarriageProducer; + import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.repository.querybuilder.MarriageRegistryQueryBuilder; +import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; +import lombok.extern.slf4j.Slf4j; +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@Repository +public class MarriageRegistryRepository { + private final MarriageProducer producer; + + private final MarriageApplicationConfiguration marriageApplicationConfiguration; + + private final MarriageRegistryEnrichment marriageRegistryEnrichment; + private final MarriageRegistryQueryBuilder marriageQueryBuilder; + private final MarriageRegistryRowMapper marriageRegistryRowMapper; + private final JdbcTemplate jdbcTemplate; + + @Autowired + public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnrichment, MarriageProducer producer, + MarriageApplicationConfiguration marriageApplicationConfiguration, + JdbcTemplate jdbcTemplate, + MarriageRegistryEnrichment marriageDetailsEnrichment, MarriageRegistryQueryBuilder marriageQueryBuilder, + MarriageRegistryRowMapper marriageRegistryRowMapper) { + this.producer = producer; + this.marriageApplicationConfiguration = marriageApplicationConfiguration; + this.marriageRegistryEnrichment = marriageRegistryEnrichment; + this.jdbcTemplate = jdbcTemplate; + this.marriageQueryBuilder = marriageQueryBuilder; + this.marriageRegistryRowMapper = marriageRegistryRowMapper; + } + + + public List createMarriageRegistry(MarriageRegistryRequest request) { + + marriageRegistryEnrichment.enrichCreate(request); + producer.push(marriageApplicationConfiguration.getSaveMarriageRegistryTopic(), request); + MarriageRegistryRequest result = MarriageRegistryRequest + .builder() + .requestInfo(request.getRequestInfo()) + .marriageDetails(request.getMarriageDetails()) + .build(); + return result.getMarriageDetails(); + } + + public List updateMarriageRegistry(MarriageRegistryRequest request) { + marriageRegistryEnrichment.enrichUpdate(request); + producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryTopic(), request); + MarriageRegistryRequest result = MarriageRegistryRequest + .builder() + .requestInfo(request.getRequestInfo()) + .marriageDetails(request.getMarriageDetails()) + .build(); + return result.getMarriageDetails(); + } + + // public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { + // List preparedStmtValues = new ArrayList<>(); + // String query = marriageRegistryQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + // List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); + // return result; + // } + + //private final org.ksmart.birth.common.producer.MarriageProducer producer; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java new file mode 100644 index 00000000000..cf29d2d6ed5 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java @@ -0,0 +1,101 @@ +package org.ksmart.marriage.marriageregistry.repository.querybuilder; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.springframework.stereotype.Component; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Component +public class BaseMarriageQuery { + void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, + List paramValues) { + + if (startDate != null || endDate != null) { + addWhereClause(paramValues, query); + query.append(" ("); + + if (startDate != null) { + query.append(column) + .append(" >= ? "); + paramValues.add(startDate); + } + + if (endDate != null) { + if (startDate != null) { + query.append(" AND "); + } + + query.append(column) + .append(" <= ? "); + paramValues.add(endDate); + } + + query.append(") "); + } + } + + void addFilters(String column, List ids, StringBuilder query, List paramValues) { + if (CollectionUtils.isNotEmpty(ids)) { + addWhereClause(paramValues, query); + query.append(column) + .append(" IN (") + .append(getStatementParameters(ids.size())) + .append(") "); + ids.forEach(paramValues::add); + } + } + + void addFilter(String column, String value, StringBuilder query, List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + } + } + + void addWhereClause(List values, StringBuilder query) { + if (CollectionUtils.isEmpty(values)) { + query.append(" WHERE "); + } else { + query.append(" AND "); + } + } + + private String getStatementParameters(int count) { + return Collections.nCopies(count, "(?)") + .stream() + .collect(Collectors.joining(", ")); + } + void addOrderByColumns(String column, MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder orderBy){ + addOrderClause(orderBy); + if(!StringUtils.isEmpty(column)){ + addOrderClause(orderBy); + orderBy.append(column); + addAscDesc(valueSort, orderBy); + } + } + void addOrderClause(StringBuilder orderBy) { + if (orderBy.length() == 0) { + orderBy.append(" ORDER BY "); + } else { + orderBy.append(" "); + } + } + + void addAscDesc(MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder query){ + if(valueSort == null) + query.append(" ASC, "); + else if(valueSort == MarriageApplicationSearchCriteria.SortOrder.ASC) + query.append(" ASC, "); + else + query.append(" DESC, "); + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseQueryBuilder copy.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseQueryBuilder copy.java new file mode 100644 index 00000000000..95c68467e7e --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseQueryBuilder copy.java @@ -0,0 +1,149 @@ +package org.ksmart.marriage.marriageregistry.repository.querybuilder; + +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.springframework.beans.factory.annotation.Autowired; +/** +/** + * Created by Jasmine + * on 24.03.2023 + */ +class BaseQueryBuilder { + + //Rakhi S on 27.02.2023 + @Autowired + private MarriageApplicationConfiguration config; + + void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, + List paramValues) { + + if (startDate != null || endDate != null) { + addWhereClause(paramValues, query); + query.append(" ("); + + if (startDate != null) { + query.append(column) + .append(" >= ? "); + paramValues.add(startDate); + } + + if (endDate != null) { + if (startDate != null) { + query.append(" AND "); + } + + query.append(column) + .append(" <= ? "); + paramValues.add(endDate); + } + + query.append(") "); + } + } + + void addFilters(String column, List ids, StringBuilder query, List paramValues) { + if (CollectionUtils.isNotEmpty(ids)) { + addWhereClause(paramValues, query); + query.append(column) + .append(" IN (") + .append(getStatementParameters(ids.size())) + .append(") "); + ids.forEach(paramValues::add); + } + } + + void addFilter(String column, String value, StringBuilder query, List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + } + } + void addFilter(String column, int value, StringBuilder query, List paramValues) { + if (value>0) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + } + } + // void addFilter(String column, Long value, StringBuilder query, List paramValues) { + // if (StringUtils.isAllBlank(value)) { + // addWhereClause(paramValues, query); + // query.append(column) + // .append("=? "); + // paramValues.add(value); + // } + // } + + void addWhereClause(List values, StringBuilder query) { + if (CollectionUtils.isEmpty(values)) { + query.append(" WHERE "); + } else { + query.append(" AND "); + } + } + + private String getStatementParameters(int count) { + return Collections.nCopies(count, "(?)") + .stream() + .collect(Collectors.joining(", ")); + } + + void addOrderClause(StringBuilder orderBy) { + if (orderBy.length() == 0) { + orderBy.append(" ORDER BY "); + } else { + orderBy.append(" "); + } + } + + void addOrderByColumns(String column, String valueSort, StringBuilder orderBy){ + addOrderClause(orderBy); + if(!StringUtils.isEmpty(column)){ + addOrderClause(orderBy); + orderBy.append(column); + addAscDesc(valueSort, orderBy); + } + } + void addOrderToQuery(StringBuilder orderBy, StringBuilder query){ + if (orderBy.length() > 0) { + String orderByStr = orderBy.toString().trim(); + orderByStr = orderByStr.substring(0, orderByStr.length() - 1); + query.append(orderByStr); + } + } + + void addAscDesc(String valueSort, StringBuilder query){ + if(StringUtils.isEmpty(valueSort) || valueSort == null) + query.append("ASC, "); + else if(valueSort == "ASC") + query.append(" ASC, "); + else + query.append(" DESC, "); + } + + void addLimitAndOffset(Integer offset, Integer limit, StringBuilder query, final List paramValues) { + // prepare Offset + if (offset == null) { + query.append(" OFFSET ? "); + paramValues.add(config.getDefaultOffset()); + } else { + query.append(" OFFSET ? "); + paramValues.add(offset); + } + // prepare limit + if (limit == null) { + query.append(" LIMIT ? "); + paramValues.add(config.getDefaultBndLimit()); + } else{ + query.append(" LIMIT ? "); + paramValues.add(limit); + } + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java new file mode 100644 index 00000000000..4e0dd73706e --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -0,0 +1,83 @@ +package org.ksmart.marriage.marriageregistry.repository.querybuilder; +import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; +import javax.validation.constraints.NotNull; +import java.util.List; +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Component +public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { + @Autowired + CommonQueryBuilder commonQueryBuilder; + + private static final String QUERY = new StringBuilder() + .append("SELECT mrg.id as ma_id,mrg.dateofmarriage as ma_dateofmarriage,mrg.dateofreporting as ma_dateofreporting,mrg.districtid as ma_districtid,") + .append("mrg.lbtype as ma_lbtype,mrg.tenantid as ma_tenantid,mrg.placetype as ma_placetype,mrg.placeothers as ma_placeothers,mrg.placeid as ma_placeid,") + .append("mrg.placename_en as ma_placename_en,mrg.street_name_en as ma_street_name_en,mrg.street_name_ml as ma_street_name_ml,") + .append("mrg.placename_mal as ma_placename_mal,mrg.ward_code as ma_ward_code,mrg.talukid as ma_talukid,mrg.village_name as ma_village_name,mrg.marriage_type as ma_marriage_type,") + .append("mrg.oth_marriage_type as ma_oth_marriage_type,mrg.landmark as ma_landmark,mrg.locality_en as ma_locality_en,mrg.locality_ml as ma_locality_ml,mrg.othersspecify as ma_othersspecify,") + .append("mrg.applicationtype as ma_applicationtype,mrg.businessservice as ma_businessservice,mrg.workflowcode as ma_workflowcode,mrg.fileno as ma_fileno,") + .append("mrg.file_date as ma_file_date,mrg.file_status as ma_file_status,mrg.applicationnumber as ma_applicationnumber,mrg.registrationno as ma_registrationno,mrg.registration_date as ma_registration_date,") + .append("mrg.action as ma_action,mrg.status as ma_status,mrg.createdtime,mrg.createdby,mrg.lastmodifiedtime ,mrg.lastmodifiedby ,mrg.houseno_and_nameen as ma_houseno_and_nameen,") + .append("mrg.houseno_and_nameml as ma_houseno_and_nameml,mrg.religious_institution as ma_religious_institution,mrg.public_or_privateplace as ma_public_or_privateplace,mrg.public_or_privateplacennameplace_en as ma_public_or_privateplacennameplace_en,") + .append("mrg.public_or_privateplacennameplace_ml as ma_public_or_privateplacennameplace_ml,mrg.religious_institution_other as ma_religious_institution_other,") + .append("mrg.religious_institution_othername_en as ma_religious_institution_othername_en,mrg.religious_institution_othername_ml as ma_religious_institution_othername_ml").toString(); + + private static final String QUERYCONDITION = new StringBuilder() + .append(" FROM public.eg_marriage_details mrg LEFT JOIN eg_marriage_bride_details mbd ON mbd.marriageid = mrg.id") + .append(" LEFT JOIN eg_marriage_groom_details mrd ON mrd.marriageid = mrg.id") + .append(" LEFT JOIN eg_marriage_present_address_details mpress ON mpress.marriageid = mrg.id") + .append(" LEFT JOIN eg_marriage_permanent_address_details mper ON mper.marriageid = mrg.id") + .append(" LEFT JOIN eg_marriage_witness_details mwd ON mwd.marriageid = mrg.id") + + .toString(); + + + + public String getBirthApplicationSearchQuery(@NotNull MarriageApplicationSearchCriteria criteria, + @NotNull List preparedStmtValues, Boolean isCount) { + StringBuilder query = new StringBuilder(QUERY); + query.append(",").append(commonQueryBuilder.getQueryBrideDetails()) + .append(",") + .append(commonQueryBuilder.getGroomDetails()) + .append(",") + .append(commonQueryBuilder.getPresentAddressDetails()) + .append(",") + .append(commonQueryBuilder.getPermanentAddressDetails()) + .append(",") + .append(commonQueryBuilder.getWitnessDetails()) + + .append(QUERYCONDITION).toString(); + + StringBuilder orderBy = new StringBuilder(); + + addFilter("mrg.id", criteria.getId(), query, preparedStmtValues); + addFilter("mrg.tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("mrg.applicationno", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("mrg.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + addFilter("mrg.fileno", criteria.getFileNo(),query,preparedStmtValues); + + + if (StringUtils.isEmpty(criteria.getSortBy())) + addOrderByColumns("mrg.createdtime",null, orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenantId) + addOrderByColumns("mrg.tenantid",criteria.getSortOrder(), orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.applicationNumber) + addOrderByColumns("mrg.applicationno",criteria.getSortOrder(),orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.registrationNo) + addOrderByColumns("mrg.registrationno",criteria.getSortOrder(),orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.fileNo) + addOrderByColumns("mrg.fileno",criteria.getSortOrder(),orderBy); + return query.toString(); + } + public String getNextIDQuery() { + StringBuilder query = new StringBuilder("select fn_next_id(?,?,?)"); + return query.toString(); + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java new file mode 100644 index 00000000000..e0509baec97 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java @@ -0,0 +1,21 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import org.ksmart.marriage.common.model.AuditDetails; +import java.sql.ResultSet; +import java.sql.SQLException; +/** + * Created by Jasmine + * on 24.03.2023 + */ +interface BaseRowMapper { + + default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { + return AuditDetails.builder() + .createdBy(rs.getString("createdby")) + .createdTime(Long.valueOf(rs.getLong("createdtime"))) + .lastModifiedBy(rs.getString("lastmodifiedby")) + .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) + .build(); + } + +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java new file mode 100644 index 00000000000..f0a82d20e5b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -0,0 +1,53 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; +import java.sql.ResultSet; +import java.sql.SQLException; +/** + * Created by Jasmine + * on 24.03.2023 + */ +public interface BrideRegistryRowMapper { + default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ + + return BrideDetails.builder() + //.id(rs.getString("bd_id")) + .residentship(rs.getString("bd_residentship")) + .adharno(rs.getString("bd_adharno")) + .passportno(rs.getString("bd_passportno")) + .socialsecurityno(rs.getString("bd_socialsecurityno")) + .firstname_en(rs.getString("bd_firstname_en")) + .firstname_mal(rs.getString("bd_firstname_mal")) + .middlename_en(rs.getString("bd_middlename_en")) + .middlename_mal(rs.getString("bd_middlename_mal")) + .lastname_en(rs.getString("bd_lastname_en")) + .lastname_mal(rs.getString("bd_lastname_mal")) + .mobile(rs.getString("bd_mobile")) + .emailid(rs.getString("bd_emailid")) + .gender(rs.getString("bd_gender")) + .dateofbirth(rs.getLong("bd_dateofbirth")) + .age(rs.getInt("bd_age")) + .parent_guardian(rs.getString("bd_parent_guardian")) + .fathername_en(rs.getString("bd_fathername_en")) + .fathername_mal(rs.getString("bd_fathername_mal")) + .mothername_en(rs.getString("bd_mothername_en")) + .mothername_mal(rs.getString("bd_mothername_mal")) + .father_adharno(rs.getString("bd_father_adharno")) + .mother_adharno(rs.getString("bd_mother_adharno")) + .guardianname_en(rs.getString("bd_guardianname_en")) + .guardianname_mal(rs.getString("bd_guardianname_mal")) + .guardian_adhar(rs.getString("bd_guardian_adhar")) + // .profession_en(rs.getString("bd_profession_en")) + // .profession_mal(rs.getString("bd_profession_mal")) + .maritalstatusid(rs.getString("bd_maritalstatusid")) + .is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) + .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) + .photo_url(rs.getString("bd_photo_url")) + .marriageid(rs.getString("bd_marriageid")) + .build(); + + + + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java new file mode 100644 index 00000000000..498b892f1ef --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -0,0 +1,48 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.GroomDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface GroomRegistryRowMapper { + default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ + + return GroomDetails.builder() + // .id(rs.getString("gd_id")) + .residentship(rs.getString("gd_residentship")) + .adharno(rs.getString("gd_adharno")) + .passportno(rs.getString("gd_passportno")) + .socialsecurityno(rs.getString("gd_socialsecurityno")) + .fathername_en(rs.getString("gd_firstname_en")) + .fathername_mal(rs.getString("gd_firstname_mal")) + .middlename_en(rs.getString("gd_middlename_en")) + .middlename_mal(rs.getString("gd_middlename_mal")) + .lastname_en(rs.getString("gd_lastname_en")) + .lastname_mal(rs.getString("gd_lastname_mal")) + .mobile(rs.getString("gd_mobile")) + .emailid(rs.getString("gd_emailid")) + .gender(rs.getString("gd_gender")) + .dateofbirth(rs.getLong("gd_dateofbirth")) + .age(rs.getInt("gd_age")) + .parent_guardian(rs.getString("gd_parent_guardian")) + .fathername_en(rs.getString("gd_fathername_en")) + .fathername_mal(rs.getString("gd_fathername_mal")) + .mothername_en(rs.getString("gd_mothername_en")) + .mothername_mal(rs.getString("gd_mothername_mal")) + .father_adharno(rs.getString("gd_father_adharno")) + .mother_adharno(rs.getString("gd_mother_adharno")) + .guardianname_en(rs.getString("gd_guardianname_en")) + .guardianname_mal(rs.getString("gd_guardianname_mal")) + .guardian_adhar(rs.getString("gd_guardian_adhar")) + // .profession_en(rs.getString("gd_profession_en")) + //.profession_mal(rs.getString("gd_profession_mal")) + .maritalstatusid(rs.getString("gd_maritalstatusid")) + .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) + .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) + .marriageid(rs.getString("gd_marriageid")) + .photo_url(rs.getString("gd_photo_url")) + + .build(); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java new file mode 100644 index 00000000000..24b5fdb9d2f --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java @@ -0,0 +1,37 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.PermanentAdressDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface MarriageAddressRegistryRowMapper { + default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ + + return PermanentAdressDetails.builder() +// .id(rs.getString("per_id")) +// .houseno(rs.getString("per_houseno")) +// .housename_no_en(rs.getString("per_housename_no_en")) +// .housename_no_ml(rs.getString("per_housename_no_ml")) +// .villageid(rs.getString("per_villageid")) +// .village_name(rs.getString("per_village_name")) +// .talukid(rs.getString("per_talukid")) +// .taluk_name(rs.getString("per_taluk_name")) +// .ward_code(rs.getString("per_ward_code")) +// .doorno(rs.getInt("per_doorno")) +// .locality_en(rs.getString("per_locality_en")) +// .locality_ml(rs.getString("per_locality_ml")) +// .street_name_en(rs.getString("per_street_name_en")) +// .street_name_ml(rs.getString("per_street_name_ml")) +// .districtid(rs.getString("per_districtid")) +// .stateid(rs.getString("per_stateid")) +// .poid(rs.getString("per_poid")) +// .pinno(rs.getString("per_pinno")) +// .countryid(rs.getString("per_countryid")) +// .marriageid(rs.getString("per_marriageid")) + + .build(); + + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java new file mode 100644 index 00000000000..857fbeec053 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -0,0 +1,76 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ResultSetExtractor; +import org.springframework.stereotype.Component; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +@Component +public class MarriageRegistryRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideRegistryRowMapper,GroomRegistryRowMapper,MarriageAddressRegistryRowMapper,WitnessDetailsRowMapper{ + + @Override + public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null + List result = new ArrayList<>(); + while (rs.next()) { + result.add(MarriageApplicationDetail.builder() + .id(rs.getString("ma_id")) + .dateofreporting(rs.getLong("ma_dateofreporting")) + .dateofmarriage(rs.getLong("ma_dateofmarriage")) + .districtid(rs.getString("ma_districtid")) + .lbtype(rs.getString("ma_lbtype")) + .tenantid(rs.getString("ma_tenantid")) + .placetype(rs.getString("ma_placetype")) + .placeothers(rs.getString("ma_placeothers")) + .placeid(rs.getString("ma_placeid")) + .placenameEn(rs.getString("ma_placename_en")) + .placenameMl(rs.getString("ma_placename_mal")) + .street_name_en(rs.getString("ma_street_name_en")) + .street_name_ml(rs.getString("ma_street_name_ml")) + .ward_code(rs.getString("ma_ward_code")) + .talukid(rs.getString("ma_talukid")) + .village_name(rs.getString("ma_village_name")) + .marriage_type(rs.getString("ma_marriage_type")) + .oth_marriage_type(rs.getString("ma_oth_marriage_type")) + .landmark(rs.getString("ma_landmark")) + .locality_en(rs.getString("ma_locality_en")) + .locality_ml(rs.getString("ma_locality_ml")) + .othersspecify(rs.getString("ma_othersspecify")) + .applicationtype(rs.getString("ma_applicationtype")) + .businessservice(rs.getString("ma_businessservice")) + .workflowcode(rs.getString("ma_workflowcode")) + //.fileno(rs.getString("ma_fileno")) + //.file_date(rs.getLong("ma_file_date")) + // .file_status(rs.getString("ma_file_status")) + .applicationnumber(rs.getString("ma_applicationnumber")) + .registrationDate(rs.getLong("ma_registration_date")) + .registrationno(rs.getString("ma_registrationno")) + .action(rs.getString("ma_action")) + .status(rs.getString("ma_status")) + .marriageHouseNoAndNameEn(rs.getString("ma_houseno_and_nameen")) + .marriageHouseNoAndNameMal(rs.getString("ma_houseno_and_nameml")) + .marriageReligiousInstitution(rs.getString("ma_religious_institution")) + .marriagePublicOrPrivateNamePlaceEn(rs.getString("ma_public_or_privateplacennameplace_en")) + .marriagePublicOrPrivateNamePlaceMal(rs.getString("ma_public_or_privateplacennameplace_ml")) + .marriagePublicOrPrivatePlace(rs.getString("ma_public_or_privateplace")) + .marriageReligiousInstitutionOther(rs.getString("ma_religious_institution_other")) + .marriageReligiousInstitutionOtherNameEn(rs.getString("ma_religious_institution_othername_en")) + .marriageReligiousInstitutionOtherNameMal(rs.getString("ma_religious_institution_othername_ml")) + .brideDetails(getBrideDetails(rs)) + .groomDetails(getgroomDetails(rs)) +// .permanent(getPermanentAddress(rs)) + // .present(getPresentAddress(rs)) + .witness(getWitnessDetails(rs)) + .auditDetails(getAuditDetails(rs)) + + .build()); + } + + + return result; + } +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessDetailsRowMapper.java new file mode 100644 index 00000000000..978c2c4fc9b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessDetailsRowMapper.java @@ -0,0 +1,25 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface WitnessDetailsRowMapper { + default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { + + return WitnessDetails.builder() +// .id(rs.getString("wd_id")) + .adharno(rs.getString("wd_adharno")) + .name_en(rs.getString("wd_name_en")) + .name_mal(rs.getString("wd_name_mal")) + .age(rs.getInt("wd_age")) + .address_en(rs.getString("wd_address_en")) + .address_mal(rs.getString("wd_address_mal")) + .mobile(rs.getString("wd_mobile")) + .is_esigned(Boolean.valueOf(rs.getString("wd_is_esigned"))) + .marriageid(rs.getString("wd_marriageid")) + .build(); + } + +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java new file mode 100644 index 00000000000..8503b05fbc8 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -0,0 +1,36 @@ +package org.ksmart.marriage.marriageregistry.service; + +import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; +import org.springframework.stereotype.Service; +import java.util.List; +/** + * Created by Jasmine + * on 24.03.2023 + */ +@Slf4j +@Service +public class MarriageRegistryService { + private final MarriageRegistryRepository repository; + + public MarriageRegistryService(MarriageRegistryRepository repository) { + this.repository = repository; + } + + public List createRegistry(MarriageRegistryRequest request) { + + return repository.createMarriageRegistry(request); + } + + public List updateRegistry(MarriageRegistryRequest request) { + + return repository.updateMarriageRegistry(request); + } + + // public List searchRegistry(MarriageRegistrySearchCriteria criteria) { + // return repository.searchMarriageRegistry(criteria); + // } +} diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 0e55d0545c0..67762ad07d8 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,15 +5,15 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -47,6 +47,10 @@ spring.kafka.producer.buffer_memory_config=33554432 persister.save.marriage.application.topic=save-marriage-application-topic persister.update.marriage.application.topic=update-marriage-application-topic + +persister.save.marriage.registry.topic=save-marriage-registry-topic +persister.update.marriage.registry.topic=update-marriage-registry-topic + #kafka topics for save and update birth #persister.save.birth.cert.topic=save-birth-cert-topic #persister.update.birth.cert.topic=update-birth-cert-topic From 5145a4c38aa5203e3d3ceac6bc618f7d30ae4ab5 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 25 Mar 2023 11:26:49 +0530 Subject: [PATCH 041/420] marriage registry --- .../MarriageApplicationController.java | 8 +- .../MarriageRegistryController.java | 120 ++++++++++++++++++ .../MarriageRegistryEnrichment.java | 20 ++- ....java => GroomRegistryAddressDetails.java} | 2 +- .../model/MarriageRegistryDetails.java | 24 ++-- .../model/MarriageRegistryResponse.java | 4 +- .../MarriageRegistryRepository.java | 20 +-- .../service/MarriageRegistryService.java | 6 +- 8 files changed, 159 insertions(+), 45 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/{MarriageRegistryAddressDetails.java => GroomRegistryAddressDetails.java} (99%) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index c209c7c6114..f39e74655f7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -26,7 +26,7 @@ @Slf4j @RestController -@RequestMapping("/cr/marriage") +@RequestMapping("/v1/marriagedetails") public class MarriageApplicationController { private final MarriageApplicationService crMarriageService; @@ -39,7 +39,7 @@ public MarriageApplicationController( MarriageApplicationService crMarriageServi } - @PostMapping(value = {"/_createMarriage"}) + @PostMapping(value = {"/_createmarriage"}) public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { List marriageDetails=crMarriageService.saveMarriageDetails(request); MarriageApplicationResponse response= MarriageApplicationResponse.builder() @@ -50,13 +50,13 @@ public ResponseEntity saveMarriageDetails(@RequestB .build(); return new ResponseEntity<>(response, HttpStatus.OK); } - @PostMapping(value = { "/_updateMarriage"}) + @PostMapping(value = { "/_updatemarriage"}) public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { List marriageDetails = crMarriageService.updateMarriageDetails(request); return new ResponseEntity<>(marriageDetails, HttpStatus.OK); } - @PostMapping(value = { "/_searchMarriage"}) + @PostMapping(value = { "/_searchmarriage"}) public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { List marriageDetails = crMarriageService.searchMarriageDetails(criteria); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java new file mode 100644 index 00000000000..6c32552d495 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java @@ -0,0 +1,120 @@ +package org.ksmart.marriage.marriageregistry.controller; + + +// import lombok.extern.slf4j.Slf4j; + +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryResponse; +import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; +import org.ksmart.marriage.utils.ResponseInfoFactory; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import lombok.extern.slf4j.Slf4j; + +import javax.validation.Valid; +import java.util.List; +//import org.ksmart.marriage.marriageregistry.model.BirthCertificate; +//import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; +//import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetailsRequest; +//import org.ksmart.marriage.marriageregistry.model.RegisterBirthSearchCriteria; +//import org.ksmart.marriage.marriageregistry.service.RegisterBirthService; +//import org.ksmart.marriage.utils.ResponseInfoFactory; + + +@Slf4j +@RestController +@RequestMapping("/v1/marriagedetails") + +public class MarriageRegistryController { + private final MarriageRegistryService marriageService; + private final ResponseInfoFactory responseInfoFactory; + + + public MarriageRegistryController( MarriageRegistryService marriageService, ResponseInfoFactory responseInfoFactory) { + this.marriageService = marriageService; + this.responseInfoFactory = responseInfoFactory; + } + + @PostMapping(value = {"/_createregistry"}) + public ResponseEntity saveMarriageDetails(@RequestBody MarriageRegistryRequest request) { + List marriageDetails=marriageService.createRegistry(request); + MarriageRegistryResponse response= MarriageRegistryResponse.builder() + .marriageApplicationDetails(marriageDetails) + .responseInfo( + responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),true)) + .build(); + return new ResponseEntity<>(response, HttpStatus.OK); + } + // @PostMapping(value = { "/_updateregistry"}) + // public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { + // List marriageDetails = crMarriageService.updateMarriageDetails(request); + // return new ResponseEntity<>(marriageDetails, HttpStatus.OK); + // } + + // @PostMapping(value = { "/_searchregistry"}) + // public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, + // @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { + // List marriageDetails = crMarriageService.searchMarriageDetails(criteria); + // MarriageApplicationResponse response = MarriageApplicationResponse.builder() + // .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), + // Boolean.TRUE)) + // .marriageApplicationDetails(marriageDetails) + // .build(); + // return ResponseEntity.ok(response); + // } +// @PostMapping(value = {"/_update"}) +// public ResponseEntity updateBirthDetails(@RequestBody MarriageDetailsRequest request) { +// //BirthCertificate birthCertificate = new BirthCertificate(); +// List birthApplicationDetails=crBirthService.updateBirthDetails(request); +// //Download certificate when Approved +// if((birthApplicationDetails.get(0).getStatus() == "APPROVED") && (birthApplicationDetails.get(0).getAction() == "APPROVE")){ +// RegisterBirthDetailsRequest registerBirthDetailsRequest = registryRequestService.createRegistryRequest(request); +// List registerBirthDetails = registerBirthService.saveRegisterBirthDetails(registerBirthDetailsRequest); +// RegisterBirthSearchCriteria criteria = new RegisterBirthSearchCriteria(); +// criteria.setTenantId(registerBirthDetails.get(0).getTenantId()); +// System.out.println(criteria.getTenantId()); +// +// criteria.setRegistrationNo(registerBirthDetails.get(0).getRegistrationNo()); System.out.println(registerBirthDetails.get(0).getRegistrationNo()); +// birthCertificate = registerBirthService.download(criteria,request.getRequestInfo()); +// } +// MarriageApplicationResponse response= MarriageApplicationResponse.builder() +// .birthDetails(birthApplicationDetails) +// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), +// true)) +// .birthCertificate(birthCertificate) +// .build(); +// return new ResponseEntity<>(response, HttpStatus.OK); +// } +// +// @PostMapping(value = {"/_search"}) +// public ResponseEntity listByHospitalId(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { +// List birthDetails=crBirthService.searchBirthDetails(criteria); +// MarriageApplicationResponse response= MarriageApplicationResponse.builder() +// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), +// Boolean.TRUE)) +// .birthDetails(birthDetails) +// .build(); +// return ResponseEntity.ok(response); +// } + +// @PostMapping(value = { "/_getfilestoreid"}) +// public ResponseEntity getfilestoreid(@RequestBody RequestInfoWrapper requestInfoWrapper, +// @Valid @ModelAttribute SearchCriteria criteria) { +// +// BirthCertificate birthCert = birthService.getBirthCertReqByConsumerCode(criteria,requestInfoWrapper.getRequestInfo()); +// BirthCertResponse response = BirthCertResponse.builder().filestoreId(birthCert.getFilestoreid()).tenantId(criteria.getTenantId()).responseInfo( +// responseInfoFactory.createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(), true)) +// .build(); +// if(null!=birthCert.getFilestoreid()) { +// birthCert.setBirthCertificateNo(criteria.getConsumerCode()); +// birthService.updateDownloadStatus(BirthCertRequest.builder().birthCertificate(birthCert).requestInfo(requestInfoWrapper.getRequestInfo()).build()); +// } +// return new ResponseEntity<>(response, HttpStatus.OK); +// } + + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 73883dd5b65..c9cc6b7d4d2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -16,11 +16,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.IdGenerator; - import java.util.List; import java.util.ListIterator; import java.util.UUID; - /** * Created by Jasmine * on 24.03.2023 @@ -50,17 +48,17 @@ public void enrichCreate(MarriageRegistryRequest request) { marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); } - marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); - marriage.getPermanentBride().setId2(UUID.randomUUID().toString()); + // marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); + // marriage.getPermanentBride().setId2(UUID.randomUUID().toString()); - marriage.getPermanentBride().setBrideGroom1("BRIDE"); - marriage.getPermanentBride().setBrideGroom2("GROOM"); + // marriage.getPermanentBride().setBrideGroom1("BRIDE"); + // marriage.getPermanentBride().setBrideGroom2("GROOM"); - if(marriage.getPresent()!=null){ - marriage.getPresent().setId(UUID.randomUUID().toString()); - marriage.getPresent().setBrideGroom("BRIDE"); - marriage.getPresent().setBrideGroom("GROOM"); - } + // if(marriage.getPresent()!=null){ + // marriage.getPresent().setId(UUID.randomUUID().toString()); + // marriage.getPresent().setBrideGroom("BRIDE"); + // marriage.getPresent().setBrideGroom("GROOM"); + // } if(marriage.getWitness()!=null){ marriage.getWitness().setWitnessId1(UUID.randomUUID().toString()); marriage.getWitness().setWitnessId2(UUID.randomUUID().toString()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java similarity index 99% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryAddressDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java index 7d5416dd1ed..85c768973ac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java @@ -7,7 +7,7 @@ * Created by Jasmine * on 24.03.2023 */ -public class MarriageRegistryAddressDetails { +public class GroomRegistryAddressDetails { @Size(max = 64) @JsonProperty("presentaddressCountry") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java index 0796a7e1278..4b04e6aae09 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java @@ -3,12 +3,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.*; +import org.ksmart.marriage.marriageregistry.model.*; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; //import org.ksmart.marriage.common.model.AuditDetails; //import org.ksmart.marriage.common.model.Document; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; + @Getter @Setter @@ -183,26 +184,21 @@ public class MarriageRegistryDetails { private String marriageReligiousInstitutionOtherNameMal; @Size(max = 64) - @JsonProperty("applicationnumber") - private String applicationnumber; + @JsonProperty("applicationNumber") + private String applicationNumber; @JsonProperty("auditDetails") private AuditDetails auditDetails; @JsonProperty("BrideDetails") - private BrideDetails brideDetails; + private BrideRegistryDetails brideDetails; @JsonProperty("GroomDetails") - private GroomDetails groomDetails; - - @JsonProperty("PermanentAddressDetails") - private PermanentAdressDetails permanentBride; + private GroomRegistryDetails groomDetails; - @JsonProperty("PresentAddressDetails") - private PresentAddressDetails present ; - @JsonProperty("WitnessDetail") - private WitnessDetails witness; + @JsonProperty("WitnessDetails") + private WitnessRegistryDetails witness; @JsonProperty("modulecode") private String modulecode; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java index 7398f657b6a..c3804445e7a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java @@ -30,7 +30,7 @@ public class MarriageRegistryResponse { @JsonProperty("MarriageDetails") @Valid - private List marriageApplicationDetails; + private List marriageApplicationDetails; // @JsonProperty("BirthCertificate") // @Valid @@ -39,7 +39,7 @@ public class MarriageRegistryResponse { @JsonProperty("Count") private int count; - public MarriageRegistryResponse addMarriageApplication(MarriageApplicationDetail details) { + public MarriageRegistryResponse addMarriageApplication(MarriageRegistryDetails details) { if (marriageApplicationDetails == null) { marriageApplicationDetails = new ArrayList<>(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index a215a584a75..db50470dc8a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -54,16 +54,16 @@ public List createMarriageRegistry(MarriageRegistryRequ return result.getMarriageDetails(); } - public List updateMarriageRegistry(MarriageRegistryRequest request) { - marriageRegistryEnrichment.enrichUpdate(request); - producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryTopic(), request); - MarriageRegistryRequest result = MarriageRegistryRequest - .builder() - .requestInfo(request.getRequestInfo()) - .marriageDetails(request.getMarriageDetails()) - .build(); - return result.getMarriageDetails(); - } + // public List updateMarriageRegistry(MarriageRegistryRequest request) { + // marriageRegistryEnrichment.enrichUpdate(request); + // producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryTopic(), request); + // MarriageRegistryRequest result = MarriageRegistryRequest + // .builder() + // .requestInfo(request.getRequestInfo()) + // .marriageDetails(request.getMarriageDetails()) + // .build(); + // return result.getMarriageDetails(); + // } // public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { // List preparedStmtValues = new ArrayList<>(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 8503b05fbc8..47e335d8e64 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -25,10 +25,10 @@ public List createRegistry(MarriageRegistryRequest requ return repository.createMarriageRegistry(request); } - public List updateRegistry(MarriageRegistryRequest request) { + // public List updateRegistry(MarriageRegistryRequest request) { - return repository.updateMarriageRegistry(request); - } + // return repository.updateMarriageRegistry(request); + // } // public List searchRegistry(MarriageRegistrySearchCriteria criteria) { // return repository.searchMarriageRegistry(criteria); From 00436a687023eca15d2f5cf761d927f847a2940b Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 25 Mar 2023 11:35:43 +0530 Subject: [PATCH 042/420] Address Updation --- .../src/main/resources/marriage.yml | 663 +----------------- .../MarriageApplicationController.java | 49 -- .../enrichment/MarriageDetailsEnrichment.java | 24 +- .../model/MarriageApplicationDetail.java | 24 +- .../model/marriage/BrideDetails.java | 13 +- .../model/marriage/GroomDetails.java | 7 +- .../marriage/MarriageApplicationResponse.java | 5 - .../marriage/PermanentAdressDetails.java | 203 ------ .../model/marriage/PresentAddressDetails.java | 115 --- .../MarriageApplicationRepository.java | 3 +- ...ery.java => BaseMarriageQueryBuilder.java} | 2 +- .../MarriageApplicationQueryBuilder.java | 4 +- .../rowmapper/BrideDetailsRowMapper.java | 4 +- .../rowmapper/GroomDetailsRowMapper.java | 2 +- .../MarriageApplicationRowMapper.java | 6 +- .../rowmapper/PermanentAddressRowMapper.java | 11 +- .../rowmapper/PresentAddressRowMapper.java | 52 +- .../rowmapper/BrideRegistryRowMapper.java | 4 +- .../rowmapper/GroomRegistryRowMapper.java | 2 +- .../MarriageAddressRegistryRowMapper.java | 11 +- .../rowmapper/MarriageRegistryRowMapper.java | 4 +- .../src/main/resources/application.properties | 8 +- ...30325112220__marriage_services_new_dll.sql | 3 + 23 files changed, 120 insertions(+), 1099 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/{BaseBirthQuery.java => BaseMarriageQueryBuilder.java} (98%) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index d07aa184de2..7b3bda2cdbe 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -6,15 +6,12 @@ serviceMaps: fromTopic: save-marriage-application-topic isTransaction: true queryMaps: - - query: INSERT INTO public.eg_marriage_details( - id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, - houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, - oth_marriage_type, landmark, locality_en, locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, filenumber, - file_date, file_status, registrationno, registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby, - domcorreflag, placeidcorrflag, groomnamecorreflag, bridenamecorreflag, grromagecorreflag, brideagecorreflag, groomdobcorreflag, - bridedobcorreflag, groompermanentaddrcorreflag, bridepermanentaddrcorreflag, groommothercorreflag, bridemothercorreflag, groomfathercorreflag, - bridefathercorreflag, groomguardiancorreflag, bridegurdiancorreflag) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + - query: INSERT INTO public.eg_marriage_details( + id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, + houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, + locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationno, registration_date, action, status, createdtime, createdby, + lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -89,14 +86,14 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_bride_groom_details( - id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, - lastname_en, lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, - mothername_mal, father_adharno, mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, maritalstatusid, no_of_spouse_living, - marriageid, photo_url, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_adharno, + mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.BrideDetails.id + - jsonPath: $.MarriageDetails.*.BrideDetails.brideId - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip @@ -154,7 +151,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.BrideDetails.photo_url + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom - jsonPath: $.MarriageDetails.*.auditDetails.createdTime @@ -166,14 +163,14 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_bride_groom_details( - id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, - lastname_en, lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, - mothername_mal, father_adharno, mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, maritalstatusid, no_of_spouse_living, - marriageid, photo_url, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_adharno, + mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.GroomDetails.id + - jsonPath: $.MarriageDetails.*.GroomDetails.groomId - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip @@ -231,7 +228,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.GroomDetails.groomPhotoUrl + - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom - jsonPath: $.MarriageDetails.*.auditDetails.createdTime @@ -241,192 +238,14 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - query : INSERT INTO public.eg_marriage_permanent_address_details( - id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid , poname_en) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.PermanentAddressDetails - jsonMaps: - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id1 - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEnBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMalBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageIdBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageNameBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukIDBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukNameBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCodeBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEnBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMalBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEnBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMalBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictIdBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateIdBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOidBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPinBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryIdBride - - - jsonPath: $.MarriageDetails.*.id - - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.brideGroom1 - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.marriageTenantidBride - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.ponameEnBride - - - - query: INSERT INTO public.eg_marriage_permanent_address_details( - id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid , poname_en) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.PermanentAddressDetails - jsonMaps: - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.id2 - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEnGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMalGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageIdGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageNameGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukIDGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukNameGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCodeGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEnGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMalGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEnGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMalGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictIdGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateIdGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOidGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPinGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryIdGroom - - - jsonPath: $.MarriageDetails.*.id - - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.brideGroom2 - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.marriageTenantidGroom - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.ponameEnGroom - - - - - - - query: INSERT INTO public.eg_marriage_present_address_details( - id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, - lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.PresentAddressDetails - jsonMaps: - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.id - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageName - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukID - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukName - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentWardCode - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDistrictId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStateId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPOid - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPin - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentCountryId - - - jsonPath: $.MarriageDetails.*.id - - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.brideGroom - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.same_as_permanent - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.marriageTenantid - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.poname_en - - query: INSERT INTO public.eg_marriage_witness_details( - id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, serial_no) + id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, + lastmodifiedtime, lastmodifiedby, serial_no) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetail jsonMaps: - - jsonPath: $.MarriageDetails.*.WitnessDetail.id1 + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessId1 - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AdharNo @@ -457,12 +276,12 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetail.serial_no1 - query: INSERT INTO public.eg_marriage_witness_details( - id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, serial_no) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, + lastmodifiedtime, lastmodifiedby, serial_no) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetail jsonMaps: - - jsonPath: $.MarriageDetails.*.WitnessDetail.id2 + - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessId2 - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AdharNo @@ -494,431 +313,3 @@ serviceMaps: - - version: 1.0 - description: Persists save marriage details in marriage table - fromTopic: update-marriage-application-topic - isTransaction: true - queryMaps: - - - - query: UPDATE public.eg_marriage_details - SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeid=?, placename_en=?, - placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, - village_name=?, marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, - workflowcode=?, applicationnumber=?, filenumber=?, file_date=?, file_status=?, registrationno=?, registration_date=?, action=?, status=?, - createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=?, domcorreflag=?, placeidcorrflag=?, groomnamecorreflag=?, bridenamecorreflag=?, - grromagecorreflag=?, brideagecorreflag=?, groomdobcorreflag=?, bridedobcorreflag=?, groompermanentaddrcorreflag=?, bridepermanentaddrcorreflag=?, - groommothercorreflag=?, bridemothercorreflag=?, groomfathercorreflag=?, bridefathercorreflag=?, groomguardiancorreflag=?, bridegurdiancorreflag=? - WHERE id=?; - - basePath: MarriageDetails.* - jsonMaps: - - jsonPath: $.MarriageDetails.*.marriageDOM - - - jsonPath: $.MarriageDetails.*.marriageDOR - - - jsonPath: $.MarriageDetails.*.marriageDistrictid - - - jsonPath: $.MarriageDetails.*.marriageLBtype - - - jsonPath: $.MarriageDetails.*.marriageTenantid - - - jsonPath: $.MarriageDetails.*.marriagePlacetype - - - jsonPath: $.MarriageDetails.*.marriagePlaceothers - - - jsonPath: $.MarriageDetails.*.placeid - - - jsonPath: $.MarriageDetails.*.marriagePlacenameEn - - - jsonPath: $.MarriageDetails.*.marriageStreetEn - - - jsonPath: $.MarriageDetails.*.marriageStreetMal - - - jsonPath: $.MarriageDetails.*.marriagePlacenameMal - - - jsonPath: $.MarriageDetails.*.marriageWardCode - - - jsonPath: $.MarriageDetails.*.marriageTalukID - - - jsonPath: $.MarriageDetails.*.marriageVillageName - - - jsonPath: $.MarriageDetails.*.marriageType - - - jsonPath: $.MarriageDetails.*.othMarriageType - - - jsonPath: $.MarriageDetails.*.marriageLandmark - - - jsonPath: $.MarriageDetails.*.marriageLocalityEn - - - jsonPath: $.MarriageDetails.*.marriageLocalityMal - - - jsonPath: $.MarriageDetails.*.marriageOthersSpecify - - - jsonPath: $.MarriageDetails.*.applicationType - - - jsonPath: $.MarriageDetails.*.businessService - - - jsonPath: $.MarriageDetails.*.workflowCode - - - jsonPath: $.MarriageDetails.*.fileNo - - - jsonPath: $.MarriageDetails.*.fileDate - - - jsonPath: $.MarriageDetails.*.fileStatus - - - jsonPath: $.MarriageDetails.*.applicationnumber - - - jsonPath: $.MarriageDetails.*.registrationno - - - jsonPath: $.MarriageDetails.*.registration_date - - - jsonPath: $.MarriageDetails.*.action - - - jsonPath: $.MarriageDetails.*.status - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn - - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal - - - jsonPath: $.MarriageDetails.*.marriageReligiousInstitution - - - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivatePlace - - - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivateNamePlaceEn - - - jsonPath: $.MarriageDetails.*.marriagePublicOrPrivateNamePlaceMal - - - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOther - - - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOtherNameEn - - - jsonPath: $.MarriageDetails.*.marriageReligiousInstitutionOtherNameMal - - - jsonPath: $.MarriageDetails.*.id - - - query : UPDATE public.eg_marriage_bride_details - SET residentship=?, adharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_mal=?, middlename_en=?, middlename_mal=?, - lastname_en=?, lastname_mal=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, fathername_mal=?, - mothername_en=?, mothername_mal=?, father_adharno=?, mother_adharno=?, guardianname_en=?, guardianname_mal=?, guardian_adhar=?, - profession_en=?, profession_mal=?, maritalstatusid=?, is_spouse_living=?, no_of_spouse_living=?, photo_url=?, - lastmodifiedtime=?, lastmodifiedby=? - WHERE marriageid=?; - basePath: MarriageDetails.*.BrideDetails - jsonMaps: - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideAdharNo - - - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMal - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMal - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMal - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMal - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMal - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAdharNo - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAdharNo - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMal - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGardianAdhar - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideProfessionEn - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideProfessionMal - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideSpouseLiving - - - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse - - - - jsonPath: $.MarriageDetails.*.BrideDetails.photo_url - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.id - - - - query : UPDATE public.eg_marriage_groom_details - SET residentship=?, adharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_mal=?, middlename_en=?, - middlename_mal=?, lastname_en=?, lastname_mal=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, - fathername_mal=?, mothername_en=?, mothername_mal=?, father_adharno=?, mother_adharno=?, guardianname_en=?, guardianname_mal=?, - guardian_adhar=?, profession_en=?, profession_mal=?, maritalstatusid=?, is_spouse_living=?, no_of_spouse_living=?, - photo_url=?, lastmodifiedtime=?, lastmodifiedby=? - WHERE marriageid=?; - basePath: MarriageDetails.*.GroomDetails - jsonMaps: - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomAdharNo - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMal - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMal - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMal - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMal - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMal - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAdharNo - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAdharNo - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMal - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomGardianAdhar - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomProfessionEn - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomProfessionMal - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomSpouseLiving - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse - - - - jsonPath: $.MarriageDetails.*.GroomDetails.groomPhotoUrl - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.id - - - - query : UPDATE public.eg_marriage_permanent_address_details - SET houseno=?, housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, - ward_code=?, doorno=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, - countryid=?, lastmodifiedtime=?, lastmodifiedby=? - WHERE marriageid=? ; - - basePath: MarriageDetails.*.PermanentAddressDetails - jsonMaps: - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNo - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameEn - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentHouseNameMal - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageId - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentVillageName - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukID - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentTalukName - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentWardCode - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDoorNO - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityEn - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentLocalityMal - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameEn - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStreetNameMal - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentDistrictId - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentStateId - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPOid - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentPin - - - jsonPath: $.MarriageDetails.*.PermanentAddressDetails.permanentCountryId - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.id - - - - query : UPDATE public.eg_marriage_present_address_details - SET houseno=?, housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, doorno=?, - locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, - lastmodifiedtime=?, lastmodifiedby=? - WHERE marriageid=?; - - - basePath: MarriageDetails.*.PresentAddressDetails - jsonMaps: - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNo - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentHouseNameMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentVillageName - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukID - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentTalukName - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentWardCode - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDoorNO - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentLocalityMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameEn - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStreetNameMal - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentDistrictId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentStateId - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPOid - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentPin - - - jsonPath: $.MarriageDetails.*.PresentAddressDetails.presentCountryId - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - - jsonPath: $.MarriageDetails.*.id - - - - - query : UPDATE public.eg_marriage_witness_details - SET adharno=?, name_en=?, name_mal=?, age=?, address_en=?, address_mal=?, mobile=?, is_message_received=?, is_esigned=?, marriageid=?, - lastmodifiedtime=?, lastmodifiedby=?, w2_adharno=?, w2_name_en=?, w2_name_mal=?, w2_age=?, w2_address_en=?, w2_address_mal=?, w2_mobile=?, - w2_is_message_received=?, w2_is_esigned=? - WHERE marriageid=?; - basePath: MarriageDetails.*.WitnessDetail - jsonMaps: - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AdharNo - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameEn - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameMal - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Age - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddresSEn - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddressMal - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Mobile - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISmessageReceived - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISEsigned - - - jsonPath: $.MarriageDetails.*.id - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AdharNo - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameEn - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameMal - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Age - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddresSEn - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddressMal - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Mobile - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISmessageReceived - - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISEsigned - - - jsonPath: $.MarriageDetails.*.id - - - diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index f39e74655f7..6b524926360 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -67,55 +67,6 @@ public ResponseEntity searchMarriageDetails(@Reques .build(); return ResponseEntity.ok(response); } -// @PostMapping(value = {"/_update"}) -// public ResponseEntity updateBirthDetails(@RequestBody MarriageDetailsRequest request) { -// //BirthCertificate birthCertificate = new BirthCertificate(); -// List birthApplicationDetails=crBirthService.updateBirthDetails(request); -// //Download certificate when Approved -// if((birthApplicationDetails.get(0).getStatus() == "APPROVED") && (birthApplicationDetails.get(0).getAction() == "APPROVE")){ -// RegisterBirthDetailsRequest registerBirthDetailsRequest = registryRequestService.createRegistryRequest(request); -// List registerBirthDetails = registerBirthService.saveRegisterBirthDetails(registerBirthDetailsRequest); -// RegisterBirthSearchCriteria criteria = new RegisterBirthSearchCriteria(); -// criteria.setTenantId(registerBirthDetails.get(0).getTenantId()); -// System.out.println(criteria.getTenantId()); -// -// criteria.setRegistrationNo(registerBirthDetails.get(0).getRegistrationNo()); System.out.println(registerBirthDetails.get(0).getRegistrationNo()); -// birthCertificate = registerBirthService.download(criteria,request.getRequestInfo()); -// } -// MarriageApplicationResponse response= MarriageApplicationResponse.builder() -// .birthDetails(birthApplicationDetails) -// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), -// true)) -// .birthCertificate(birthCertificate) -// .build(); -// return new ResponseEntity<>(response, HttpStatus.OK); -// } -// -// @PostMapping(value = {"/_search"}) -// public ResponseEntity listByHospitalId(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { -// List birthDetails=crBirthService.searchBirthDetails(criteria); -// MarriageApplicationResponse response= MarriageApplicationResponse.builder() -// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), -// Boolean.TRUE)) -// .birthDetails(birthDetails) -// .build(); -// return ResponseEntity.ok(response); -// } - -// @PostMapping(value = { "/_getfilestoreid"}) -// public ResponseEntity getfilestoreid(@RequestBody RequestInfoWrapper requestInfoWrapper, -// @Valid @ModelAttribute SearchCriteria criteria) { -// -// BirthCertificate birthCert = birthService.getBirthCertReqByConsumerCode(criteria,requestInfoWrapper.getRequestInfo()); -// BirthCertResponse response = BirthCertResponse.builder().filestoreId(birthCert.getFilestoreid()).tenantId(criteria.getTenantId()).responseInfo( -// responseInfoFactory.createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(), true)) -// .build(); -// if(null!=birthCert.getFilestoreid()) { -// birthCert.setBirthCertificateNo(criteria.getConsumerCode()); -// birthService.updateDownloadStatus(BirthCertRequest.builder().birthCertificate(birthCert).requestInfo(requestInfoWrapper.getRequestInfo()).build()); -// } -// return new ResponseEntity<>(response, HttpStatus.OK); -// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 9445684f6e1..bbf5e857071 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -40,23 +40,27 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.setAuditDetails(auditDetails); if(marriage.getBrideDetails()!=null){ marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); + marriage.getBrideDetails().setBrideGroom("BRIDE"); + } if(marriage.getGroomDetails()!=null){ marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); + marriage.getGroomDetails().setBrideGroom("GROOM"); + } - marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); - marriage.getPermanentBride().setId2(UUID.randomUUID().toString()); +// marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); +// marriage.getPermanentBride().setId2(UUID.randomUUID().toString()); - marriage.getPermanentBride().setBrideGroom1("BRIDE"); - marriage.getPermanentBride().setBrideGroom2("GROOM"); +// marriage.getPermanentBride().setBrideGroom("BRIDE"); +// marriage.getPermanentBride().setBrideGroom2("GROOM"); - if(marriage.getPresent()!=null){ - marriage.getPresent().setId(UUID.randomUUID().toString()); - marriage.getPresent().setBrideGroom("BRIDE"); - marriage.getPresent().setBrideGroom("GROOM"); - } +// if(marriage.getPresent()!=null){ +// marriage.getPresent().setId(UUID.randomUUID().toString()); +//// marriage.getPresent().setBrideGroom("BRIDE"); +//// marriage.getPresent().setBrideGroom("GROOM"); +// } if(marriage.getWitness()!=null){ marriage.getWitness().setWitnessId1(UUID.randomUUID().toString()); marriage.getWitness().setWitnessId2(UUID.randomUUID().toString()); @@ -68,7 +72,7 @@ public void enrichCreate(MarriageDetailsRequest request) { }); setApplicationNumbers(request); setFileNumbers(request); - setRegistrationNumber(request); + // setRegistrationNumber(request); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java index c713c859553..f8f6b6bb39c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java @@ -90,18 +90,18 @@ public class MarriageApplicationDetail { @Size(max = 64) @JsonProperty("marriageType") private String marriage_type; - - @Size(max = 64) - @JsonProperty("marriagePlaceothers") - private String placeothers; +// +// @Size(max = 64) +// @JsonProperty("marriagePlaceothers") +// private String placeothers; @Size(max = 200) @JsonProperty("othMarriageType") private String oth_marriage_type; - @Size(max = 1000) - @JsonProperty("marriageOthersSpecify") - private String othersspecify; +// @Size(max = 1000) +// @JsonProperty("marriageOthersSpecify") +// private String othersspecify; @NotNull @Size(max = 64) @@ -193,12 +193,12 @@ public class MarriageApplicationDetail { @JsonProperty("GroomDetails") private GroomDetails groomDetails; - @JsonProperty("PermanentAddressDetails") - private PermanentAdressDetails permanentBride; - @JsonProperty("PresentAddressDetails") - private PresentAddressDetails present ; +// @JsonProperty("PermanentAddressDetails") +// private PermanentAdressDetails permanentBride; +// @JsonProperty("PresentAddressDetails") +// private PresentAddressDetails present ; - @JsonProperty("WitnessDetail") + @JsonProperty("WitnessDetails") private WitnessDetails witness; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index 3a6b6c9ea57..a0bf1176bf9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -4,6 +4,7 @@ import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Getter @Setter @@ -15,7 +16,10 @@ public class BrideDetails { @Size(max = 64) @JsonProperty("brideId") private String brideId; - + @NotNull + @Size(max = 64) + @JsonProperty("brideGroom") + private String brideGroom; @Size(max = 64) @JsonProperty("tenentId") private String tenentId; @@ -134,16 +138,9 @@ public class BrideDetails { @JsonProperty("brideMaritalstatusID") private String maritalstatusid; - @JsonProperty("brideSpouseLiving") - private Boolean is_spouse_living; - - @JsonProperty("brideNoOfSpouse") private Boolean no_of_spouse_living; - @Size(max = 150) - @JsonProperty("bridePhotoUrl") - private String photo_url; @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index b8b2679c802..689c34378a3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -18,6 +18,10 @@ public class GroomDetails { @Size(max = 64) @JsonProperty("tenentId") private String tenentId; + @NotNull + @Size(max = 64) + @JsonProperty("brideGroom") + private String brideGroom; @Size(max = 64) @JsonProperty("marriageid") private String marriageid; @@ -114,9 +118,6 @@ public class GroomDetails { private Boolean is_spouse_living; @JsonProperty("groomNoOfSpouse") private Boolean no_of_spouse_living; - @Size(max = 150) - @JsonProperty("groomPhotoUrl") - private String photo_url; @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java index aceebe33327..8b1a51211cb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java @@ -5,7 +5,6 @@ import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.response.ResponseInfo; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; -//import org.ksmart.marriage.marriageregistry.model.BirthCertificate; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; @@ -29,10 +28,6 @@ public class MarriageApplicationResponse { @Valid private List marriageApplicationDetails; -// @JsonProperty("BirthCertificate") -// @Valid -// private BirthCertificate birthCertificate; - @JsonProperty("Count") private int count; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java deleted file mode 100644 index c068a112ef9..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PermanentAdressDetails.java +++ /dev/null @@ -1,203 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class PermanentAdressDetails { - @NotNull - @Size(max = 64) - @JsonProperty("id1") - private String id1; - - @Size(max = 200) - @JsonProperty("permanentHouseNoBride") - private String housenoBride; - - @Size(max = 2500) - @JsonProperty("permanentHouseNameEnBride") - private String housename_no_enBride; - - @Size(max = 2500) - @JsonProperty("permanentHouseNameMalBride") - private String housename_no_mlBride; - - @Size(max = 64) - @JsonProperty("permanentVillageIdBride") - private String villageidBride; - - @Size(max = 1000) - @JsonProperty("permanentVillageNameBride") - private String village_nameBride; - - @Size(max = 64) - @JsonProperty("permanentTalukIDBride") - private String talukidBride; - - @Size(max = 1000) - @JsonProperty("permanentTalukNameBride") - private String taluk_nameBride; - - @Size(max = 64) - @JsonProperty("permanentWardCodeBride") - private String ward_codeBride; - - @JsonProperty("permanentDoorNOBride") - private Integer doornoBride; - - @Size(max = 1000) - @JsonProperty("permanentLocalityEnBride") - private String locality_enBride; - - @Size(max = 1000) - @JsonProperty("permanentLocalityMalBride") - private String locality_mlBride; - - @Size(max = 2000) - @JsonProperty("permanentStreetNameEnBride") - private String street_name_enBride; - - @Size(max = 2000) - @JsonProperty("permanentStreetNameMalBride") - private String street_name_mlBride; - - - @Size(max = 64) - @JsonProperty("permanentDistrictIdBride") - private String districtidBride; - - - - - @Size(max = 64) - @JsonProperty("permanentStateIdBride") - private String stateidBride; - - @Size(max = 64) - @JsonProperty("permanentPOidBride") - private String poidBride; - - @Size(max = 10) - @JsonProperty("permanentPinBride") - private String pinnoBride; - - @Size(max = 64) - @JsonProperty("permanentCountryIdBride") - private String countryidBride; - @NotNull - @Size(max = 64) - @JsonProperty("marriageidBride") - private String marriageidBride; - @NotNull - @Size(max = 64) - @JsonProperty("brideGroom1") - private String brideGroom1; - @Size(max = 64) - @JsonProperty("marriageTenantidBride") - private String tenantidBride; - @Size(max = 64) - @JsonProperty("ponameEnBride") - private String poname_enBride; - - - - - @NotNull - @Size(max = 64) - @JsonProperty("id2") - private String id2; - @Size(max = 200) - @JsonProperty("permanentHouseNoGroom") - private String housenoGroom; - - @Size(max = 2500) - @JsonProperty("permanentHouseNameEnGroom") - private String housename_no_enGroom; - - @Size(max = 2500) - @JsonProperty("permanentHouseNameMalGroom") - private String housename_no_mlGroom; - - @Size(max = 64) - @JsonProperty("permanentVillageIdGroom") - private String villageidGroom; - - @Size(max = 1000) - @JsonProperty("permanentVillageNameGroom") - private String village_nameGroom; - - @Size(max = 64) - @JsonProperty("permanentTalukIDGroom") - private String talukidGroom; - - @Size(max = 1000) - @JsonProperty("permanentTalukNameGroom") - private String taluk_nameGroom; - - @Size(max = 64) - @JsonProperty("permanentWardCodeGroom") - private String ward_codeGroom; - - @JsonProperty("permanentDoorNOGroom") - private Integer doornoGroom; - - @Size(max = 1000) - @JsonProperty("permanentLocalityEnGroom") - private String locality_enGroom; - - @Size(max = 1000) - @JsonProperty("permanentLocalityMalGroom") - private String locality_mlGroom; - - @Size(max = 2000) - @JsonProperty("permanentStreetNameEnGroom") - private String street_name_enGroom; - - @Size(max = 2000) - @JsonProperty("permanentStreetNameMalGroom") - private String street_name_mlGroom; - - - @Size(max = 64) - @JsonProperty("permanentDistrictIdGroom") - private String districtidGroom; - - - - - @Size(max = 64) - @JsonProperty("permanentStateIdGroom") - private String stateidGroom; - - @Size(max = 64) - @JsonProperty("permanentPOidGroom") - private String poidGroom; - - @Size(max = 10) - @JsonProperty("permanentPinGroom") - private String pinnoGroom; - - @Size(max = 64) - @JsonProperty("permanentCountryIdGroom") - private String countryidGroom; - @NotNull - @Size(max = 64) - @JsonProperty("marriageidGroom") - private String marriageidGroom; - @NotNull - @Size(max = 64) - @JsonProperty("brideGroom2") - private String brideGroom2; - @Size(max = 64) - @JsonProperty("marriageTenantidGroom") - private String tenantidGroom; - @Size(max = 64) - @JsonProperty("ponameEnGroom") - private String poname_enGroom; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java deleted file mode 100644 index 93c1674c181..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/PresentAddressDetails.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class PresentAddressDetails { - @NotNull - @Size(max = 64) - @JsonProperty("id") - private String id; - @Size(max = 200) - @JsonProperty("presentHouseNo") - private String houseno; - - @Size(max = 2500) - @JsonProperty("presentHouseNameEn") - private String housename_no_en; - - - - @Size(max = 2500) - @JsonProperty("presentHouseNameMal") - private String housename_no_ml; - - @Size(max = 64) - @JsonProperty("presentVillageId") - private String villageid; - - @Size(max = 1000) - @JsonProperty("presentVillageName") - private String village_name; - - @Size(max = 64) - @JsonProperty("presentTalukID") - private String talukid; - - @Size(max = 1000) - @JsonProperty("presentTalukName") - private String taluk_name; - - @Size(max = 64) - @JsonProperty("presentWardCode") - private String ward_code; - - - - - @JsonProperty("presentDoorNO") - private Integer doorno; - - @Size(max = 1000) - @JsonProperty("presentLocalityEn") - private String locality_en; - - @Size(max = 1000) - @JsonProperty("presentLocalityMal") - private String locality_ml; - - @Size(max = 2000) - @JsonProperty("presentStreetNameEn") - private String street_name_en; - - @Size(max = 2000) - @JsonProperty("presentStreetNameMal") - private String street_name_ml; - - - @Size(max = 64) - @JsonProperty("presentDistrictId") - private String districtid; - - - - - @Size(max = 64) - @JsonProperty("presentStateId") - private String stateid; - - @Size(max = 64) - @JsonProperty("presentPOid") - private String poid; - - @Size(max = 10) - @JsonProperty("presentPin") - private String pinno; - - @Size(max = 64) - @JsonProperty("presentCountryId") - private String countryid; - @NotNull - @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; - - @NotNull - @Size(max = 64) - @JsonProperty("brideGroom") - private String brideGroom; - @Size(max = 64) - @JsonProperty("marriageTenantid") - private String tenantid; - @Size(max = 64) - @JsonProperty("poname_en") - private String poname_en; - - @JsonProperty("same_as_permanent") - private Boolean same_as_permanent; -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index be84d006b9b..6231d71fc25 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -60,11 +60,10 @@ public List updateMarriageDetails(MarriageDetailsRequ public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getBirthApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); return result; } - //private final org.ksmart.birth.common.producer.MarriageProducer producer; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java similarity index 98% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java index d67ff21fdff..2bab44ba386 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseBirthQuery.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java @@ -10,7 +10,7 @@ import java.util.stream.Collectors; @Component -public class BaseBirthQuery { +public class BaseMarriageQueryBuilder { void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, List paramValues) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 4f355634934..d459a614186 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull; import java.util.List; @Component -public class MarriageApplicationQueryBuilder extends BaseBirthQuery { +public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { @Autowired CommonQueryBuilder commonQueryBuilder; @@ -38,7 +38,7 @@ public class MarriageApplicationQueryBuilder extends BaseBirthQuery { - public String getBirthApplicationSearchQuery(@NotNull MarriageApplicationSearchCriteria criteria, + public String getMarriageApplicationSearchQuery(@NotNull MarriageApplicationSearchCriteria criteria, @NotNull List preparedStmtValues, Boolean isCount) { StringBuilder query = new StringBuilder(QUERY); query.append(",").append(commonQueryBuilder.getQueryBrideDetails()) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 1a23c840f30..0e84a021f86 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -38,9 +38,9 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ // .profession_en(rs.getString("bd_profession_en")) // .profession_mal(rs.getString("bd_profession_mal")) .maritalstatusid(rs.getString("bd_maritalstatusid")) - .is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) + //.is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) - .photo_url(rs.getString("bd_photo_url")) + // .photo_url(rs.getString("bd_photo_url")) .marriageid(rs.getString("bd_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 1f8145a21ed..78932c3a470 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -41,7 +41,7 @@ default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) .marriageid(rs.getString("gd_marriageid")) - .photo_url(rs.getString("gd_photo_url")) + //.photo_url(rs.getString("gd_photo_url")) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index e7e368d7800..9a7b667eda8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -25,7 +25,7 @@ public List extractData(ResultSet rs) throws SQLExcep .lbtype(rs.getString("ma_lbtype")) .tenantid(rs.getString("ma_tenantid")) .placetype(rs.getString("ma_placetype")) - .placeothers(rs.getString("ma_placeothers")) + // .placeothers(rs.getString("ma_placeothers")) .placeid(rs.getString("ma_placeid")) .placenameEn(rs.getString("ma_placename_en")) .placenameMl(rs.getString("ma_placename_mal")) @@ -39,7 +39,7 @@ public List extractData(ResultSet rs) throws SQLExcep .landmark(rs.getString("ma_landmark")) .locality_en(rs.getString("ma_locality_en")) .locality_ml(rs.getString("ma_locality_ml")) - .othersspecify(rs.getString("ma_othersspecify")) + // .othersspecify(rs.getString("ma_othersspecify")) .applicationtype(rs.getString("ma_applicationtype")) .businessservice(rs.getString("ma_businessservice")) .workflowcode(rs.getString("ma_workflowcode")) @@ -63,7 +63,7 @@ public List extractData(ResultSet rs) throws SQLExcep .brideDetails(getBrideDetails(rs)) .groomDetails(getgroomDetails(rs)) // .permanent(getPermanentAddress(rs)) - .present(getPresentAddress(rs)) + //.present(getPresentAddress(rs)) .witness(getWitnessDetails(rs)) .auditDetails(getAuditDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java index b33e19abd35..f987f51bd69 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java @@ -1,14 +1,13 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.PermanentAdressDetails; import java.sql.ResultSet; import java.sql.SQLException; public interface PermanentAddressRowMapper { - default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ - - return PermanentAdressDetails.builder() +// default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ +// +// return PermanentAdressDetails.builder() // .id(rs.getString("per_id")) // .houseno(rs.getString("per_houseno")) // .housename_no_en(rs.getString("per_housename_no_en")) @@ -30,8 +29,8 @@ default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLExce // .countryid(rs.getString("per_countryid")) // .marriageid(rs.getString("per_marriageid")) - .build(); +// .build(); - } +// } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java index 76d87105f1d..8de5f73a9c4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java @@ -1,34 +1,34 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; +//import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; import java.sql.ResultSet; import java.sql.SQLException; public interface PresentAddressRowMapper { - default PresentAddressDetails getPresentAddress (ResultSet rs) throws SQLException{ - - return PresentAddressDetails.builder() - .id(rs.getString("pes_id")) - .houseno(rs.getString("pes_houseno")) - .housename_no_en(rs.getString("pes_housename_no_en")) - .housename_no_ml(rs.getString("pes_housename_no_ml")) - .villageid(rs.getString("pes_villageid")) - .village_name(rs.getString("pes_village_name")) - .talukid(rs.getString("pes_talukid")) - .taluk_name(rs.getString("pes_taluk_name")) - .ward_code(rs.getString("pes_ward_code")) - .doorno(rs.getInt("pes_doorno")) - .locality_en(rs.getString("pes_locality_en")) - .locality_ml(rs.getString("pes_locality_ml")) - .street_name_en(rs.getString("pes_street_name_en")) - .street_name_ml(rs.getString("pes_street_name_ml")) - .districtid(rs.getString("pes_districtid")) - .stateid(rs.getString("pes_stateid")) - .poid(rs.getString("pes_poid")) - .pinno(rs.getString("pes_pinno")) - .countryid(rs.getString("pes_countryid")) - .marriageid(rs.getString("pes_marriageid")) - .build(); - } +// default PresentAddressDetails getPresentAddress (ResultSet rs) throws SQLException{ +// +// return PresentAddressDetails.builder() +// .id(rs.getString("pes_id")) +// .houseno(rs.getString("pes_houseno")) +// .housename_no_en(rs.getString("pes_housename_no_en")) +// .housename_no_ml(rs.getString("pes_housename_no_ml")) +// .villageid(rs.getString("pes_villageid")) +// .village_name(rs.getString("pes_village_name")) +// .talukid(rs.getString("pes_talukid")) +// .taluk_name(rs.getString("pes_taluk_name")) +// .ward_code(rs.getString("pes_ward_code")) +// .doorno(rs.getInt("pes_doorno")) +// .locality_en(rs.getString("pes_locality_en")) +// .locality_ml(rs.getString("pes_locality_ml")) +// .street_name_en(rs.getString("pes_street_name_en")) +// .street_name_ml(rs.getString("pes_street_name_ml")) +// .districtid(rs.getString("pes_districtid")) +// .stateid(rs.getString("pes_stateid")) +// .poid(rs.getString("pes_poid")) +// .pinno(rs.getString("pes_pinno")) +// .countryid(rs.getString("pes_countryid")) +// .marriageid(rs.getString("pes_marriageid")) +// .build(); +// } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index f0a82d20e5b..f24bea93419 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -40,9 +40,9 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ // .profession_en(rs.getString("bd_profession_en")) // .profession_mal(rs.getString("bd_profession_mal")) .maritalstatusid(rs.getString("bd_maritalstatusid")) - .is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) + //.is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) - .photo_url(rs.getString("bd_photo_url")) + //.photo_url(rs.getString("bd_photo_url")) .marriageid(rs.getString("bd_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index 498b892f1ef..8f8ee4634cf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -41,7 +41,7 @@ default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) .marriageid(rs.getString("gd_marriageid")) - .photo_url(rs.getString("gd_photo_url")) + // .photo_url(rs.getString("gd_photo_url")) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java index 24b5fdb9d2f..a84c4a27c21 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java @@ -1,14 +1,13 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.PermanentAdressDetails; import java.sql.ResultSet; import java.sql.SQLException; public interface MarriageAddressRegistryRowMapper { - default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ - - return PermanentAdressDetails.builder() +// default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ +// +// return PermanentAdressDetails.builder() // .id(rs.getString("per_id")) // .houseno(rs.getString("per_houseno")) // .housename_no_en(rs.getString("per_housename_no_en")) @@ -30,8 +29,8 @@ default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLExce // .countryid(rs.getString("per_countryid")) // .marriageid(rs.getString("per_marriageid")) - .build(); + //.build(); } -} +//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 857fbeec053..e1ed72d7a16 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -25,7 +25,7 @@ public List extractData(ResultSet rs) throws SQLExcep .lbtype(rs.getString("ma_lbtype")) .tenantid(rs.getString("ma_tenantid")) .placetype(rs.getString("ma_placetype")) - .placeothers(rs.getString("ma_placeothers")) + //.placeothers(rs.getString("ma_placeothers")) .placeid(rs.getString("ma_placeid")) .placenameEn(rs.getString("ma_placename_en")) .placenameMl(rs.getString("ma_placename_mal")) @@ -39,7 +39,7 @@ public List extractData(ResultSet rs) throws SQLExcep .landmark(rs.getString("ma_landmark")) .locality_en(rs.getString("ma_locality_en")) .locality_ml(rs.getString("ma_locality_ml")) - .othersspecify(rs.getString("ma_othersspecify")) + // .othersspecify(rs.getString("ma_othersspecify")) .applicationtype(rs.getString("ma_applicationtype")) .businessservice(rs.getString("ma_businessservice")) .workflowcode(rs.getString("ma_workflowcode")) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 67762ad07d8..996c59f2c42 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,15 +5,15 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage2 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage2 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql new file mode 100644 index 00000000000..c03ac6179f2 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql @@ -0,0 +1,3 @@ +ALTER TABLE public.eg_marriage_bride_groom_details + DROP COLUMN no_of_spouse_living, + ADD COLUMN no_of_spouse_living bigint; From 9a0b3863c95f6b1009ce889738996f61d4ea9ae1 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 25 Mar 2023 11:53:53 +0530 Subject: [PATCH 043/420] Model Updation --- .../src/main/resources/application.properties | 4 +- .../src/main/resources/marriage.yml | 44 +++++++++---------- .../MarriageApplicationController.java | 8 ++-- .../enrichment/MarriageDetailsEnrichment.java | 10 ++--- ...l.java => MarriageApplicationDetails.java} | 6 +-- .../model/marriage/BrideDetails.java | 2 +- .../model/marriage/GroomDetails.java | 2 +- .../marriage/MarriageApplicationResponse.java | 7 ++- .../marriage/MarriageDetailsRequest.java | 6 +-- .../MarriageApplicationRepository.java | 10 ++--- .../rowmapper/BrideDetailsRowMapper.java | 2 +- .../rowmapper/GroomDetailsRowMapper.java | 2 +- .../MarriageApplicationRowMapper.java | 11 +++-- .../service/MarriageApplicationService.java | 8 ++-- .../model/MarriageRegistryRequest.java | 1 - .../model/MarriageRegistryResponse.java | 2 - .../rowmapper/BrideRegistryRowMapper.java | 2 +- .../rowmapper/GroomRegistryRowMapper.java | 2 +- .../rowmapper/MarriageRegistryRowMapper.java | 11 +++-- 19 files changed, 66 insertions(+), 74 deletions(-) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/{MarriageApplicationDetail.java => MarriageApplicationDetails.java} (97%) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 75e178d880a..bee682173b2 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,5 +1,5 @@ spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage2 spring.datasource.username=postgres spring.datasource.password=123 @@ -10,7 +10,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage2 spring.flyway.user=postgres spring.flyway.password=123 spring.flyway.table=public diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 7b3bda2cdbe..455e1bd3f77 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -242,26 +242,26 @@ serviceMaps: id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, serial_no) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.WitnessDetail + basePath: MarriageDetails.*.WitnessDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessId1 + - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId1 - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AdharNo - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameEn + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameEn - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1NameMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMal - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Age + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Age - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddresSEn + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1AddressMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddressMal - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1Mobile + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness1ISEsigned + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1ISEsigned - jsonPath: $.MarriageDetails.*.id @@ -273,31 +273,31 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.WitnessDetail.serial_no1 + - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 - query: INSERT INTO public.eg_marriage_witness_details( id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, serial_no) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.WitnessDetail + basePath: MarriageDetails.*.WitnessDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.WitnessDetail.witnessId2 + - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId2 - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AdharNo - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameEn + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameEn - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2NameMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMal - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Age + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Age - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddresSEn + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddresSEn - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2AddressMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMal - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2Mobile + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Mobile - - jsonPath: $.MarriageDetails.*.WitnessDetail.witness2ISEsigned + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2ISEsigned - jsonPath: $.MarriageDetails.*.id @@ -309,7 +309,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.WitnessDetail.serial_no2 + - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index 6b524926360..5732fc96b49 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -2,7 +2,7 @@ // import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationResponse; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; @@ -41,7 +41,7 @@ public MarriageApplicationController( MarriageApplicationService crMarriageServi @PostMapping(value = {"/_createmarriage"}) public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { - List marriageDetails=crMarriageService.saveMarriageDetails(request); + List marriageDetails=crMarriageService.saveMarriageDetails(request); MarriageApplicationResponse response= MarriageApplicationResponse.builder() .marriageApplicationDetails(marriageDetails) .responseInfo( @@ -52,14 +52,14 @@ public ResponseEntity saveMarriageDetails(@RequestB } @PostMapping(value = { "/_updatemarriage"}) public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { - List marriageDetails = crMarriageService.updateMarriageDetails(request); + List marriageDetails = crMarriageService.updateMarriageDetails(request); return new ResponseEntity<>(marriageDetails, HttpStatus.OK); } @PostMapping(value = { "/_searchmarriage"}) public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { - List marriageDetails = crMarriageService.searchMarriageDetails(criteria); + List marriageDetails = crMarriageService.searchMarriageDetails(criteria); MarriageApplicationResponse response = MarriageApplicationResponse.builder() .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index bbf5e857071..0120a74d89a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -7,14 +7,12 @@ import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; import org.ksmart.marriage.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.utils.IDGenerator; -import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.enums.ErrorCodes; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import org.springframework.util.IdGenerator; import java.util.List; import java.util.ListIterator; @@ -80,7 +78,7 @@ public void enrichCreate(MarriageDetailsRequest request) { private void setRegistrationNumber(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); - List marriageDetails = request.getMarriageDetails(); + List marriageDetails = request.getMarriageDetails(); String tenantId = marriageDetails.get(0) .getTenantid(); @@ -105,7 +103,7 @@ private void setRegistrationNumber(MarriageDetailsRequest request) { private void setFileNumbers(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); - List marriageDetails = request.getMarriageDetails(); + List marriageDetails = request.getMarriageDetails(); String tenantId = marriageDetails.get(0) .getTenantid(); System.out.println(("request"+request)); @@ -128,7 +126,7 @@ private void setFileNumbers(MarriageDetailsRequest request) { private void setApplicationNumbers(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); - List marriageDetails = request.getMarriageDetails(); + List marriageDetails = request.getMarriageDetails(); String tenantId = marriageDetails.get(0) .getTenantid(); List filecodes = getIds(requestInfo, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java similarity index 97% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index f8f6b6bb39c..aa206124c77 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -15,7 +15,7 @@ @AllArgsConstructor @NoArgsConstructor @Builder -public class MarriageApplicationDetail { +public class MarriageApplicationDetails { @NotNull @Size(max = 64) @@ -183,8 +183,8 @@ public class MarriageApplicationDetail { private String marriageReligiousInstitutionOtherNameMal; @Size(max = 64) - @JsonProperty("applicationnumber") - private String applicationnumber; + @JsonProperty("applicationNumber") + private String applicationNumber; @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index a0bf1176bf9..03288783e36 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -139,7 +139,7 @@ public class BrideDetails { private String maritalstatusid; @JsonProperty("brideNoOfSpouse") - private Boolean no_of_spouse_living; + private Integer no_of_spouse_living; @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index 689c34378a3..127b9be83cb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -117,7 +117,7 @@ public class GroomDetails { @JsonProperty("groomSpouseLiving") private Boolean is_spouse_living; @JsonProperty("groomNoOfSpouse") - private Boolean no_of_spouse_living; + private Integer no_of_spouse_living; @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java index 8b1a51211cb..9dd23bf93e6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java @@ -2,9 +2,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; -import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.response.ResponseInfo; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; @@ -26,12 +25,12 @@ public class MarriageApplicationResponse { @JsonProperty("MarriageDetails") @Valid - private List marriageApplicationDetails; + private List marriageApplicationDetails; @JsonProperty("Count") private int count; - public MarriageApplicationResponse addMarriageApplication(MarriageApplicationDetail details) { + public MarriageApplicationResponse addMarriageApplication(MarriageApplicationDetails details) { if (marriageApplicationDetails == null) { marriageApplicationDetails = new ArrayList<>(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java index 89e7bf970c5..e8c4bfab681 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java @@ -4,7 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.egov.common.contract.request.RequestInfo; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; @@ -22,9 +22,9 @@ public class MarriageDetailsRequest { @JsonProperty("MarriageDetails") @Valid - private List marriageDetails; + private List marriageDetails; - public MarriageDetailsRequest addMarriageDetails(MarriageApplicationDetail marriageDetail) { + public MarriageDetailsRequest addMarriageDetails(MarriageApplicationDetails marriageDetail) { if (marriageDetails == null) { marriageDetails = null; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 6231d71fc25..19a5421c7ea 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -6,7 +6,7 @@ import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; //import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; @@ -45,23 +45,23 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat } - public List saveMarriageDetails(MarriageDetailsRequest request) { + public List saveMarriageDetails(MarriageDetailsRequest request) { marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); return request.getMarriageDetails(); } - public List updateMarriageDetails(MarriageDetailsRequest request) { + public List updateMarriageDetails(MarriageDetailsRequest request) { marriageDetailsEnrichment.enrichUpdate(request); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); return request.getMarriageDetails(); } - public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { + public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); return result; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 0e84a021f86..14de9a84a0d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -39,7 +39,7 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ // .profession_mal(rs.getString("bd_profession_mal")) .maritalstatusid(rs.getString("bd_maritalstatusid")) //.is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) - .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) + // .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) // .photo_url(rs.getString("bd_photo_url")) .marriageid(rs.getString("bd_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 78932c3a470..6d5690e8960 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -39,7 +39,7 @@ default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ //.profession_mal(rs.getString("gd_profession_mal")) .maritalstatusid(rs.getString("gd_maritalstatusid")) .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) - .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) + // .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) .marriageid(rs.getString("gd_marriageid")) //.photo_url(rs.getString("gd_photo_url")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 9a7b667eda8..652b1d13a3b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -1,7 +1,6 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.common.model.AuditDetails; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.stereotype.Component; @@ -11,13 +10,13 @@ import java.util.ArrayList; import java.util.List; @Component -public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper,PermanentAddressRowMapper,PresentAddressRowMapper,WitnessDetailsRowMapper{ +public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper,PermanentAddressRowMapper,PresentAddressRowMapper,WitnessDetailsRowMapper{ @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null - List result = new ArrayList<>(); + public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null + List result = new ArrayList<>(); while (rs.next()) { - result.add(MarriageApplicationDetail.builder() + result.add(MarriageApplicationDetails.builder() .id(rs.getString("ma_id")) .dateofreporting(rs.getLong("ma_dateofreporting")) .dateofmarriage(rs.getLong("ma_dateofmarriage")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index a3153f56b15..e62cc361857 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -2,7 +2,7 @@ import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; @@ -22,7 +22,7 @@ public MarriageApplicationService(MarriageApplicationRepository repository) { this.repository = repository; } - public List saveMarriageDetails(MarriageDetailsRequest request) { + public List saveMarriageDetails(MarriageDetailsRequest request) { @@ -31,11 +31,11 @@ public List saveMarriageDetails(MarriageDetailsReques return repository.saveMarriageDetails(request); } - public List updateMarriageDetails(MarriageDetailsRequest request) { + public List updateMarriageDetails(MarriageDetailsRequest request) { return repository.updateMarriageDetails(request); } - public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { + public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { return repository.searchMarriageDetails(criteria); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java index 2dfe1250e7f..e5c7f5759de 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.egov.common.contract.request.RequestInfo; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; import java.util.List; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java index c3804445e7a..01ee041f869 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java @@ -2,9 +2,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; -import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.response.ResponseInfo; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; //import org.ksmart.marriage.marriageregistry.model.BirthCertificate; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index f24bea93419..89ec6879bf4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -41,7 +41,7 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ // .profession_mal(rs.getString("bd_profession_mal")) .maritalstatusid(rs.getString("bd_maritalstatusid")) //.is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) - .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) + // .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) //.photo_url(rs.getString("bd_photo_url")) .marriageid(rs.getString("bd_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index 8f8ee4634cf..503a63bcbee 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -39,7 +39,7 @@ default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ //.profession_mal(rs.getString("gd_profession_mal")) .maritalstatusid(rs.getString("gd_maritalstatusid")) .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) - .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) + // .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) .marriageid(rs.getString("gd_marriageid")) // .photo_url(rs.getString("gd_photo_url")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index e1ed72d7a16..e2722f1bf0c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -1,7 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.common.model.AuditDetails; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.stereotype.Component; @@ -11,13 +10,13 @@ import java.util.ArrayList; import java.util.List; @Component -public class MarriageRegistryRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideRegistryRowMapper,GroomRegistryRowMapper,MarriageAddressRegistryRowMapper,WitnessDetailsRowMapper{ +public class MarriageRegistryRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideRegistryRowMapper,GroomRegistryRowMapper,MarriageAddressRegistryRowMapper,WitnessDetailsRowMapper{ @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null - List result = new ArrayList<>(); + public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null + List result = new ArrayList<>(); while (rs.next()) { - result.add(MarriageApplicationDetail.builder() + result.add(MarriageApplicationDetails.builder() .id(rs.getString("ma_id")) .dateofreporting(rs.getLong("ma_dateofreporting")) .dateofmarriage(rs.getLong("ma_dateofmarriage")) From 1e04f45b4490fc7dcdfb5ab093396eac0f7d4f8f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 25 Mar 2023 11:55:24 +0530 Subject: [PATCH 044/420] Model Updation --- .../src/main/resources/application.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 996c59f2c42..3c7a895002f 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,13 +5,13 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage2 +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage spring.datasource.username=postgres spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage2 +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage spring.flyway.user=postgres spring.flyway.password=123 spring.flyway.table=public From 63141c84c579ca94730cfccf561107cad644bdb4 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 25 Mar 2023 11:55:56 +0530 Subject: [PATCH 045/420] Model Updation --- .../egov-persister/src/main/resources/application.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index bee682173b2..75e178d880a 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,5 +1,5 @@ spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage2 +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage spring.datasource.username=postgres spring.datasource.password=123 @@ -10,7 +10,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage2 +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage spring.flyway.user=postgres spring.flyway.password=123 spring.flyway.table=public From 11d15891e3df73e45dea56b8273c97b25acd5670 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 25 Mar 2023 11:59:51 +0530 Subject: [PATCH 046/420] Model Updation --- .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../repository/rowmapper/MarriageApplicationRowMapper.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 0120a74d89a..d40fbbe19c2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -140,7 +140,7 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { ListIterator itr = filecodes.listIterator(); request.getMarriageDetails() .forEach(marriage -> { - marriage.setApplicationnumber(itr.next()); + marriage.setApplicationNumber(itr.next()); }); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 652b1d13a3b..9399e57111f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -45,7 +45,7 @@ public List extractData(ResultSet rs) throws SQLExce //.fileno(rs.getString("ma_fileno")) //.file_date(rs.getLong("ma_file_date")) // .file_status(rs.getString("ma_file_status")) - .applicationnumber(rs.getString("ma_applicationnumber")) + //.applicationnumber(rs.getString("ma_applicationnumber")) .registrationDate(rs.getLong("ma_registration_date")) .registrationno(rs.getString("ma_registrationno")) .action(rs.getString("ma_action")) From ce2f4cee6cfe31f39d4d9523a61049cbc9815397 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 25 Mar 2023 12:04:29 +0530 Subject: [PATCH 047/420] Model Updation --- .../repository/rowmapper/MarriageRegistryRowMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index e2722f1bf0c..b28ff65b437 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -45,7 +45,7 @@ public List extractData(ResultSet rs) throws SQLExce //.fileno(rs.getString("ma_fileno")) //.file_date(rs.getLong("ma_file_date")) // .file_status(rs.getString("ma_file_status")) - .applicationnumber(rs.getString("ma_applicationnumber")) + .applicationNumber(rs.getString("ma_applicationnumber")) .registrationDate(rs.getLong("ma_registration_date")) .registrationno(rs.getString("ma_registrationno")) .action(rs.getString("ma_action")) From 90652f3939477635903fff98e2c2cbb89ab95561 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 26 Mar 2023 16:53:35 +0530 Subject: [PATCH 048/420] marriage registry-search ,query,rowmapper ,yml --- .../src/main/resources/marriage-registry.yml | 315 +++++++++++++ .../src/main/resources/marriage.yml | 16 +- .../MarriageApplicationConfiguration.java | 2 + .../model/marriage/BrideDetails.java | 4 + .../rowmapper/BrideDetailsRowMapper.java | 4 +- .../rowmapper/GroomDetailsRowMapper.java | 2 +- .../MarriageRegistryController.java | 79 +--- .../MarriageRegistryEnrichment.java | 30 +- .../model/BrideRegistryAddressDetails.java | 446 ++++++++++++++++++ .../model/BrideRegistryDetails.java | 20 +- .../model/GroomRegistryDetails.java | 48 +- .../model/MarriageRegistryDetails.java | 63 ++- .../model/MarriageRegistrySearchCriteria.java | 109 ++++- .../MarriageRegistryRepository.java | 15 +- .../querybuilder/BaseMarriageQuery.java | 86 +++- .../MarriageRegistryQueryBuilder.java | 182 +++++-- .../repository/rowmapper/BaseRowMapper.java | 8 +- .../rowmapper/BrideRegistryRowMapper.java | 75 +-- .../rowmapper/GroomRegistryRowMapper.java | 79 ++-- .../MarriageAddressRegistryRowMapper.java | 3 +- .../rowmapper/MarriageRegistryRowMapper.java | 96 ++-- ...per.java => WitnessRegistryRowMapper.java} | 12 +- .../service/MarriageRegistryService.java | 8 +- .../src/main/resources/application.properties | 8 +- ...30225134500__registry_column_added_dll.sql | 9 + ...30323144512__marriage_services_new_dll.sql | 102 ++-- ...30325112220__marriage_services_new_dll.sql | 6 +- 27 files changed, 1419 insertions(+), 408 deletions(-) create mode 100644 core-services/egov-persister/src/main/resources/marriage-registry.yml create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/{WitnessDetailsRowMapper.java => WitnessRegistryRowMapper.java} (69%) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230225134500__registry_column_added_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml new file mode 100644 index 00000000000..c6a9afb1b3f --- /dev/null +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -0,0 +1,315 @@ +serviceMaps: + serviceName: marriage-services + mappings: + - version: 1.0 + description: Persists save marriage details in marriage table + fromTopic: save-marriage-registry-topic + isTransaction: true + queryMaps: + - query: INSERT INTO public.eg_register_marriage_details( + id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, housenameno_en, + housenameno_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, + locality_ml, applicationnumber, registrationno, registration_date, registration_status, createdtime, createdby, + lastmodifiedtime, lastmodifiedby) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageDOM + + - jsonPath: $.MarriageDetails.*.marriageDOR + + - jsonPath: $.MarriageDetails.*.marriageDistrictid + + - jsonPath: $.MarriageDetails.*.marriageLBtype + + - jsonPath: $.MarriageDetails.*.marriageTenantid + + - jsonPath: $.MarriageDetails.*.marriagePlacetype + + - jsonPath: $.MarriageDetails.*.placeid + + - jsonPath: $.MarriageDetails.*.marriagePlacenameEn + + - jsonPath: $.MarriageDetails.*.marriagePlacenameMal + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + + - jsonPath: $.MarriageDetails.*.marriageStreetEn + + - jsonPath: $.MarriageDetails.*.marriageStreetMal + + - jsonPath: $.MarriageDetails.*.marriageWardCode + + - jsonPath: $.MarriageDetails.*.marriageTalukID + + - jsonPath: $.MarriageDetails.*.marriageVillageName + + - jsonPath: $.MarriageDetails.*.marriageType + + - jsonPath: $.MarriageDetails.*.othMarriageType + + - jsonPath: $.MarriageDetails.*.marriageLandmark + + - jsonPath: $.MarriageDetails.*.marriageLocalityEn + + - jsonPath: $.MarriageDetails.*.marriageLocalityMal + + # - jsonPath: $.MarriageDetails.*.applicationType + + # - jsonPath: $.MarriageDetails.*.businessService + + # - jsonPath: $.MarriageDetails.*.workflowCode + + - jsonPath: $.MarriageDetails.*.applicationnumber + + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.registration_date + + # - jsonPath: $.MarriageDetails.*.action + + - jsonPath: $.MarriageDetails.*.status + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + + + + - query: INSERT INTO public.eg_register_marriage_bride_groom_details( + id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, + mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.BrideDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideDetails.brideId + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAdharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMal + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGardianAdhar + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + + - query: INSERT INTO public.eg_register_marriage_bride_groom_details( + id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, + mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.GroomDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomDetails.groomId + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAdharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAdharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAdharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMal + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGardianAdhar + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - query: INSERT INTO public.eg_register_marriage_witness_details( + id, aadharno, name_en, name_ml, age, address_en, mobile, is_esigned, marriageid, createdtime, createdby, + lastmodifiedtime, lastmodifiedby, serial_no) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.WitnessDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId1 + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AdharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMal + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Age + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn + + # - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddressMal + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1ISEsigned + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 + + - query: INSERT INTO public.eg_register_marriage_witness_details( + id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, + lastmodifiedtime, lastmodifiedby, serial_no) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.WitnessDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId2 + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AdharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMal + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Age + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddresSEn + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMal + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Mobile + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2ISEsigned + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 + + + diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 455e1bd3f77..53be6e8568d 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -86,9 +86,9 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_bride_groom_details( - id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, - mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_adharno, - mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, + id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_aadharno, + mother_aadharno, guardianname_en, guardianname_mal, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideDetails @@ -163,9 +163,9 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_bride_groom_details( - id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, - mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_adharno, - mother_adharno, guardianname_en, guardianname_mal, guardian_adhar, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, + id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_aadharno, + mother_aadharno, guardianname_en, guardianname_mal, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomDetails @@ -239,7 +239,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - query: INSERT INTO public.eg_marriage_witness_details( - id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, + id, aadharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, serial_no) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetails @@ -276,7 +276,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 - query: INSERT INTO public.eg_marriage_witness_details( - id, adharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, + id, aadharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, serial_no) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetails diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index dc313eb6616..1709fb4d8fc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -51,4 +51,6 @@ public class MarriageApplicationConfiguration { @Value("${egov.bnd.max.limit}") private Integer maxSearchLimit; + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index 03288783e36..a3703274f7b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -79,6 +79,7 @@ public class BrideDetails { @Size(max = 20) @JsonProperty("brideGender") private String gender; + @JsonProperty("brideDOB") private long dateofbirth; @@ -138,6 +139,9 @@ public class BrideDetails { @JsonProperty("brideMaritalstatusID") private String maritalstatusid; + @JsonProperty("bridelivingSpouse") + private boolean is_spouse_living; + @JsonProperty("brideNoOfSpouse") private Integer no_of_spouse_living; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 14de9a84a0d..c41190a8ac3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -38,8 +38,8 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ // .profession_en(rs.getString("bd_profession_en")) // .profession_mal(rs.getString("bd_profession_mal")) .maritalstatusid(rs.getString("bd_maritalstatusid")) - //.is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) - // .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) + .is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) + .no_of_spouse_living(Integer.valueOf(rs.getString("bd_no_of_spouse_living"))) // .photo_url(rs.getString("bd_photo_url")) .marriageid(rs.getString("bd_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 6d5690e8960..4f496ee6ea0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -39,7 +39,7 @@ default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ //.profession_mal(rs.getString("gd_profession_mal")) .maritalstatusid(rs.getString("gd_maritalstatusid")) .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) - // .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) + .no_of_spouse_living(Integer.valueOf(rs.getString("gd_no_of_spouse_living"))) .marriageid(rs.getString("gd_marriageid")) //.photo_url(rs.getString("gd_photo_url")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java index 6c32552d495..40eb1b68ce6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java @@ -6,6 +6,7 @@ import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryResponse; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; @@ -23,7 +24,7 @@ //import org.ksmart.marriage.marriageregistry.service.RegisterBirthService; //import org.ksmart.marriage.utils.ResponseInfoFactory; - +//v1/marriagedetails/_createregistry @Slf4j @RestController @RequestMapping("/v1/marriagedetails") @@ -48,73 +49,21 @@ public ResponseEntity saveMarriageDetails(@RequestBody .build(); return new ResponseEntity<>(response, HttpStatus.OK); } - // @PostMapping(value = { "/_updateregistry"}) - // public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { - // List marriageDetails = crMarriageService.updateMarriageDetails(request); - // return new ResponseEntity<>(marriageDetails, HttpStatus.OK); - // } - // @PostMapping(value = { "/_searchregistry"}) - // public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, - // @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { - // List marriageDetails = crMarriageService.searchMarriageDetails(criteria); - // MarriageApplicationResponse response = MarriageApplicationResponse.builder() - // .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), - // Boolean.TRUE)) - // .marriageApplicationDetails(marriageDetails) - // .build(); - // return ResponseEntity.ok(response); - // } -// @PostMapping(value = {"/_update"}) -// public ResponseEntity updateBirthDetails(@RequestBody MarriageDetailsRequest request) { -// //BirthCertificate birthCertificate = new BirthCertificate(); -// List birthApplicationDetails=crBirthService.updateBirthDetails(request); -// //Download certificate when Approved -// if((birthApplicationDetails.get(0).getStatus() == "APPROVED") && (birthApplicationDetails.get(0).getAction() == "APPROVE")){ -// RegisterBirthDetailsRequest registerBirthDetailsRequest = registryRequestService.createRegistryRequest(request); -// List registerBirthDetails = registerBirthService.saveRegisterBirthDetails(registerBirthDetailsRequest); -// RegisterBirthSearchCriteria criteria = new RegisterBirthSearchCriteria(); -// criteria.setTenantId(registerBirthDetails.get(0).getTenantId()); -// System.out.println(criteria.getTenantId()); -// -// criteria.setRegistrationNo(registerBirthDetails.get(0).getRegistrationNo()); System.out.println(registerBirthDetails.get(0).getRegistrationNo()); -// birthCertificate = registerBirthService.download(criteria,request.getRequestInfo()); -// } -// MarriageApplicationResponse response= MarriageApplicationResponse.builder() -// .birthDetails(birthApplicationDetails) -// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), -// true)) -// .birthCertificate(birthCertificate) -// .build(); -// return new ResponseEntity<>(response, HttpStatus.OK); -// } -// -// @PostMapping(value = {"/_search"}) -// public ResponseEntity listByHospitalId(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { -// List birthDetails=crBirthService.searchBirthDetails(criteria); -// MarriageApplicationResponse response= MarriageApplicationResponse.builder() -// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), -// Boolean.TRUE)) -// .birthDetails(birthDetails) -// .build(); -// return ResponseEntity.ok(response); -// } + @PostMapping("_searchregistry") + + public ResponseEntity search(@RequestBody MarriageRegistryRequest request, + @ModelAttribute MarriageRegistrySearchCriteria criteria) { -// @PostMapping(value = { "/_getfilestoreid"}) -// public ResponseEntity getfilestoreid(@RequestBody RequestInfoWrapper requestInfoWrapper, -// @Valid @ModelAttribute SearchCriteria criteria) { -// -// BirthCertificate birthCert = birthService.getBirthCertReqByConsumerCode(criteria,requestInfoWrapper.getRequestInfo()); -// BirthCertResponse response = BirthCertResponse.builder().filestoreId(birthCert.getFilestoreid()).tenantId(criteria.getTenantId()).responseInfo( -// responseInfoFactory.createResponseInfoFromRequestInfo(requestInfoWrapper.getRequestInfo(), true)) -// .build(); -// if(null!=birthCert.getFilestoreid()) { -// birthCert.setBirthCertificateNo(criteria.getConsumerCode()); -// birthService.updateDownloadStatus(BirthCertRequest.builder().birthCertificate(birthCert).requestInfo(requestInfoWrapper.getRequestInfo()).build()); -// } -// return new ResponseEntity<>(response, HttpStatus.OK); -// } + List marriageDetails = marriageService.searchRegistry(criteria); + MarriageRegistryResponse response = MarriageRegistryResponse + .builder() + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) + .marriageApplicationDetails(marriageDetails) + .build(); + return ResponseEntity.ok(response); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index c9cc6b7d4d2..8dc67252291 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -47,27 +47,23 @@ public void enrichCreate(MarriageRegistryRequest request) { if(marriage.getGroomDetails()!=null){ marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); } + if(marriage.getBrideDetails()!=null){ + marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); + marriage.getBrideDetails().setBrideGroom("B"); + } + if(marriage.getGroomDetails()!=null){ + marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); + marriage.getGroomDetails().setBrideGroom("G"); - // marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); - // marriage.getPermanentBride().setId2(UUID.randomUUID().toString()); - - // marriage.getPermanentBride().setBrideGroom1("BRIDE"); - // marriage.getPermanentBride().setBrideGroom2("GROOM"); - - // if(marriage.getPresent()!=null){ - // marriage.getPresent().setId(UUID.randomUUID().toString()); - // marriage.getPresent().setBrideGroom("BRIDE"); - // marriage.getPresent().setBrideGroom("GROOM"); - // } - if(marriage.getWitness()!=null){ - marriage.getWitness().setWitnessId1(UUID.randomUUID().toString()); - marriage.getWitness().setWitnessId2(UUID.randomUUID().toString()); - marriage.getWitness().setSerial_no1(1); - marriage.getWitness().setSerial_no2(2); + } + if(marriage.getWitnessDetails()!=null){ + marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); + marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); + marriage.getWitnessDetails().setSerial_no1(1); + marriage.getWitnessDetails().setSerial_no2(2); } }); setRegistrationNumber(request); - } private void setRegistrationNumber(MarriageRegistryRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java new file mode 100644 index 00000000000..55cb1169fb9 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java @@ -0,0 +1,446 @@ +package org.ksmart.marriage.marriageregistry.model; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import javax.validation.constraints.Size; +/** + * Created by Jasmine + * on 24.03.2023 + */ +public class BrideRegistryAddressDetails { + + @Size(max = 64) + @JsonProperty("presentaddressCountry") + private String presentaddressCountry; + + @Size(max = 64) + @JsonProperty("presentaddressStateName") + private String presentaddressStateName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaLBName") + private String presentInsideKeralaLBName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaDistrict") + private String presentInsideKeralaDistrict; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaTaluk") + private String presentInsideKeralaTaluk; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaVillage") + private String presentInsideKeralaVillage; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameEn") + private String presentInsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameEn") + private String presentInsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameEn") + private String presentInsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameMl") + private String presentInsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameMl") + private String presentInsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameMl") + private String presentInsideKeralaHouseNameMl; + + @Size(max = 10) + @JsonProperty("presentInsideKeralaPincode") + private String presentInsideKeralaPincode; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaPostOffice") + private String presentInsideKeralaPostOffice; + + @Size(max = 64) + @JsonProperty("presentWardNo") + private String presentWardNo; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaDistrict") + private String presentOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaTaluk") + private String presentOutsideKeralaTalukName; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaVillage") + private String presentOutsideKeralaVillageName; + + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaCityVilgeEn") + private String presentOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPincode") + private String presentOutsideKeralaPincode; + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeEn") + private String presentOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeMl") + private String presentOutsideKeralaPostOfficeMl; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameEn") + private String presentOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameEn") + private String presentOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameEn") + private String presentOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameMl") + private String presentOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameMl") + private String presentOutsideKeralaStreetNameMl; + + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameMl") + private String presentOutsideKeralaHouseNameMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEn") + private String presentOutSideIndiaAdressEn; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMl") + private String presentOutSideIndiaAdressMl; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEnB") + private String presentOutSideIndiaAdressEnB; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMlB") + private String presentOutSideIndiaAdressMlB; + + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceEn") + private String presentOutSideIndiaProvinceEn; + + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaLocalityMl") + private String presentOutSideIndiaLocalityMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceMl") + private String presentOutSideIndiaProvinceMl; + + @Size(max = 64) + @JsonProperty("presentOutSideCountry") + private String presentOutSideCountry; + + @JsonProperty("isPrsentAddress") + private Boolean isPrsentAddress; + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaadrsVillage") + private String presentOutSideIndiaadrsVillage; + + @Size(max = 64) + @JsonProperty("presentOutSideIndiaadrsCityTown") + private String presentOutSideIndiaadrsCityTown; + + ////Db Fields////// + + @JsonProperty("isPrsentAddressInt") + private Integer isPrsentAddressInt; + @Size(max = 64) + @JsonProperty("presentUuid") + private String presentUuid; + + @Size(max = 64) + @JsonProperty("countryIdPresent") + private String countryIdPresent; + + @Size(max = 64) + @JsonProperty("stateIdPresent") + private String stateIdPresent; + + @Size(max = 64) + @JsonProperty("districtIdPresent") + private String districtIdPresent; + + @Size(max = 64) + @JsonProperty("pinNoPresent") + private String pinNoPresent; + + @Size(max = 1000) + @JsonProperty("localityEnPresent") + private String localityEnPresent; + + @Size(max = 1000) + @JsonProperty("localityMlPresent") + private String localityMlPresent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPresent") + private String streetNameEnPresent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPresent") + private String streetNameMlPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPresent") + private String houseNameNoEnPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPresent") + private String houseNameNoMlPresent; + + @Size(max = 1000) + @JsonProperty("villageNamePresent") + private String villageNamePresent; + + @Size(max = 1000) + @JsonProperty("villageIdPresent") + private String villageIdPresent; + + @Size(max = 10) + @JsonProperty("poNoPresent") + private String poNoPresent; + + @Size(max = 64) + @JsonProperty("brideGroomPresent") + private String brideGroomPresent; + ////Permanant + @Size(max = 1000) + @JsonProperty("permtaddressCountry") + private String permtaddressCountry; + + @Size(max = 64) + @JsonProperty("permtaddressStateName") + private String permtaddressStateName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrLBName") + private String permntInKeralaAdrLBName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrDistrict") + private String permntInKeralaAdrDistrict; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaCityVilgeEn") + private String permntOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrTaluk") + private String permntInKeralaAdrTaluk; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrVillage") + private String permntInKeralaAdrVillage; + + @Size(max = 1000) + @JsonProperty("permntInKeralaAdrLocalityNameEn") + private String permntInKeralaAdrLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntInKeralaAdrStreetNameEn") + private String permntInKeralaAdrStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameEn") + private String permntInKeralaAdrHouseNameEn; + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrLocalityNameMl") + private String permntInKeralaAdrLocalityNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrStreetNameMl") + private String permntInKeralaAdrStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameMl") + private String permntInKeralaAdrHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPincode") + private String permntInKeralaAdrPincode; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPostOffice") + private String permntInKeralaAdrPostOffice; + + @Size(max = 64) + @JsonProperty("permntInKeralaWardNo") + private String permntInKeralaWardNo; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaDistrict") + private String permntOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaTaluk") + private String permntOutsideKeralaTaluk; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaVillage") + private String permntOutsideKeralaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPincode") + private String permntOutsideKeralaPincode; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameEn") + private String permntOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameEn") + private String permntOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameEn") + private String permntOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameMl") + private String permntOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameMl") + private String permntOutsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameMl") + private String permntOutsideKeralaHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeEn") + private String permntOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeMl") + private String permntOutsideKeralaPostOfficeMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneEn") + private String permntOutsideIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneMl") + private String permntOutsideIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoEn") + private String permntOutsideIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoMl") + private String permntOutsideIndiaLinetwoMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaprovinceEn") + private String permntOutsideIndiaprovinceEn; + + @Size(max = 1000) + @JsonProperty("permntOutsideIndiaVillage") + private String permntOutsideIndiaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCityTown") + private String permntOutsideIndiaCityTown; + + @Size(max = 10) + @JsonProperty("permanentOutsideIndiaPostCode") + private String permanentOutsideIndiaPostCode; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCountry") + private String permntOutsideIndiaCountry; + + + ////Db Fields////// + + @Size(max = 64) + @JsonProperty("permanentUuid") + private String permanentUuid; + @Size(max = 64) + @JsonProperty("countryIdPermanent") + private String countryIdPermanent; + + @Size(max = 64) + @JsonProperty("stateIdPermanent") + private String stateIdPermanent; + + @Size(max = 64) + @JsonProperty("districtIdPermanent") + private String districtIdPermanent; + + @Size(max = 64) + @JsonProperty("pinNoPermanent") + private String pinNoPermanent; + + @Size(max = 1000) + @JsonProperty("localityEnPermanent") + private String localityEnPermanent; + + @Size(max = 1000) + @JsonProperty("localityMlPermanent") + private String localityMlPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPermanent") + private String streetNameEnPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPermanent") + private String streetNameMlPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPermanent") + private String houseNameNoEnPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPermanent") + private String houseNameNoMlPermanent; + + @Size(max = 1000) + @JsonProperty("villageNamePermanent") + private String villageNamePermanent; + + @Size(max = 1000) + @JsonProperty("villageIdPermanent") + private String villageIdPermanent; + + @Size(max = 10) + @JsonProperty("poNoPermanent") + private String poNoPermanent; + + @Size(max = 64) + @JsonProperty("brideGroomPermanent") + private String brideGroomPermanent; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java index 118921d37a6..747d16689a3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java @@ -51,7 +51,7 @@ public class BrideRegistryDetails { @Size(max = 200) @JsonProperty("brideFirstnameMal") - private String firstname_mal; + private String firstname_ml; @Size(max = 200) @JsonProperty("brideMiddlenameEn") @@ -59,7 +59,7 @@ public class BrideRegistryDetails { @Size(max = 200) @JsonProperty("brideMiddlenameMal") - private String middlename_mal; + private String middlename_ml; @Size(max = 200) @JsonProperty("brideLastnameEn") @@ -67,7 +67,7 @@ public class BrideRegistryDetails { @Size(max = 200) @JsonProperty("brideLastnameMal") - private String lastname_mal; + private String lastname_ml; @Size(max = 150) @JsonProperty("brideMobile") @@ -80,6 +80,7 @@ public class BrideRegistryDetails { @Size(max = 20) @JsonProperty("brideGender") private String gender; + @JsonProperty("brideDOB") private long dateofbirth; @@ -96,7 +97,7 @@ public class BrideRegistryDetails { @Size(max = 200) @JsonProperty("brideFathernameMal") - private String fathername_mal; + private String fathername_ml; @Size(max = 200) @JsonProperty("brideMothernameEn") @@ -104,7 +105,7 @@ public class BrideRegistryDetails { @Size(max = 200) @JsonProperty("brideMothernameMal") - private String mothername_mal; + private String mothername_ml; @Size(max = 15) @JsonProperty("brideFatherAdharNo") @@ -120,7 +121,7 @@ public class BrideRegistryDetails { @Size(max = 200) @JsonProperty("brideGuardiannameMal") - private String guardianname_mal; + private String guardianname_ml; @Size(max = 15) @JsonProperty("brideGardianAdhar") @@ -144,11 +145,16 @@ public class BrideRegistryDetails { @JsonProperty("brideNoOfSpouse") - private Boolean no_of_spouse_living; + private Integer no_of_spouse_living; @Size(max = 150) @JsonProperty("bridePhotoUrl") private String photo_url; + + @Size(max = 64) + @JsonProperty("brideGroom") + private String brideGroom; + @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java index 0255729c512..9656d926518 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java @@ -20,85 +20,109 @@ public class GroomRegistryDetails { @Size(max = 64) @JsonProperty("groomId") private String groomId; + @Size(max = 64) @JsonProperty("tenentId") private String tenentId; + @Size(max = 64) @JsonProperty("marriageid") private String marriageid; + @Size(max = 64) @JsonProperty("groomResidentShip") private String residentship; + @Size(max = 15) @JsonProperty("groomAdharNo") private String adharno; + @Size(max = 1000) @JsonProperty("groomPassportNo") private String passportno; + @Size(max = 64) @JsonProperty("groomSocialSecurityNo") private String socialsecurityno; + @Size(max = 200) @JsonProperty("groomFirstnameEn") private String firstname_en; + @Size(max = 200) @JsonProperty("groomFirstnameMal") - private String firstname_mal; + private String firstname_ml; + @Size(max = 200) @JsonProperty("groomMiddlenameEn") private String middlename_en; + @Size(max = 200) @JsonProperty("groomMiddlenameMal") - private String middlename_mal; + private String middlename_ml; @Size(max = 200) @JsonProperty("groomLastnameEn") private String lastname_en; + @Size(max = 200) @JsonProperty("groomLastnameMal") - private String lastname_mal; + private String lastname_ml; + @Size(max = 150) @JsonProperty("groomMobile") private String mobile; + @Size(max = 300) @JsonProperty("groomEmailid") private String emailid; + @Size(max = 20) @JsonProperty("groomGender") + private String gender; @JsonProperty("groomDOB") + private long dateofbirth; @JsonProperty("groomAge") private Integer age; + @Size(max = 64) @JsonProperty("groomParentGuardian") private String parent_guardian; + @Size(max = 200) @JsonProperty("groomFathernameEn") private String fathername_en; @Size(max = 200) @JsonProperty("groomFathernameMal") - private String fathername_mal; + private String fathername_ml; + @Size(max = 200) @JsonProperty("groomMothernameEn") private String mothername_en; + @Size(max = 200) @JsonProperty("groomMothernameMal") - private String mothername_mal; + private String mothername_ml; @Size(max = 15) @JsonProperty("groomFatherAdharNo") private String father_adharno; + @Size(max = 15) @JsonProperty("groomMotherAdharNo") private String mother_adharno; + @Size(max = 200) @JsonProperty("groomGuardiannameEn") private String guardianname_en; + @Size(max = 200) @JsonProperty("groomGuardiannameMal") - private String guardianname_mal; + private String guardianname_ml; + @Size(max = 15) @JsonProperty("groomGardianAdhar") private String guardian_adhar; @@ -110,18 +134,26 @@ public class GroomRegistryDetails { // // @Size(max = 200) // @JsonProperty("groomProfessionMal") -// private String profession_mal; +// private String profession_ml; @Size(max = 64) @JsonProperty("groomMaritalstatusID") private String maritalstatusid; + @JsonProperty("groomSpouseLiving") private Boolean is_spouse_living; + @JsonProperty("groomNoOfSpouse") - private Boolean no_of_spouse_living; + private Integer no_of_spouse_living; + @Size(max = 150) @JsonProperty("groomPhotoUrl") private String photo_url; + + @Size(max = 64) + @JsonProperty("brideGroom") + private String brideGroom; + @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java index 4b04e6aae09..d103d7b83e3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java @@ -30,7 +30,6 @@ public class MarriageRegistryDetails { private Long dateofreporting; - @Size(max = 64) @JsonProperty("marriageDistrictid") private String districtid; @@ -131,12 +130,6 @@ public class MarriageRegistryDetails { @JsonProperty("registration_date") private Long registrationDate; -// @JsonProperty("fileDate") -// private long file_date; -// -// @Size(max = 64) -// @JsonProperty("fileStatus") -// private String file_status; @Size(max = 64) @JsonProperty("action") @@ -145,6 +138,7 @@ public class MarriageRegistryDetails { @Size(max = 64) @JsonProperty("status") private String status; + @Size(max = 1000) @JsonProperty("placeid") private String placeid; @@ -152,42 +146,45 @@ public class MarriageRegistryDetails { @Size(max = 2500) @JsonProperty("marriageHouseNoAndNameEn") private String marriageHouseNoAndNameEn; + @Size(max = 2500) @JsonProperty("marriageHouseNoAndNameMal") private String marriageHouseNoAndNameMal; - @Size(max = 1000) - @JsonProperty("marriageReligiousInstitutionOther") - private String marriageReligiousInstitutionOther; + // @Size(max = 1000) + // @JsonProperty("marriageReligiousInstitutionOther") + // private String marriageReligiousInstitutionOther; - @Size(max = 1000) - @JsonProperty("marriagePublicOrPrivatePlace") - private String marriagePublicOrPrivatePlace; + // @Size(max = 1000) + // @JsonProperty("marriagePublicOrPrivatePlace") + // private String marriagePublicOrPrivatePlace; - @Size(max = 2500) - @JsonProperty("marriagePublicOrPrivateNamePlaceEn") - private String marriagePublicOrPrivateNamePlaceEn; - @Size(max = 2500) - @JsonProperty("marriagePublicOrPrivateNamePlaceMal") - private String marriagePublicOrPrivateNamePlaceMal; + // @Size(max = 2500) + // @JsonProperty("marriagePublicOrPrivateNamePlaceEn") + // private String marriagePublicOrPrivateNamePlaceEn; + // @Size(max = 2500) + // @JsonProperty("marriagePublicOrPrivateNamePlaceMal") + // private String marriagePublicOrPrivateNamePlaceMal; + // @Size(max = 1000) + // @JsonProperty("marriageReligiousInstitution") + // private String marriageReligiousInstitution; - @Size(max = 1000) - @JsonProperty("marriageReligiousInstitution") - private String marriageReligiousInstitution; - - @Size(max = 2500) - @JsonProperty("marriageReligiousInstitutionOtherNameEn") - private String marriageReligiousInstitutionOtherNameEn; - @Size(max = 2500) - @JsonProperty("marriageReligiousInstitutionOtherNameMal") - private String marriageReligiousInstitutionOtherNameMal; + // @Size(max = 2500) + // @JsonProperty("marriageReligiousInstitutionOtherNameEn") + // private String marriageReligiousInstitutionOtherNameEn; + // @Size(max = 2500) + // @JsonProperty("marriageReligiousInstitutionOtherNameMal") + // private String marriageReligiousInstitutionOtherNameMal; @Size(max = 64) @JsonProperty("applicationNumber") private String applicationNumber; - @JsonProperty("auditDetails") + @JsonProperty("modulecode") + private String modulecode; + + @JsonProperty("AuditDetails") private AuditDetails auditDetails; @JsonProperty("BrideDetails") @@ -196,12 +193,10 @@ public class MarriageRegistryDetails { @JsonProperty("GroomDetails") private GroomRegistryDetails groomDetails; - @JsonProperty("WitnessDetails") - private WitnessRegistryDetails witness; + private WitnessRegistryDetails witnessDetails; + - @JsonProperty("modulecode") - private String modulecode; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java index 45b9c7e141b..9ebf68e5bd7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java @@ -27,16 +27,65 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("registrationNo") private String registrationNo; - @JsonProperty("fileNo") - private String fileNo; + @JsonProperty("certificateNo") + private String certificateNo; + + + @JsonProperty("marriageDOM") + private Long marriageDOM; + + //Groom + @JsonProperty("groomFirstnameEn") + private String groomFirstnameEn; + + @JsonProperty("groomFirstnameMal") + private String groomFirstnameMal; + + @JsonProperty("groomMiddlenameEn") + private String groomMiddlenameEn; + + @JsonProperty("groomMiddlenameMal") + private String groomMiddlenameMal; + + @JsonProperty("groomLastnameEn") + private String groomLastnameEn; + + @JsonProperty("groomLastnameMal") + private String groomLastnameMal; + + @JsonProperty("groomAdharNo") + private String groomAdharNo; + + //BRIDE + @JsonProperty("brideAdharNo") + private String brideAdharNo; + + @JsonProperty("brideFirstnameEn") + private String brideFirstnameEn; + + @JsonProperty("brideFirstnameMal") + private String brideFirstnameMal; + + @JsonProperty("brideMiddlenameEn") + private String brideMiddlenameEn; + + @JsonProperty("brideMiddlenameMal") + private String brideMiddlenameMal; + + @JsonProperty("brideLastnameEn") + private String brideLastnameEn; + + @JsonProperty("brideLastnameMal") + private String brideLastnameMal; + @JsonProperty("sortBy") private SortBy sortBy; + public enum SortBy { applicationNumber, tenantId, registrationNo, - fileNo - + dateofmarriage } @JsonProperty("sortOrder") private SortOrder sortOrder; @@ -46,5 +95,57 @@ public enum SortOrder { DESC } + @Valid + private Integer offset; + + @Valid + private Integer limit; + + + + @JsonProperty("fromDate") + private Long fromDate; + + @JsonProperty("toDate") + private Long toDate; + + + public enum SourceEnum { + sms("sms"), + + email("email"), + + ivr("ivr"), + + mobileapp("mobileapp"), + + whatsapp("whatsapp"), + + csc("csc"), + + web("web"); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static SourceEnum fromValue(String text) { + for (SourceEnum b : SourceEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + private SourceEnum source; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index db50470dc8a..c52fd469666 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -23,7 +23,7 @@ public class MarriageRegistryRepository { private final MarriageApplicationConfiguration marriageApplicationConfiguration; private final MarriageRegistryEnrichment marriageRegistryEnrichment; - private final MarriageRegistryQueryBuilder marriageQueryBuilder; + private final MarriageRegistryQueryBuilder queryBuilder; private final MarriageRegistryRowMapper marriageRegistryRowMapper; private final JdbcTemplate jdbcTemplate; @@ -31,13 +31,14 @@ public class MarriageRegistryRepository { public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnrichment, MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, JdbcTemplate jdbcTemplate, - MarriageRegistryEnrichment marriageDetailsEnrichment, MarriageRegistryQueryBuilder marriageQueryBuilder, + MarriageRegistryEnrichment marriageDetailsEnrichment, + MarriageRegistryQueryBuilder queryBuilder, MarriageRegistryRowMapper marriageRegistryRowMapper) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageRegistryEnrichment = marriageRegistryEnrichment; this.jdbcTemplate = jdbcTemplate; - this.marriageQueryBuilder = marriageQueryBuilder; + this.queryBuilder = queryBuilder; this.marriageRegistryRowMapper = marriageRegistryRowMapper; } @@ -53,7 +54,13 @@ public List createMarriageRegistry(MarriageRegistryRequ .build(); return result.getMarriageDetails(); } - + public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { + List preparedStmtValues = new ArrayList<>(); + String query = queryBuilder.getMarriageRegistrySearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); + + return result; + } // public List updateMarriageRegistry(MarriageRegistryRequest request) { // marriageRegistryEnrichment.enrichUpdate(request); // producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryTopic(), request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java index cf29d2d6ed5..765d39b3e3f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java @@ -2,7 +2,9 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Collections; import java.util.List; @@ -12,7 +14,11 @@ * on 24.03.2023 */ @Component -public class BaseMarriageQuery { + class BaseMarriageQuery { + + @Autowired + private MarriageApplicationConfiguration config; + void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, List paramValues) { @@ -59,7 +65,32 @@ void addFilter(String column, String value, StringBuilder query, List pa paramValues.add(value); } } + // void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, + // List paramValues) { + + // if (startDate != null || endDate != null) { + // addWhereClause(paramValues, query); + // query.append(" ("); + + // if (startDate != null) { + // query.append(column) + // .append(" >= ? "); + // paramValues.add(startDate); + // } + + // if (endDate != null) { + // if (startDate != null) { + // query.append(" AND "); + // } + // query.append(column) + // .append(" <= ? "); + // paramValues.add(endDate); + // } + + // query.append(") "); + // } + // } void addWhereClause(List values, StringBuilder query) { if (CollectionUtils.isEmpty(values)) { query.append(" WHERE "); @@ -73,7 +104,16 @@ private String getStatementParameters(int count) { .stream() .collect(Collectors.joining(", ")); } - void addOrderByColumns(String column, MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder orderBy){ + // void addOrderByColumns(String column, MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder orderBy){ + // addOrderClause(orderBy); + // if(!StringUtils.isEmpty(column)){ + // addOrderClause(orderBy); + // orderBy.append(column); + // addAscDesc(valueSort, orderBy); + // } + // } + + void addOrderByColumns(String column, String valueSort, StringBuilder orderBy){ addOrderClause(orderBy); if(!StringUtils.isEmpty(column)){ addOrderClause(orderBy); @@ -81,6 +121,25 @@ void addOrderByColumns(String column, MarriageApplicationSearchCriteria.SortOrde addAscDesc(valueSort, orderBy); } } + + void addLimitAndOffset(Integer offset, Integer limit, StringBuilder query, final List paramValues) { + // prepare Offset + if (offset == null) { + query.append(" OFFSET ? "); + paramValues.add(config.getDefaultOffset()); + } else { + query.append(" OFFSET ? "); + paramValues.add(offset); + } + // prepare limit + if (limit == null) { + query.append(" LIMIT ? "); + paramValues.add(config.getDefaultBndLimit()); + } else{ + query.append(" LIMIT ? "); + paramValues.add(limit); + } + } void addOrderClause(StringBuilder orderBy) { if (orderBy.length() == 0) { orderBy.append(" ORDER BY "); @@ -88,14 +147,29 @@ void addOrderClause(StringBuilder orderBy) { orderBy.append(" "); } } + void addOrderToQuery(StringBuilder orderBy, StringBuilder query){ + if (orderBy.length() > 0) { + String orderByStr = orderBy.toString().trim(); + orderByStr = orderByStr.substring(0, orderByStr.length() - 1); + query.append(orderByStr); + } + } - void addAscDesc(MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder query){ - if(valueSort == null) - query.append(" ASC, "); - else if(valueSort == MarriageApplicationSearchCriteria.SortOrder.ASC) + void addAscDesc(String valueSort, StringBuilder query){ + if(StringUtils.isEmpty(valueSort) || valueSort == null) + query.append("ASC, "); + else if(valueSort == "ASC") query.append(" ASC, "); else query.append(" DESC, "); } + // void addAscDesc(MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder query){ + // if(valueSort == null) + // query.append(" ASC, "); + // else if(valueSort == MarriageApplicationSearchCriteria.SortOrder.ASC) + // query.append(" ASC, "); + // else + // query.append(" DESC, "); + // } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 4e0dd73706e..d4913f05e13 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -1,6 +1,7 @@ package org.ksmart.marriage.marriageregistry.repository.querybuilder; import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; @@ -14,67 +15,144 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { @Autowired CommonQueryBuilder commonQueryBuilder; - +//Jasmine 26.03.2023 private static final String QUERY = new StringBuilder() - .append("SELECT mrg.id as ma_id,mrg.dateofmarriage as ma_dateofmarriage,mrg.dateofreporting as ma_dateofreporting,mrg.districtid as ma_districtid,") - .append("mrg.lbtype as ma_lbtype,mrg.tenantid as ma_tenantid,mrg.placetype as ma_placetype,mrg.placeothers as ma_placeothers,mrg.placeid as ma_placeid,") - .append("mrg.placename_en as ma_placename_en,mrg.street_name_en as ma_street_name_en,mrg.street_name_ml as ma_street_name_ml,") - .append("mrg.placename_mal as ma_placename_mal,mrg.ward_code as ma_ward_code,mrg.talukid as ma_talukid,mrg.village_name as ma_village_name,mrg.marriage_type as ma_marriage_type,") - .append("mrg.oth_marriage_type as ma_oth_marriage_type,mrg.landmark as ma_landmark,mrg.locality_en as ma_locality_en,mrg.locality_ml as ma_locality_ml,mrg.othersspecify as ma_othersspecify,") - .append("mrg.applicationtype as ma_applicationtype,mrg.businessservice as ma_businessservice,mrg.workflowcode as ma_workflowcode,mrg.fileno as ma_fileno,") - .append("mrg.file_date as ma_file_date,mrg.file_status as ma_file_status,mrg.applicationnumber as ma_applicationnumber,mrg.registrationno as ma_registrationno,mrg.registration_date as ma_registration_date,") - .append("mrg.action as ma_action,mrg.status as ma_status,mrg.createdtime,mrg.createdby,mrg.lastmodifiedtime ,mrg.lastmodifiedby ,mrg.houseno_and_nameen as ma_houseno_and_nameen,") - .append("mrg.houseno_and_nameml as ma_houseno_and_nameml,mrg.religious_institution as ma_religious_institution,mrg.public_or_privateplace as ma_public_or_privateplace,mrg.public_or_privateplacennameplace_en as ma_public_or_privateplacennameplace_en,") - .append("mrg.public_or_privateplacennameplace_ml as ma_public_or_privateplacennameplace_ml,mrg.religious_institution_other as ma_religious_institution_other,") - .append("mrg.religious_institution_othername_en as ma_religious_institution_othername_en,mrg.religious_institution_othername_ml as ma_religious_institution_othername_ml").toString(); - - private static final String QUERYCONDITION = new StringBuilder() - .append(" FROM public.eg_marriage_details mrg LEFT JOIN eg_marriage_bride_details mbd ON mbd.marriageid = mrg.id") - .append(" LEFT JOIN eg_marriage_groom_details mrd ON mrd.marriageid = mrg.id") - .append(" LEFT JOIN eg_marriage_present_address_details mpress ON mpress.marriageid = mrg.id") - .append(" LEFT JOIN eg_marriage_permanent_address_details mper ON mper.marriageid = mrg.id") - .append(" LEFT JOIN eg_marriage_witness_details mwd ON mwd.marriageid = mrg.id") - - .toString(); + .append(" SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") + .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") + .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.housenameno_en as MD_housenameno_en , MD.housenameno_ml as MD_housenameno_ml ,") + .append("MD.locality_en as MD_locality_en , MD.locality_ml as MD_locality_ml , MD.street_name_en as MD_street_name_en , MD.street_name_ml as MD_street_name_ml , ") + .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") + .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") + .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") + .append("MD.applicationnumber as MD_applicationnumber ,") + + .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") + .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") + .append("GD.firstname_ml as GD_firstname_ml , GD.middlename_ml as GD_middlename_ml , GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,") + .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") + .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") + .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") + .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + + .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") + .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") + .append("BD.middlename_ml as BD_middlename_ml , BD.lastname_ml as BD_lastname_ml , BD.mobile as BD_mobile , BD.emailid as BD_emailid , ") + .append("BD.gender as BD_gender , BD.dateofbirth as BD_dateofbirth , BD.age as BD_age , BD.parent_guardian as BD_parent_guardian ,BD.fathername_en as BD_fathername_en ,") + .append("BD.mothername_en as BD_mothername_en, BD.fathername_ml as BD_fathername_ml , BD.mothername_ml as BD_mothername_ml , BD.father_aadharno as BD_father_aadharno ,") + .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") + .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.bride_groom as BD_bride_groom,") + + .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") + .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") + .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") + .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") + .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") + .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") + .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") + .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") + .append("GPMA.locality_en as GPMA_locality_en,GPMA.locality_ml as GPMA_locality_ml,GPMA.street_name_en as GPMA_street_name_en,GPMA.street_name_ml as GPMA_street_name_ml ,") + .append("GPMA.districtid as GPMA_districtid,GPMA.stateid as GPMA_stateid , GPMA.poid as GPMA_poid , GPMA.poname_en as GPMA_poname_en , GPMA.poname_ml as GPMA_poname_ml ,") + .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") + .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") + .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") + .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml ,") + + .append("BPMA.id as BPMA_id ,BPMA.housename_en as BPMA_housename_en ,BPMA.housename_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") + .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") + .append("BPMA.locality_en as BPMA_locality_en , BPMA.locality_ml as BPMA_locality_ml , BPMA.street_name_en as BPMA_street_name_en , BPMA.street_name_ml as BPMA_street_name_ml,") + .append("BPMA.districtid as BPMA_districtid , BPMA.stateid BPMA_stateid , BPMA.poid as BPMA_poid , BPMA.poname_en as BPMA_poname_en , BPMA.poname_ml as BPMA_poname_ml ,") + .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , ") + .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") + .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") + .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml ,") + + .append("GPSA.id as GPSA_id ,GPSA.housename_en as GPSA_housename_en,GPSA.housename_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") + .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") + .append("GPSA.locality_en as GPSA_locality_en,GPSA.locality_ml as GPSA_locality_ml , GPSA.street_name_en as GPSA_street_name_en , GPSA.street_name_ml as GPSA_street_name_ml , ") + .append("GPSA.districtid as GPSA_districtid , GPSA.stateid GPSA_stateid , GPSA.poid as GPSA_poid , GPSA.poname_en as GPSA_poname_en , GPSA.poname_ml as GPSA_poname_ml , ") + .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom , ") + .append("GPSA.ot_address1_en as GPSA_ot_address1_en,GPSA.ot_address1_ml as GPSA_ot_address1_ml , GPSA.ot_address2_en as GPSA_ot_address2_en , ") + .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") + .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml,") + + .append("BPSA.id as BPSA_id ,BPSA.housename_en as BPSA_housename_en,BPSA.housename_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") + .append("BPSA.talukid as BPSA_talukid , BPSA.taluk_name as BPSA_taluk_name , BPSA.tenantid as BPSA_tenantid , BPSA.ward_code as BPSA_ward_code ,") + .append("BPSA.locality_en as BPSA_locality_en , BPSA.locality_ml as BPSA_locality_ml ,") + .append("BPSA.street_name_en as BPSA_street_name_en , BPSA.street_name_ml as BPSA_street_name_ml , BPSA.districtid as BPSA_districtid , BPSA.stateid BPSA_stateid ,") + .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") + .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") + .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") + .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,") + .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") + .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") + .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") + .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") + + .append("FROM public.eg_register_marriage_details as MD ") + .append("INNER JOIN eg_register_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") + .append("BD.bride_groom ='B' ") + .append("INNER JOIN eg_register_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") + .append("GD.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("BPMA.bride_groom ='B' ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("GPMA.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("BPSA.bride_groom ='B' ") + .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("GPSA.bride_groom ='G' ") + .append("INNER JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("WD1.serial_no = 1 ") + .append("INNER JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("WD2.serial_no = 2 ") + .toString(); - public String getBirthApplicationSearchQuery(@NotNull MarriageApplicationSearchCriteria criteria, - @NotNull List preparedStmtValues, Boolean isCount) { - StringBuilder query = new StringBuilder(QUERY); - query.append(",").append(commonQueryBuilder.getQueryBrideDetails()) - .append(",") - .append(commonQueryBuilder.getGroomDetails()) - .append(",") - .append(commonQueryBuilder.getPresentAddressDetails()) - .append(",") - .append(commonQueryBuilder.getPermanentAddressDetails()) - .append(",") - .append(commonQueryBuilder.getWitnessDetails()) + public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCriteria criteria, + @NotNull List preparedStmtValues, Boolean isCount) { - .append(QUERYCONDITION).toString(); + StringBuilder query = new StringBuilder(QUERY); + StringBuilder orderBy = new StringBuilder(); + addFilter("MD_id", criteria.getId(), query, preparedStmtValues); + addFilter("MD_tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("MD_applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); + addFilter("BD_aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); + addFilter("BD_firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); + addFilter("BD_lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); + addFilter("GD_aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); + addFilter("GD_firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + addFilter("GD_middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); + addFilter("GD_lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); + // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); + addDateRangeFilter("MD_dateofmarriage", + criteria.getFromDate(), + criteria.getToDate(), + query, + preparedStmtValues); - StringBuilder orderBy = new StringBuilder(); + // if(criteria.getSortOrder() == null){ + // criteria.setSortOrder(MarriageRegistrySearchCriteria.SortOrder.ASC); + // } + // if (StringUtils.isEmpty(criteria.getSortBy())) + // addOrderByColumns("MD_createdtime","ASC", orderBy); + // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.dateofmarriage) + // addOrderByColumns("MD_dateofmarriage",criteria.getSortOrder().toString(), orderBy); + // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.applicationNumber) + // addOrderByColumns("MD_applicationnumber",criteria.getSortOrder().toString(),orderBy); + // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.tenantId) + // addOrderByColumns("MD_tenantid",criteria.getSortOrder().toString(), orderBy); + // addOrderToQuery(orderBy, query); + // //addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); - addFilter("mrg.id", criteria.getId(), query, preparedStmtValues); - addFilter("mrg.tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("mrg.applicationno", criteria.getApplicationNo(), query, preparedStmtValues); - addFilter("mrg.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); - addFilter("mrg.fileno", criteria.getFileNo(),query,preparedStmtValues); + return query.toString(); +} - if (StringUtils.isEmpty(criteria.getSortBy())) - addOrderByColumns("mrg.createdtime",null, orderBy); - else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenantId) - addOrderByColumns("mrg.tenantid",criteria.getSortOrder(), orderBy); - else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.applicationNumber) - addOrderByColumns("mrg.applicationno",criteria.getSortOrder(),orderBy); - else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.registrationNo) - addOrderByColumns("mrg.registrationno",criteria.getSortOrder(),orderBy); - else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.fileNo) - addOrderByColumns("mrg.fileno",criteria.getSortOrder(),orderBy); - return query.toString(); - } public String getNextIDQuery() { StringBuilder query = new StringBuilder("select fn_next_id(?,?,?)"); return query.toString(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java index e0509baec97..c0f627cb299 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java @@ -11,10 +11,10 @@ interface BaseRowMapper { default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { return AuditDetails.builder() - .createdBy(rs.getString("createdby")) - .createdTime(Long.valueOf(rs.getLong("createdtime"))) - .lastModifiedBy(rs.getString("lastmodifiedby")) - .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) + .createdBy(rs.getString("MD_createdby")) + .createdTime(Long.valueOf(rs.getLong("MD_createdtime"))) + .lastModifiedBy(rs.getString("MD_lastmodifiedby")) + .lastModifiedTime(Long.valueOf(rs.getLong("MD_lastmodifiedtime"))) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index 89ec6879bf4..7e7544af652 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -1,50 +1,51 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageregistry.model.BrideRegistryDetails; +import org.springframework.stereotype.Component; + import java.sql.ResultSet; import java.sql.SQLException; /** * Created by Jasmine * on 24.03.2023 */ + +@Component public interface BrideRegistryRowMapper { - default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ + default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ - return BrideDetails.builder() - //.id(rs.getString("bd_id")) - .residentship(rs.getString("bd_residentship")) - .adharno(rs.getString("bd_adharno")) - .passportno(rs.getString("bd_passportno")) - .socialsecurityno(rs.getString("bd_socialsecurityno")) - .firstname_en(rs.getString("bd_firstname_en")) - .firstname_mal(rs.getString("bd_firstname_mal")) - .middlename_en(rs.getString("bd_middlename_en")) - .middlename_mal(rs.getString("bd_middlename_mal")) - .lastname_en(rs.getString("bd_lastname_en")) - .lastname_mal(rs.getString("bd_lastname_mal")) - .mobile(rs.getString("bd_mobile")) - .emailid(rs.getString("bd_emailid")) - .gender(rs.getString("bd_gender")) - .dateofbirth(rs.getLong("bd_dateofbirth")) - .age(rs.getInt("bd_age")) - .parent_guardian(rs.getString("bd_parent_guardian")) - .fathername_en(rs.getString("bd_fathername_en")) - .fathername_mal(rs.getString("bd_fathername_mal")) - .mothername_en(rs.getString("bd_mothername_en")) - .mothername_mal(rs.getString("bd_mothername_mal")) - .father_adharno(rs.getString("bd_father_adharno")) - .mother_adharno(rs.getString("bd_mother_adharno")) - .guardianname_en(rs.getString("bd_guardianname_en")) - .guardianname_mal(rs.getString("bd_guardianname_mal")) - .guardian_adhar(rs.getString("bd_guardian_adhar")) - // .profession_en(rs.getString("bd_profession_en")) - // .profession_mal(rs.getString("bd_profession_mal")) - .maritalstatusid(rs.getString("bd_maritalstatusid")) - //.is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) - // .no_of_spouse_living(Boolean.valueOf(rs.getString("bd_no_of_spouse_living"))) - //.photo_url(rs.getString("bd_photo_url")) - .marriageid(rs.getString("bd_marriageid")) - .build(); + return BrideRegistryDetails.builder() + .residentship(rs.getString("BD_residentship")) + .adharno(rs.getString("BD_aadharno")) + .passportno(rs.getString("BD_passportno")) + .socialsecurityno(rs.getString("BD_socialsecurityno")) + .firstname_en(rs.getString("BD_firstname_en")) + .firstname_ml(rs.getString("BD_firstname_ml")) + .middlename_en(rs.getString("BD_middlename_en")) + .middlename_ml(rs.getString("BD_middlename_ml")) + .lastname_en(rs.getString("BD_lastname_en")) + .lastname_ml(rs.getString("BD_lastname_ml")) + .mobile(rs.getString("BD_mobile")) + .emailid(rs.getString("BD_emailid")) + .gender(rs.getString("BD_gender")) + .dateofbirth(rs.getLong("BD_dateofbirth")) + .age(rs.getInt("BD_age")) + .parent_guardian(rs.getString("BD_parent_guardian")) + .fathername_en(rs.getString("BD_fathername_en")) + .fathername_ml(rs.getString("BD_fathername_ml")) + .mothername_en(rs.getString("BD_mothername_en")) + .mothername_ml(rs.getString("BD_mothername_ml")) + .father_adharno(rs.getString("BD_father_aadharno")) + .mother_adharno(rs.getString("BD_mother_aadharno")) + .guardianname_en(rs.getString("BD_guardianname_en")) + .guardianname_ml(rs.getString("BD_guardianname_ml")) + .guardian_adhar(rs.getString("BD_guardian_aadharno")) + .maritalstatusid(rs.getString("BD_maritalstatusid")) + //.is_spouse_living(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) + .no_of_spouse_living(Integer.valueOf(rs.getString("BD_livingspouseNo"))) + //.photo_url(rs.getString("BD_photo_url")) + // .marriageid(rs.getString("BD_marriageid")) + .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index 503a63bcbee..210217b2c10 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -1,48 +1,49 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.GroomDetails; - +import org.ksmart.marriage.marriageregistry.model.GroomRegistryDetails; import java.sql.ResultSet; import java.sql.SQLException; - +import org.springframework.stereotype.Component; + +@Component public interface GroomRegistryRowMapper { - default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ + default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ - return GroomDetails.builder() - // .id(rs.getString("gd_id")) - .residentship(rs.getString("gd_residentship")) - .adharno(rs.getString("gd_adharno")) - .passportno(rs.getString("gd_passportno")) - .socialsecurityno(rs.getString("gd_socialsecurityno")) - .fathername_en(rs.getString("gd_firstname_en")) - .fathername_mal(rs.getString("gd_firstname_mal")) - .middlename_en(rs.getString("gd_middlename_en")) - .middlename_mal(rs.getString("gd_middlename_mal")) - .lastname_en(rs.getString("gd_lastname_en")) - .lastname_mal(rs.getString("gd_lastname_mal")) - .mobile(rs.getString("gd_mobile")) - .emailid(rs.getString("gd_emailid")) - .gender(rs.getString("gd_gender")) - .dateofbirth(rs.getLong("gd_dateofbirth")) - .age(rs.getInt("gd_age")) - .parent_guardian(rs.getString("gd_parent_guardian")) - .fathername_en(rs.getString("gd_fathername_en")) - .fathername_mal(rs.getString("gd_fathername_mal")) - .mothername_en(rs.getString("gd_mothername_en")) - .mothername_mal(rs.getString("gd_mothername_mal")) - .father_adharno(rs.getString("gd_father_adharno")) - .mother_adharno(rs.getString("gd_mother_adharno")) - .guardianname_en(rs.getString("gd_guardianname_en")) - .guardianname_mal(rs.getString("gd_guardianname_mal")) - .guardian_adhar(rs.getString("gd_guardian_adhar")) - // .profession_en(rs.getString("gd_profession_en")) - //.profession_mal(rs.getString("gd_profession_mal")) - .maritalstatusid(rs.getString("gd_maritalstatusid")) - .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) - // .no_of_spouse_living(Boolean.valueOf(rs.getString("gd_no_of_spouse_living"))) - .marriageid(rs.getString("gd_marriageid")) - // .photo_url(rs.getString("gd_photo_url")) + return GroomRegistryDetails.builder() + // .groomId(rs.getString("GD_id")) + .residentship(rs.getString("GD_residentship")) + .adharno(rs.getString("GD_aadharno")) + .passportno(rs.getString("GD_passportno")) + .socialsecurityno(rs.getString("GD_socialsecurityno")) + .fathername_en(rs.getString("GD_firstname_en")) + .fathername_ml(rs.getString("GD_firstname_ml")) + .middlename_en(rs.getString("GD_middlename_en")) + .middlename_ml(rs.getString("GD_middlename_ml")) + .lastname_en(rs.getString("GD_lastname_en")) + .lastname_ml(rs.getString("GD_lastname_ml")) + .mobile(rs.getString("GD_mobile")) + .emailid(rs.getString("GD_emailid")) + .gender(rs.getString("GD_gender")) + .dateofbirth(rs.getLong("GD_dateofbirth")) + .age(rs.getInt("GD_age")) + .parent_guardian(rs.getString("GD_parent_guardian")) + .fathername_en(rs.getString("GD_fathername_en")) + .fathername_ml(rs.getString("GD_fathername_ml")) + .mothername_en(rs.getString("GD_mothername_en")) + .mothername_ml(rs.getString("GD_mothername_ml")) + .father_adharno(rs.getString("GD_father_aadharno")) + .mother_adharno(rs.getString("GD_mother_aadharno")) + .guardianname_en(rs.getString("GD_guardianname_en")) + .guardianname_ml(rs.getString("GD_guardianname_ml")) + .guardian_adhar(rs.getString("GD_guardian_aadharno")) + // .profession_en(rs.getString("GD_profession_en")) + //.profession_ml(rs.getString("GD_profession_ml")) + .maritalstatusid(rs.getString("GD_maritalstatusid")) + // .is_spouse_living(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) + .no_of_spouse_living(Integer.valueOf(rs.getString("GD_livingspouseNo"))) + // .marriageid(rs.getString("GD_marriageid")) + // .photo_url(rs.getString("GD_photo_url")) - .build(); + .build(); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java index a84c4a27c21..96b0acb3374 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java @@ -3,7 +3,8 @@ import java.sql.ResultSet; import java.sql.SQLException; - +import org.springframework.stereotype.Component; +@Component public interface MarriageAddressRegistryRowMapper { // default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ // diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index b28ff65b437..791ee69d8b4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.stereotype.Component; @@ -9,67 +9,53 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; +import org.springframework.stereotype.Component; + @Component -public class MarriageRegistryRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideRegistryRowMapper,GroomRegistryRowMapper,MarriageAddressRegistryRowMapper,WitnessDetailsRowMapper{ +public class MarriageRegistryRowMapper implements ResultSetExtractor>, + BaseRowMapper,BrideRegistryRowMapper, + GroomRegistryRowMapper,MarriageAddressRegistryRowMapper, + WitnessRegistryRowMapper{ @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null - List result = new ArrayList<>(); + public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null + System.out.println("QuertOut"+rs); + List result = new ArrayList<>(); while (rs.next()) { - result.add(MarriageApplicationDetails.builder() - .id(rs.getString("ma_id")) - .dateofreporting(rs.getLong("ma_dateofreporting")) - .dateofmarriage(rs.getLong("ma_dateofmarriage")) - .districtid(rs.getString("ma_districtid")) - .lbtype(rs.getString("ma_lbtype")) - .tenantid(rs.getString("ma_tenantid")) - .placetype(rs.getString("ma_placetype")) - //.placeothers(rs.getString("ma_placeothers")) - .placeid(rs.getString("ma_placeid")) - .placenameEn(rs.getString("ma_placename_en")) - .placenameMl(rs.getString("ma_placename_mal")) - .street_name_en(rs.getString("ma_street_name_en")) - .street_name_ml(rs.getString("ma_street_name_ml")) - .ward_code(rs.getString("ma_ward_code")) - .talukid(rs.getString("ma_talukid")) - .village_name(rs.getString("ma_village_name")) - .marriage_type(rs.getString("ma_marriage_type")) - .oth_marriage_type(rs.getString("ma_oth_marriage_type")) - .landmark(rs.getString("ma_landmark")) - .locality_en(rs.getString("ma_locality_en")) - .locality_ml(rs.getString("ma_locality_ml")) - // .othersspecify(rs.getString("ma_othersspecify")) - .applicationtype(rs.getString("ma_applicationtype")) - .businessservice(rs.getString("ma_businessservice")) - .workflowcode(rs.getString("ma_workflowcode")) - //.fileno(rs.getString("ma_fileno")) - //.file_date(rs.getLong("ma_file_date")) - // .file_status(rs.getString("ma_file_status")) - .applicationNumber(rs.getString("ma_applicationnumber")) - .registrationDate(rs.getLong("ma_registration_date")) - .registrationno(rs.getString("ma_registrationno")) - .action(rs.getString("ma_action")) - .status(rs.getString("ma_status")) - .marriageHouseNoAndNameEn(rs.getString("ma_houseno_and_nameen")) - .marriageHouseNoAndNameMal(rs.getString("ma_houseno_and_nameml")) - .marriageReligiousInstitution(rs.getString("ma_religious_institution")) - .marriagePublicOrPrivateNamePlaceEn(rs.getString("ma_public_or_privateplacennameplace_en")) - .marriagePublicOrPrivateNamePlaceMal(rs.getString("ma_public_or_privateplacennameplace_ml")) - .marriagePublicOrPrivatePlace(rs.getString("ma_public_or_privateplace")) - .marriageReligiousInstitutionOther(rs.getString("ma_religious_institution_other")) - .marriageReligiousInstitutionOtherNameEn(rs.getString("ma_religious_institution_othername_en")) - .marriageReligiousInstitutionOtherNameMal(rs.getString("ma_religious_institution_othername_ml")) - .brideDetails(getBrideDetails(rs)) - .groomDetails(getgroomDetails(rs)) -// .permanent(getPermanentAddress(rs)) - // .present(getPresentAddress(rs)) - .witness(getWitnessDetails(rs)) - .auditDetails(getAuditDetails(rs)) - - .build()); + + result.add(MarriageRegistryDetails.builder() + .id(rs.getString("MD_id")) + .dateofreporting(rs.getLong("MD_dateofreporting")) + .dateofmarriage(rs.getLong("MD_dateofmarriage")) + .districtid(rs.getString("MD_districtid")) + .lbtype(rs.getString("MD_lbtype")) + .tenantid(rs.getString("MD_tenantid")) + .placetype(rs.getString("MD_placetype")) + .placeid(rs.getString("MD_placeid")) + .placenameEn(rs.getString("MD_placename_en")) + .placenameMl(rs.getString("MD_placename_ml")) + .street_name_en(rs.getString("MD_street_name_en")) + .street_name_ml(rs.getString("MD_street_name_ml")) + .ward_code(rs.getString("MD_ward_code")) + .talukid(rs.getString("MD_talukid")) + .village_name(rs.getString("MD_village_name")) + .marriage_type(rs.getString("MD_marriage_type")) + .landmark(rs.getString("MD_landmark")) + .locality_en(rs.getString("MD_locality_en")) + .locality_ml(rs.getString("MD_locality_ml")) + .applicationNumber(rs.getString("MD_applicationnumber")) + .registrationDate(rs.getLong("MD_registration_date")) + .registrationno(rs.getString("MD_registrationno")) + .status(rs.getString("MD_registration_status")) + .brideDetails(getBrideDetails(rs)) + .groomDetails(getGroomDetails(rs)) + // .witnessDetails(getWitnessDetails(rs)) + .auditDetails(getAuditDetails(rs)) + .build()); } return result; } + } \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java similarity index 69% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessDetailsRowMapper.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index 978c2c4fc9b..ef52d33a4a8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -1,14 +1,16 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; - +import org.ksmart.marriage.marriageregistry.model.WitnessRegistryDetails; import java.sql.ResultSet; import java.sql.SQLException; +import org.springframework.stereotype.Component; -public interface WitnessDetailsRowMapper { - default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { + +@Component +public interface WitnessRegistryRowMapper { + default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { - return WitnessDetails.builder() + return WitnessRegistryDetails.builder() // .id(rs.getString("wd_id")) .adharno(rs.getString("wd_adharno")) .name_en(rs.getString("wd_name_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 47e335d8e64..68b7facb9c7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -30,7 +30,9 @@ public List createRegistry(MarriageRegistryRequest requ // return repository.updateMarriageRegistry(request); // } - // public List searchRegistry(MarriageRegistrySearchCriteria criteria) { - // return repository.searchMarriageRegistry(criteria); - // } + public List searchRegistry(MarriageRegistrySearchCriteria criteria) { + return repository.searchMarriageRegistry(criteria); + } + + } diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 3c7a895002f..67762ad07d8 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -5,15 +5,15 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230225134500__registry_column_added_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230225134500__registry_column_added_dll.sql new file mode 100644 index 00000000000..6cca31f21fd --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230225134500__registry_column_added_dll.sql @@ -0,0 +1,9 @@ +-- ALTER TABLE eg_register_marriage_details ADD COLUMN IF NOT EXISTS application_type character varying(20); +-- ALTER TABLE eg_register_marriage_details_audit ADD COLUMN IF NOT EXISTS application_type character varying(20); + +-- ALTER TABLE eg_register_marriage_details ADD COLUMN IF NOT EXISTS application_number character varying(20); +-- ALTER TABLE eg_register_marriage_details_audit ADD COLUMN IF NOT EXISTS application_number character varying(20); + +-- ALTER TABLE eg_register_marriage_details ADD COLUMN IF NOT EXISTS bride_groom character varying(20); +-- ALTER TABLE eg_register_marriage_details_audit ADD COLUMN IF NOT EXISTS bride_groom character varying(20); + diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql index 8c5afb0c614..522be8cb5a0 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql @@ -109,15 +109,15 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details ( id character varying(64) COLLATE pg_catalog."default" NOT NULL, residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", passportno character varying(1000) COLLATE pg_catalog."default", socialsecurityno character varying(64) COLLATE pg_catalog."default", firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", mobile character varying(150) COLLATE pg_catalog."default", emailid character varying(300) COLLATE pg_catalog."default", gender character varying(20) COLLATE pg_catalog."default", @@ -125,16 +125,17 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details age integer, parent_guardian character varying(64) COLLATE pg_catalog."default", fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(15) COLLATE pg_catalog."default", + mother_aadharno character varying(15) COLLATE pg_catalog."default", guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(15) COLLATE pg_catalog."default", maritalstatusid character varying(64) COLLATE pg_catalog."default", - no_of_spouse_living boolean, + is_spouse_living boolean, + no_of_spouse_living integer, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, createdtime bigint, @@ -158,15 +159,15 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details_audit stamp timestamp without time zone NOT NULL, id character varying(64) COLLATE pg_catalog."default" NOT NULL, residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", passportno character varying(1000) COLLATE pg_catalog."default", socialsecurityno character varying(64) COLLATE pg_catalog."default", firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_mal character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_mal character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_mal character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", mobile character varying(150) COLLATE pg_catalog."default", emailid character varying(300) COLLATE pg_catalog."default", gender character varying(20) COLLATE pg_catalog."default", @@ -174,16 +175,17 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details_audit age integer, parent_guardian character varying(64) COLLATE pg_catalog."default", fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_mal character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_mal character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(15) COLLATE pg_catalog."default", + mother_aadharno character varying(15) COLLATE pg_catalog."default", guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_mal character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(15) COLLATE pg_catalog."default", maritalstatusid character varying(64) COLLATE pg_catalog."default", - no_of_spouse_living boolean, + is_spouse_living boolean, + no_of_spouse_living integer, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, createdtime bigint, @@ -347,12 +349,12 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details ( id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", age integer, address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", mobile character varying(150) COLLATE pg_catalog."default", is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, @@ -373,12 +375,12 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit operation character(1) COLLATE pg_catalog."default" NOT NULL, stamp timestamp without time zone NOT NULL, id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", age integer, address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", mobile character varying(150) COLLATE pg_catalog."default", is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, @@ -465,16 +467,16 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details landmark character varying(1000) COLLATE pg_catalog."default", registrationno character varying(64) COLLATE pg_catalog."default", registration_date bigint, - registrtion_status character varying(64) COLLATE pg_catalog."default", + registration_status character varying(64) COLLATE pg_catalog."default", createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - ack_no character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", is_migrated boolean, migrated_date bigint, CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_place_details_ack_no_fkey UNIQUE (ack_no, tenantid) + CONSTRAINT eg_register_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber, tenantid) ); CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details_audit @@ -505,12 +507,12 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details_audit landmark character varying(1000) COLLATE pg_catalog."default", registrationno character varying(64) COLLATE pg_catalog."default", registration_date bigint, - registrtion_status character varying(64) COLLATE pg_catalog."default", + registration_status character varying(64) COLLATE pg_catalog."default", createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - ack_no character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", is_migrated boolean, migrated_date bigint); -- Index: idx_eg_register_marriage_details_tenantid @@ -530,7 +532,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details ( id character varying(64) COLLATE pg_catalog."default" NOT NULL, residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", passportno character varying(1000) COLLATE pg_catalog."default", socialsecurityno character varying(64) COLLATE pg_catalog."default", firstname_en character varying(200) COLLATE pg_catalog."default", @@ -549,13 +551,14 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details mothername_en character varying(200) COLLATE pg_catalog."default", fathername_ml character varying(200) COLLATE pg_catalog."default", mothername_ml character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", + father_aadharno character varying(15) COLLATE pg_catalog."default", + mother_aadharno character varying(15) COLLATE pg_catalog."default", guardianname_en character varying(200) COLLATE pg_catalog."default", guardianname_ml character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", + guardian_aadharno character varying(15) COLLATE pg_catalog."default", maritalstatusid character varying(64) COLLATE pg_catalog."default", - no_of_spouse_living boolean, + is_spouse_living boolean, + no_of_spouse_living integer, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, mig_chvackno character varying(64) COLLATE pg_catalog."default", @@ -576,7 +579,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details_audit stamp timestamp without time zone NOT NULL, id character varying(64) COLLATE pg_catalog."default" NOT NULL, residentship character varying(64) COLLATE pg_catalog."default", - adharno character varying(15) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", passportno character varying(1000) COLLATE pg_catalog."default", socialsecurityno character varying(64) COLLATE pg_catalog."default", firstname_en character varying(200) COLLATE pg_catalog."default", @@ -595,13 +598,14 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details_audit mothername_en character varying(200) COLLATE pg_catalog."default", fathername_ml character varying(200) COLLATE pg_catalog."default", mothername_ml character varying(200) COLLATE pg_catalog."default", - father_adharno character varying(15) COLLATE pg_catalog."default", - mother_adharno character varying(15) COLLATE pg_catalog."default", + father_aadharno character varying(15) COLLATE pg_catalog."default", + mother_aadharno character varying(15) COLLATE pg_catalog."default", guardianname_en character varying(200) COLLATE pg_catalog."default", guardianname_ml character varying(200) COLLATE pg_catalog."default", - guardian_adhar character varying(15) COLLATE pg_catalog."default", + guardian_aadharno character varying(15) COLLATE pg_catalog."default", maritalstatusid character varying(64) COLLATE pg_catalog."default", - no_of_spouse_living boolean, + is_spouse_living boolean, + no_of_spouse_living integer, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, mig_chvackno character varying(64) COLLATE pg_catalog."default", @@ -768,12 +772,12 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details_a CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details ( id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", age integer, address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", mobile character varying(150) COLLATE pg_catalog."default", is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, @@ -795,12 +799,12 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details_audit operation character(1) COLLATE pg_catalog."default" NOT NULL, stamp timestamp without time zone NOT NULL, id character varying(64) COLLATE pg_catalog."default" NOT NULL, - adharno character varying(15) COLLATE pg_catalog."default", + aadharno character varying(15) COLLATE pg_catalog."default", name_en character varying(200) COLLATE pg_catalog."default", - name_mal character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", age integer, address_en character varying(200) COLLATE pg_catalog."default", - address_mal character varying(200) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", mobile character varying(150) COLLATE pg_catalog."default", is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql index c03ac6179f2..4a1513c66d6 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql @@ -1,3 +1,3 @@ -ALTER TABLE public.eg_marriage_bride_groom_details - DROP COLUMN no_of_spouse_living, - ADD COLUMN no_of_spouse_living bigint; +-- ALTER TABLE public.eg_marriage_bride_groom_details +-- DROP COLUMN no_of_spouse_living, +-- ADD COLUMN no_of_spouse_living bigint; From 34323d12e1625b16d0f642ef5e1d70fab2fd216e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 27 Mar 2023 13:21:59 +0530 Subject: [PATCH 049/420] marriage registry-rowmapper,migration,yml updation --- .../MarriageRegistryEnrichment.java | 27 +++++++---- .../model/BrideRegistryDetails.java | 4 +- .../model/GroomRegistryDetails.java | 2 +- .../model/MarriageRegistryRequest.java | 6 ++- .../model/WitnessRegistryDetails.java | 47 ++++++++++--------- .../repository/rowmapper/BaseRowMapper.java | 1 + .../rowmapper/MarriageRegistryRowMapper.java | 2 +- .../rowmapper/WitnessRegistryRowMapper.java | 29 ++++++++---- ...30225134500__registry_column_added_dll.sql | 9 ---- ...30323144512__marriage_services_new_dll.sql | 18 +++---- ...30325112220__marriage_services_new_dll.sql | 3 -- 11 files changed, 82 insertions(+), 66 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230225134500__registry_column_added_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 8dc67252291..fa236e7f6d0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -19,11 +19,15 @@ import java.util.List; import java.util.ListIterator; import java.util.UUID; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import lombok.extern.slf4j.Slf4j; /** * Created by Jasmine * on 24.03.2023 */ @Component +@Slf4j public class MarriageRegistryEnrichment implements BaseEnrichment { @Autowired MarriageApplicationConfiguration config; @@ -37,6 +41,14 @@ public void enrichCreate(MarriageRegistryRequest request) { RequestInfo requestInfo = request.getRequestInfo(); User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + // try { + // ObjectMapper mapper = new ObjectMapper(); + // Object obj = request; + // mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + // System.out.println("JasmineRegistryCreation "+ mapper.writeValueAsString(obj)); + // }catch(Exception e) { + // log.error("Exception while fetching from searcher: ",e); + // } request.getMarriageDetails().forEach(marriage -> { marriage.setId(UUID.randomUUID().toString()); @@ -70,24 +82,23 @@ private void setRegistrationNumber(MarriageRegistryRequest request) { RequestInfo requestInfo = request.getRequestInfo(); List marriageDetails = request.getMarriageDetails(); - String tenantId = marriageDetails.get(0) - .getTenantid(); + String tenantId = marriageDetails.get(0).getTenantid(); List filecodes = getIds(requestInfo, - tenantId, - config.getGetMarriageRegisNumberName(), - request.getMarriageDetails().get(0).getModulecode(), - "REG", + tenantId, + config.getGetMarriageRegisNumberName(), + request.getMarriageDetails().get(0).getModulecode(), + "REG", marriageDetails.size()); validateFileCodes(filecodes, marriageDetails.size()); Long currentTime = Long.valueOf(System.currentTimeMillis()); ListIterator itr = filecodes.listIterator(); request.getMarriageDetails() .forEach(marriage -> { - if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { + //if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { marriage.setRegistrationno(itr.next()); marriage.setRegistrationDate(currentTime); - } + // } }); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java index 747d16689a3..45bbc5ecd61 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java @@ -155,8 +155,8 @@ public class BrideRegistryDetails { @JsonProperty("brideGroom") private String brideGroom; - @JsonProperty("auditDetails") - private AuditDetails auditDetails; + @JsonProperty("AuditDetails") + private AuditDetails registryAuditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java index 9656d926518..1099740b75e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java @@ -154,7 +154,7 @@ public class GroomRegistryDetails { @JsonProperty("brideGroom") private String brideGroom; - @JsonProperty("auditDetails") + @JsonProperty("AuditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java index e5c7f5759de..087dd95627e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java @@ -5,6 +5,8 @@ import org.egov.common.contract.request.RequestInfo; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; + +import java.util.ArrayList; import java.util.List; /** * Created by Jasmine @@ -26,8 +28,10 @@ public class MarriageRegistryRequest { public MarriageRegistryRequest addMarriageDetails(MarriageRegistryDetails marriageDetail) { if (marriageDetails == null) { - marriageDetails = null; + marriageDetails = new ArrayList<>(); } + marriageDetails.add(marriageDetail); return this; } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java index c2f3be837bf..969960b2391 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java @@ -3,6 +3,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; + +import java.math.BigInteger; + import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** @@ -35,34 +38,34 @@ public class WitnessRegistryDetails { private String marriageid; @Size(max = 15) - @JsonProperty("witness1AdharNo") - private String adharno; + @JsonProperty("witness1AadharNo") + private String witness1AadharNo; @Size(max = 200) @JsonProperty("witness1NameEn") - private String name_en; + private String witness1NameEn; @Size(max = 200) - @JsonProperty("witness1NameMal") - private String name_mal; + @JsonProperty("witness1NameMl") + private String witness1NameMl; @JsonProperty("witness1Age") - private Integer age; + private Integer witness1Age; @Size(max = 500) @JsonProperty("witness1AddresSEn") - private String address_en; + private String witness1AddresSEn; @Size(max = 500) - @JsonProperty("witness1AddressMal") - private String address_mal; + @JsonProperty("witness1AddressMl") + private String witness1AddressMl; @Size(max = 150) @JsonProperty("witness1Mobile") - private String mobile; + private Long witness1Mobile; - @JsonProperty("witness1ISEsigned") - private Boolean is_esigned; + @JsonProperty("witness1Esigned") + private Boolean witness1Esigned; @JsonProperty("serial_no1") private Integer serial_no1; @@ -71,16 +74,16 @@ public class WitnessRegistryDetails { private Integer serial_no2; @Size(max = 15) - @JsonProperty("witness2AdharNo") - private String witness2AdharNo; + @JsonProperty("witness2AadharNo") + private String witness2AadharNo; @Size(max = 200) @JsonProperty("witness2NameEn") private String witness2NameEn; @Size(max = 200) - @JsonProperty("witness2NameMal") - private String witness2NameMal; + @JsonProperty("witness2NameMl") + private String witness2NameMl; @JsonProperty("witness2Age") private Integer witness2Age; @@ -90,17 +93,17 @@ public class WitnessRegistryDetails { private String witness2AddresSEn; @Size(max = 200) - @JsonProperty("witness2AddressMal") - private String witness2AddressMal; + @JsonProperty("witness2AddressMl") + private String witness2AddressMl; @Size(max = 150) @JsonProperty("witness2Mobile") - private String witness2Mobile; + private Long witness2Mobile; - @JsonProperty("witness2ISEsigned") - private Boolean witness2ISEsigned; + @JsonProperty("witness2Esigned") + private Boolean witness2Esigned; - @JsonProperty("auditDetails") + @JsonProperty("AuditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java index c0f627cb299..32460279cf3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java @@ -10,6 +10,7 @@ interface BaseRowMapper { default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { + return AuditDetails.builder() .createdBy(rs.getString("MD_createdby")) .createdTime(Long.valueOf(rs.getLong("MD_createdtime"))) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 791ee69d8b4..caf60fcb105 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -49,7 +49,7 @@ public List extractData(ResultSet rs) throws SQLExcepti .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) - // .witnessDetails(getWitnessDetails(rs)) + .witnessDetails(getWitnessDetails(rs)) .auditDetails(getAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index ef52d33a4a8..ae57fecf459 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -11,16 +11,25 @@ public interface WitnessRegistryRowMapper { default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { return WitnessRegistryDetails.builder() -// .id(rs.getString("wd_id")) - .adharno(rs.getString("wd_adharno")) - .name_en(rs.getString("wd_name_en")) - .name_mal(rs.getString("wd_name_mal")) - .age(rs.getInt("wd_age")) - .address_en(rs.getString("wd_address_en")) - .address_mal(rs.getString("wd_address_mal")) - .mobile(rs.getString("wd_mobile")) - .is_esigned(Boolean.valueOf(rs.getString("wd_is_esigned"))) - .marriageid(rs.getString("wd_marriageid")) + .marriageid(rs.getString("WD_marriageid")) + .witnessId1(rs.getString("WD_id")) + .witness1AadharNo(rs.getString("WD_adharno")) + .witness1NameEn(rs.getString("WD_name_en")) + .witness1NameMl(rs.getString("WD_name_mal")) + .witness1Age(rs.getInt("WD_age")) + .witness1AddresSEn(rs.getString("WD_address_en")) + .witness1AddressMl(rs.getString("WD_address_ml")) + .witness1Mobile(rs.getLong("WD_mobile")) + .witness1Esigned(Boolean.valueOf(rs.getString("WD_is_esigned"))) + .witnessId2(rs.getString("WD_id")) + .witness2AadharNo(rs.getString("WD_adharno")) + .witness2NameEn(rs.getString("WD_name_en")) + .witness2NameMl(rs.getString("WD_name_mal")) + .witness2Age(rs.getInt("WD_age")) + .witness2AddresSEn(rs.getString("WD_address_en")) + .witness2AddressMl(rs.getString("WD_address_ml")) + .witness2Mobile(rs.getLong("WD_mobile")) + .witness2Esigned(Boolean.valueOf(rs.getString("WD_is_esigned"))) .build(); } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230225134500__registry_column_added_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230225134500__registry_column_added_dll.sql deleted file mode 100644 index 6cca31f21fd..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230225134500__registry_column_added_dll.sql +++ /dev/null @@ -1,9 +0,0 @@ --- ALTER TABLE eg_register_marriage_details ADD COLUMN IF NOT EXISTS application_type character varying(20); --- ALTER TABLE eg_register_marriage_details_audit ADD COLUMN IF NOT EXISTS application_type character varying(20); - --- ALTER TABLE eg_register_marriage_details ADD COLUMN IF NOT EXISTS application_number character varying(20); --- ALTER TABLE eg_register_marriage_details_audit ADD COLUMN IF NOT EXISTS application_number character varying(20); - --- ALTER TABLE eg_register_marriage_details ADD COLUMN IF NOT EXISTS bride_groom character varying(20); --- ALTER TABLE eg_register_marriage_details_audit ADD COLUMN IF NOT EXISTS bride_groom character varying(20); - diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql index 522be8cb5a0..6cdfe8a0148 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql @@ -355,14 +355,14 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details age integer, address_en character varying(200) COLLATE pg_catalog."default", address_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", + mobile bigint, is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no bigint, + serial_no integer, CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) REFERENCES public.eg_marriage_details (id) MATCH SIMPLE @@ -381,14 +381,14 @@ CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit age integer, address_en character varying(200) COLLATE pg_catalog."default", address_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", + mobile bigint, is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, createdtime bigint, createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no bigint + serial_no integer ); -- Table: public.eg_register_marriage_document @@ -489,7 +489,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details_audit districtid character varying(64) COLLATE pg_catalog."default", lbtype character varying(64) COLLATE pg_catalog."default", tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", placeid character varying(64) COLLATE pg_catalog."default", placename_en character varying(1000) COLLATE pg_catalog."default", placename_ml character varying(1000) COLLATE pg_catalog."default", @@ -778,7 +778,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details age integer, address_en character varying(200) COLLATE pg_catalog."default", address_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", + mobile bigint, is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, mig_chvackno character varying(64) COLLATE pg_catalog."default", @@ -786,7 +786,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no bigint, + serial_no integer, CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE @@ -805,7 +805,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details_audit age integer, address_en character varying(200) COLLATE pg_catalog."default", address_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", + mobile bigint, is_esigned boolean, marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, mig_chvackno character varying(64) COLLATE pg_catalog."default", @@ -813,7 +813,7 @@ CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details_audit createdby character varying(64) COLLATE pg_catalog."default", lastmodifiedtime bigint, lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no bigint + serial_no integer ); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql deleted file mode 100644 index 4a1513c66d6..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql +++ /dev/null @@ -1,3 +0,0 @@ --- ALTER TABLE public.eg_marriage_bride_groom_details --- DROP COLUMN no_of_spouse_living, --- ADD COLUMN no_of_spouse_living bigint; From a0c00da59cd2c2724d0efc33dc5998c8cf147ba0 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 27 Mar 2023 16:38:08 +0530 Subject: [PATCH 050/420] marriage registry-rowmapper,migration,yml updation --- .../model/BrideRegistryDetails.java | 38 +++++++++---------- .../model/GroomRegistryDetails.java | 36 +++++++++--------- .../model/MarriageRegistryDetails.java | 18 ++++----- .../model/MarriageRegistrySearchCriteria.java | 24 ++++++------ .../rowmapper/BrideRegistryRowMapper.java | 12 +++--- .../rowmapper/GroomRegistryRowMapper.java | 12 +++--- .../rowmapper/WitnessRegistryRowMapper.java | 38 +++++++++---------- 7 files changed, 89 insertions(+), 89 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java index 45bbc5ecd61..b08daa0f419 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java @@ -34,8 +34,8 @@ public class BrideRegistryDetails { private String residentship; @Size(max = 15) - @JsonProperty("brideAdharNo") - private String adharno; + @JsonProperty("brideAadharNo") + private String aadharno; @Size(max = 1000) @JsonProperty("bridePassportNo") @@ -50,7 +50,7 @@ public class BrideRegistryDetails { private String firstname_en; @Size(max = 200) - @JsonProperty("brideFirstnameMal") + @JsonProperty("brideFirstnameMl") private String firstname_ml; @Size(max = 200) @@ -58,7 +58,7 @@ public class BrideRegistryDetails { private String middlename_en; @Size(max = 200) - @JsonProperty("brideMiddlenameMal") + @JsonProperty("brideMiddlenameMl") private String middlename_ml; @Size(max = 200) @@ -66,7 +66,7 @@ public class BrideRegistryDetails { private String lastname_en; @Size(max = 200) - @JsonProperty("brideLastnameMal") + @JsonProperty("brideLastnameMl") private String lastname_ml; @Size(max = 150) @@ -96,7 +96,7 @@ public class BrideRegistryDetails { private String fathername_en; @Size(max = 200) - @JsonProperty("brideFathernameMal") + @JsonProperty("brideFathernameMl") private String fathername_ml; @Size(max = 200) @@ -104,28 +104,28 @@ public class BrideRegistryDetails { private String mothername_en; @Size(max = 200) - @JsonProperty("brideMothernameMal") + @JsonProperty("brideMothernameMl") private String mothername_ml; @Size(max = 15) - @JsonProperty("brideFatherAdharNo") - private String father_adharno; + @JsonProperty("brideFatherAadharNo") + private String father_aadharno; @Size(max = 15) - @JsonProperty("brideMotherAdharNo") - private String mother_adharno; + @JsonProperty("brideMotherAadharNo") + private String mother_aadharno; @Size(max = 200) @JsonProperty("brideGuardiannameEn") private String guardianname_en; @Size(max = 200) - @JsonProperty("brideGuardiannameMal") + @JsonProperty("brideGuardiannameMl") private String guardianname_ml; - @Size(max = 15) - @JsonProperty("brideGardianAdhar") - private String guardian_adhar; + + @JsonProperty("brideGuardianAadharNo") + private String guardian_aadharno; // @Size(max = 200) @@ -133,19 +133,19 @@ public class BrideRegistryDetails { // private String profession_en; // // @Size(max = 200) -// @JsonProperty("brideProfessionMal") -// private String profession_mal; +// @JsonProperty("brideProfessionMl") +// private String profession_ml; @Size(max = 64) @JsonProperty("brideMaritalstatusID") private String maritalstatusid; @JsonProperty("brideSpouseLiving") - private Boolean is_spouse_living; + private Boolean brideIsSpouseLiving; @JsonProperty("brideNoOfSpouse") - private Integer no_of_spouse_living; + private Integer bridelivingSpouseNo; @Size(max = 150) @JsonProperty("bridePhotoUrl") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java index 1099740b75e..c80762c793a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java @@ -34,8 +34,8 @@ public class GroomRegistryDetails { private String residentship; @Size(max = 15) - @JsonProperty("groomAdharNo") - private String adharno; + @JsonProperty("groomAadharNo") + private String aadharno; @Size(max = 1000) @JsonProperty("groomPassportNo") @@ -50,7 +50,7 @@ public class GroomRegistryDetails { private String firstname_en; @Size(max = 200) - @JsonProperty("groomFirstnameMal") + @JsonProperty("groomFirstnameMl") private String firstname_ml; @Size(max = 200) @@ -58,7 +58,7 @@ public class GroomRegistryDetails { private String middlename_en; @Size(max = 200) - @JsonProperty("groomMiddlenameMal") + @JsonProperty("groomMiddlenameMl") private String middlename_ml; @Size(max = 200) @@ -66,7 +66,7 @@ public class GroomRegistryDetails { private String lastname_en; @Size(max = 200) - @JsonProperty("groomLastnameMal") + @JsonProperty("groomLastnameMl") private String lastname_ml; @Size(max = 150) @@ -96,7 +96,7 @@ public class GroomRegistryDetails { private String fathername_en; @Size(max = 200) - @JsonProperty("groomFathernameMal") + @JsonProperty("groomFathernameMl") private String fathername_ml; @Size(max = 200) @@ -104,28 +104,28 @@ public class GroomRegistryDetails { private String mothername_en; @Size(max = 200) - @JsonProperty("groomMothernameMal") + @JsonProperty("groomMothernameMl") private String mothername_ml; @Size(max = 15) - @JsonProperty("groomFatherAdharNo") - private String father_adharno; + @JsonProperty("groomFatherAadharNo") + private String father_aadharno; @Size(max = 15) - @JsonProperty("groomMotherAdharNo") - private String mother_adharno; + @JsonProperty("groomMotherAadharNo") + private String mother_aadharno; @Size(max = 200) @JsonProperty("groomGuardiannameEn") private String guardianname_en; @Size(max = 200) - @JsonProperty("groomGuardiannameMal") + @JsonProperty("groomGuardiannameMl") private String guardianname_ml; - @Size(max = 15) - @JsonProperty("groomGardianAdhar") - private String guardian_adhar; + + @JsonProperty("groomGuardianAadharNo") + private String guardian_aadharno; // @Size(max = 200) // @JsonProperty("groomProfessionEn") @@ -133,7 +133,7 @@ public class GroomRegistryDetails { // // // @Size(max = 200) -// @JsonProperty("groomProfessionMal") +// @JsonProperty("groomProfessionMl") // private String profession_ml; @Size(max = 64) @@ -141,10 +141,10 @@ public class GroomRegistryDetails { private String maritalstatusid; @JsonProperty("groomSpouseLiving") - private Boolean is_spouse_living; + private Boolean groomIsSpouseLiving; @JsonProperty("groomNoOfSpouse") - private Integer no_of_spouse_living; + private Integer groomlivingSpouseNo; @Size(max = 150) @JsonProperty("groomPhotoUrl") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java index d103d7b83e3..9d05697fe97 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java @@ -51,7 +51,7 @@ public class MarriageRegistryDetails { @JsonProperty("marriagePlacenameEn") private String placenameEn; @Size(max = 1000) - @JsonProperty("marriagePlacenameMal") + @JsonProperty("marriagePlacenameMl") private String placenameMl; @Size(max = 64) @@ -64,7 +64,7 @@ public class MarriageRegistryDetails { private String street_name_en; @Size(max = 1000) - @JsonProperty("marriageStreetMal") + @JsonProperty("marriageStreetMl") private String street_name_ml; @Size(max = 64) @@ -84,7 +84,7 @@ public class MarriageRegistryDetails { private String locality_en; @Size(max = 1000) - @JsonProperty("marriageLocalityMal") + @JsonProperty("marriageLocalityMl") private String locality_ml; @Size(max = 64) @@ -148,8 +148,8 @@ public class MarriageRegistryDetails { private String marriageHouseNoAndNameEn; @Size(max = 2500) - @JsonProperty("marriageHouseNoAndNameMal") - private String marriageHouseNoAndNameMal; + @JsonProperty("marriageHouseNoAndNameMl") + private String marriageHouseNoAndNameMl; // @Size(max = 1000) // @JsonProperty("marriageReligiousInstitutionOther") @@ -163,8 +163,8 @@ public class MarriageRegistryDetails { // @JsonProperty("marriagePublicOrPrivateNamePlaceEn") // private String marriagePublicOrPrivateNamePlaceEn; // @Size(max = 2500) - // @JsonProperty("marriagePublicOrPrivateNamePlaceMal") - // private String marriagePublicOrPrivateNamePlaceMal; + // @JsonProperty("marriagePublicOrPrivateNamePlaceMl") + // private String marriagePublicOrPrivateNamePlaceMl; // @Size(max = 1000) // @JsonProperty("marriageReligiousInstitution") @@ -174,8 +174,8 @@ public class MarriageRegistryDetails { // @JsonProperty("marriageReligiousInstitutionOtherNameEn") // private String marriageReligiousInstitutionOtherNameEn; // @Size(max = 2500) - // @JsonProperty("marriageReligiousInstitutionOtherNameMal") - // private String marriageReligiousInstitutionOtherNameMal; + // @JsonProperty("marriageReligiousInstitutionOtherNameMl") + // private String marriageReligiousInstitutionOtherNameMl; @Size(max = 64) @JsonProperty("applicationNumber") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java index 9ebf68e5bd7..bd48a0b3e39 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java @@ -38,20 +38,20 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("groomFirstnameEn") private String groomFirstnameEn; - @JsonProperty("groomFirstnameMal") - private String groomFirstnameMal; + @JsonProperty("groomFirstnameMl") + private String groomFirstnameMl; @JsonProperty("groomMiddlenameEn") private String groomMiddlenameEn; - @JsonProperty("groomMiddlenameMal") - private String groomMiddlenameMal; + @JsonProperty("groomMiddlenameMl") + private String groomMiddlenameMl; @JsonProperty("groomLastnameEn") private String groomLastnameEn; - @JsonProperty("groomLastnameMal") - private String groomLastnameMal; + @JsonProperty("groomLastnameMl") + private String groomLastnameMl; @JsonProperty("groomAdharNo") private String groomAdharNo; @@ -63,20 +63,20 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("brideFirstnameEn") private String brideFirstnameEn; - @JsonProperty("brideFirstnameMal") - private String brideFirstnameMal; + @JsonProperty("brideFirstnameMl") + private String brideFirstnameMl; @JsonProperty("brideMiddlenameEn") private String brideMiddlenameEn; - @JsonProperty("brideMiddlenameMal") - private String brideMiddlenameMal; + @JsonProperty("brideMiddlenameMl") + private String brideMiddlenameMl; @JsonProperty("brideLastnameEn") private String brideLastnameEn; - @JsonProperty("brideLastnameMal") - private String brideLastnameMal; + @JsonProperty("brideLastnameMl") + private String brideLastnameMl; @JsonProperty("sortBy") private SortBy sortBy; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index 7e7544af652..6bb9146cbf4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -16,7 +16,7 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ return BrideRegistryDetails.builder() .residentship(rs.getString("BD_residentship")) - .adharno(rs.getString("BD_aadharno")) + .aadharno(rs.getString("BD_aadharno")) .passportno(rs.getString("BD_passportno")) .socialsecurityno(rs.getString("BD_socialsecurityno")) .firstname_en(rs.getString("BD_firstname_en")) @@ -35,14 +35,14 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ .fathername_ml(rs.getString("BD_fathername_ml")) .mothername_en(rs.getString("BD_mothername_en")) .mothername_ml(rs.getString("BD_mothername_ml")) - .father_adharno(rs.getString("BD_father_aadharno")) - .mother_adharno(rs.getString("BD_mother_aadharno")) + .father_aadharno(rs.getString("BD_father_aadharno")) + .mother_aadharno(rs.getString("BD_mother_aadharno")) .guardianname_en(rs.getString("BD_guardianname_en")) .guardianname_ml(rs.getString("BD_guardianname_ml")) - .guardian_adhar(rs.getString("BD_guardian_aadharno")) + .guardian_aadharno(rs.getString("BD_guardian_aadharno")) .maritalstatusid(rs.getString("BD_maritalstatusid")) - //.is_spouse_living(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) - .no_of_spouse_living(Integer.valueOf(rs.getString("BD_livingspouseNo"))) + .brideIsSpouseLiving(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) + .bridelivingSpouseNo(Integer.valueOf(rs.getString("BD_livingspouseNo"))) //.photo_url(rs.getString("BD_photo_url")) // .marriageid(rs.getString("BD_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index 210217b2c10..30b00f56ec8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -12,7 +12,7 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ return GroomRegistryDetails.builder() // .groomId(rs.getString("GD_id")) .residentship(rs.getString("GD_residentship")) - .adharno(rs.getString("GD_aadharno")) + .aadharno(rs.getString("GD_aadharno")) .passportno(rs.getString("GD_passportno")) .socialsecurityno(rs.getString("GD_socialsecurityno")) .fathername_en(rs.getString("GD_firstname_en")) @@ -31,16 +31,16 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ .fathername_ml(rs.getString("GD_fathername_ml")) .mothername_en(rs.getString("GD_mothername_en")) .mothername_ml(rs.getString("GD_mothername_ml")) - .father_adharno(rs.getString("GD_father_aadharno")) - .mother_adharno(rs.getString("GD_mother_aadharno")) + .father_aadharno(rs.getString("GD_father_aadharno")) + .mother_aadharno(rs.getString("GD_mother_aadharno")) .guardianname_en(rs.getString("GD_guardianname_en")) .guardianname_ml(rs.getString("GD_guardianname_ml")) - .guardian_adhar(rs.getString("GD_guardian_aadharno")) + .guardian_aadharno(rs.getString("GD_guardian_aadharno")) // .profession_en(rs.getString("GD_profession_en")) //.profession_ml(rs.getString("GD_profession_ml")) .maritalstatusid(rs.getString("GD_maritalstatusid")) - // .is_spouse_living(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) - .no_of_spouse_living(Integer.valueOf(rs.getString("GD_livingspouseNo"))) + .groomIsSpouseLiving(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) + .groomlivingSpouseNo(Integer.valueOf(rs.getString("GD_livingspouseNo"))) // .marriageid(rs.getString("GD_marriageid")) // .photo_url(rs.getString("GD_photo_url")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index ae57fecf459..ad4f6987a4b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -11,25 +11,25 @@ public interface WitnessRegistryRowMapper { default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { return WitnessRegistryDetails.builder() - .marriageid(rs.getString("WD_marriageid")) - .witnessId1(rs.getString("WD_id")) - .witness1AadharNo(rs.getString("WD_adharno")) - .witness1NameEn(rs.getString("WD_name_en")) - .witness1NameMl(rs.getString("WD_name_mal")) - .witness1Age(rs.getInt("WD_age")) - .witness1AddresSEn(rs.getString("WD_address_en")) - .witness1AddressMl(rs.getString("WD_address_ml")) - .witness1Mobile(rs.getLong("WD_mobile")) - .witness1Esigned(Boolean.valueOf(rs.getString("WD_is_esigned"))) - .witnessId2(rs.getString("WD_id")) - .witness2AadharNo(rs.getString("WD_adharno")) - .witness2NameEn(rs.getString("WD_name_en")) - .witness2NameMl(rs.getString("WD_name_mal")) - .witness2Age(rs.getInt("WD_age")) - .witness2AddresSEn(rs.getString("WD_address_en")) - .witness2AddressMl(rs.getString("WD_address_ml")) - .witness2Mobile(rs.getLong("WD_mobile")) - .witness2Esigned(Boolean.valueOf(rs.getString("WD_is_esigned"))) + // .marriageid(rs.getString("MD_id")) + .witnessId1(rs.getString("WD1_id")) + .witness1AadharNo(rs.getString("WD1_aadharno")) + .witness1NameEn(rs.getString("WD1_name_en")) + .witness1NameMl(rs.getString("WD1_name_ml")) + .witness1Age(rs.getInt("WD1_age")) + .witness1AddresSEn(rs.getString("WD1_address_en")) + .witness1AddressMl(rs.getString("WD1_address_ml")) + .witness1Mobile(rs.getLong("WD1_mobile")) + .witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) + .witnessId2(rs.getString("WD2_id")) + .witness2AadharNo(rs.getString("WD2_aadharno")) + .witness2NameEn(rs.getString("WD2_name_en")) + .witness2NameMl(rs.getString("WD2_name_ml")) + .witness2Age(rs.getInt("WD2_age")) + .witness2AddresSEn(rs.getString("WD2_address_en")) + .witness2AddressMl(rs.getString("WD2_address_ml")) + .witness2Mobile(rs.getLong("WD2_mobile")) + .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) .build(); } From cb159b06f03cbfe2843d2bb6f3de0399740447fb Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 27 Mar 2023 16:42:21 +0530 Subject: [PATCH 051/420] CREATE --- .../src/main/resources/marriage.yml | 418 +++++++++++++- .../enrichment/MarriageDetailsEnrichment.java | 409 +++++++++++++- .../model/MarriageApplicationDetails.java | 10 +- .../model/marriage/BrideAddressDetails.java | 514 ++++++++++++++++++ .../model/marriage/GroomAddressDetails.java | 514 ++++++++++++++++++ ...30325112220__marriage_services_new_dll.sql | 36 ++ 6 files changed, 1893 insertions(+), 8 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 53be6e8568d..69d15f2eec9 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -64,7 +64,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.workflowCode - - jsonPath: $.MarriageDetails.*.applicationnumber + - jsonPath: $.MarriageDetails.*.applicationNumber - jsonPath: $.MarriageDetails.*.registrationno @@ -86,10 +86,17 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_bride_groom_details( +<<<<<<< HEAD id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_aadharno, mother_aadharno, guardianname_en, guardianname_mal, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby) +======= + id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, + lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, + father_adharno, mother_adharno, guardianname_en, guardianname_ml, guardian_adhar, maritalstatusid, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) +>>>>>>> 52c781b876 (CREATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideDetails jsonMaps: @@ -147,8 +154,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID - - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse - - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom @@ -161,12 +166,21 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + - query: INSERT INTO public.eg_marriage_bride_groom_details( +<<<<<<< HEAD id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_aadharno, mother_aadharno, guardianname_en, guardianname_mal, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby) +======= + id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, + lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, + father_adharno, mother_adharno, guardianname_en, guardianname_ml, guardian_adhar, maritalstatusid, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) +>>>>>>> 52c781b876 (CREATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomDetails jsonMaps: @@ -224,8 +238,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID - - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse - - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom @@ -238,6 +250,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse + + - query: INSERT INTO public.eg_marriage_witness_details( id, aadharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, serial_no) @@ -311,5 +326,398 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 + - query : INSERT INTO public.eg_marriage_present_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, + street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, + lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.BrideAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentUuid + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentWardNo + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.isPermanentAddress + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEnB + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl + + + - query : INSERT INTO public.eg_marriage_permanent_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: MarriageDetails.*.BrideAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaLBName + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + + + + - query: INSERT INTO public.eg_marriage_present_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, + street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, + lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.GroomAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentUuid + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentWardNo + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.isPermanentAddress + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEnB + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl + + + + - query : INSERT INTO public.eg_marriage_permanent_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: MarriageDetails.*.GroomAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaLBName + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + + + + - version: 1.0 + description: Persists save marriage details in marriage table + fromTopic: update-marriage-application-topic + isTransaction: true + queryMaps: + - query: UPDATE public.eg_marriage_details + SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeid=?, placename_en=?, + placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, + marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, + applicationnumber=?, registrationno=?, registration_date=?, action=?, status=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=?, + WHERE id=?; + basePath: MarriageDetails.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.marriageDOM + + - jsonPath: $.MarriageDetails.*.marriageDOR + + - jsonPath: $.MarriageDetails.*.marriageDistrictid + + - jsonPath: $.MarriageDetails.*.marriageLBtype + + - jsonPath: $.MarriageDetails.*.marriageTenantid + + - jsonPath: $.MarriageDetails.*.marriagePlacetype + + - jsonPath: $.MarriageDetails.*.placeid + + - jsonPath: $.MarriageDetails.*.marriagePlacenameEn + + - jsonPath: $.MarriageDetails.*.marriagePlacenameMal + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + + - jsonPath: $.MarriageDetails.*.marriageStreetEn + + - jsonPath: $.MarriageDetails.*.marriageStreetMal + + - jsonPath: $.MarriageDetails.*.marriageWardCode + + - jsonPath: $.MarriageDetails.*.marriageTalukID + + - jsonPath: $.MarriageDetails.*.marriageVillageName + + - jsonPath: $.MarriageDetails.*.marriageType + + - jsonPath: $.MarriageDetails.*.othMarriageType + + - jsonPath: $.MarriageDetails.*.marriageLandmark + + - jsonPath: $.MarriageDetails.*.marriageLocalityEn + + - jsonPath: $.MarriageDetails.*.marriageLocalityMal + + - jsonPath: $.MarriageDetails.*.applicationType + + - jsonPath: $.MarriageDetails.*.businessService + + - jsonPath: $.MarriageDetails.*.workflowCode + + - jsonPath: $.MarriageDetails.*.applicationNumber + + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.registration_date + + - jsonPath: $.MarriageDetails.*.action + + - jsonPath: $.MarriageDetails.*.status + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index d40fbbe19c2..d10f6506239 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -10,6 +10,7 @@ import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.utils.IDGenerator; +import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.enums.ErrorCodes; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -70,11 +71,417 @@ public void enrichCreate(MarriageDetailsRequest request) { }); setApplicationNumbers(request); setFileNumbers(request); + setBridePermanentAddress(request); + setBridePresentAddress(request); + setGroomPermanentAddress(request); + setGroomPresentAddress(request); // setRegistrationNumber(request); } + private void setGroomPresentAddress(MarriageDetailsRequest request) { + request.getMarriageDetails() + .forEach(marriage ->{ + if (marriage.getGroomAddressDetails()!=null) { + + marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPresent("G"); + } + + if (marriage.getGroomAddressDetails() != null && marriage.getGroomAddressDetails().getIsPermanentAddress() != null) { + marriage.getGroomAddressDetails().setIsPermanentAddressInt(marriage.getGroomAddressDetails().getIsPermanentAddress() == true ? 1 : 0); + if(marriage.getGroomAddressDetails().getIsPermanentAddress()) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); + if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + if (marriage.getGroomAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { + marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); + } + } + } + + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { + if (marriage.getGroomAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if(!marriage.getGroomAddressDetails().getIsPermanentAddress()){ + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); + } + + marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + + + } + else { + if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); + } + marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaPincode()); + + marriage.getGroomAddressDetails().setPresentOthrTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); + + + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + + } + } + + else { + if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + + + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); + + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); + + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); + + + + + } + } + } + + + + } + + + }); + + + + + } + + private void setGroomPermanentAddress(MarriageDetailsRequest request) { + request.getMarriageDetails() + .forEach(marriage-> { + + if (marriage.getGroomAddressDetails()!=null){ + if (marriage.getGroomAddressDetails()!=null) { + + marriage.getGroomAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + //marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPermanent("G"); + //marriage.getGroomAddressDetails().setBrideGroomPresent("B"); + } + + if(marriage.getGroomAddressDetails().getPermtaddressCountry()!=null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ + if (marriage.getGroomAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + + marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + + marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); + + marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); + marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + } + else { + marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + + marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); + + marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + + marriage.getGroomAddressDetails().setPermntOthrTalukName(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + + marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + + } + + + } + else { + if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + + + + + } + } + + } + + } + + }); + + } + + private void setBridePresentAddress(MarriageDetailsRequest request) { + request.getMarriageDetails() + .forEach(marriage ->{ + if (marriage.getBrideAddressDetails()!=null) { + + marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getBrideAddressDetails().setBrideGroomPresent("B"); + } + + if (marriage.getBrideAddressDetails() != null && marriage.getBrideAddressDetails().getIsPermanentAddress() != null) { + marriage.getBrideAddressDetails().setIsPermanentAddressInt(marriage.getBrideAddressDetails().getIsPermanentAddress() == true ? 1 : 0); + if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); + marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); + if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + if (marriage.getBrideAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { + marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); + } + } + } + + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { + if (marriage.getBrideAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if(!marriage.getBrideAddressDetails().getIsPermanentAddress()){ + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); + } + + marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameMl()); + + marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + + + } + else { + if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); + } + marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaHouseNameMl()); + + marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaPincode()); + + marriage.getBrideAddressDetails().setPresentOthrTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(marriage.getBrideAddressDetails().getPresentOutsideKeralaPostOfficeEn()); + + + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + + } + } + + else { + if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + + + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); + + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); + + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + + + + + } + } + } + + + + } + + + }); + + + + } + + private void setBridePermanentAddress(MarriageDetailsRequest request) { + request.getMarriageDetails() + .forEach(marriage-> { + + if (marriage.getBrideAddressDetails()!=null){ + if (marriage.getBrideAddressDetails()!=null) { + + marriage.getBrideAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + //marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getBrideAddressDetails().setBrideGroomPermanent("B"); + //marriage.getBrideAddressDetails().setBrideGroomPresent("B"); + } + + if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ + if (marriage.getBrideAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + + marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + + marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + + marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); + marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + } + else { + marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + + marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + + marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); + + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + + marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + + marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + + } + + + } + else { + if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + + + + + } + } + + } + + } + + }); + + } + + private void setRegistrationNumber(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); @@ -132,7 +539,7 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { List filecodes = getIds(requestInfo, tenantId, config.getMarriageApplNumberIdName(), - request.getMarriageDetails().get(0).getApplicationtype(), + request.getMarriageDetails().get(0).getFunctionUID(), "APPL", marriageDetails.size()); validateFileCodes(filecodes, marriageDetails.size()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index aa206124c77..d9963c5ff9f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -108,6 +108,9 @@ public class MarriageApplicationDetails { @JsonProperty("applicationType") private String applicationtype; + @Size(max = 64) + @JsonProperty("functionUID") + private String functionUID; @NotNull @Size(max = 64) @JsonProperty("businessService") @@ -193,8 +196,11 @@ public class MarriageApplicationDetails { @JsonProperty("GroomDetails") private GroomDetails groomDetails; -// @JsonProperty("PermanentAddressDetails") -// private PermanentAdressDetails permanentBride; + @JsonProperty("BrideAddressDetails") + private BrideAddressDetails brideAddressDetails; + + @JsonProperty("GroomAddressDetails") + private GroomAddressDetails groomAddressDetails; // @JsonProperty("PresentAddressDetails") // private PresentAddressDetails present ; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java new file mode 100644 index 00000000000..6589875814a --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java @@ -0,0 +1,514 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; + +import javax.validation.constraints.Size; +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class BrideAddressDetails { + + @Size(max = 64) + @JsonProperty("presentaddressCountry") + private String presentaddressCountry; + + @Size(max = 64) + @JsonProperty("presentaddressStateName") + private String presentaddressStateName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaLBName") + private String presentInsideKeralaLBName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaDistrict") + private String presentInsideKeralaDistrict; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaTaluk") + private String presentInsideKeralaTaluk; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaVillage") + private String presentInsideKeralaVillage; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameEn") + private String presentInsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameEn") + private String presentInsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameEn") + private String presentInsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameMl") + private String presentInsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameMl") + private String presentInsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameMl") + private String presentInsideKeralaHouseNameMl; + + @Size(max = 10) + @JsonProperty("presentInsideKeralaPincode") + private String presentInsideKeralaPincode; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaPostOffice") + private String presentInsideKeralaPostOffice; + + @Size(max = 64) + @JsonProperty("presentWardNo") + private String presentWardNo; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaDistrict") + private String presentOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaTaluk") + private String presentOutsideKeralaTalukName; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaVillage") + private String presentOutsideKeralaVillageName; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaCityVilgeEn") + private String presentOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPincode") + private String presentOutsideKeralaPincode; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeEn") + private String presentOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeMl") + private String presentOutsideKeralaPostOfficeMl; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameEn") + private String presentOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameEn") + private String presentOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameEn") + private String presentOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameMl") + private String presentOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameMl") + private String presentOutsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameMl") + private String presentOutsideKeralaHouseNameMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEn") + private String presentOutSideIndiaAdressEn; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMl") + private String presentOutSideIndiaAdressMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEnB") + private String presentOutSideIndiaAdressEnB; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMlB") + private String presentOutSideIndiaAdressMlB; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceEn") + private String presentOutSideIndiaProvinceEn; + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaLocalityMl") + private String presentOutSideIndiaLocalityMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceMl") + private String presentOutSideIndiaProvinceMl; + + @Size(max = 64) + @JsonProperty("presentOutSideCountry") + private String presentOutSideCountry; + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaadrsVillage") + private String presentOutSideIndiaadrsVillage; + + @Size(max = 64) + @JsonProperty("presentOutSideIndiaadrsCityTown") + private String presentOutSideIndiaadrsCityTown; + + ////Db Fields////// + + + + @Size(max = 64) + @JsonProperty("presentUuid") + private String presentUuid; + + @Size(max = 64) + @JsonProperty("countryIdPresent") + private String countryIdPresent; + + @Size(max = 64) + @JsonProperty("stateIdPresent") + private String stateIdPresent; + + @Size(max = 64) + @JsonProperty("districtIdPresent") + private String districtIdPresent; + + @Size(max = 64) + @JsonProperty("pinNoPresent") + private String pinNoPresent; + + @Size(max = 1000) + @JsonProperty("localityEnPresent") + private String localityEnPresent; + + @Size(max = 1000) + @JsonProperty("localityMlPresent") + private String localityMlPresent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPresent") + private String streetNameEnPresent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPresent") + private String streetNameMlPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPresent") + private String houseNameNoEnPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPresent") + private String houseNameNoMlPresent; + + @Size(max = 1000) + @JsonProperty("villageNamePresent") + private String villageNamePresent; + @Size(max = 1000) + @JsonProperty("townOrVillagePresent") + private String townOrVillagePresent; + + @Size(max = 10) + @JsonProperty("poNoPresent") + private String poNoPresent; + + @Size(max = 1000) + @JsonProperty("presentOthrTalukName") + private String presentOthrTalukName; + @Size(max = 64) + @JsonProperty("presentOthPostOfficeEn") + private String presentOthPostOfficeEn; + @Size(max = 64) + @JsonProperty("brideGroomPresent") + private String brideGroomPresent; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressEn") + private String presentOthrIndiaAdressEn; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressMl") + private String presentOthrIndiaAdressMl; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressEnB") + private String presentOthrIndiaAdressEnB; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressMlB") + private String presentOthrIndiaAdressMlB; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaProvinceEn") + private String presentOthrIndiaProvinceEn; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaProvinceMl") + private String presentOthrIndiaProvinceMl; + + + ////Permanant + + @JsonProperty("isPermanentAddress") + private Boolean isPermanentAddress; + + @Size(max = 1000) + @JsonProperty("permtaddressCountry") + private String permtaddressCountry; + + @Size(max = 64) + @JsonProperty("permtaddressStateName") + private String permtaddressStateName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrLBName") + private String permntInKeralaAdrLBName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrDistrict") + private String permntInKeralaAdrDistrict; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaCityVilgeEn") + private String permntOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrTaluk") + private String permntInKeralaAdrTaluk; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrVillage") + private String permntInKeralaAdrVillage; + + @Size(max = 2500) + @JsonProperty("permntOutSideIndiaProvinceMl") + private String permntOutSideIndiaProvinceMl; + + @Size(max = 2500) + @JsonProperty("permntOutSideIndiaProvinceEn") + private String permntOutSideIndiaProvinceEn; + + @Size(max = 1000) + @JsonProperty("permntInKeralaAdrLocalityNameEn") + private String permntInKeralaAdrLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntInKeralaAdrStreetNameEn") + private String permntInKeralaAdrStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameEn") + private String permntInKeralaAdrHouseNameEn; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrLocalityNameMl") + private String permntInKeralaAdrLocalityNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrStreetNameMl") + private String permntInKeralaAdrStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameMl") + private String permntInKeralaAdrHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPincode") + private String permntInKeralaAdrPincode; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPostOffice") + private String permntInKeralaAdrPostOffice; + + @Size(max = 64) + @JsonProperty("permntInKeralaWardNo") + private String permntInKeralaWardNo; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaDistrict") + private String permntOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaTaluk") + private String permntOutsideKeralaTaluk; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaVillage") + private String permntOutsideKeralaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPincode") + private String permntOutsideKeralaPincode; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameEn") + private String permntOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameEn") + private String permntOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameEn") + private String permntOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameMl") + private String permntOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameMl") + private String permntOutsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameMl") + private String permntOutsideKeralaHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeEn") + private String permntOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeMl") + private String permntOutsideKeralaPostOfficeMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneEn") + private String permntOutsideIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneMl") + private String permntOutsideIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoEn") + private String permntOutsideIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoMl") + private String permntOutsideIndiaLinetwoMl; + + @Size(max = 1000) + @JsonProperty("permntOutsideIndiaVillage") + private String permntOutsideIndiaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCityTown") + private String permntOutsideIndiaCityTown; + + @Size(max = 10) + @JsonProperty("permanentOutsideIndiaPostCode") + private String permanentOutsideIndiaPostCode; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCountry") + private String permntOutsideIndiaCountry; + + + ////Db Fields////// + + @Size(max = 64) + @JsonProperty("permanentUuid") + private String permanentUuid; + + @JsonProperty("isPermanentAddressInt") + private Integer isPermanentAddressInt; + + @Size(max = 64) + @JsonProperty("countryIdPermanent") + private String countryIdPermanent; + + @Size(max = 64) + @JsonProperty("stateIdPermanent") + private String stateIdPermanent; + + @Size(max = 64) + @JsonProperty("districtIdPermanent") + private String districtIdPermanent; + + @Size(max = 64) + @JsonProperty("pinNoPermanent") + private String pinNoPermanent; + + @Size(max = 1000) + @JsonProperty("localityEnPermanent") + private String localityEnPermanent; + + @Size(max = 1000) + @JsonProperty("localityMlPermanent") + private String localityMlPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPermanent") + private String streetNameEnPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPermanent") + private String streetNameMlPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPermanent") + private String houseNameNoEnPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPermanent") + private String houseNameNoMlPermanent; + + @Size(max = 1000) + @JsonProperty("villageNamePermanent") + private String villageNamePermanent; + + @Size(max = 1000) + @JsonProperty("townOrVillagePermanent") + private String townOrVillagePermanent; + + @Size(max = 10) + @JsonProperty("poNoPermanent") + private String poNoPermanent; + + @Size(max = 1000) + @JsonProperty("permntOthrTalukName") + private String permntOthrTalukName; + + @Size(max = 64) + @JsonProperty("permntOthPostOfficeEn") + private String permntOthPostOfficeEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLineoneEn") + private String permntOthrIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLineoneMl") + private String permntOthrIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLinetwoEn") + private String permntOthrIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLinetwoMl") + private String permntOthrIndiaLinetwoMl; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaprovinceEn") + private String permntOthrIndiaprovinceEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaprovinceMl") + private String permntOthrIndiaprovinceMl; + @Size(max = 64) + @JsonProperty("brideGroomPermanent") + private String brideGroomPermanent; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java new file mode 100644 index 00000000000..f375387064c --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java @@ -0,0 +1,514 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; + +import javax.validation.constraints.Size; +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class GroomAddressDetails { + + @Size(max = 64) + @JsonProperty("presentaddressCountry") + private String presentaddressCountry; + + @Size(max = 64) + @JsonProperty("presentaddressStateName") + private String presentaddressStateName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaLBName") + private String presentInsideKeralaLBName; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaDistrict") + private String presentInsideKeralaDistrict; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaTaluk") + private String presentInsideKeralaTaluk; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaVillage") + private String presentInsideKeralaVillage; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameEn") + private String presentInsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameEn") + private String presentInsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameEn") + private String presentInsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentInsideKeralaLocalityNameMl") + private String presentInsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentInsideKeralaStreetNameMl") + private String presentInsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("presentInsideKeralaHouseNameMl") + private String presentInsideKeralaHouseNameMl; + + @Size(max = 10) + @JsonProperty("presentInsideKeralaPincode") + private String presentInsideKeralaPincode; + + @Size(max = 64) + @JsonProperty("presentInsideKeralaPostOffice") + private String presentInsideKeralaPostOffice; + + @Size(max = 64) + @JsonProperty("presentWardNo") + private String presentWardNo; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaDistrict") + private String presentOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaTaluk") + private String presentOutsideKeralaTalukName; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaVillage") + private String presentOutsideKeralaVillageName; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaCityVilgeEn") + private String presentOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPincode") + private String presentOutsideKeralaPincode; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeEn") + private String presentOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("presentOutsideKeralaPostOfficeMl") + private String presentOutsideKeralaPostOfficeMl; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameEn") + private String presentOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameEn") + private String presentOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameEn") + private String presentOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("presentOutsideKeralaLocalityNameMl") + private String presentOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("presentOutsideKeralaStreetNameMl") + private String presentOutsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("presentOutsideKeralaHouseNameMl") + private String presentOutsideKeralaHouseNameMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEn") + private String presentOutSideIndiaAdressEn; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMl") + private String presentOutSideIndiaAdressMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressEnB") + private String presentOutSideIndiaAdressEnB; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaAdressMlB") + private String presentOutSideIndiaAdressMlB; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceEn") + private String presentOutSideIndiaProvinceEn; + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaLocalityMl") + private String presentOutSideIndiaLocalityMl; + + @Size(max = 2500) + @JsonProperty("presentOutSideIndiaProvinceMl") + private String presentOutSideIndiaProvinceMl; + + @Size(max = 64) + @JsonProperty("presentOutSideCountry") + private String presentOutSideCountry; + + @Size(max = 1000) + @JsonProperty("presentOutSideIndiaadrsVillage") + private String presentOutSideIndiaadrsVillage; + + @Size(max = 64) + @JsonProperty("presentOutSideIndiaadrsCityTown") + private String presentOutSideIndiaadrsCityTown; + + ////Db Fields////// + + + + @Size(max = 64) + @JsonProperty("presentUuid") + private String presentUuid; + + @Size(max = 64) + @JsonProperty("countryIdPresent") + private String countryIdPresent; + + @Size(max = 64) + @JsonProperty("stateIdPresent") + private String stateIdPresent; + + @Size(max = 64) + @JsonProperty("districtIdPresent") + private String districtIdPresent; + + @Size(max = 64) + @JsonProperty("pinNoPresent") + private String pinNoPresent; + + @Size(max = 1000) + @JsonProperty("localityEnPresent") + private String localityEnPresent; + + @Size(max = 1000) + @JsonProperty("localityMlPresent") + private String localityMlPresent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPresent") + private String streetNameEnPresent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPresent") + private String streetNameMlPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPresent") + private String houseNameNoEnPresent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPresent") + private String houseNameNoMlPresent; + + @Size(max = 1000) + @JsonProperty("villageNamePresent") + private String villageNamePresent; + @Size(max = 1000) + @JsonProperty("townOrVillagePresent") + private String townOrVillagePresent; + + @Size(max = 10) + @JsonProperty("poNoPresent") + private String poNoPresent; + + @Size(max = 1000) + @JsonProperty("presentOthrTalukName") + private String presentOthrTalukName; + @Size(max = 64) + @JsonProperty("presentOthPostOfficeEn") + private String presentOthPostOfficeEn; + @Size(max = 64) + @JsonProperty("brideGroomPresent") + private String brideGroomPresent; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressEn") + private String presentOthrIndiaAdressEn; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressMl") + private String presentOthrIndiaAdressMl; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressEnB") + private String presentOthrIndiaAdressEnB; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressMlB") + private String presentOthrIndiaAdressMlB; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaProvinceEn") + private String presentOthrIndiaProvinceEn; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaProvinceMl") + private String presentOthrIndiaProvinceMl; + + + ////Permanant + + @JsonProperty("isPermanentAddress") + private Boolean isPermanentAddress; + + @Size(max = 1000) + @JsonProperty("permtaddressCountry") + private String permtaddressCountry; + + @Size(max = 64) + @JsonProperty("permtaddressStateName") + private String permtaddressStateName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrLBName") + private String permntInKeralaAdrLBName; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrDistrict") + private String permntInKeralaAdrDistrict; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaCityVilgeEn") + private String permntOutsideKeralaCityVilgeEn; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrTaluk") + private String permntInKeralaAdrTaluk; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrVillage") + private String permntInKeralaAdrVillage; + + @Size(max = 2500) + @JsonProperty("permntOutSideIndiaProvinceMl") + private String permntOutSideIndiaProvinceMl; + + @Size(max = 2500) + @JsonProperty("permntOutSideIndiaProvinceEn") + private String permntOutSideIndiaProvinceEn; + + @Size(max = 1000) + @JsonProperty("permntInKeralaAdrLocalityNameEn") + private String permntInKeralaAdrLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntInKeralaAdrStreetNameEn") + private String permntInKeralaAdrStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameEn") + private String permntInKeralaAdrHouseNameEn; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrLocalityNameMl") + private String permntInKeralaAdrLocalityNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrStreetNameMl") + private String permntInKeralaAdrStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntInKeralaAdrHouseNameMl") + private String permntInKeralaAdrHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPincode") + private String permntInKeralaAdrPincode; + + @Size(max = 64) + @JsonProperty("permntInKeralaAdrPostOffice") + private String permntInKeralaAdrPostOffice; + + @Size(max = 64) + @JsonProperty("permntInKeralaWardNo") + private String permntInKeralaWardNo; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaDistrict") + private String permntOutsideKeralaDistrict; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaTaluk") + private String permntOutsideKeralaTaluk; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaVillage") + private String permntOutsideKeralaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPincode") + private String permntOutsideKeralaPincode; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameEn") + private String permntOutsideKeralaLocalityNameEn; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameEn") + private String permntOutsideKeralaStreetNameEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameEn") + private String permntOutsideKeralaHouseNameEn; + + @Size(max = 1000) + @JsonProperty("permntOutsideKeralaLocalityNameMl") + private String permntOutsideKeralaLocalityNameMl; + + @Size(max = 2000) + @JsonProperty("permntOutsideKeralaStreetNameMl") + private String permntOutsideKeralaStreetNameMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideKeralaHouseNameMl") + private String permntOutsideKeralaHouseNameMl; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeEn") + private String permntOutsideKeralaPostOfficeEn; + + @Size(max = 64) + @JsonProperty("permntOutsideKeralaPostOfficeMl") + private String permntOutsideKeralaPostOfficeMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneEn") + private String permntOutsideIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLineoneMl") + private String permntOutsideIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoEn") + private String permntOutsideIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOutsideIndiaLinetwoMl") + private String permntOutsideIndiaLinetwoMl; + + @Size(max = 1000) + @JsonProperty("permntOutsideIndiaVillage") + private String permntOutsideIndiaVillage; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCityTown") + private String permntOutsideIndiaCityTown; + + @Size(max = 10) + @JsonProperty("permanentOutsideIndiaPostCode") + private String permanentOutsideIndiaPostCode; + + @Size(max = 64) + @JsonProperty("permntOutsideIndiaCountry") + private String permntOutsideIndiaCountry; + + + ////Db Fields////// + + @Size(max = 64) + @JsonProperty("permanentUuid") + private String permanentUuid; + + @JsonProperty("isPermanentAddressInt") + private Integer isPermanentAddressInt; + + @Size(max = 64) + @JsonProperty("countryIdPermanent") + private String countryIdPermanent; + + @Size(max = 64) + @JsonProperty("stateIdPermanent") + private String stateIdPermanent; + + @Size(max = 64) + @JsonProperty("districtIdPermanent") + private String districtIdPermanent; + + @Size(max = 64) + @JsonProperty("pinNoPermanent") + private String pinNoPermanent; + + @Size(max = 1000) + @JsonProperty("localityEnPermanent") + private String localityEnPermanent; + + @Size(max = 1000) + @JsonProperty("localityMlPermanent") + private String localityMlPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameEnPermanent") + private String streetNameEnPermanent; + + @Size(max = 1000) + @JsonProperty("streetNameMlPermanent") + private String streetNameMlPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoEnPermanent") + private String houseNameNoEnPermanent; + + @Size(max = 1000) + @JsonProperty("houseNameNoMlPermanent") + private String houseNameNoMlPermanent; + + @Size(max = 1000) + @JsonProperty("villageNamePermanent") + private String villageNamePermanent; + + @Size(max = 1000) + @JsonProperty("townOrVillagePermanent") + private String townOrVillagePermanent; + + @Size(max = 10) + @JsonProperty("poNoPermanent") + private String poNoPermanent; + + @Size(max = 1000) + @JsonProperty("permntOthrTalukName") + private String permntOthrTalukName; + + @Size(max = 64) + @JsonProperty("permntOthPostOfficeEn") + private String permntOthPostOfficeEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLineoneEn") + private String permntOthrIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLineoneMl") + private String permntOthrIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLinetwoEn") + private String permntOthrIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLinetwoMl") + private String permntOthrIndiaLinetwoMl; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaprovinceEn") + private String permntOthrIndiaprovinceEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaprovinceMl") + private String permntOthrIndiaprovinceMl; + @Size(max = 64) + @JsonProperty("brideGroomPermanent") + private String brideGroomPermanent; + +} diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql new file mode 100644 index 00000000000..4f83bde58e7 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql @@ -0,0 +1,36 @@ +ALTER TABLE public.eg_marriage_bride_groom_details + DROP COLUMN no_of_spouse_living, + ADD COLUMN IF NOT EXISTS no_of_spouse_living bigint; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN IF NOT EXISTS migrated_marriage_type character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN IF NOT EXISTS migrated_marriage_type character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_permanent_address_details + ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_permanent_address_details_audit + ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_present_address_details + ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_present_address_details_audit + ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN firstname_mal TO firstname_ml; +ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN middlename_mal TO middlename_ml; +ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN mothername_mal TO mothername_ml; +ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN guardianname_mal TO guardianname_ml; +ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN lastname_mal TO lastname_ml; +ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN fathername_mal TO fathername_ml; + + +ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN firstname_mal TO firstname_ml; +ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN middlename_mal TO middlename_ml; +ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN mothername_mal TO mothername_ml; +ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN guardianname_mal TO guardianname_ml; +ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN lastname_mal TO lastname_ml; +ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN fathername_mal TO fathername_ml; From 524991f464d37878f1677ca4857645082e1ecea0 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 27 Mar 2023 16:51:50 +0530 Subject: [PATCH 052/420] CREATE --- .../marriage/MarriageAddressDetails.java | 443 ------------------ .../src/main/resources/application.properties | 4 +- ...30325112220__marriage_services_new_dll.sql | 30 +- 3 files changed, 17 insertions(+), 460 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java deleted file mode 100644 index e6aaea78757..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageAddressDetails.java +++ /dev/null @@ -1,443 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; - -import javax.validation.constraints.Size; - -public class MarriageAddressDetails { - - @Size(max = 64) - @JsonProperty("presentaddressCountry") - private String presentaddressCountry; - - @Size(max = 64) - @JsonProperty("presentaddressStateName") - private String presentaddressStateName; - - @Size(max = 64) - @JsonProperty("presentInsideKeralaLBName") - private String presentInsideKeralaLBName; - - @Size(max = 64) - @JsonProperty("presentInsideKeralaDistrict") - private String presentInsideKeralaDistrict; - - @Size(max = 64) - @JsonProperty("presentInsideKeralaTaluk") - private String presentInsideKeralaTaluk; - - @Size(max = 64) - @JsonProperty("presentInsideKeralaVillage") - private String presentInsideKeralaVillage; - - @Size(max = 1000) - @JsonProperty("presentInsideKeralaLocalityNameEn") - private String presentInsideKeralaLocalityNameEn; - - @Size(max = 2000) - @JsonProperty("presentInsideKeralaStreetNameEn") - private String presentInsideKeralaStreetNameEn; - - @Size(max = 2500) - @JsonProperty("presentInsideKeralaHouseNameEn") - private String presentInsideKeralaHouseNameEn; - - @Size(max = 1000) - @JsonProperty("presentInsideKeralaLocalityNameMl") - private String presentInsideKeralaLocalityNameMl; - - @Size(max = 2000) - @JsonProperty("presentInsideKeralaStreetNameMl") - private String presentInsideKeralaStreetNameMl; - - @Size(max = 2500) - @JsonProperty("presentInsideKeralaHouseNameMl") - private String presentInsideKeralaHouseNameMl; - - @Size(max = 10) - @JsonProperty("presentInsideKeralaPincode") - private String presentInsideKeralaPincode; - - @Size(max = 64) - @JsonProperty("presentInsideKeralaPostOffice") - private String presentInsideKeralaPostOffice; - - @Size(max = 64) - @JsonProperty("presentWardNo") - private String presentWardNo; - - @Size(max = 64) - @JsonProperty("presentOutsideKeralaDistrict") - private String presentOutsideKeralaDistrict; - - @Size(max = 1000) - @JsonProperty("presentOutsideKeralaTaluk") - private String presentOutsideKeralaTalukName; - - @Size(max = 1000) - @JsonProperty("presentOutsideKeralaVillage") - private String presentOutsideKeralaVillageName; - - - @Size(max = 64) - @JsonProperty("presentOutsideKeralaCityVilgeEn") - private String presentOutsideKeralaCityVilgeEn; - - @Size(max = 64) - @JsonProperty("presentOutsideKeralaPincode") - private String presentOutsideKeralaPincode; - @Size(max = 64) - @JsonProperty("presentOutsideKeralaPostOfficeEn") - private String presentOutsideKeralaPostOfficeEn; - - @Size(max = 64) - @JsonProperty("presentOutsideKeralaPostOfficeMl") - private String presentOutsideKeralaPostOfficeMl; - - @Size(max = 1000) - @JsonProperty("presentOutsideKeralaLocalityNameEn") - private String presentOutsideKeralaLocalityNameEn; - - @Size(max = 2000) - @JsonProperty("presentOutsideKeralaStreetNameEn") - private String presentOutsideKeralaStreetNameEn; - - @Size(max = 2500) - @JsonProperty("presentOutsideKeralaHouseNameEn") - private String presentOutsideKeralaHouseNameEn; - - @Size(max = 1000) - @JsonProperty("presentOutsideKeralaLocalityNameMl") - private String presentOutsideKeralaLocalityNameMl; - - @Size(max = 2000) - @JsonProperty("presentOutsideKeralaStreetNameMl") - private String presentOutsideKeralaStreetNameMl; - - - @Size(max = 2500) - @JsonProperty("presentOutsideKeralaHouseNameMl") - private String presentOutsideKeralaHouseNameMl; - - @Size(max = 2500) - @JsonProperty("presentOutSideIndiaAdressEn") - private String presentOutSideIndiaAdressEn; - - - @Size(max = 2500) - @JsonProperty("presentOutSideIndiaAdressMl") - private String presentOutSideIndiaAdressMl; - - - @Size(max = 2500) - @JsonProperty("presentOutSideIndiaAdressEnB") - private String presentOutSideIndiaAdressEnB; - - - @Size(max = 2500) - @JsonProperty("presentOutSideIndiaAdressMlB") - private String presentOutSideIndiaAdressMlB; - - - @Size(max = 2500) - @JsonProperty("presentOutSideIndiaProvinceEn") - private String presentOutSideIndiaProvinceEn; - - - @Size(max = 1000) - @JsonProperty("presentOutSideIndiaLocalityMl") - private String presentOutSideIndiaLocalityMl; - - @Size(max = 2500) - @JsonProperty("presentOutSideIndiaProvinceMl") - private String presentOutSideIndiaProvinceMl; - - @Size(max = 64) - @JsonProperty("presentOutSideCountry") - private String presentOutSideCountry; - - @JsonProperty("isPrsentAddress") - private Boolean isPrsentAddress; - - @Size(max = 1000) - @JsonProperty("presentOutSideIndiaadrsVillage") - private String presentOutSideIndiaadrsVillage; - - @Size(max = 64) - @JsonProperty("presentOutSideIndiaadrsCityTown") - private String presentOutSideIndiaadrsCityTown; - - ////Db Fields////// - - @JsonProperty("isPrsentAddressInt") - private Integer isPrsentAddressInt; - @Size(max = 64) - @JsonProperty("presentUuid") - private String presentUuid; - - @Size(max = 64) - @JsonProperty("countryIdPresent") - private String countryIdPresent; - - @Size(max = 64) - @JsonProperty("stateIdPresent") - private String stateIdPresent; - - @Size(max = 64) - @JsonProperty("districtIdPresent") - private String districtIdPresent; - - @Size(max = 64) - @JsonProperty("pinNoPresent") - private String pinNoPresent; - - @Size(max = 1000) - @JsonProperty("localityEnPresent") - private String localityEnPresent; - - @Size(max = 1000) - @JsonProperty("localityMlPresent") - private String localityMlPresent; - - @Size(max = 1000) - @JsonProperty("streetNameEnPresent") - private String streetNameEnPresent; - - @Size(max = 1000) - @JsonProperty("streetNameMlPresent") - private String streetNameMlPresent; - - @Size(max = 1000) - @JsonProperty("houseNameNoEnPresent") - private String houseNameNoEnPresent; - - @Size(max = 1000) - @JsonProperty("houseNameNoMlPresent") - private String houseNameNoMlPresent; - - @Size(max = 1000) - @JsonProperty("villageNamePresent") - private String villageNamePresent; - - @Size(max = 1000) - @JsonProperty("villageIdPresent") - private String villageIdPresent; - - @Size(max = 10) - @JsonProperty("poNoPresent") - private String poNoPresent; - - @Size(max = 64) - @JsonProperty("brideGroomPresent") - private String brideGroomPresent; - ////Permanant - @Size(max = 1000) - @JsonProperty("permtaddressCountry") - private String permtaddressCountry; - - @Size(max = 64) - @JsonProperty("permtaddressStateName") - private String permtaddressStateName; - - @Size(max = 64) - @JsonProperty("permntInKeralaAdrLBName") - private String permntInKeralaAdrLBName; - - @Size(max = 64) - @JsonProperty("permntInKeralaAdrDistrict") - private String permntInKeralaAdrDistrict; - - @Size(max = 64) - @JsonProperty("permntOutsideKeralaCityVilgeEn") - private String permntOutsideKeralaCityVilgeEn; - - @Size(max = 64) - @JsonProperty("permntInKeralaAdrTaluk") - private String permntInKeralaAdrTaluk; - - @Size(max = 64) - @JsonProperty("permntInKeralaAdrVillage") - private String permntInKeralaAdrVillage; - - @Size(max = 1000) - @JsonProperty("permntInKeralaAdrLocalityNameEn") - private String permntInKeralaAdrLocalityNameEn; - - @Size(max = 2000) - @JsonProperty("permntInKeralaAdrStreetNameEn") - private String permntInKeralaAdrStreetNameEn; - - @Size(max = 2500) - @JsonProperty("permntInKeralaAdrHouseNameEn") - private String permntInKeralaAdrHouseNameEn; - @Size(max = 2500) - @JsonProperty("permntInKeralaAdrLocalityNameMl") - private String permntInKeralaAdrLocalityNameMl; - - @Size(max = 2500) - @JsonProperty("permntInKeralaAdrStreetNameMl") - private String permntInKeralaAdrStreetNameMl; - - @Size(max = 2500) - @JsonProperty("permntInKeralaAdrHouseNameMl") - private String permntInKeralaAdrHouseNameMl; - - @Size(max = 64) - @JsonProperty("permntInKeralaAdrPincode") - private String permntInKeralaAdrPincode; - - @Size(max = 64) - @JsonProperty("permntInKeralaAdrPostOffice") - private String permntInKeralaAdrPostOffice; - - @Size(max = 64) - @JsonProperty("permntInKeralaWardNo") - private String permntInKeralaWardNo; - - @Size(max = 64) - @JsonProperty("permntOutsideKeralaDistrict") - private String permntOutsideKeralaDistrict; - - @Size(max = 1000) - @JsonProperty("permntOutsideKeralaTaluk") - private String permntOutsideKeralaTaluk; - - @Size(max = 1000) - @JsonProperty("permntOutsideKeralaVillage") - private String permntOutsideKeralaVillage; - - @Size(max = 64) - @JsonProperty("permntOutsideKeralaPincode") - private String permntOutsideKeralaPincode; - - @Size(max = 1000) - @JsonProperty("permntOutsideKeralaLocalityNameEn") - private String permntOutsideKeralaLocalityNameEn; - - @Size(max = 2000) - @JsonProperty("permntOutsideKeralaStreetNameEn") - private String permntOutsideKeralaStreetNameEn; - - @Size(max = 2500) - @JsonProperty("permntOutsideKeralaHouseNameEn") - private String permntOutsideKeralaHouseNameEn; - - @Size(max = 1000) - @JsonProperty("permntOutsideKeralaLocalityNameMl") - private String permntOutsideKeralaLocalityNameMl; - - @Size(max = 2000) - @JsonProperty("permntOutsideKeralaStreetNameMl") - private String permntOutsideKeralaStreetNameMl; - - @Size(max = 2500) - @JsonProperty("permntOutsideKeralaHouseNameMl") - private String permntOutsideKeralaHouseNameMl; - - @Size(max = 64) - @JsonProperty("permntOutsideKeralaPostOfficeEn") - private String permntOutsideKeralaPostOfficeEn; - - @Size(max = 64) - @JsonProperty("permntOutsideKeralaPostOfficeMl") - private String permntOutsideKeralaPostOfficeMl; - - @Size(max = 2500) - @JsonProperty("permntOutsideIndiaLineoneEn") - private String permntOutsideIndiaLineoneEn; - - @Size(max = 2500) - @JsonProperty("permntOutsideIndiaLineoneMl") - private String permntOutsideIndiaLineoneMl; - - @Size(max = 2500) - @JsonProperty("permntOutsideIndiaLinetwoEn") - private String permntOutsideIndiaLinetwoEn; - - @Size(max = 2500) - @JsonProperty("permntOutsideIndiaLinetwoMl") - private String permntOutsideIndiaLinetwoMl; - - @Size(max = 2500) - @JsonProperty("permntOutsideIndiaprovinceEn") - private String permntOutsideIndiaprovinceEn; - - @Size(max = 1000) - @JsonProperty("permntOutsideIndiaVillage") - private String permntOutsideIndiaVillage; - - @Size(max = 64) - @JsonProperty("permntOutsideIndiaCityTown") - private String permntOutsideIndiaCityTown; - - @Size(max = 10) - @JsonProperty("permanentOutsideIndiaPostCode") - private String permanentOutsideIndiaPostCode; - - @Size(max = 64) - @JsonProperty("permntOutsideIndiaCountry") - private String permntOutsideIndiaCountry; - - - ////Db Fields////// - - @Size(max = 64) - @JsonProperty("permanentUuid") - private String permanentUuid; - @Size(max = 64) - @JsonProperty("countryIdPermanent") - private String countryIdPermanent; - - @Size(max = 64) - @JsonProperty("stateIdPermanent") - private String stateIdPermanent; - - @Size(max = 64) - @JsonProperty("districtIdPermanent") - private String districtIdPermanent; - - @Size(max = 64) - @JsonProperty("pinNoPermanent") - private String pinNoPermanent; - - @Size(max = 1000) - @JsonProperty("localityEnPermanent") - private String localityEnPermanent; - - @Size(max = 1000) - @JsonProperty("localityMlPermanent") - private String localityMlPermanent; - - @Size(max = 1000) - @JsonProperty("streetNameEnPermanent") - private String streetNameEnPermanent; - - @Size(max = 1000) - @JsonProperty("streetNameMlPermanent") - private String streetNameMlPermanent; - - @Size(max = 1000) - @JsonProperty("houseNameNoEnPermanent") - private String houseNameNoEnPermanent; - - @Size(max = 1000) - @JsonProperty("houseNameNoMlPermanent") - private String houseNameNoMlPermanent; - - @Size(max = 1000) - @JsonProperty("villageNamePermanent") - private String villageNamePermanent; - - @Size(max = 1000) - @JsonProperty("villageIdPermanent") - private String villageIdPermanent; - - @Size(max = 10) - @JsonProperty("poNoPermanent") - private String poNoPermanent; - - @Size(max = 64) - @JsonProperty("brideGroomPermanent") - private String brideGroomPermanent; - -} diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 67762ad07d8..b31a483b262 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql index 4f83bde58e7..2ee5fb22014 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql @@ -19,18 +19,18 @@ ALTER TABLE public.eg_marriage_present_address_details ALTER TABLE public.eg_marriage_present_address_details_audit ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN firstname_mal TO firstname_ml; -ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN middlename_mal TO middlename_ml; -ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN mothername_mal TO mothername_ml; -ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN guardianname_mal TO guardianname_ml; -ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN lastname_mal TO lastname_ml; -ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN fathername_mal TO fathername_ml; - - -ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN firstname_mal TO firstname_ml; -ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN middlename_mal TO middlename_ml; -ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN mothername_mal TO mothername_ml; -ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN guardianname_mal TO guardianname_ml; -ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN lastname_mal TO lastname_ml; -ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN fathername_mal TO fathername_ml; +-- +--ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN firstname_mal TO firstname_ml; +--ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN middlename_mal TO middlename_ml; +--ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN mothername_mal TO mothername_ml; +--ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN guardianname_mal TO guardianname_ml; +--ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN lastname_mal TO lastname_ml; +--ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN fathername_mal TO fathername_ml; +-- +-- +--ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN firstname_mal TO firstname_ml; +--ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN middlename_mal TO middlename_ml; +--ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN mothername_mal TO mothername_ml; +--ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN guardianname_mal TO guardianname_ml; +--ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN lastname_mal TO lastname_ml; +--ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN fathername_mal TO fathername_ml; From 9c78811c84ebdd0a2351ec0dbfb0bc65194a5a71 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 28 Mar 2023 13:24:49 +0530 Subject: [PATCH 053/420] marriage registry-rowmapper,migration,yml updation --- .../src/main/resources/marriage-registry.yml | 438 +++++++++++++++--- .../src/main/resources/marriage.yml | 16 +- .../model/BrideRegistryDetails.java | 4 +- .../model/GroomRegistryDetails.java | 4 +- .../rowmapper/BrideRegistryRowMapper.java | 4 +- .../rowmapper/GroomRegistryRowMapper.java | 4 +- 6 files changed, 387 insertions(+), 83 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index c6a9afb1b3f..312d04e6b47 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -32,15 +32,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriagePlacenameEn - - jsonPath: $.MarriageDetails.*.marriagePlacenameMal + - jsonPath: $.MarriageDetails.*.marriagePlacenameMl - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl - jsonPath: $.MarriageDetails.*.marriageStreetEn - - jsonPath: $.MarriageDetails.*.marriageStreetMal + - jsonPath: $.MarriageDetails.*.marriageStreetMl - jsonPath: $.MarriageDetails.*.marriageWardCode @@ -56,7 +56,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageLocalityEn - - jsonPath: $.MarriageDetails.*.marriageLocalityMal + - jsonPath: $.MarriageDetails.*.marriageLocalityMl # - jsonPath: $.MarriageDetails.*.applicationType @@ -74,30 +74,28 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.status - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy - query: INSERT INTO public.eg_register_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, - mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, + mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, no_of_spouse_living,is_spouse_living, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES (? ,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideId - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip - - jsonPath: $.MarriageDetails.*.BrideDetails.brideAdharNo + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAadharNo - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo @@ -105,15 +103,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMl - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMl - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMl - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile @@ -129,52 +127,54 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMl - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMl - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAdharNo + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAadharNo - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAdharNo + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAadharNo - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMl - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGardianAdhar + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardianAadharNo - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + - jsonPath: $.MarriageDetails.*.BrideDetails.brideSpouseLiving + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy - query: INSERT INTO public.eg_register_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, - mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, + mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, no_of_spouse_living,is_spouse_living, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomId - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip - - jsonPath: $.MarriageDetails.*.GroomDetails.groomAdharNo + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAadharNo - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo @@ -182,15 +182,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMl - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMl - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMl - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile @@ -206,72 +206,74 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMl - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMl - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAdharNo + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAadharNo - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAdharNo + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAadharNo - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMl - - jsonPath: $.MarriageDetails.*.GroomDetails.groomGardianAdhar + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardianAadharNo - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse + - jsonPath: $.MarriageDetails.*.GroomDetails.groomSpouseLiving + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy - query: INSERT INTO public.eg_register_marriage_witness_details( - id, aadharno, name_en, name_ml, age, address_en, mobile, is_esigned, marriageid, createdtime, createdby, + id, aadharno, name_en, name_ml, age, address_en,address_ml, mobile, is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, serial_no) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?); basePath: MarriageDetails.*.WitnessDetails jsonMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId1 - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AadharNo - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameEn - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Age - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn - # - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddressMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddressMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1ISEsigned + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Esigned - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 @@ -283,33 +285,349 @@ serviceMaps: jsonMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId2 - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AadharNo - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameEn - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Age - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddresSEn - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Mobile - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2ISEsigned + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Esigned - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 + +# serviceMaps: +# serviceName: marriage-services +# mappings: +# - version: 1.0 +# description: Persists save marriage details in marriage table +# fromTopic: save-marriage-registry-topic +# isTransaction: true +# queryMaps: +# - query: INSERT INTO public.eg_register_marriage_details( +# id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, housenameno_en, +# housenameno_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, +# locality_ml, applicationnumber, registrationno, registration_date, registration_status, createdtime, createdby, +# lastmodifiedtime, lastmodifiedby) +# VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id + +# - jsonPath: $.MarriageDetails.*.marriageDOM + +# - jsonPath: $.MarriageDetails.*.marriageDOR + +# - jsonPath: $.MarriageDetails.*.marriageDistrictid + +# - jsonPath: $.MarriageDetails.*.marriageLBtype + +# - jsonPath: $.MarriageDetails.*.marriageTenantid + +# - jsonPath: $.MarriageDetails.*.marriagePlacetype + +# - jsonPath: $.MarriageDetails.*.placeid + +# - jsonPath: $.MarriageDetails.*.marriagePlacenameEn + +# - jsonPath: $.MarriageDetails.*.marriagePlacenameMal + +# - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + +# - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + +# - jsonPath: $.MarriageDetails.*.marriageStreetEn + +# - jsonPath: $.MarriageDetails.*.marriageStreetMal + +# - jsonPath: $.MarriageDetails.*.marriageWardCode + +# - jsonPath: $.MarriageDetails.*.marriageTalukID + +# - jsonPath: $.MarriageDetails.*.marriageVillageName + +# - jsonPath: $.MarriageDetails.*.marriageType + +# - jsonPath: $.MarriageDetails.*.othMarriageType + +# - jsonPath: $.MarriageDetails.*.marriageLandmark + +# - jsonPath: $.MarriageDetails.*.marriageLocalityEn + +# - jsonPath: $.MarriageDetails.*.marriageLocalityMal + +# # - jsonPath: $.MarriageDetails.*.applicationType + +# # - jsonPath: $.MarriageDetails.*.businessService + +# # - jsonPath: $.MarriageDetails.*.workflowCode + +# - jsonPath: $.MarriageDetails.*.applicationnumber + +# - jsonPath: $.MarriageDetails.*.registrationno + +# - jsonPath: $.MarriageDetails.*.registration_date + +# # - jsonPath: $.MarriageDetails.*.action + +# - jsonPath: $.MarriageDetails.*.status + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + + + +# - query: INSERT INTO public.eg_register_marriage_bride_groom_details( +# id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, +# mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, +# mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, +# createdby, lastmodifiedtime, lastmodifiedby) +# VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); +# basePath: MarriageDetails.*.BrideDetails +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideId + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideAdharNo + +# - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMal + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMal + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMal + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMal + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMal + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAdharNo + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAdharNo + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMal + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGardianAdhar + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + +# - jsonPath: $.MarriageDetails.*.id + +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + +# - query: INSERT INTO public.eg_register_marriage_bride_groom_details( +# id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, +# mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, +# mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, +# createdby, lastmodifiedtime, lastmodifiedby) +# VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); +# basePath: MarriageDetails.*.GroomDetails +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomId + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomAdharNo + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMal + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMal + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMal + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMal + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMal + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAdharNo + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAdharNo + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMal + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGardianAdhar + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID + +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse + +# - jsonPath: $.MarriageDetails.*.id + +# - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + +# - query: INSERT INTO public.eg_register_marriage_witness_details( +# id, aadharno, name_en, name_ml, age, address_en, mobile, is_esigned, marriageid, createdtime, createdby, +# lastmodifiedtime, lastmodifiedby, serial_no) +# VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); +# basePath: MarriageDetails.*.WitnessDetails +# jsonMaps: + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId1 + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AdharNo + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameEn + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMal + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Age + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn + +# # - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddressMal + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1ISEsigned + +# - jsonPath: $.MarriageDetails.*.id + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 + +# - query: INSERT INTO public.eg_register_marriage_witness_details( +# id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, +# lastmodifiedtime, lastmodifiedby, serial_no) +# VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); +# basePath: MarriageDetails.*.WitnessDetails +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId2 + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AdharNo + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameEn + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMal + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Age + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddresSEn + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMal + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Mobile + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2ISEsigned + +# - jsonPath: $.MarriageDetails.*.id + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + +# - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 + + + diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 69d15f2eec9..a173db9b9fd 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -86,17 +86,10 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_bride_groom_details( -<<<<<<< HEAD - id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, - mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_aadharno, - mother_aadharno, guardianname_en, guardianname_mal, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, - createdby, lastmodifiedtime, lastmodifiedby) -======= id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_adharno, mother_adharno, guardianname_en, guardianname_ml, guardian_adhar, maritalstatusid, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) ->>>>>>> 52c781b876 (CREATE) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideDetails jsonMaps: @@ -170,18 +163,11 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_bride_groom_details( -<<<<<<< HEAD - id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_mal, middlename_en, middlename_mal, lastname_en, lastname_mal, - mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_mal, mothername_en, mothername_mal, father_aadharno, - mother_aadharno, guardianname_en, guardianname_mal, guardian_aadharno, maritalstatusid, no_of_spouse_living, marriageid, bride_groom, createdtime, - createdby, lastmodifiedtime, lastmodifiedby) -======= id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_adharno, mother_adharno, guardianname_en, guardianname_ml, guardian_adhar, maritalstatusid, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) ->>>>>>> 52c781b876 (CREATE) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES (?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomId diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java index b08daa0f419..c7a444299fc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java @@ -140,12 +140,12 @@ public class BrideRegistryDetails { @JsonProperty("brideMaritalstatusID") private String maritalstatusid; - @JsonProperty("brideSpouseLiving") + @JsonProperty("brideIsSpouseLiving") private Boolean brideIsSpouseLiving; @JsonProperty("brideNoOfSpouse") - private Integer bridelivingSpouseNo; + private Integer brideNoOfSpouse; @Size(max = 150) @JsonProperty("bridePhotoUrl") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java index c80762c793a..5c53453557e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java @@ -140,11 +140,11 @@ public class GroomRegistryDetails { @JsonProperty("groomMaritalstatusID") private String maritalstatusid; - @JsonProperty("groomSpouseLiving") + @JsonProperty("groomIsSpouseLiving") private Boolean groomIsSpouseLiving; @JsonProperty("groomNoOfSpouse") - private Integer groomlivingSpouseNo; + private Integer groomNoOfSpouse; @Size(max = 150) @JsonProperty("groomPhotoUrl") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index 6bb9146cbf4..01f6160e219 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -41,8 +41,8 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ .guardianname_ml(rs.getString("BD_guardianname_ml")) .guardian_aadharno(rs.getString("BD_guardian_aadharno")) .maritalstatusid(rs.getString("BD_maritalstatusid")) - .brideIsSpouseLiving(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) - .bridelivingSpouseNo(Integer.valueOf(rs.getString("BD_livingspouseNo"))) + // .brideIsSpouseLiving(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) + .brideNoOfSpouse(Integer.valueOf(rs.getString("BD_livingspouseNo"))) //.photo_url(rs.getString("BD_photo_url")) // .marriageid(rs.getString("BD_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index 30b00f56ec8..ffe9482bf97 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -39,8 +39,8 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ // .profession_en(rs.getString("GD_profession_en")) //.profession_ml(rs.getString("GD_profession_ml")) .maritalstatusid(rs.getString("GD_maritalstatusid")) - .groomIsSpouseLiving(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) - .groomlivingSpouseNo(Integer.valueOf(rs.getString("GD_livingspouseNo"))) + // .groomIsSpouseLiving(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) + .groomNoOfSpouse(Integer.valueOf(rs.getString("GD_livingspouseNo"))) // .marriageid(rs.getString("GD_marriageid")) // .photo_url(rs.getString("GD_photo_url")) From 3715ba8b29ec35465515ecd9c8f5c970cce81b40 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 28 Mar 2023 13:31:38 +0530 Subject: [PATCH 054/420] CREATE --- .../src/main/resources/application.properties | 4 +- .../src/main/resources/marriage.yml | 106 +++++------ .../enrichment/MarriageDetailsEnrichment.java | 16 +- .../model/MarriageApplicationDetails.java | 26 +-- .../model/marriage/BrideDetails.java | 46 ++--- .../model/marriage/GroomDetails.java | 46 ++--- .../MarriageApplicationSearchCriteria.java | 115 +++++++++++- .../model/marriage/WitnessDetails.java | 88 ++++----- .../BaseMarriageQueryBuilder.java | 84 ++++++++- .../MarriageApplicationQueryBuilder.java | 176 +++++++++++++----- .../rowmapper/BrideDetailsRowMapper.java | 61 +++--- .../rowmapper/GroomDetailsRowMapper.java | 68 +++---- .../MarriageApplicationRowMapper.java | 75 +++----- .../rowmapper/WitnessDetailsRowMapper.java | 29 ++- 14 files changed, 589 insertions(+), 351 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 75e178d880a..0e4944fa684 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,5 +1,5 @@ spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres spring.datasource.password=123 @@ -10,7 +10,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/marriage +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres spring.flyway.password=123 spring.flyway.table=public diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index a173db9b9fd..747d64585e5 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -32,15 +32,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriagePlacenameEn - - jsonPath: $.MarriageDetails.*.marriagePlacenameMal + - jsonPath: $.MarriageDetails.*.marriagePlacenameMl - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl - jsonPath: $.MarriageDetails.*.marriageStreetEn - - jsonPath: $.MarriageDetails.*.marriageStreetMal + - jsonPath: $.MarriageDetails.*.marriageStreetMl - jsonPath: $.MarriageDetails.*.marriageWardCode @@ -56,7 +56,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageLocalityEn - - jsonPath: $.MarriageDetails.*.marriageLocalityMal + - jsonPath: $.MarriageDetails.*.marriageLocalityMl - jsonPath: $.MarriageDetails.*.applicationType @@ -83,21 +83,19 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - - - query: INSERT INTO public.eg_marriage_bride_groom_details( - id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, - lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, - father_adharno, mother_adharno, guardianname_en, guardianname_ml, guardian_adhar, maritalstatusid, marriageid, bride_groom, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + - query: INSERT INTO public.eg_marriage_bride_groom_details( + id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, + mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, is_spouse_living, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideId - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip - - jsonPath: $.MarriageDetails.*.BrideDetails.brideAdharNo + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAadharNo - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo @@ -105,15 +103,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMl - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMl - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMl - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile @@ -129,24 +127,26 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMl - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMl - - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAdharNo + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAadharNo - - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAdharNo + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAadharNo - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMal + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMl - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGardianAdhar + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardianAadharNo - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID + - jsonPath: $.MarriageDetails.*.BrideDetails.brideIslivingSpouse + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom @@ -161,20 +161,19 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse - - - query: INSERT INTO public.eg_marriage_bride_groom_details( - id, residentship, adharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, - lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, - father_adharno, mother_adharno, guardianname_en, guardianname_ml, guardian_adhar, maritalstatusid, marriageid, bride_groom, createdtime, + - query: INSERT INTO public.eg_marriage_bride_groom_details( + id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, + mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, is_spouse_living, marriageid, bride_groom, createdtime, createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) - VALUES (?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomId - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip - - jsonPath: $.MarriageDetails.*.GroomDetails.groomAdharNo + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAadharNo - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo @@ -182,15 +181,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMl - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMl - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMl - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile @@ -206,24 +205,27 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMl - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMl - - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAdharNo + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAadharNo - - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAdharNo + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAadharNo - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn - - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMal + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMl - - jsonPath: $.MarriageDetails.*.GroomDetails.groomGardianAdhar + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardianAadharNo - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID + - jsonPath: $.MarriageDetails.*.BrideDetails.groomIsSpouseLiving + + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom @@ -240,7 +242,7 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_witness_details( - id, aadharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, + id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, serial_no) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetails @@ -248,21 +250,21 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId1 - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AadharNo - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameEn - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Age - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddressMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1ISEsigned + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Esigned - jsonPath: $.MarriageDetails.*.id @@ -277,28 +279,28 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 - query: INSERT INTO public.eg_marriage_witness_details( - id, aadharno, name_en, name_mal, age, address_en, address_mal, mobile, is_esigned, marriageid, createdtime, createdby, + id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, serial_no) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetails jsonMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId2 - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AdharNo + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AadharNo - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameEn - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Age - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddresSEn - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMal + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Mobile - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2ISEsigned + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Esigned - jsonPath: $.MarriageDetails.*.id @@ -651,15 +653,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriagePlacenameEn - - jsonPath: $.MarriageDetails.*.marriagePlacenameMal + - jsonPath: $.MarriageDetails.*.marriagePlacenameMl - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMal + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl - jsonPath: $.MarriageDetails.*.marriageStreetEn - - jsonPath: $.MarriageDetails.*.marriageStreetMal + - jsonPath: $.MarriageDetails.*.marriageStreetMl - jsonPath: $.MarriageDetails.*.marriageWardCode @@ -675,7 +677,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageLocalityEn - - jsonPath: $.MarriageDetails.*.marriageLocalityMal + - jsonPath: $.MarriageDetails.*.marriageLocalityMl - jsonPath: $.MarriageDetails.*.applicationType diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index d10f6506239..08e6c985405 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -39,12 +39,12 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.setAuditDetails(auditDetails); if(marriage.getBrideDetails()!=null){ marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); - marriage.getBrideDetails().setBrideGroom("BRIDE"); + marriage.getBrideDetails().setBrideGroom("B"); } if(marriage.getGroomDetails()!=null){ marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); - marriage.getGroomDetails().setBrideGroom("GROOM"); + marriage.getGroomDetails().setBrideGroom("G"); } @@ -60,12 +60,12 @@ public void enrichCreate(MarriageDetailsRequest request) { //// marriage.getPresent().setBrideGroom("BRIDE"); //// marriage.getPresent().setBrideGroom("GROOM"); // } - if(marriage.getWitness()!=null){ - marriage.getWitness().setWitnessId1(UUID.randomUUID().toString()); - marriage.getWitness().setWitnessId2(UUID.randomUUID().toString()); + if(marriage.getWitnessDetails()!=null){ + marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); + marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); - marriage.getWitness().setSerial_no1(1); - marriage.getWitness().setSerial_no2(2); + marriage.getWitnessDetails().setSerial_no1(1); + marriage.getWitnessDetails().setSerial_no2(2); } }); @@ -539,7 +539,7 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { List filecodes = getIds(requestInfo, tenantId, config.getMarriageApplNumberIdName(), - request.getMarriageDetails().get(0).getFunctionUID(), + request.getMarriageDetails().get(0).getModulecode(), "APPL", marriageDetails.size()); validateFileCodes(filecodes, marriageDetails.size()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index d9963c5ff9f..e7718b48e8d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -51,7 +51,7 @@ public class MarriageApplicationDetails { @JsonProperty("marriagePlacenameEn") private String placenameEn; @Size(max = 1000) - @JsonProperty("marriagePlacenameMal") + @JsonProperty("marriagePlacenameMl") private String placenameMl; @Size(max = 64) @@ -64,7 +64,7 @@ public class MarriageApplicationDetails { private String street_name_en; @Size(max = 1000) - @JsonProperty("marriageStreetMal") + @JsonProperty("marriageStreetMl") private String street_name_ml; @Size(max = 64) @@ -84,7 +84,7 @@ public class MarriageApplicationDetails { private String locality_en; @Size(max = 1000) - @JsonProperty("marriageLocalityMal") + @JsonProperty("marriageLocalityMl") private String locality_ml; @Size(max = 64) @@ -108,9 +108,9 @@ public class MarriageApplicationDetails { @JsonProperty("applicationType") private String applicationtype; - @Size(max = 64) - @JsonProperty("functionUID") - private String functionUID; + @JsonProperty("modulecode") + private String modulecode; + @NotNull @Size(max = 64) @JsonProperty("businessService") @@ -155,8 +155,8 @@ public class MarriageApplicationDetails { @JsonProperty("marriageHouseNoAndNameEn") private String marriageHouseNoAndNameEn; @Size(max = 2500) - @JsonProperty("marriageHouseNoAndNameMal") - private String marriageHouseNoAndNameMal; + @JsonProperty("marriageHouseNoAndNameMl") + private String marriageHouseNoAndNameMl; @Size(max = 1000) @JsonProperty("marriageReligiousInstitutionOther") @@ -170,8 +170,8 @@ public class MarriageApplicationDetails { @JsonProperty("marriagePublicOrPrivateNamePlaceEn") private String marriagePublicOrPrivateNamePlaceEn; @Size(max = 2500) - @JsonProperty("marriagePublicOrPrivateNamePlaceMal") - private String marriagePublicOrPrivateNamePlaceMal; + @JsonProperty("marriagePublicOrPrivateNamePlaceMl") + private String marriagePublicOrPrivateNamePlaceMl; @Size(max = 1000) @@ -182,8 +182,8 @@ public class MarriageApplicationDetails { @JsonProperty("marriageReligiousInstitutionOtherNameEn") private String marriageReligiousInstitutionOtherNameEn; @Size(max = 2500) - @JsonProperty("marriageReligiousInstitutionOtherNameMal") - private String marriageReligiousInstitutionOtherNameMal; + @JsonProperty("marriageReligiousInstitutionOtherNameMl") + private String marriageReligiousInstitutionOtherNameMl; @Size(max = 64) @JsonProperty("applicationNumber") @@ -205,7 +205,7 @@ public class MarriageApplicationDetails { // private PresentAddressDetails present ; @JsonProperty("WitnessDetails") - private WitnessDetails witness; + private WitnessDetails witnessDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index a3703274f7b..52f61847f27 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -33,8 +33,8 @@ public class BrideDetails { private String residentship; @Size(max = 15) - @JsonProperty("brideAdharNo") - private String adharno; + @JsonProperty("brideAadharNo") + private String aadharno; @Size(max = 1000) @JsonProperty("bridePassportNo") @@ -49,24 +49,24 @@ public class BrideDetails { private String firstname_en; @Size(max = 200) - @JsonProperty("brideFirstnameMal") - private String firstname_mal; + @JsonProperty("brideFirstnameMl") + private String firstname_ml; @Size(max = 200) @JsonProperty("brideMiddlenameEn") private String middlename_en; @Size(max = 200) - @JsonProperty("brideMiddlenameMal") - private String middlename_mal; + @JsonProperty("brideMiddlenameMl") + private String middlename_ml; @Size(max = 200) @JsonProperty("brideLastnameEn") private String lastname_en; @Size(max = 200) - @JsonProperty("brideLastnameMal") - private String lastname_mal; + @JsonProperty("brideLastnameMl") + private String lastname_ml; @Size(max = 150) @JsonProperty("brideMobile") @@ -95,36 +95,36 @@ public class BrideDetails { private String fathername_en; @Size(max = 200) - @JsonProperty("brideFathernameMal") - private String fathername_mal; + @JsonProperty("brideFathernameMl") + private String fathername_ml; @Size(max = 200) @JsonProperty("brideMothernameEn") private String mothername_en; @Size(max = 200) - @JsonProperty("brideMothernameMal") - private String mothername_mal; + @JsonProperty("brideMothernameMl") + private String mothername_ml; @Size(max = 15) - @JsonProperty("brideFatherAdharNo") - private String father_adharno; + @JsonProperty("brideFatherAadharNo") + private String father_aadharno; @Size(max = 15) - @JsonProperty("brideMotherAdharNo") - private String mother_adharno; + @JsonProperty("brideMotherAadharNo") + private String mother_aadharno; @Size(max = 200) @JsonProperty("brideGuardiannameEn") private String guardianname_en; @Size(max = 200) - @JsonProperty("brideGuardiannameMal") - private String guardianname_mal; + @JsonProperty("brideGuardiannameMl") + private String guardianname_ml; @Size(max = 15) - @JsonProperty("brideGardianAdhar") - private String guardian_adhar; + @JsonProperty("brideGuardianAadharNo") + private String guardian_aadharno; // @Size(max = 200) @@ -139,11 +139,11 @@ public class BrideDetails { @JsonProperty("brideMaritalstatusID") private String maritalstatusid; - @JsonProperty("bridelivingSpouse") - private boolean is_spouse_living; + @JsonProperty("brideIsSpouseLiving") + private boolean brideIsSpouseLiving; @JsonProperty("brideNoOfSpouse") - private Integer no_of_spouse_living; + private Integer brideNoOfSpouse; @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index 127b9be83cb..a4027f2ad34 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -29,8 +29,8 @@ public class GroomDetails { @JsonProperty("groomResidentShip") private String residentship; @Size(max = 15) - @JsonProperty("groomAdharNo") - private String adharno; + @JsonProperty("groomAadharNo") + private String aadharno; @Size(max = 1000) @JsonProperty("groomPassportNo") private String passportno; @@ -41,21 +41,21 @@ public class GroomDetails { @JsonProperty("groomFirstnameEn") private String firstname_en; @Size(max = 200) - @JsonProperty("groomFirstnameMal") - private String firstname_mal; + @JsonProperty("groomFirstnameMl") + private String firstname_ml; @Size(max = 200) @JsonProperty("groomMiddlenameEn") private String middlename_en; @Size(max = 200) - @JsonProperty("groomMiddlenameMal") - private String middlename_mal; + @JsonProperty("groomMiddlenameMl") + private String middlename_ml; @Size(max = 200) @JsonProperty("groomLastnameEn") private String lastname_en; @Size(max = 200) - @JsonProperty("groomLastnameMal") - private String lastname_mal; + @JsonProperty("groomLastnameMl") + private String lastname_ml; @Size(max = 150) @JsonProperty("groomMobile") private String mobile; @@ -77,30 +77,30 @@ public class GroomDetails { private String fathername_en; @Size(max = 200) - @JsonProperty("groomFathernameMal") - private String fathername_mal; + @JsonProperty("groomFathernameMl") + private String fathername_ml; @Size(max = 200) @JsonProperty("groomMothernameEn") private String mothername_en; @Size(max = 200) - @JsonProperty("groomMothernameMal") - private String mothername_mal; + @JsonProperty("groomMothernameMl") + private String mothername_ml; @Size(max = 15) - @JsonProperty("groomFatherAdharNo") - private String father_adharno; + @JsonProperty("groomFatherAadharNo") + private String father_aadharno; @Size(max = 15) - @JsonProperty("groomMotherAdharNo") - private String mother_adharno; + @JsonProperty("groomMotherAadharNo") + private String mother_aadharno; @Size(max = 200) @JsonProperty("groomGuardiannameEn") private String guardianname_en; @Size(max = 200) - @JsonProperty("groomGuardiannameMal") - private String guardianname_mal; + @JsonProperty("groomGuardiannameMl") + private String guardianname_ml; @Size(max = 15) - @JsonProperty("groomGardianAdhar") - private String guardian_adhar; + @JsonProperty("groomGuardianAadharNo") + private String guardian_aadharno; // @Size(max = 200) // @JsonProperty("groomProfessionEn") @@ -114,10 +114,10 @@ public class GroomDetails { @Size(max = 64) @JsonProperty("groomMaritalstatusID") private String maritalstatusid; - @JsonProperty("groomSpouseLiving") - private Boolean is_spouse_living; + @JsonProperty("groomIsSpouseLiving") + private Boolean groomIsSpouseLiving; @JsonProperty("groomNoOfSpouse") - private Integer no_of_spouse_living; + private Integer groomNoOfSpouse; @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java index 5e5a21cf704..f164d8b20d7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; import javax.validation.Valid; @@ -26,24 +27,126 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("registrationNo") private String registrationNo; - @JsonProperty("fileNo") - private String fileNo; + @JsonProperty("certificateNo") + private String certificateNo; + + + @JsonProperty("marriageDOM") + private Long marriageDOM; + + //Groom + @JsonProperty("groomFirstnameEn") + private String groomFirstnameEn; + + @JsonProperty("groomFirstnameMl") + private String groomFirstnameMl; + + @JsonProperty("groomMiddlenameEn") + private String groomMiddlenameEn; + + @JsonProperty("groomMiddlenameMl") + private String groomMiddlenameMl; + + @JsonProperty("groomLastnameEn") + private String groomLastnameEn; + + @JsonProperty("groomLastnameMl") + private String groomLastnameMl; + + @JsonProperty("groomAdharNo") + private String groomAdharNo; + + //BRIDE + @JsonProperty("brideAdharNo") + private String brideAdharNo; + + @JsonProperty("brideFirstnameEn") + private String brideFirstnameEn; + + @JsonProperty("brideFirstnameMl") + private String brideFirstnameMl; + + @JsonProperty("brideMiddlenameEn") + private String brideMiddlenameEn; + + @JsonProperty("brideMiddlenameMl") + private String brideMiddlenameMl; + + @JsonProperty("brideLastnameEn") + private String brideLastnameEn; + + @JsonProperty("brideLastnameMl") + private String brideLastnameMl; + @JsonProperty("sortBy") - private SortBy sortBy; + private MarriageRegistrySearchCriteria.SortBy sortBy; + public enum SortBy { applicationNumber, tenantId, registrationNo, - fileNo - + dateofmarriage } @JsonProperty("sortOrder") - private SortOrder sortOrder; + private MarriageRegistrySearchCriteria.SortOrder sortOrder; public enum SortOrder { ASC, DESC } + @Valid + private Integer offset; + + @Valid + private Integer limit; + + + + @JsonProperty("fromDate") + private Long fromDate; + + @JsonProperty("toDate") + private Long toDate; + + + public enum SourceEnum { + sms("sms"), + + email("email"), + + ivr("ivr"), + + mobileapp("mobileapp"), + + whatsapp("whatsapp"), + + csc("csc"), + + web("web"); + + private String value; + + SourceEnum(String value) { + this.value = value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static MarriageApplicationSearchCriteria.SourceEnum fromValue(String text) { + for (MarriageApplicationSearchCriteria.SourceEnum b : MarriageApplicationSearchCriteria.SourceEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + private SourceEnum source; + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index c095df5506b..c13550382a8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -18,48 +18,48 @@ public class WitnessDetails { @JsonProperty("witnessId1") private String witnessId1; - @NotNull - @Size(max = 64) - @JsonProperty("witnessId2") - private String witnessId2; + @NotNull + @Size(max = 64) + @JsonProperty("witnessId2") + private String witnessId2; - @Size(max = 64) - @JsonProperty("tenentId") - private String tenentId; + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; - @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; - @Size(max = 15) - @JsonProperty("witness1AdharNo") - private String adharno; + @Size(max = 15) + @JsonProperty("witness1AadharNo") + private String witness1AadharNo; - @Size(max = 200) - @JsonProperty("witness1NameEn") - private String name_en; + @Size(max = 200) + @JsonProperty("witness1NameEn") + private String witness1NameEn; - @Size(max = 200) - @JsonProperty("witness1NameMal") - private String name_mal; + @Size(max = 200) + @JsonProperty("witness1NameMl") + private String witness1NameMl; - @JsonProperty("witness1Age") - private Integer age; + @JsonProperty("witness1Age") + private Integer witness1Age; - @Size(max = 500) - @JsonProperty("witness1AddresSEn") - private String address_en; + @Size(max = 500) + @JsonProperty("witness1AddresSEn") + private String witness1AddresSEn; - @Size(max = 500) - @JsonProperty("witness1AddressMal") - private String address_mal; + @Size(max = 500) + @JsonProperty("witness1AddressMl") + private String witness1AddressMl; - @Size(max = 150) - @JsonProperty("witness1Mobile") - private String mobile; + @Size(max = 150) + @JsonProperty("witness1Mobile") + private Long witness1Mobile; - @JsonProperty("witness1ISEsigned") - private Boolean is_esigned; + @JsonProperty("witness1Esigned") + private Boolean witness1Esigned; @JsonProperty("serial_no1") private Integer serial_no1; @@ -68,16 +68,16 @@ public class WitnessDetails { private Integer serial_no2; @Size(max = 15) - @JsonProperty("witness2AdharNo") - private String witness2AdharNo; + @JsonProperty("witness2AadharNo") + private String witness2AadharNo; @Size(max = 200) @JsonProperty("witness2NameEn") private String witness2NameEn; @Size(max = 200) - @JsonProperty("witness2NameMal") - private String witness2NameMal; + @JsonProperty("witness2NameMl") + private String witness2NameMl; @JsonProperty("witness2Age") private Integer witness2Age; @@ -87,18 +87,18 @@ public class WitnessDetails { private String witness2AddresSEn; @Size(max = 200) - @JsonProperty("witness2AddressMal") - private String witness2AddressMal; + @JsonProperty("witness2AddressMl") + private String witness2AddressMl; @Size(max = 150) @JsonProperty("witness2Mobile") - private String witness2Mobile; + private Long witness2Mobile; + + @JsonProperty("witness2Esigned") + private Boolean witness2Esigned; - @JsonProperty("witness2ISEsigned") - private Boolean witness2ISEsigned; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; + @JsonProperty("AuditDetails") + private AuditDetails auditDetails; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java index 2bab44ba386..ab3be1fd6a8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java @@ -2,7 +2,9 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Collections; @@ -11,6 +13,10 @@ @Component public class BaseMarriageQueryBuilder { + + @Autowired + private MarriageApplicationConfiguration config; + void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, List paramValues) { @@ -57,7 +63,32 @@ void addFilter(String column, String value, StringBuilder query, List pa paramValues.add(value); } } + // void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, + // List paramValues) { + + // if (startDate != null || endDate != null) { + // addWhereClause(paramValues, query); + // query.append(" ("); + + // if (startDate != null) { + // query.append(column) + // .append(" >= ? "); + // paramValues.add(startDate); + // } + // if (endDate != null) { + // if (startDate != null) { + // query.append(" AND "); + // } + + // query.append(column) + // .append(" <= ? "); + // paramValues.add(endDate); + // } + + // query.append(") "); + // } + // } void addWhereClause(List values, StringBuilder query) { if (CollectionUtils.isEmpty(values)) { query.append(" WHERE "); @@ -71,7 +102,16 @@ private String getStatementParameters(int count) { .stream() .collect(Collectors.joining(", ")); } - void addOrderByColumns(String column, MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder orderBy){ + // void addOrderByColumns(String column, MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder orderBy){ + // addOrderClause(orderBy); + // if(!StringUtils.isEmpty(column)){ + // addOrderClause(orderBy); + // orderBy.append(column); + // addAscDesc(valueSort, orderBy); + // } + // } + + void addOrderByColumns(String column, String valueSort, StringBuilder orderBy){ addOrderClause(orderBy); if(!StringUtils.isEmpty(column)){ addOrderClause(orderBy); @@ -79,6 +119,25 @@ void addOrderByColumns(String column, MarriageApplicationSearchCriteria.SortOrde addAscDesc(valueSort, orderBy); } } + + void addLimitAndOffset(Integer offset, Integer limit, StringBuilder query, final List paramValues) { + // prepare Offset + if (offset == null) { + query.append(" OFFSET ? "); + paramValues.add(config.getDefaultOffset()); + } else { + query.append(" OFFSET ? "); + paramValues.add(offset); + } + // prepare limit + if (limit == null) { + query.append(" LIMIT ? "); + paramValues.add(config.getDefaultBndLimit()); + } else{ + query.append(" LIMIT ? "); + paramValues.add(limit); + } + } void addOrderClause(StringBuilder orderBy) { if (orderBy.length() == 0) { orderBy.append(" ORDER BY "); @@ -86,14 +145,29 @@ void addOrderClause(StringBuilder orderBy) { orderBy.append(" "); } } + void addOrderToQuery(StringBuilder orderBy, StringBuilder query){ + if (orderBy.length() > 0) { + String orderByStr = orderBy.toString().trim(); + orderByStr = orderByStr.substring(0, orderByStr.length() - 1); + query.append(orderByStr); + } + } - void addAscDesc(MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder query){ - if(valueSort == null) - query.append(" ASC, "); - else if(valueSort == MarriageApplicationSearchCriteria.SortOrder.ASC) + void addAscDesc(String valueSort, StringBuilder query){ + if(StringUtils.isEmpty(valueSort) || valueSort == null) + query.append("ASC, "); + else if(valueSort == "ASC") query.append(" ASC, "); else query.append(" DESC, "); } + // void addAscDesc(MarriageApplicationSearchCriteria.SortOrder valueSort, StringBuilder query){ + // if(valueSort == null) + // query.append(" ASC, "); + // else if(valueSort == MarriageApplicationSearchCriteria.SortOrder.ASC) + // query.append(" ASC, "); + // else + // query.append(" DESC, "); + // } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index d459a614186..9e8ac73c695 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -5,7 +5,6 @@ import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; import javax.validation.constraints.NotNull; import java.util.List; @@ -15,65 +14,142 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { CommonQueryBuilder commonQueryBuilder; private static final String QUERY = new StringBuilder() - .append("SELECT mrg.id as ma_id,mrg.dateofmarriage as ma_dateofmarriage,mrg.dateofreporting as ma_dateofreporting,mrg.districtid as ma_districtid,") - .append("mrg.lbtype as ma_lbtype,mrg.tenantid as ma_tenantid,mrg.placetype as ma_placetype,mrg.placeothers as ma_placeothers,mrg.placeid as ma_placeid,") - .append("mrg.placename_en as ma_placename_en,mrg.street_name_en as ma_street_name_en,mrg.street_name_ml as ma_street_name_ml,") - .append("mrg.placename_mal as ma_placename_mal,mrg.ward_code as ma_ward_code,mrg.talukid as ma_talukid,mrg.village_name as ma_village_name,mrg.marriage_type as ma_marriage_type,") - .append("mrg.oth_marriage_type as ma_oth_marriage_type,mrg.landmark as ma_landmark,mrg.locality_en as ma_locality_en,mrg.locality_ml as ma_locality_ml,mrg.othersspecify as ma_othersspecify,") - .append("mrg.applicationtype as ma_applicationtype,mrg.businessservice as ma_businessservice,mrg.workflowcode as ma_workflowcode,mrg.fileno as ma_fileno,") - .append("mrg.file_date as ma_file_date,mrg.file_status as ma_file_status,mrg.applicationnumber as ma_applicationnumber,mrg.registrationno as ma_registrationno,mrg.registration_date as ma_registration_date,") - .append("mrg.action as ma_action,mrg.status as ma_status,mrg.createdtime,mrg.createdby,mrg.lastmodifiedtime ,mrg.lastmodifiedby ,mrg.houseno_and_nameen as ma_houseno_and_nameen,") - .append("mrg.houseno_and_nameml as ma_houseno_and_nameml,mrg.religious_institution as ma_religious_institution,mrg.public_or_privateplace as ma_public_or_privateplace,mrg.public_or_privateplacennameplace_en as ma_public_or_privateplacennameplace_en,") - .append("mrg.public_or_privateplacennameplace_ml as ma_public_or_privateplacennameplace_ml,mrg.religious_institution_other as ma_religious_institution_other,") - .append("mrg.religious_institution_othername_en as ma_religious_institution_othername_en,mrg.religious_institution_othername_ml as ma_religious_institution_othername_ml").toString(); - - private static final String QUERYCONDITION = new StringBuilder() - .append(" FROM public.eg_marriage_details mrg LEFT JOIN eg_marriage_bride_details mbd ON mbd.marriageid = mrg.id") - .append(" LEFT JOIN eg_marriage_groom_details mrd ON mrd.marriageid = mrg.id") - .append(" LEFT JOIN eg_marriage_present_address_details mpress ON mpress.marriageid = mrg.id") - .append(" LEFT JOIN eg_marriage_permanent_address_details mper ON mper.marriageid = mrg.id") - .append(" LEFT JOIN eg_marriage_witness_details mwd ON mwd.marriageid = mrg.id") + .append(" SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") + .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") + .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.housenameno_en as MD_housenameno_en , MD.housenameno_ml as MD_housenameno_ml ,") + .append("MD.locality_en as MD_locality_en , MD.locality_ml as MD_locality_ml , MD.street_name_en as MD_street_name_en , MD.street_name_ml as MD_street_name_ml , ") + .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") + .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") + .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") + .append("MD.applicationnumber as MD_applicationnumber ,") + .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") + .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") + .append("GD.firstname_ml as GD_firstname_ml , GD.middlename_ml as GD_middlename_ml , GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,") + .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") + .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") + .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") + .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + + .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") + .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") + .append("BD.middlename_ml as BD_middlename_ml , BD.lastname_ml as BD_lastname_ml , BD.mobile as BD_mobile , BD.emailid as BD_emailid , ") + .append("BD.gender as BD_gender , BD.dateofbirth as BD_dateofbirth , BD.age as BD_age , BD.parent_guardian as BD_parent_guardian ,BD.fathername_en as BD_fathername_en ,") + .append("BD.mothername_en as BD_mothername_en, BD.fathername_ml as BD_fathername_ml , BD.mothername_ml as BD_mothername_ml , BD.father_aadharno as BD_father_aadharno ,") + .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") + .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.bride_groom as BD_bride_groom,") + + .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") + .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") + .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") + .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") + .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") + .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") + .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") + .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") + .append("GPMA.locality_en as GPMA_locality_en,GPMA.locality_ml as GPMA_locality_ml,GPMA.street_name_en as GPMA_street_name_en,GPMA.street_name_ml as GPMA_street_name_ml ,") + .append("GPMA.districtid as GPMA_districtid,GPMA.stateid as GPMA_stateid , GPMA.poid as GPMA_poid , GPMA.poname_en as GPMA_poname_en , GPMA.poname_ml as GPMA_poname_ml ,") + .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") + .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") + .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") + .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml ,") + + .append("BPMA.id as BPMA_id ,BPMA.housename_en as BPMA_housename_en ,BPMA.housename_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") + .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") + .append("BPMA.locality_en as BPMA_locality_en , BPMA.locality_ml as BPMA_locality_ml , BPMA.street_name_en as BPMA_street_name_en , BPMA.street_name_ml as BPMA_street_name_ml,") + .append("BPMA.districtid as BPMA_districtid , BPMA.stateid BPMA_stateid , BPMA.poid as BPMA_poid , BPMA.poname_en as BPMA_poname_en , BPMA.poname_ml as BPMA_poname_ml ,") + .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , ") + .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") + .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") + .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml ,") + + .append("GPSA.id as GPSA_id ,GPSA.housename_en as GPSA_housename_en,GPSA.housename_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") + .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") + .append("GPSA.locality_en as GPSA_locality_en,GPSA.locality_ml as GPSA_locality_ml , GPSA.street_name_en as GPSA_street_name_en , GPSA.street_name_ml as GPSA_street_name_ml , ") + .append("GPSA.districtid as GPSA_districtid , GPSA.stateid GPSA_stateid , GPSA.poid as GPSA_poid , GPSA.poname_en as GPSA_poname_en , GPSA.poname_ml as GPSA_poname_ml , ") + .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom , ") + .append("GPSA.ot_address1_en as GPSA_ot_address1_en,GPSA.ot_address1_ml as GPSA_ot_address1_ml , GPSA.ot_address2_en as GPSA_ot_address2_en , ") + .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") + .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml,") + + .append("BPSA.id as BPSA_id ,BPSA.housename_en as BPSA_housename_en,BPSA.housename_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") + .append("BPSA.talukid as BPSA_talukid , BPSA.taluk_name as BPSA_taluk_name , BPSA.tenantid as BPSA_tenantid , BPSA.ward_code as BPSA_ward_code ,") + .append("BPSA.locality_en as BPSA_locality_en , BPSA.locality_ml as BPSA_locality_ml ,") + .append("BPSA.street_name_en as BPSA_street_name_en , BPSA.street_name_ml as BPSA_street_name_ml , BPSA.districtid as BPSA_districtid , BPSA.stateid BPSA_stateid ,") + .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") + .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") + .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") + .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,") + + .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") + .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") + .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") + .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") + + .append("FROM public.eg_register_marriage_details as MD ") + .append("INNER JOIN eg_register_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") + .append("BD.bride_groom ='B' ") + .append("INNER JOIN eg_register_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") + .append("GD.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("BPMA.bride_groom ='B' ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("GPMA.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("BPSA.bride_groom ='B' ") + .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("GPSA.bride_groom ='G' ") + .append("INNER JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("WD1.serial_no = 1 ") + .append("INNER JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("WD2.serial_no = 2 ") .toString(); + public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteria criteria, + @NotNull List preparedStmtValues, Boolean isCount) { - public String getMarriageApplicationSearchQuery(@NotNull MarriageApplicationSearchCriteria criteria, - @NotNull List preparedStmtValues, Boolean isCount) { StringBuilder query = new StringBuilder(QUERY); - query.append(",").append(commonQueryBuilder.getQueryBrideDetails()) - .append(",") - .append(commonQueryBuilder.getGroomDetails()) - .append(",") - .append(commonQueryBuilder.getPresentAddressDetails()) - .append(",") - .append(commonQueryBuilder.getPermanentAddressDetails()) - .append(",") - .append(commonQueryBuilder.getWitnessDetails()) - - .append(QUERYCONDITION).toString(); - StringBuilder orderBy = new StringBuilder(); + addFilter("MD_id", criteria.getId(), query, preparedStmtValues); + addFilter("MD_tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("MD_applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); + addFilter("BD_aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); + addFilter("BD_firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); + addFilter("BD_lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); + addFilter("GD_aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); + addFilter("GD_firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + addFilter("GD_middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); + addFilter("GD_lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); + // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); + addDateRangeFilter("MD_dateofmarriage", + criteria.getFromDate(), + criteria.getToDate(), + query, + preparedStmtValues); + + // if(criteria.getSortOrder() == null){ + // criteria.setSortOrder(MarriageRegistrySearchCriteria.SortOrder.ASC); + // } + // if (StringUtils.isEmpty(criteria.getSortBy())) + // addOrderByColumns("MD_createdtime","ASC", orderBy); + // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.dateofmarriage) + // addOrderByColumns("MD_dateofmarriage",criteria.getSortOrder().toString(), orderBy); + // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.applicationNumber) + // addOrderByColumns("MD_applicationnumber",criteria.getSortOrder().toString(),orderBy); + // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.tenantId) + // addOrderByColumns("MD_tenantid",criteria.getSortOrder().toString(), orderBy); + // addOrderToQuery(orderBy, query); + // //addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); - addFilter("mrg.id", criteria.getId(), query, preparedStmtValues); - addFilter("mrg.tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("mrg.applicationno", criteria.getApplicationNo(), query, preparedStmtValues); - addFilter("mrg.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); - addFilter("mrg.fileno", criteria.getFileNo(),query,preparedStmtValues); - - - if (StringUtils.isEmpty(criteria.getSortBy())) - addOrderByColumns("mrg.createdtime",null, orderBy); - else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenantId) - addOrderByColumns("mrg.tenantid",criteria.getSortOrder(), orderBy); - else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.applicationNumber) - addOrderByColumns("mrg.applicationno",criteria.getSortOrder(),orderBy); - else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.registrationNo) - addOrderByColumns("mrg.registrationno",criteria.getSortOrder(),orderBy); - else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.fileNo) - addOrderByColumns("mrg.fileno",criteria.getSortOrder(),orderBy); return query.toString(); + } + public String getNextIDQuery() { StringBuilder query = new StringBuilder("select fn_next_id(?,?,?)"); return query.toString(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index c41190a8ac3..9f442c13b0c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -9,39 +9,34 @@ public interface BrideDetailsRowMapper { default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ return BrideDetails.builder() - //.id(rs.getString("bd_id")) - .residentship(rs.getString("bd_residentship")) - .adharno(rs.getString("bd_adharno")) - .passportno(rs.getString("bd_passportno")) - .socialsecurityno(rs.getString("bd_socialsecurityno")) - .firstname_en(rs.getString("bd_firstname_en")) - .firstname_mal(rs.getString("bd_firstname_mal")) - .middlename_en(rs.getString("bd_middlename_en")) - .middlename_mal(rs.getString("bd_middlename_mal")) - .lastname_en(rs.getString("bd_lastname_en")) - .lastname_mal(rs.getString("bd_lastname_mal")) - .mobile(rs.getString("bd_mobile")) - .emailid(rs.getString("bd_emailid")) - .gender(rs.getString("bd_gender")) - .dateofbirth(rs.getLong("bd_dateofbirth")) - .age(rs.getInt("bd_age")) - .parent_guardian(rs.getString("bd_parent_guardian")) - .fathername_en(rs.getString("bd_fathername_en")) - .fathername_mal(rs.getString("bd_fathername_mal")) - .mothername_en(rs.getString("bd_mothername_en")) - .mothername_mal(rs.getString("bd_mothername_mal")) - .father_adharno(rs.getString("bd_father_adharno")) - .mother_adharno(rs.getString("bd_mother_adharno")) - .guardianname_en(rs.getString("bd_guardianname_en")) - .guardianname_mal(rs.getString("bd_guardianname_mal")) - .guardian_adhar(rs.getString("bd_guardian_adhar")) - // .profession_en(rs.getString("bd_profession_en")) - // .profession_mal(rs.getString("bd_profession_mal")) - .maritalstatusid(rs.getString("bd_maritalstatusid")) - .is_spouse_living(Boolean.valueOf(rs.getString("bd_is_spouse_living"))) - .no_of_spouse_living(Integer.valueOf(rs.getString("bd_no_of_spouse_living"))) - // .photo_url(rs.getString("bd_photo_url")) - .marriageid(rs.getString("bd_marriageid")) + .residentship(rs.getString("BD_residentship")) + .aadharno(rs.getString("BD_aadharno")) + .passportno(rs.getString("BD_passportno")) + .socialsecurityno(rs.getString("BD_socialsecurityno")) + .firstname_en(rs.getString("BD_firstname_en")) + .firstname_ml(rs.getString("BD_firstname_ml")) + .middlename_en(rs.getString("BD_middlename_en")) + .middlename_ml(rs.getString("BD_middlename_ml")) + .lastname_en(rs.getString("BD_lastname_en")) + .lastname_ml(rs.getString("BD_lastname_ml")) + .mobile(rs.getString("BD_mobile")) + .emailid(rs.getString("BD_emailid")) + .gender(rs.getString("BD_gender")) + .dateofbirth(rs.getLong("BD_dateofbirth")) + .age(rs.getInt("BD_age")) + .parent_guardian(rs.getString("BD_parent_guardian")) + .fathername_en(rs.getString("BD_fathername_en")) + .fathername_ml(rs.getString("BD_fathername_ml")) + .mothername_en(rs.getString("BD_mothername_en")) + .mothername_ml(rs.getString("BD_mothername_ml")) + .father_aadharno(rs.getString("BD_father_aadharno")) + .mother_aadharno(rs.getString("BD_mother_aadharno")) + .guardianname_en(rs.getString("BD_guardianname_en")) + .guardianname_ml(rs.getString("BD_guardianname_ml")) + .guardian_aadharno(rs.getString("BD_guardian_aadharno")) + .maritalstatusid(rs.getString("BD_maritalstatusid")) + //.brideIsSpouseLiving(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) + .brideNoOfSpouse(Integer.valueOf(rs.getString("BD_livingspouseNo"))) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 4f496ee6ea0..9c10798a50c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -6,42 +6,42 @@ import java.sql.SQLException; public interface GroomDetailsRowMapper { - default GroomDetails getgroomDetails (ResultSet rs) throws SQLException{ + default GroomDetails getGroomDetails (ResultSet rs) throws SQLException{ return GroomDetails.builder() - // .id(rs.getString("gd_id")) - .residentship(rs.getString("gd_residentship")) - .adharno(rs.getString("gd_adharno")) - .passportno(rs.getString("gd_passportno")) - .socialsecurityno(rs.getString("gd_socialsecurityno")) - .fathername_en(rs.getString("gd_firstname_en")) - .fathername_mal(rs.getString("gd_firstname_mal")) - .middlename_en(rs.getString("gd_middlename_en")) - .middlename_mal(rs.getString("gd_middlename_mal")) - .lastname_en(rs.getString("gd_lastname_en")) - .lastname_mal(rs.getString("gd_lastname_mal")) - .mobile(rs.getString("gd_mobile")) - .emailid(rs.getString("gd_emailid")) - .gender(rs.getString("gd_gender")) - .dateofbirth(rs.getLong("gd_dateofbirth")) - .age(rs.getInt("gd_age")) - .parent_guardian(rs.getString("gd_parent_guardian")) - .fathername_en(rs.getString("gd_fathername_en")) - .fathername_mal(rs.getString("gd_fathername_mal")) - .mothername_en(rs.getString("gd_mothername_en")) - .mothername_mal(rs.getString("gd_mothername_mal")) - .father_adharno(rs.getString("gd_father_adharno")) - .mother_adharno(rs.getString("gd_mother_adharno")) - .guardianname_en(rs.getString("gd_guardianname_en")) - .guardianname_mal(rs.getString("gd_guardianname_mal")) - .guardian_adhar(rs.getString("gd_guardian_adhar")) - // .profession_en(rs.getString("gd_profession_en")) - //.profession_mal(rs.getString("gd_profession_mal")) - .maritalstatusid(rs.getString("gd_maritalstatusid")) - .is_spouse_living(Boolean.valueOf(rs.getString("gd_is_spouse_living"))) - .no_of_spouse_living(Integer.valueOf(rs.getString("gd_no_of_spouse_living"))) - .marriageid(rs.getString("gd_marriageid")) - //.photo_url(rs.getString("gd_photo_url")) + .groomId(rs.getString("GD_id")) + .residentship(rs.getString("GD_residentship")) + .aadharno(rs.getString("GD_aadharno")) + .passportno(rs.getString("GD_passportno")) + .socialsecurityno(rs.getString("GD_socialsecurityno")) + .fathername_en(rs.getString("GD_firstname_en")) + .fathername_ml(rs.getString("GD_firstname_ml")) + .middlename_en(rs.getString("GD_middlename_en")) + .middlename_ml(rs.getString("GD_middlename_ml")) + .lastname_en(rs.getString("GD_lastname_en")) + .lastname_ml(rs.getString("GD_lastname_ml")) + .mobile(rs.getString("GD_mobile")) + .emailid(rs.getString("GD_emailid")) + .gender(rs.getString("GD_gender")) + .dateofbirth(rs.getLong("GD_dateofbirth")) + .age(rs.getInt("GD_age")) + .parent_guardian(rs.getString("GD_parent_guardian")) + .fathername_en(rs.getString("GD_fathername_en")) + .fathername_ml(rs.getString("GD_fathername_ml")) + .mothername_en(rs.getString("GD_mothername_en")) + .mothername_ml(rs.getString("GD_mothername_ml")) + .father_aadharno(rs.getString("GD_father_aadharno")) + .mother_aadharno(rs.getString("GD_mother_aadharno")) + .guardianname_en(rs.getString("GD_guardianname_en")) + .guardianname_ml(rs.getString("GD_guardianname_ml")) + .guardian_aadharno(rs.getString("GD_guardian_aadharno")) + // .profession_en(rs.getString("GD_profession_en")) + //.profession_ml(rs.getString("GD_profession_ml")) + .maritalstatusid(rs.getString("GD_maritalstatusid")) + //.groomIsSpouseLiving(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) + .groomNoOfSpouse(Integer.valueOf(rs.getString("GD_livingspouseNo"))) + // .marriageid(rs.getString("GD_marriageid")) + // .photo_url(rs.getString("GD_photo_url")) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 9399e57111f..9534293f9ba 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -17,54 +17,33 @@ public List extractData(ResultSet rs) throws SQLExce List result = new ArrayList<>(); while (rs.next()) { result.add(MarriageApplicationDetails.builder() - .id(rs.getString("ma_id")) - .dateofreporting(rs.getLong("ma_dateofreporting")) - .dateofmarriage(rs.getLong("ma_dateofmarriage")) - .districtid(rs.getString("ma_districtid")) - .lbtype(rs.getString("ma_lbtype")) - .tenantid(rs.getString("ma_tenantid")) - .placetype(rs.getString("ma_placetype")) - // .placeothers(rs.getString("ma_placeothers")) - .placeid(rs.getString("ma_placeid")) - .placenameEn(rs.getString("ma_placename_en")) - .placenameMl(rs.getString("ma_placename_mal")) - .street_name_en(rs.getString("ma_street_name_en")) - .street_name_ml(rs.getString("ma_street_name_ml")) - .ward_code(rs.getString("ma_ward_code")) - .talukid(rs.getString("ma_talukid")) - .village_name(rs.getString("ma_village_name")) - .marriage_type(rs.getString("ma_marriage_type")) - .oth_marriage_type(rs.getString("ma_oth_marriage_type")) - .landmark(rs.getString("ma_landmark")) - .locality_en(rs.getString("ma_locality_en")) - .locality_ml(rs.getString("ma_locality_ml")) - // .othersspecify(rs.getString("ma_othersspecify")) - .applicationtype(rs.getString("ma_applicationtype")) - .businessservice(rs.getString("ma_businessservice")) - .workflowcode(rs.getString("ma_workflowcode")) - //.fileno(rs.getString("ma_fileno")) - //.file_date(rs.getLong("ma_file_date")) - // .file_status(rs.getString("ma_file_status")) - //.applicationnumber(rs.getString("ma_applicationnumber")) - .registrationDate(rs.getLong("ma_registration_date")) - .registrationno(rs.getString("ma_registrationno")) - .action(rs.getString("ma_action")) - .status(rs.getString("ma_status")) - .marriageHouseNoAndNameEn(rs.getString("ma_houseno_and_nameen")) - .marriageHouseNoAndNameMal(rs.getString("ma_houseno_and_nameml")) - .marriageReligiousInstitution(rs.getString("ma_religious_institution")) - .marriagePublicOrPrivateNamePlaceEn(rs.getString("ma_public_or_privateplacennameplace_en")) - .marriagePublicOrPrivateNamePlaceMal(rs.getString("ma_public_or_privateplacennameplace_ml")) - .marriagePublicOrPrivatePlace(rs.getString("ma_public_or_privateplace")) - .marriageReligiousInstitutionOther(rs.getString("ma_religious_institution_other")) - .marriageReligiousInstitutionOtherNameEn(rs.getString("ma_religious_institution_othername_en")) - .marriageReligiousInstitutionOtherNameMal(rs.getString("ma_religious_institution_othername_ml")) - .brideDetails(getBrideDetails(rs)) - .groomDetails(getgroomDetails(rs)) -// .permanent(getPermanentAddress(rs)) - //.present(getPresentAddress(rs)) - .witness(getWitnessDetails(rs)) - .auditDetails(getAuditDetails(rs)) + .id(rs.getString("MD_id")) + .dateofreporting(rs.getLong("MD_dateofreporting")) + .dateofmarriage(rs.getLong("MD_dateofmarriage")) + .districtid(rs.getString("MD_districtid")) + .lbtype(rs.getString("MD_lbtype")) + .tenantid(rs.getString("MD_tenantid")) + .placetype(rs.getString("MD_placetype")) + .placeid(rs.getString("MD_placeid")) + .placenameEn(rs.getString("MD_placename_en")) + .placenameMl(rs.getString("MD_placename_ml")) + .street_name_en(rs.getString("MD_street_name_en")) + .street_name_ml(rs.getString("MD_street_name_ml")) + .ward_code(rs.getString("MD_ward_code")) + .talukid(rs.getString("MD_talukid")) + .village_name(rs.getString("MD_village_name")) + .marriage_type(rs.getString("MD_marriage_type")) + .landmark(rs.getString("MD_landmark")) + .locality_en(rs.getString("MD_locality_en")) + .locality_ml(rs.getString("MD_locality_ml")) + .applicationNumber(rs.getString("MD_applicationnumber")) + .registrationDate(rs.getLong("MD_registration_date")) + .registrationno(rs.getString("MD_registrationno")) + .status(rs.getString("MD_registration_status")) + .brideDetails(getBrideDetails(rs)) + .groomDetails(getGroomDetails(rs)) + .witnessDetails(getWitnessDetails(rs)) + .auditDetails(getAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index e0f0142fd24..41c792b5356 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -9,16 +9,25 @@ public interface WitnessDetailsRowMapper { default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { return WitnessDetails.builder() -// .id(rs.getString("wd_id")) - .adharno(rs.getString("wd_adharno")) - .name_en(rs.getString("wd_name_en")) - .name_mal(rs.getString("wd_name_mal")) - .age(rs.getInt("wd_age")) - .address_en(rs.getString("wd_address_en")) - .address_mal(rs.getString("wd_address_mal")) - .mobile(rs.getString("wd_mobile")) - .is_esigned(Boolean.valueOf(rs.getString("wd_is_esigned"))) - .marriageid(rs.getString("wd_marriageid")) + .marriageid(rs.getString("MD_id")) + .witnessId1(rs.getString("WD1_id")) + .witness1AadharNo(rs.getString("WD1_aadharno")) + .witness1NameEn(rs.getString("WD1_name_en")) + .witness1NameMl(rs.getString("WD1_name_ml")) + .witness1Age(rs.getInt("WD1_age")) + .witness1AddresSEn(rs.getString("WD1_address_en")) + .witness1AddressMl(rs.getString("WD1_address_ml")) + .witness1Mobile(rs.getLong("WD1_mobile")) + .witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) + .witnessId2(rs.getString("WD2_id")) + .witness2AadharNo(rs.getString("WD2_aadharno")) + .witness2NameEn(rs.getString("WD2_name_en")) + .witness2NameMl(rs.getString("WD2_name_ml")) + .witness2Age(rs.getInt("WD2_age")) + .witness2AddresSEn(rs.getString("WD2_address_en")) + .witness2AddressMl(rs.getString("WD2_address_ml")) + .witness2Mobile(rs.getLong("WD2_mobile")) + .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) .build(); } From ad21d9a680474b80e48daca146c7ab946138a14c Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 28 Mar 2023 14:11:39 +0530 Subject: [PATCH 055/420] search update with sort and limit --- .../model/MarriageApplicationDetails.java | 1 + .../model/MarriageRegistrySearchCriteria.java | 48 +++++++++---------- .../MarriageRegistryQueryBuilder.java | 36 +++++++------- 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index d9963c5ff9f..a5b30041435 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -188,6 +188,7 @@ public class MarriageApplicationDetails { @Size(max = 64) @JsonProperty("applicationNumber") private String applicationNumber; + @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java index bd48a0b3e39..6c113b3ffdc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java @@ -21,8 +21,8 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("id") private String id; - @JsonProperty("applicationNo") - private String applicationNo; + @JsonProperty("applicationNumber") + private String applicationNumber; @JsonProperty("registrationNo") private String registrationNo; @@ -38,45 +38,45 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("groomFirstnameEn") private String groomFirstnameEn; - @JsonProperty("groomFirstnameMl") - private String groomFirstnameMl; + // @JsonProperty("groomFirstnameMl") + // private String groomFirstnameMl; - @JsonProperty("groomMiddlenameEn") - private String groomMiddlenameEn; + // @JsonProperty("groomMiddlenameEn") + // private String groomMiddlenameEn; - @JsonProperty("groomMiddlenameMl") - private String groomMiddlenameMl; + // @JsonProperty("groomMiddlenameMl") + // private String groomMiddlenameMl; - @JsonProperty("groomLastnameEn") - private String groomLastnameEn; + // @JsonProperty("groomLastnameEn") + // private String groomLastnameEn; - @JsonProperty("groomLastnameMl") - private String groomLastnameMl; + // @JsonProperty("groomLastnameMl") + // private String groomLastnameMl; - @JsonProperty("groomAdharNo") + @JsonProperty("groomAadharNo") private String groomAdharNo; //BRIDE - @JsonProperty("brideAdharNo") + @JsonProperty("brideAadharNo") private String brideAdharNo; @JsonProperty("brideFirstnameEn") private String brideFirstnameEn; - @JsonProperty("brideFirstnameMl") - private String brideFirstnameMl; + // @JsonProperty("brideFirstnameMl") + // private String brideFirstnameMl; - @JsonProperty("brideMiddlenameEn") - private String brideMiddlenameEn; + // @JsonProperty("brideMiddlenameEn") + // private String brideMiddlenameEn; - @JsonProperty("brideMiddlenameMl") - private String brideMiddlenameMl; + // @JsonProperty("brideMiddlenameMl") + // private String brideMiddlenameMl; - @JsonProperty("brideLastnameEn") - private String brideLastnameEn; + // @JsonProperty("brideLastnameEn") + // private String brideLastnameEn; - @JsonProperty("brideLastnameMl") - private String brideLastnameMl; + // @JsonProperty("brideLastnameMl") + // private String brideLastnameMl; @JsonProperty("sortBy") private SortBy sortBy; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index d4913f05e13..92640f9f455 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -117,17 +117,17 @@ public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCrit StringBuilder orderBy = new StringBuilder(); addFilter("MD_id", criteria.getId(), query, preparedStmtValues); addFilter("MD_tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("MD_applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("MD_applicationnumber", criteria.getApplicationNumber(), query, preparedStmtValues); addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); addFilter("BD_aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); addFilter("BD_firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); - addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); - addFilter("BD_lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); + //addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); + // addFilter("BD_lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); addFilter("GD_aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); addFilter("GD_firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); - addFilter("GD_middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); - addFilter("GD_lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); + //addFilter("GD_middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); + //addFilter("GD_lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); addDateRangeFilter("MD_dateofmarriage", criteria.getFromDate(), @@ -135,19 +135,19 @@ public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCrit query, preparedStmtValues); - // if(criteria.getSortOrder() == null){ - // criteria.setSortOrder(MarriageRegistrySearchCriteria.SortOrder.ASC); - // } - // if (StringUtils.isEmpty(criteria.getSortBy())) - // addOrderByColumns("MD_createdtime","ASC", orderBy); - // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.dateofmarriage) - // addOrderByColumns("MD_dateofmarriage",criteria.getSortOrder().toString(), orderBy); - // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.applicationNumber) - // addOrderByColumns("MD_applicationnumber",criteria.getSortOrder().toString(),orderBy); - // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.tenantId) - // addOrderByColumns("MD_tenantid",criteria.getSortOrder().toString(), orderBy); - // addOrderToQuery(orderBy, query); - // //addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); + if(criteria.getSortOrder() == null){ + criteria.setSortOrder(MarriageRegistrySearchCriteria.SortOrder.ASC); + } + if (StringUtils.isEmpty(criteria.getSortBy())) + addOrderByColumns("MD_createdtime","ASC", orderBy); + else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.dateofmarriage) + addOrderByColumns("MD_dateofmarriage",criteria.getSortOrder().toString(), orderBy); + else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.applicationNumber) + addOrderByColumns("MD_applicationnumber",criteria.getSortOrder().toString(),orderBy); + else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.tenantId) + addOrderByColumns("MD_tenantid",criteria.getSortOrder().toString(), orderBy); + addOrderToQuery(orderBy, query); + addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); return query.toString(); From 8494314eedbe92e524e8be3464d47768c6babaa5 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 28 Mar 2023 17:03:58 +0530 Subject: [PATCH 056/420] Search --- .../src/main/resources/marriage.yml | 79 ++++++++++++++++++ .../MarriageApplicationQueryBuilder.java | 37 +++++---- .../repository/rowmapper/BaseRowMapper.java | 8 +- .../BrideAddressDetailsRowMapper.java | 82 +++++++++++++++++++ .../rowmapper/BrideDetailsRowMapper.java | 2 + .../GroomAddressDetailsRowMapper.java | 80 ++++++++++++++++++ .../rowmapper/GroomDetailsRowMapper.java | 1 + .../MarriageApplicationRowMapper.java | 8 +- .../rowmapper/PermanentAddressRowMapper.java | 36 -------- .../rowmapper/PresentAddressRowMapper.java | 34 -------- 10 files changed, 273 insertions(+), 94 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 747d64585e5..8fa00bc8551 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -705,6 +705,85 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id + - query : UPDATE public.eg_marriage_bride_groom_details + SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, + middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, + fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, + maritalstatusid=?, is_spouse_living=?, bride_groom=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? + WHERE marriageid=?; + + basePath: MarriageDetails.*.BrideDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAadharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAadharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAadharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardianAadharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideIslivingSpouse + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + + - jsonPath: $.MarriageDetails.*.id + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 9e8ac73c695..3761ecb1599 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -16,10 +16,10 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { private static final String QUERY = new StringBuilder() .append(" SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") - .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.housenameno_en as MD_housenameno_en , MD.housenameno_ml as MD_housenameno_ml ,") + .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.houseno_and_name_en as MD_housenameno_en , MD.houseno_and_name_ml as MD_housenameno_ml ,") .append("MD.locality_en as MD_locality_en , MD.locality_ml as MD_locality_ml , MD.street_name_en as MD_street_name_en , MD.street_name_ml as MD_street_name_ml , ") .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") - .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") + .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date ,") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationnumber as MD_applicationnumber ,") @@ -46,25 +46,26 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") - .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") + + .append("GPMA.id as GPMA_id ,GPMA.housename_no_en as GPMA_housename_en,GPMA.housename_no_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") .append("GPMA.locality_en as GPMA_locality_en,GPMA.locality_ml as GPMA_locality_ml,GPMA.street_name_en as GPMA_street_name_en,GPMA.street_name_ml as GPMA_street_name_ml ,") .append("GPMA.districtid as GPMA_districtid,GPMA.stateid as GPMA_stateid , GPMA.poid as GPMA_poid , GPMA.poname_en as GPMA_poname_en , GPMA.poname_ml as GPMA_poname_ml ,") .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") - .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml ,") + .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode ,") - .append("BPMA.id as BPMA_id ,BPMA.housename_en as BPMA_housename_en ,BPMA.housename_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") + .append("BPMA.id as BPMA_id ,BPMA.housename_no_en as BPMA_housename_en ,BPMA.housename_no_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") .append("BPMA.locality_en as BPMA_locality_en , BPMA.locality_ml as BPMA_locality_ml , BPMA.street_name_en as BPMA_street_name_en , BPMA.street_name_ml as BPMA_street_name_ml,") .append("BPMA.districtid as BPMA_districtid , BPMA.stateid BPMA_stateid , BPMA.poid as BPMA_poid , BPMA.poname_en as BPMA_poname_en , BPMA.poname_ml as BPMA_poname_ml ,") .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , ") .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") - .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml ,") + .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml , BPMA.ot_zipcode as BPMA_ot_zipcode ,") - .append("GPSA.id as GPSA_id ,GPSA.housename_en as GPSA_housename_en,GPSA.housename_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") + .append("GPSA.id as GPSA_id ,GPSA.housename_no_en as GPSA_housename_en,GPSA.housename_no_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") .append("GPSA.locality_en as GPSA_locality_en,GPSA.locality_ml as GPSA_locality_ml , GPSA.street_name_en as GPSA_street_name_en , GPSA.street_name_ml as GPSA_street_name_ml , ") .append("GPSA.districtid as GPSA_districtid , GPSA.stateid GPSA_stateid , GPSA.poid as GPSA_poid , GPSA.poname_en as GPSA_poname_en , GPSA.poname_ml as GPSA_poname_ml , ") @@ -73,7 +74,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml,") - .append("BPSA.id as BPSA_id ,BPSA.housename_en as BPSA_housename_en,BPSA.housename_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") + .append("BPSA.id as BPSA_id ,BPSA.housename_no_en as BPSA_housename_en,BPSA.housename_no_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") .append("BPSA.talukid as BPSA_talukid , BPSA.taluk_name as BPSA_taluk_name , BPSA.tenantid as BPSA_tenantid , BPSA.ward_code as BPSA_ward_code ,") .append("BPSA.locality_en as BPSA_locality_en , BPSA.locality_ml as BPSA_locality_ml ,") .append("BPSA.street_name_en as BPSA_street_name_en , BPSA.street_name_ml as BPSA_street_name_ml , BPSA.districtid as BPSA_districtid , BPSA.stateid BPSA_stateid ,") @@ -87,22 +88,22 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") - .append("FROM public.eg_register_marriage_details as MD ") - .append("INNER JOIN eg_register_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") + .append("FROM public.eg_marriage_details as MD ") + .append("INNER JOIN eg_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") .append("BD.bride_groom ='B' ") - .append("INNER JOIN eg_register_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") .append("GD.bride_groom ='G' ") - .append("LEFT JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") .append("BPMA.bride_groom ='B' ") - .append("LEFT JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") .append("GPMA.bride_groom ='G' ") - .append("LEFT JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") .append("BPSA.bride_groom ='B' ") - .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") .append("GPSA.bride_groom ='G' ") - .append("INNER JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") .append("WD1.serial_no = 1 ") - .append("INNER JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") .toString(); @@ -112,7 +113,7 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri StringBuilder query = new StringBuilder(QUERY); StringBuilder orderBy = new StringBuilder(); - addFilter("MD_id", criteria.getId(), query, preparedStmtValues); + //addFilter("MD_id", criteria.getId(), query, preparedStmtValues); addFilter("MD_tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD_applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java index ae40418e384..b16e047e9bf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java @@ -9,10 +9,10 @@ interface BaseRowMapper { default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { return AuditDetails.builder() - .createdBy(rs.getString("createdby")) - .createdTime(Long.valueOf(rs.getLong("createdtime"))) - .lastModifiedBy(rs.getString("lastmodifiedby")) - .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) + .createdBy(rs.getString("MD_createdby")) + .createdTime(Long.valueOf(rs.getLong("MD_createdtime"))) + .lastModifiedBy(rs.getString("MD_lastmodifiedby")) + .lastModifiedTime(Long.valueOf(rs.getLong("MD_lastmodifiedtime"))) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java new file mode 100644 index 00000000000..c8ce5018177 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -0,0 +1,82 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + + +import org.ksmart.marriage.marriageapplication.model.marriage.BrideAddressDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface BrideAddressDetailsRowMapper { + default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLException { + + return BrideAddressDetails.builder() + .countryIdPresent(rs.getString("BPSA_countryid")) + .stateIdPresent(rs.getString("BPSA_stateid")) + .districtIdPresent(rs.getString("BPSA_districtid")) + .poNoPresent(rs.getString("BPSA_poid")) + .presentaddressCountry(rs.getString("GPMA_countryid")) + .localityEnPresent(rs.getString("BPSA_locality_en")) + .localityMlPresent(rs.getString("BPSA_locality_ml")) + .streetNameEnPresent(rs.getString("BPSA_street_name_en")) + .streetNameMlPresent(rs.getString("BPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("BPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("BPSA_housename_ml")) + .villageNamePresent(rs.getString("BPSA_village_name")) + .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) + .presentInsideKeralaTaluk(rs.getString("BPSA_talukid")) + .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) + .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) + .presentWardNo(rs.getString("BPSA_ward_code")) + .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) + .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) + .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) +// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) + + + .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) + .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) + .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) + .presentOutSideIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) + .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) + .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) +// .presentOutSideIndiaadrsCityTown(rs.getString("stat_mother_resdnce_placetype")) + + .countryIdPermanent(rs.getString("BPMA_countryid")) + .stateIdPermanent(rs.getString("BPMA_stateid")) + .districtIdPermanent(rs.getString("BPMA_districtid")) + .poNoPermanent(rs.getString("BPMA_poid")) + .localityEnPermanent(rs.getString("BPMA_locality_en")) + .localityMlPermanent(rs.getString("BPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) + .villageNamePermanent(rs.getString("BPMA_village_name")) + .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) + .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) + .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) + .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) + .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) + .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) +// .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) + .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) + .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) +// .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) +// .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) + .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) + .permntOutsideIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) + .permntOutsideIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) + .permntOutsideIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) + .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) + .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) + + .presentUuid(rs.getString("BPSA_id")) + .permanentUuid(rs.getString("BPMA_id")) + + + .build(); + + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 9f442c13b0c..997b997aaac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -9,6 +9,7 @@ public interface BrideDetailsRowMapper { default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ return BrideDetails.builder() + .brideId(rs.getString("BD_id")) .residentship(rs.getString("BD_residentship")) .aadharno(rs.getString("BD_aadharno")) .passportno(rs.getString("BD_passportno")) @@ -37,6 +38,7 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ .maritalstatusid(rs.getString("BD_maritalstatusid")) //.brideIsSpouseLiving(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) .brideNoOfSpouse(Integer.valueOf(rs.getString("BD_livingspouseNo"))) + .brideGroom(rs.getString("BD_bride_groom")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java new file mode 100644 index 00000000000..9b7756a7715 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -0,0 +1,80 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +//import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; + +import org.ksmart.marriage.marriageapplication.model.marriage.GroomAddressDetails; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface GroomAddressDetailsRowMapper { + default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throws SQLException { + + return GroomAddressDetails.builder() + .countryIdPresent(rs.getString("GPSA_countryid")) + .stateIdPresent(rs.getString("GPSA_stateid")) + .districtIdPresent(rs.getString("GPSA_districtid")) + .poNoPresent(rs.getString("GPSA_poid")) + .presentaddressCountry(rs.getString("GPMA_countryid")) + .localityEnPresent(rs.getString("GPSA_locality_en")) + .localityMlPresent(rs.getString("GPSA_locality_ml")) + .streetNameEnPresent(rs.getString("GPSA_street_name_en")) + .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) + .villageNamePresent(rs.getString("GPSA_village_name")) + .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) + .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) + .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) + .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) + .presentWardNo(rs.getString("GPSA_ward_code")) + .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) + .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) + .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) +// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) + + + .presentOutSideIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) + .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) + .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) + .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) + .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) + .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) +// .presentOutSideIndiaadrsCityTown(rs.getString("stat_mother_resdnce_placetype")) + + .countryIdPermanent(rs.getString("GPMA_countryid")) + .stateIdPermanent(rs.getString("GPMA_stateid")) + .districtIdPermanent(rs.getString("GPMA_districtid")) + .poNoPermanent(rs.getString("GPMA_poid")) + .localityEnPermanent(rs.getString("GPMA_locality_en")) + .localityMlPermanent(rs.getString("GPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) + .villageNamePermanent(rs.getString("GPMA_village_name")) + .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) + .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) + .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) + .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) + .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) + .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) + .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) +// .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) + .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) + .permntOutsideKeralaPostOfficeMl(rs.getString("GPMA_poname_ml")) +// .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) +// .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) + .permntOutsideIndiaLineoneEn(rs.getString("GPMA_ot_address1_en")) + .permntOutsideIndiaLineoneMl(rs.getString("GPMA_ot_address1_ml")) + .permntOutsideIndiaLinetwoEn(rs.getString("GPMA_ot_address2_en")) + .permntOutsideIndiaLinetwoMl(rs.getString("GPMA_ot_address2_ml")) + .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) + .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) + + .presentUuid(rs.getString("GPSA_id")) + .permanentUuid(rs.getString("GPMA_id")) + + .build(); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 9c10798a50c..68f9c3ac74a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -40,6 +40,7 @@ default GroomDetails getGroomDetails (ResultSet rs) throws SQLException{ .maritalstatusid(rs.getString("GD_maritalstatusid")) //.groomIsSpouseLiving(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) .groomNoOfSpouse(Integer.valueOf(rs.getString("GD_livingspouseNo"))) + .brideGroom(rs.getString("GD_bride_groom")) // .marriageid(rs.getString("GD_marriageid")) // .photo_url(rs.getString("GD_photo_url")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 9534293f9ba..725034f6bf0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -10,7 +10,7 @@ import java.util.ArrayList; import java.util.List; @Component -public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper,PermanentAddressRowMapper,PresentAddressRowMapper,WitnessDetailsRowMapper{ +public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper{ @Override public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null @@ -25,6 +25,8 @@ public List extractData(ResultSet rs) throws SQLExce .tenantid(rs.getString("MD_tenantid")) .placetype(rs.getString("MD_placetype")) .placeid(rs.getString("MD_placeid")) + .marriageHouseNoAndNameEn(rs.getString("MD_housenameno_en")) + .marriageHouseNoAndNameMl(rs.getString("MD_housenameno_ml")) .placenameEn(rs.getString("MD_placename_en")) .placenameMl(rs.getString("MD_placename_ml")) .street_name_en(rs.getString("MD_street_name_en")) @@ -39,10 +41,12 @@ public List extractData(ResultSet rs) throws SQLExce .applicationNumber(rs.getString("MD_applicationnumber")) .registrationDate(rs.getLong("MD_registration_date")) .registrationno(rs.getString("MD_registrationno")) - .status(rs.getString("MD_registration_status")) + //.status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) .witnessDetails(getWitnessDetails(rs)) + .brideAddressDetails(getBrideAddressDetails(rs)) + .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) .auditDetails(getAuditDetails(rs)) .build()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java deleted file mode 100644 index f987f51bd69..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PermanentAddressRowMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.ksmart.marriage.marriageapplication.repository.rowmapper; - - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface PermanentAddressRowMapper { -// default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ -// -// return PermanentAdressDetails.builder() -// .id(rs.getString("per_id")) -// .houseno(rs.getString("per_houseno")) -// .housename_no_en(rs.getString("per_housename_no_en")) -// .housename_no_ml(rs.getString("per_housename_no_ml")) -// .villageid(rs.getString("per_villageid")) -// .village_name(rs.getString("per_village_name")) -// .talukid(rs.getString("per_talukid")) -// .taluk_name(rs.getString("per_taluk_name")) -// .ward_code(rs.getString("per_ward_code")) -// .doorno(rs.getInt("per_doorno")) -// .locality_en(rs.getString("per_locality_en")) -// .locality_ml(rs.getString("per_locality_ml")) -// .street_name_en(rs.getString("per_street_name_en")) -// .street_name_ml(rs.getString("per_street_name_ml")) -// .districtid(rs.getString("per_districtid")) -// .stateid(rs.getString("per_stateid")) -// .poid(rs.getString("per_poid")) -// .pinno(rs.getString("per_pinno")) -// .countryid(rs.getString("per_countryid")) -// .marriageid(rs.getString("per_marriageid")) - -// .build(); - - -// } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java deleted file mode 100644 index 8de5f73a9c4..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PresentAddressRowMapper.java +++ /dev/null @@ -1,34 +0,0 @@ -package org.ksmart.marriage.marriageapplication.repository.rowmapper; - -//import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; - -import java.sql.ResultSet; -import java.sql.SQLException; - -public interface PresentAddressRowMapper { -// default PresentAddressDetails getPresentAddress (ResultSet rs) throws SQLException{ -// -// return PresentAddressDetails.builder() -// .id(rs.getString("pes_id")) -// .houseno(rs.getString("pes_houseno")) -// .housename_no_en(rs.getString("pes_housename_no_en")) -// .housename_no_ml(rs.getString("pes_housename_no_ml")) -// .villageid(rs.getString("pes_villageid")) -// .village_name(rs.getString("pes_village_name")) -// .talukid(rs.getString("pes_talukid")) -// .taluk_name(rs.getString("pes_taluk_name")) -// .ward_code(rs.getString("pes_ward_code")) -// .doorno(rs.getInt("pes_doorno")) -// .locality_en(rs.getString("pes_locality_en")) -// .locality_ml(rs.getString("pes_locality_ml")) -// .street_name_en(rs.getString("pes_street_name_en")) -// .street_name_ml(rs.getString("pes_street_name_ml")) -// .districtid(rs.getString("pes_districtid")) -// .stateid(rs.getString("pes_stateid")) -// .poid(rs.getString("pes_poid")) -// .pinno(rs.getString("pes_pinno")) -// .countryid(rs.getString("pes_countryid")) -// .marriageid(rs.getString("pes_marriageid")) -// .build(); -// } -} From 21295a524a506ca600f205166a9743d57f627377 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 28 Mar 2023 17:05:12 +0530 Subject: [PATCH 057/420] Search --- .../egov-persister/src/main/resources/application.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 0e4944fa684..bed2f6aa9d3 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm #Set context root server.port = 9082 @@ -12,7 +12,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true From 8993e4c5a0a610e1143e30d26034416a514ac6ca Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 29 Mar 2023 03:17:59 +0530 Subject: [PATCH 058/420] registry create -address --- .../src/main/resources/marriage-registry.yml | 305 ++++++++++ .../enrichment/MarriageDetailsEnrichment.java | 98 ++-- .../model/MarriageApplicationDetails.java | 1 + .../MarriageRegistryEnrichment.java | 386 ++++++++++++ .../model/BrideRegistryAddressDetails.java | 553 ++++++++++++++++- .../model/GroomRegistryAddressDetails.java | 554 +++++++++++++++++- .../model/MarriageRegistryDetails.java | 12 +- 7 files changed, 1813 insertions(+), 96 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 312d04e6b47..cec5ada736b 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -313,6 +313,311 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 + - query : INSERT INTO public.eg_register_marriage_present_address_details( + id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, + street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, + lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.BrideAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentUuid + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentWardNo + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.isPermanentAddress + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEnB + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl + + + - query : INSERT INTO public.eg_register_marriage_permanent_address_details( + id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: MarriageDetails.*.BrideAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + + - query: INSERT INTO public.eg_register_marriage_present_address_details( + id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, + street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, + lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: MarriageDetails.*.GroomAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentUuid + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentWardNo + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.isPermanentAddress + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEnB + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl + + + + - query : INSERT INTO public.eg_register_marriage_permanent_address_details( + id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: MarriageDetails.*.GroomAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 08e6c985405..ac6433b85cf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -70,7 +70,7 @@ public void enrichCreate(MarriageDetailsRequest request) { } }); setApplicationNumbers(request); - setFileNumbers(request); + // setFileNumbers(request); setBridePermanentAddress(request); setBridePresentAddress(request); setGroomPermanentAddress(request); @@ -482,54 +482,54 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { } - private void setRegistrationNumber(MarriageDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - List marriageDetails = request.getMarriageDetails(); - String tenantId = marriageDetails.get(0) - .getTenantid(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getGetMarriageRegisNumberName(), - request.getMarriageDetails().get(0).getApplicationtype(), - "REG", - marriageDetails.size()); - validateFileCodes(filecodes, marriageDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getMarriageDetails() - .forEach(marriage -> { - if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { - marriage.setRegistrationno(itr.next()); - marriage.setRegistrationDate(currentTime); - } - }); - } - - private void setFileNumbers(MarriageDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - List marriageDetails = request.getMarriageDetails(); - String tenantId = marriageDetails.get(0) - .getTenantid(); - System.out.println(("request"+request)); - - List filecodes = getIds(requestInfo, - tenantId, - config.getMarriageFileNumberName(), - request.getMarriageDetails().get(0).getApplicationtype(), - "FILE", - marriageDetails.size()); - validateFileCodes(filecodes, marriageDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getMarriageDetails() - .forEach(marriage -> { -// marriage.setFileno(itr.next()); -// marriage.setFile_date(currentTime); - }); - } + // private void setRegistrationNumber(MarriageDetailsRequest request) { + + // RequestInfo requestInfo = request.getRequestInfo(); + // List marriageDetails = request.getMarriageDetails(); + // String tenantId = marriageDetails.get(0) + // .getTenantid(); + + // List filecodes = getIds(requestInfo, + // tenantId, + // config.getGetMarriageRegisNumberName(), + // request.getMarriageDetails().get(0).getApplicationtype(), + // "REG", + // marriageDetails.size()); + // validateFileCodes(filecodes, marriageDetails.size()); + // Long currentTime = Long.valueOf(System.currentTimeMillis()); + // ListIterator itr = filecodes.listIterator(); + // request.getMarriageDetails() + // .forEach(marriage -> { + // if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { + // marriage.setRegistrationno(itr.next()); + // marriage.setRegistrationDate(currentTime); + // } + // }); + // } + +// private void setFileNumbers(MarriageDetailsRequest request) { + +// RequestInfo requestInfo = request.getRequestInfo(); +// List marriageDetails = request.getMarriageDetails(); +// String tenantId = marriageDetails.get(0) +// .getTenantid(); +// System.out.println(("request"+request)); + +// List filecodes = getIds(requestInfo, +// tenantId, +// config.getMarriageFileNumberName(), +// request.getMarriageDetails().get(0).getApplicationtype(), +// "FILE", +// marriageDetails.size()); +// validateFileCodes(filecodes, marriageDetails.size()); +// Long currentTime = Long.valueOf(System.currentTimeMillis()); +// ListIterator itr = filecodes.listIterator(); +// request.getMarriageDetails() +// .forEach(marriage -> { +// // marriage.setFileno(itr.next()); +// // marriage.setFile_date(currentTime); +// }); +// } private void setApplicationNumbers(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index 6032a9989d0..966480b9b67 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -197,6 +197,7 @@ public class MarriageApplicationDetails { @JsonProperty("GroomDetails") private GroomDetails groomDetails; + @JsonProperty("BrideAddressDetails") private BrideAddressDetails brideAddressDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index fa236e7f6d0..0a45304c880 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -76,6 +76,10 @@ public void enrichCreate(MarriageRegistryRequest request) { } }); setRegistrationNumber(request); + setBridePermanentAddress(request); + setBridePresentAddress(request); + setGroomPermanentAddress(request); + setGroomPresentAddress(request); } private void setRegistrationNumber(MarriageRegistryRequest request) { @@ -102,7 +106,389 @@ private void setRegistrationNumber(MarriageRegistryRequest request) { }); } +//Jasmine 28.03.2023 +private void setGroomPresentAddress(MarriageRegistryRequest request) { + + request.getMarriageDetails() + .forEach(marriage ->{ + if (marriage.getGroomAddressDetails()!=null) { + marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPresent("G"); + } + + if (marriage.getGroomAddressDetails() != null && marriage.getGroomAddressDetails().getIsPermanentAddress() != null) { + marriage.getGroomAddressDetails().setIsPermanentAddressInt(marriage.getGroomAddressDetails().getIsPermanentAddress() == true ? 1 : 0); + if(marriage.getGroomAddressDetails().getIsPermanentAddress()) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); + if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + if (marriage.getGroomAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { + marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); + } + } + } + + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { + if (marriage.getGroomAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if(!marriage.getGroomAddressDetails().getIsPermanentAddress()){ + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); + } + + marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + + + } + else { + if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); + } + marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaPincode()); + + marriage.getGroomAddressDetails().setPresentOthrTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); + + + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + + } + } + + else { + if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + + + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); + + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); + + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); + + + + + } + } + } + } + }); +} + +private void setGroomPermanentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() + .forEach(marriage-> { + + if (marriage.getGroomAddressDetails()!=null){ + if (marriage.getGroomAddressDetails()!=null) { + + marriage.getGroomAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + //marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPermanent("G"); + //marriage.getGroomAddressDetails().setBrideGroomPresent("B"); + } + + if(marriage.getGroomAddressDetails().getPermtaddressCountry()!=null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ + if (marriage.getGroomAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + + marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + + marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); + + marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); + marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + } + else { + marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + + marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); + + marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + + marriage.getGroomAddressDetails().setPermntOthrTalukName(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + + marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + + } + + + } + else { + if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + + + + + } + } + + } + + } + + }); + +} + +private void setBridePresentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() + .forEach(marriage ->{ + if (marriage.getBrideAddressDetails()!=null) { + + marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getBrideAddressDetails().setBrideGroomPresent("B"); + } + + if (marriage.getBrideAddressDetails() != null && marriage.getBrideAddressDetails().getIsPermanentAddress() != null) { + marriage.getBrideAddressDetails().setIsPermanentAddressInt(marriage.getBrideAddressDetails().getIsPermanentAddress() == true ? 1 : 0); + if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); + marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); + if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + if (marriage.getBrideAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { + marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); + } + } + } + + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { + if (marriage.getBrideAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if(!marriage.getBrideAddressDetails().getIsPermanentAddress()){ + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); + } + + marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameMl()); + + marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + + + } + else { + if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); + } + marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaHouseNameMl()); + + marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaPincode()); + + marriage.getBrideAddressDetails().setPresentOthrTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(marriage.getBrideAddressDetails().getPresentOutsideKeralaPostOfficeEn()); + + + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + + } + } + + else { + if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + + + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); + + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); + + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + + + + + } + } + } + + + + } + + + }); + + + +} + +private void setBridePermanentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() + .forEach(marriage-> { + + if (marriage.getBrideAddressDetails()!=null){ + if (marriage.getBrideAddressDetails()!=null) { + + marriage.getBrideAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + //marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getBrideAddressDetails().setBrideGroomPermanent("B"); + //marriage.getBrideAddressDetails().setBrideGroomPresent("B"); + } + + if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ + if (marriage.getBrideAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + + marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + + marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + + marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); + marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + } + else { + marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + + marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + + marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); + + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + + marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + + marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + + } + } + else { + if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + } + } + } + } + }); + } public void enrichUpdate(MarriageRegistryRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java index 55cb1169fb9..1323f3645c6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java @@ -1,12 +1,21 @@ package org.ksmart.marriage.marriageregistry.model; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; + /** * Created by Jasmine * on 24.03.2023 */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder public class BrideRegistryAddressDetails { @Size(max = 64) @@ -81,14 +90,14 @@ public class BrideRegistryAddressDetails { @JsonProperty("presentOutsideKeralaVillage") private String presentOutsideKeralaVillageName; - - @Size(max = 64) + @Size(max = 1000) @JsonProperty("presentOutsideKeralaCityVilgeEn") private String presentOutsideKeralaCityVilgeEn; @Size(max = 64) @JsonProperty("presentOutsideKeralaPincode") private String presentOutsideKeralaPincode; + @Size(max = 64) @JsonProperty("presentOutsideKeralaPostOfficeEn") private String presentOutsideKeralaPostOfficeEn; @@ -117,7 +126,6 @@ public class BrideRegistryAddressDetails { @JsonProperty("presentOutsideKeralaStreetNameMl") private String presentOutsideKeralaStreetNameMl; - @Size(max = 2500) @JsonProperty("presentOutsideKeralaHouseNameMl") private String presentOutsideKeralaHouseNameMl; @@ -126,27 +134,22 @@ public class BrideRegistryAddressDetails { @JsonProperty("presentOutSideIndiaAdressEn") private String presentOutSideIndiaAdressEn; - @Size(max = 2500) @JsonProperty("presentOutSideIndiaAdressMl") private String presentOutSideIndiaAdressMl; - @Size(max = 2500) @JsonProperty("presentOutSideIndiaAdressEnB") private String presentOutSideIndiaAdressEnB; - @Size(max = 2500) @JsonProperty("presentOutSideIndiaAdressMlB") private String presentOutSideIndiaAdressMlB; - @Size(max = 2500) @JsonProperty("presentOutSideIndiaProvinceEn") private String presentOutSideIndiaProvinceEn; - @Size(max = 1000) @JsonProperty("presentOutSideIndiaLocalityMl") private String presentOutSideIndiaLocalityMl; @@ -159,9 +162,6 @@ public class BrideRegistryAddressDetails { @JsonProperty("presentOutSideCountry") private String presentOutSideCountry; - @JsonProperty("isPrsentAddress") - private Boolean isPrsentAddress; - @Size(max = 1000) @JsonProperty("presentOutSideIndiaadrsVillage") private String presentOutSideIndiaadrsVillage; @@ -172,8 +172,8 @@ public class BrideRegistryAddressDetails { ////Db Fields////// - @JsonProperty("isPrsentAddressInt") - private Integer isPrsentAddressInt; + + @Size(max = 64) @JsonProperty("presentUuid") private String presentUuid; @@ -221,19 +221,54 @@ public class BrideRegistryAddressDetails { @Size(max = 1000) @JsonProperty("villageNamePresent") private String villageNamePresent; - @Size(max = 1000) - @JsonProperty("villageIdPresent") - private String villageIdPresent; + @JsonProperty("townOrVillagePresent") + private String townOrVillagePresent; @Size(max = 10) @JsonProperty("poNoPresent") private String poNoPresent; + @Size(max = 1000) + @JsonProperty("presentOthrTalukName") + private String presentOthrTalukName; + @Size(max = 64) + @JsonProperty("presentOthPostOfficeEn") + private String presentOthPostOfficeEn; @Size(max = 64) @JsonProperty("brideGroomPresent") private String brideGroomPresent; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressEn") + private String presentOthrIndiaAdressEn; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressMl") + private String presentOthrIndiaAdressMl; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressEnB") + private String presentOthrIndiaAdressEnB; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressMlB") + private String presentOthrIndiaAdressMlB; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaProvinceEn") + private String presentOthrIndiaProvinceEn; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaProvinceMl") + private String presentOthrIndiaProvinceMl; + + ////Permanant + + @JsonProperty("isPermanentAddress") + private Boolean isPermanentAddress; + @Size(max = 1000) @JsonProperty("permtaddressCountry") private String permtaddressCountry; @@ -262,6 +297,14 @@ public class BrideRegistryAddressDetails { @JsonProperty("permntInKeralaAdrVillage") private String permntInKeralaAdrVillage; + @Size(max = 2500) + @JsonProperty("permntOutSideIndiaProvinceMl") + private String permntOutSideIndiaProvinceMl; + + @Size(max = 2500) + @JsonProperty("permntOutSideIndiaProvinceEn") + private String permntOutSideIndiaProvinceEn; + @Size(max = 1000) @JsonProperty("permntInKeralaAdrLocalityNameEn") private String permntInKeralaAdrLocalityNameEn; @@ -273,6 +316,7 @@ public class BrideRegistryAddressDetails { @Size(max = 2500) @JsonProperty("permntInKeralaAdrHouseNameEn") private String permntInKeralaAdrHouseNameEn; + @Size(max = 2500) @JsonProperty("permntInKeralaAdrLocalityNameMl") private String permntInKeralaAdrLocalityNameMl; @@ -361,10 +405,6 @@ public class BrideRegistryAddressDetails { @JsonProperty("permntOutsideIndiaLinetwoMl") private String permntOutsideIndiaLinetwoMl; - @Size(max = 2500) - @JsonProperty("permntOutsideIndiaprovinceEn") - private String permntOutsideIndiaprovinceEn; - @Size(max = 1000) @JsonProperty("permntOutsideIndiaVillage") private String permntOutsideIndiaVillage; @@ -387,6 +427,10 @@ public class BrideRegistryAddressDetails { @Size(max = 64) @JsonProperty("permanentUuid") private String permanentUuid; + + @JsonProperty("isPermanentAddressInt") + private Integer isPermanentAddressInt; + @Size(max = 64) @JsonProperty("countryIdPermanent") private String countryIdPermanent; @@ -432,15 +476,480 @@ public class BrideRegistryAddressDetails { private String villageNamePermanent; @Size(max = 1000) - @JsonProperty("villageIdPermanent") - private String villageIdPermanent; + @JsonProperty("townOrVillagePermanent") + private String townOrVillagePermanent; @Size(max = 10) @JsonProperty("poNoPermanent") private String poNoPermanent; + @Size(max = 1000) + @JsonProperty("permntOthrTalukName") + private String permntOthrTalukName; + + @Size(max = 64) + @JsonProperty("permntOthPostOfficeEn") + private String permntOthPostOfficeEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLineoneEn") + private String permntOthrIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLineoneMl") + private String permntOthrIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLinetwoEn") + private String permntOthrIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLinetwoMl") + private String permntOthrIndiaLinetwoMl; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaprovinceEn") + private String permntOthrIndiaprovinceEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaprovinceMl") + private String permntOthrIndiaprovinceMl; @Size(max = 64) @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; + // @Size(max = 64) + // @JsonProperty("presentaddressCountry") + // private String presentaddressCountry; + + // @Size(max = 64) + // @JsonProperty("presentaddressStateName") + // private String presentaddressStateName; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaLBName") + // private String presentInsideKeralaLBName; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaDistrict") + // private String presentInsideKeralaDistrict; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaTaluk") + // private String presentInsideKeralaTaluk; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaVillage") + // private String presentInsideKeralaVillage; + + // @Size(max = 1000) + // @JsonProperty("presentInsideKeralaLocalityNameEn") + // private String presentInsideKeralaLocalityNameEn; + + // @Size(max = 2000) + // @JsonProperty("presentInsideKeralaStreetNameEn") + // private String presentInsideKeralaStreetNameEn; + + // @Size(max = 2500) + // @JsonProperty("presentInsideKeralaHouseNameEn") + // private String presentInsideKeralaHouseNameEn; + + // @Size(max = 1000) + // @JsonProperty("presentInsideKeralaLocalityNameMl") + // private String presentInsideKeralaLocalityNameMl; + + // @Size(max = 2000) + // @JsonProperty("presentInsideKeralaStreetNameMl") + // private String presentInsideKeralaStreetNameMl; + + // @Size(max = 2500) + // @JsonProperty("presentInsideKeralaHouseNameMl") + // private String presentInsideKeralaHouseNameMl; + + // @Size(max = 10) + // @JsonProperty("presentInsideKeralaPincode") + // private String presentInsideKeralaPincode; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaPostOffice") + // private String presentInsideKeralaPostOffice; + + // @Size(max = 64) + // @JsonProperty("presentWardNo") + // private String presentWardNo; + + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaDistrict") + // private String presentOutsideKeralaDistrict; + + // @Size(max = 1000) + // @JsonProperty("presentOutsideKeralaTaluk") + // private String presentOutsideKeralaTalukName; + + // @Size(max = 1000) + // @JsonProperty("presentOutsideKeralaVillage") + // private String presentOutsideKeralaVillageName; + + + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaCityVilgeEn") + // private String presentOutsideKeralaCityVilgeEn; + + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaPincode") + // private String presentOutsideKeralaPincode; + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaPostOfficeEn") + // private String presentOutsideKeralaPostOfficeEn; + + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaPostOfficeMl") + // private String presentOutsideKeralaPostOfficeMl; + + // @Size(max = 1000) + // @JsonProperty("presentOutsideKeralaLocalityNameEn") + // private String presentOutsideKeralaLocalityNameEn; + + // @Size(max = 2000) + // @JsonProperty("presentOutsideKeralaStreetNameEn") + // private String presentOutsideKeralaStreetNameEn; + + // @Size(max = 2500) + // @JsonProperty("presentOutsideKeralaHouseNameEn") + // private String presentOutsideKeralaHouseNameEn; + + // @Size(max = 1000) + // @JsonProperty("presentOutsideKeralaLocalityNameMl") + // private String presentOutsideKeralaLocalityNameMl; + + // @Size(max = 2000) + // @JsonProperty("presentOutsideKeralaStreetNameMl") + // private String presentOutsideKeralaStreetNameMl; + + + // @Size(max = 2500) + // @JsonProperty("presentOutsideKeralaHouseNameMl") + // private String presentOutsideKeralaHouseNameMl; + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaAdressEn") + // private String presentOutSideIndiaAdressEn; + + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaAdressMl") + // private String presentOutSideIndiaAdressMl; + + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaAdressEnB") + // private String presentOutSideIndiaAdressEnB; + + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaAdressMlB") + // private String presentOutSideIndiaAdressMlB; + + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaProvinceEn") + // private String presentOutSideIndiaProvinceEn; + + + // @Size(max = 1000) + // @JsonProperty("presentOutSideIndiaLocalityMl") + // private String presentOutSideIndiaLocalityMl; + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaProvinceMl") + // private String presentOutSideIndiaProvinceMl; + + // @Size(max = 64) + // @JsonProperty("presentOutSideCountry") + // private String presentOutSideCountry; + + // @JsonProperty("isPrsentAddress") + // private Boolean isPrsentAddress; + + // @Size(max = 1000) + // @JsonProperty("presentOutSideIndiaadrsVillage") + // private String presentOutSideIndiaadrsVillage; + + // @Size(max = 64) + // @JsonProperty("presentOutSideIndiaadrsCityTown") + // private String presentOutSideIndiaadrsCityTown; + + // ////Db Fields////// + + // @JsonProperty("isPrsentAddressInt") + // private Integer isPrsentAddressInt; + // @Size(max = 64) + // @JsonProperty("presentUuid") + // private String presentUuid; + + // @Size(max = 64) + // @JsonProperty("countryIdPresent") + // private String countryIdPresent; + + // @Size(max = 64) + // @JsonProperty("stateIdPresent") + // private String stateIdPresent; + + // @Size(max = 64) + // @JsonProperty("districtIdPresent") + // private String districtIdPresent; + + // @Size(max = 64) + // @JsonProperty("pinNoPresent") + // private String pinNoPresent; + + // @Size(max = 1000) + // @JsonProperty("localityEnPresent") + // private String localityEnPresent; + + // @Size(max = 1000) + // @JsonProperty("localityMlPresent") + // private String localityMlPresent; + + // @Size(max = 1000) + // @JsonProperty("streetNameEnPresent") + // private String streetNameEnPresent; + + // @Size(max = 1000) + // @JsonProperty("streetNameMlPresent") + // private String streetNameMlPresent; + + // @Size(max = 1000) + // @JsonProperty("houseNameNoEnPresent") + // private String houseNameNoEnPresent; + + // @Size(max = 1000) + // @JsonProperty("houseNameNoMlPresent") + // private String houseNameNoMlPresent; + + // @Size(max = 1000) + // @JsonProperty("villageNamePresent") + // private String villageNamePresent; + + // @Size(max = 1000) + // @JsonProperty("villageIdPresent") + // private String villageIdPresent; + + // @Size(max = 10) + // @JsonProperty("poNoPresent") + // private String poNoPresent; + + // @Size(max = 64) + // @JsonProperty("brideGroomPresent") + // private String brideGroomPresent; + // ////Permanant + // @Size(max = 1000) + // @JsonProperty("permtaddressCountry") + // private String permtaddressCountry; + + // @Size(max = 64) + // @JsonProperty("permtaddressStateName") + // private String permtaddressStateName; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrLBName") + // private String permntInKeralaAdrLBName; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrDistrict") + // private String permntInKeralaAdrDistrict; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaCityVilgeEn") + // private String permntOutsideKeralaCityVilgeEn; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrTaluk") + // private String permntInKeralaAdrTaluk; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrVillage") + // private String permntInKeralaAdrVillage; + + // @Size(max = 1000) + // @JsonProperty("permntInKeralaAdrLocalityNameEn") + // private String permntInKeralaAdrLocalityNameEn; + + // @Size(max = 2000) + // @JsonProperty("permntInKeralaAdrStreetNameEn") + // private String permntInKeralaAdrStreetNameEn; + + // @Size(max = 2500) + // @JsonProperty("permntInKeralaAdrHouseNameEn") + // private String permntInKeralaAdrHouseNameEn; + // @Size(max = 2500) + // @JsonProperty("permntInKeralaAdrLocalityNameMl") + // private String permntInKeralaAdrLocalityNameMl; + + // @Size(max = 2500) + // @JsonProperty("permntInKeralaAdrStreetNameMl") + // private String permntInKeralaAdrStreetNameMl; + + // @Size(max = 2500) + // @JsonProperty("permntInKeralaAdrHouseNameMl") + // private String permntInKeralaAdrHouseNameMl; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrPincode") + // private String permntInKeralaAdrPincode; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrPostOffice") + // private String permntInKeralaAdrPostOffice; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaWardNo") + // private String permntInKeralaWardNo; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaDistrict") + // private String permntOutsideKeralaDistrict; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideKeralaTaluk") + // private String permntOutsideKeralaTaluk; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideKeralaVillage") + // private String permntOutsideKeralaVillage; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaPincode") + // private String permntOutsideKeralaPincode; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideKeralaLocalityNameEn") + // private String permntOutsideKeralaLocalityNameEn; + + // @Size(max = 2000) + // @JsonProperty("permntOutsideKeralaStreetNameEn") + // private String permntOutsideKeralaStreetNameEn; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideKeralaHouseNameEn") + // private String permntOutsideKeralaHouseNameEn; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideKeralaLocalityNameMl") + // private String permntOutsideKeralaLocalityNameMl; + + // @Size(max = 2000) + // @JsonProperty("permntOutsideKeralaStreetNameMl") + // private String permntOutsideKeralaStreetNameMl; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideKeralaHouseNameMl") + // private String permntOutsideKeralaHouseNameMl; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaPostOfficeEn") + // private String permntOutsideKeralaPostOfficeEn; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaPostOfficeMl") + // private String permntOutsideKeralaPostOfficeMl; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaLineoneEn") + // private String permntOutsideIndiaLineoneEn; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaLineoneMl") + // private String permntOutsideIndiaLineoneMl; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaLinetwoEn") + // private String permntOutsideIndiaLinetwoEn; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaLinetwoMl") + // private String permntOutsideIndiaLinetwoMl; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaprovinceEn") + // private String permntOutsideIndiaprovinceEn; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideIndiaVillage") + // private String permntOutsideIndiaVillage; + + // @Size(max = 64) + // @JsonProperty("permntOutsideIndiaCityTown") + // private String permntOutsideIndiaCityTown; + + // @Size(max = 10) + // @JsonProperty("permanentOutsideIndiaPostCode") + // private String permanentOutsideIndiaPostCode; + + // @Size(max = 64) + // @JsonProperty("permntOutsideIndiaCountry") + // private String permntOutsideIndiaCountry; + + + // ////Db Fields////// + + // @Size(max = 64) + // @JsonProperty("permanentUuid") + // private String permanentUuid; + // @Size(max = 64) + // @JsonProperty("countryIdPermanent") + // private String countryIdPermanent; + + // @Size(max = 64) + // @JsonProperty("stateIdPermanent") + // private String stateIdPermanent; + + // @Size(max = 64) + // @JsonProperty("districtIdPermanent") + // private String districtIdPermanent; + + // @Size(max = 64) + // @JsonProperty("pinNoPermanent") + // private String pinNoPermanent; + + // @Size(max = 1000) + // @JsonProperty("localityEnPermanent") + // private String localityEnPermanent; + + // @Size(max = 1000) + // @JsonProperty("localityMlPermanent") + // private String localityMlPermanent; + + // @Size(max = 1000) + // @JsonProperty("streetNameEnPermanent") + // private String streetNameEnPermanent; + + // @Size(max = 1000) + // @JsonProperty("streetNameMlPermanent") + // private String streetNameMlPermanent; + + // @Size(max = 1000) + // @JsonProperty("houseNameNoEnPermanent") + // private String houseNameNoEnPermanent; + + // @Size(max = 1000) + // @JsonProperty("houseNameNoMlPermanent") + // private String houseNameNoMlPermanent; + + // @Size(max = 1000) + // @JsonProperty("villageNamePermanent") + // private String villageNamePermanent; + + // @Size(max = 1000) + // @JsonProperty("villageIdPermanent") + // private String villageIdPermanent; + + // @Size(max = 10) + // @JsonProperty("poNoPermanent") + // private String poNoPermanent; + + // @Size(max = 64) + // @JsonProperty("brideGroomPermanent") + // private String brideGroomPermanent; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java index 85c768973ac..4688b3b05c0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java @@ -1,12 +1,21 @@ package org.ksmart.marriage.marriageregistry.model; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; + /** * Created by Jasmine * on 24.03.2023 */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder public class GroomRegistryAddressDetails { @Size(max = 64) @@ -81,14 +90,14 @@ public class GroomRegistryAddressDetails { @JsonProperty("presentOutsideKeralaVillage") private String presentOutsideKeralaVillageName; - - @Size(max = 64) + @Size(max = 1000) @JsonProperty("presentOutsideKeralaCityVilgeEn") private String presentOutsideKeralaCityVilgeEn; @Size(max = 64) @JsonProperty("presentOutsideKeralaPincode") private String presentOutsideKeralaPincode; + @Size(max = 64) @JsonProperty("presentOutsideKeralaPostOfficeEn") private String presentOutsideKeralaPostOfficeEn; @@ -117,7 +126,6 @@ public class GroomRegistryAddressDetails { @JsonProperty("presentOutsideKeralaStreetNameMl") private String presentOutsideKeralaStreetNameMl; - @Size(max = 2500) @JsonProperty("presentOutsideKeralaHouseNameMl") private String presentOutsideKeralaHouseNameMl; @@ -126,27 +134,22 @@ public class GroomRegistryAddressDetails { @JsonProperty("presentOutSideIndiaAdressEn") private String presentOutSideIndiaAdressEn; - @Size(max = 2500) @JsonProperty("presentOutSideIndiaAdressMl") private String presentOutSideIndiaAdressMl; - @Size(max = 2500) @JsonProperty("presentOutSideIndiaAdressEnB") private String presentOutSideIndiaAdressEnB; - @Size(max = 2500) @JsonProperty("presentOutSideIndiaAdressMlB") private String presentOutSideIndiaAdressMlB; - @Size(max = 2500) @JsonProperty("presentOutSideIndiaProvinceEn") private String presentOutSideIndiaProvinceEn; - @Size(max = 1000) @JsonProperty("presentOutSideIndiaLocalityMl") private String presentOutSideIndiaLocalityMl; @@ -159,9 +162,6 @@ public class GroomRegistryAddressDetails { @JsonProperty("presentOutSideCountry") private String presentOutSideCountry; - @JsonProperty("isPrsentAddress") - private Boolean isPrsentAddress; - @Size(max = 1000) @JsonProperty("presentOutSideIndiaadrsVillage") private String presentOutSideIndiaadrsVillage; @@ -172,8 +172,8 @@ public class GroomRegistryAddressDetails { ////Db Fields////// - @JsonProperty("isPrsentAddressInt") - private Integer isPrsentAddressInt; + + @Size(max = 64) @JsonProperty("presentUuid") private String presentUuid; @@ -221,19 +221,54 @@ public class GroomRegistryAddressDetails { @Size(max = 1000) @JsonProperty("villageNamePresent") private String villageNamePresent; - @Size(max = 1000) - @JsonProperty("villageIdPresent") - private String villageIdPresent; + @JsonProperty("townOrVillagePresent") + private String townOrVillagePresent; @Size(max = 10) @JsonProperty("poNoPresent") private String poNoPresent; + @Size(max = 1000) + @JsonProperty("presentOthrTalukName") + private String presentOthrTalukName; + @Size(max = 64) + @JsonProperty("presentOthPostOfficeEn") + private String presentOthPostOfficeEn; @Size(max = 64) @JsonProperty("brideGroomPresent") private String brideGroomPresent; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressEn") + private String presentOthrIndiaAdressEn; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressMl") + private String presentOthrIndiaAdressMl; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressEnB") + private String presentOthrIndiaAdressEnB; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaAdressMlB") + private String presentOthrIndiaAdressMlB; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaProvinceEn") + private String presentOthrIndiaProvinceEn; + + @Size(max = 2500) + @JsonProperty("presentOthrIndiaProvinceMl") + private String presentOthrIndiaProvinceMl; + + ////Permanant + + @JsonProperty("isPermanentAddress") + private Boolean isPermanentAddress; + @Size(max = 1000) @JsonProperty("permtaddressCountry") private String permtaddressCountry; @@ -262,6 +297,14 @@ public class GroomRegistryAddressDetails { @JsonProperty("permntInKeralaAdrVillage") private String permntInKeralaAdrVillage; + @Size(max = 2500) + @JsonProperty("permntOutSideIndiaProvinceMl") + private String permntOutSideIndiaProvinceMl; + + @Size(max = 2500) + @JsonProperty("permntOutSideIndiaProvinceEn") + private String permntOutSideIndiaProvinceEn; + @Size(max = 1000) @JsonProperty("permntInKeralaAdrLocalityNameEn") private String permntInKeralaAdrLocalityNameEn; @@ -273,6 +316,7 @@ public class GroomRegistryAddressDetails { @Size(max = 2500) @JsonProperty("permntInKeralaAdrHouseNameEn") private String permntInKeralaAdrHouseNameEn; + @Size(max = 2500) @JsonProperty("permntInKeralaAdrLocalityNameMl") private String permntInKeralaAdrLocalityNameMl; @@ -361,10 +405,6 @@ public class GroomRegistryAddressDetails { @JsonProperty("permntOutsideIndiaLinetwoMl") private String permntOutsideIndiaLinetwoMl; - @Size(max = 2500) - @JsonProperty("permntOutsideIndiaprovinceEn") - private String permntOutsideIndiaprovinceEn; - @Size(max = 1000) @JsonProperty("permntOutsideIndiaVillage") private String permntOutsideIndiaVillage; @@ -387,6 +427,10 @@ public class GroomRegistryAddressDetails { @Size(max = 64) @JsonProperty("permanentUuid") private String permanentUuid; + + @JsonProperty("isPermanentAddressInt") + private Integer isPermanentAddressInt; + @Size(max = 64) @JsonProperty("countryIdPermanent") private String countryIdPermanent; @@ -432,15 +476,481 @@ public class GroomRegistryAddressDetails { private String villageNamePermanent; @Size(max = 1000) - @JsonProperty("villageIdPermanent") - private String villageIdPermanent; + @JsonProperty("townOrVillagePermanent") + private String townOrVillagePermanent; @Size(max = 10) @JsonProperty("poNoPermanent") private String poNoPermanent; + @Size(max = 1000) + @JsonProperty("permntOthrTalukName") + private String permntOthrTalukName; + + @Size(max = 64) + @JsonProperty("permntOthPostOfficeEn") + private String permntOthPostOfficeEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLineoneEn") + private String permntOthrIndiaLineoneEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLineoneMl") + private String permntOthrIndiaLineoneMl; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLinetwoEn") + private String permntOthrIndiaLinetwoEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaLinetwoMl") + private String permntOthrIndiaLinetwoMl; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaprovinceEn") + private String permntOthrIndiaprovinceEn; + + @Size(max = 2500) + @JsonProperty("permntOthrIndiaprovinceMl") + private String permntOthrIndiaprovinceMl; @Size(max = 64) @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; + + // @Size(max = 64) + // @JsonProperty("presentaddressCountry") + // private String presentaddressCountry; + + // @Size(max = 64) + // @JsonProperty("presentaddressStateName") + // private String presentaddressStateName; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaLBName") + // private String presentInsideKeralaLBName; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaDistrict") + // private String presentInsideKeralaDistrict; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaTaluk") + // private String presentInsideKeralaTaluk; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaVillage") + // private String presentInsideKeralaVillage; + + // @Size(max = 1000) + // @JsonProperty("presentInsideKeralaLocalityNameEn") + // private String presentInsideKeralaLocalityNameEn; + + // @Size(max = 2000) + // @JsonProperty("presentInsideKeralaStreetNameEn") + // private String presentInsideKeralaStreetNameEn; + + // @Size(max = 2500) + // @JsonProperty("presentInsideKeralaHouseNameEn") + // private String presentInsideKeralaHouseNameEn; + + // @Size(max = 1000) + // @JsonProperty("presentInsideKeralaLocalityNameMl") + // private String presentInsideKeralaLocalityNameMl; + + // @Size(max = 2000) + // @JsonProperty("presentInsideKeralaStreetNameMl") + // private String presentInsideKeralaStreetNameMl; + + // @Size(max = 2500) + // @JsonProperty("presentInsideKeralaHouseNameMl") + // private String presentInsideKeralaHouseNameMl; + + // @Size(max = 10) + // @JsonProperty("presentInsideKeralaPincode") + // private String presentInsideKeralaPincode; + + // @Size(max = 64) + // @JsonProperty("presentInsideKeralaPostOffice") + // private String presentInsideKeralaPostOffice; + + // @Size(max = 64) + // @JsonProperty("presentWardNo") + // private String presentWardNo; + + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaDistrict") + // private String presentOutsideKeralaDistrict; + + // @Size(max = 1000) + // @JsonProperty("presentOutsideKeralaTaluk") + // private String presentOutsideKeralaTalukName; + + // @Size(max = 1000) + // @JsonProperty("presentOutsideKeralaVillage") + // private String presentOutsideKeralaVillageName; + + + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaCityVilgeEn") + // private String presentOutsideKeralaCityVilgeEn; + + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaPincode") + // private String presentOutsideKeralaPincode; + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaPostOfficeEn") + // private String presentOutsideKeralaPostOfficeEn; + + // @Size(max = 64) + // @JsonProperty("presentOutsideKeralaPostOfficeMl") + // private String presentOutsideKeralaPostOfficeMl; + + // @Size(max = 1000) + // @JsonProperty("presentOutsideKeralaLocalityNameEn") + // private String presentOutsideKeralaLocalityNameEn; + + // @Size(max = 2000) + // @JsonProperty("presentOutsideKeralaStreetNameEn") + // private String presentOutsideKeralaStreetNameEn; + + // @Size(max = 2500) + // @JsonProperty("presentOutsideKeralaHouseNameEn") + // private String presentOutsideKeralaHouseNameEn; + + // @Size(max = 1000) + // @JsonProperty("presentOutsideKeralaLocalityNameMl") + // private String presentOutsideKeralaLocalityNameMl; + + // @Size(max = 2000) + // @JsonProperty("presentOutsideKeralaStreetNameMl") + // private String presentOutsideKeralaStreetNameMl; + + + // @Size(max = 2500) + // @JsonProperty("presentOutsideKeralaHouseNameMl") + // private String presentOutsideKeralaHouseNameMl; + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaAdressEn") + // private String presentOutSideIndiaAdressEn; + + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaAdressMl") + // private String presentOutSideIndiaAdressMl; + + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaAdressEnB") + // private String presentOutSideIndiaAdressEnB; + + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaAdressMlB") + // private String presentOutSideIndiaAdressMlB; + + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaProvinceEn") + // private String presentOutSideIndiaProvinceEn; + + + // @Size(max = 1000) + // @JsonProperty("presentOutSideIndiaLocalityMl") + // private String presentOutSideIndiaLocalityMl; + + // @Size(max = 2500) + // @JsonProperty("presentOutSideIndiaProvinceMl") + // private String presentOutSideIndiaProvinceMl; + + // @Size(max = 64) + // @JsonProperty("presentOutSideCountry") + // private String presentOutSideCountry; + + // @JsonProperty("isPrsentAddress") + // private Boolean isPrsentAddress; + + // @Size(max = 1000) + // @JsonProperty("presentOutSideIndiaadrsVillage") + // private String presentOutSideIndiaadrsVillage; + + // @Size(max = 64) + // @JsonProperty("presentOutSideIndiaadrsCityTown") + // private String presentOutSideIndiaadrsCityTown; + + // ////Db Fields////// + + // @JsonProperty("isPrsentAddressInt") + // private Integer isPrsentAddressInt; + // @Size(max = 64) + // @JsonProperty("presentUuid") + // private String presentUuid; + + // @Size(max = 64) + // @JsonProperty("countryIdPresent") + // private String countryIdPresent; + + // @Size(max = 64) + // @JsonProperty("stateIdPresent") + // private String stateIdPresent; + + // @Size(max = 64) + // @JsonProperty("districtIdPresent") + // private String districtIdPresent; + + // @Size(max = 64) + // @JsonProperty("pinNoPresent") + // private String pinNoPresent; + + // @Size(max = 1000) + // @JsonProperty("localityEnPresent") + // private String localityEnPresent; + + // @Size(max = 1000) + // @JsonProperty("localityMlPresent") + // private String localityMlPresent; + + // @Size(max = 1000) + // @JsonProperty("streetNameEnPresent") + // private String streetNameEnPresent; + + // @Size(max = 1000) + // @JsonProperty("streetNameMlPresent") + // private String streetNameMlPresent; + + // @Size(max = 1000) + // @JsonProperty("houseNameNoEnPresent") + // private String houseNameNoEnPresent; + + // @Size(max = 1000) + // @JsonProperty("houseNameNoMlPresent") + // private String houseNameNoMlPresent; + + // @Size(max = 1000) + // @JsonProperty("villageNamePresent") + // private String villageNamePresent; + + // @Size(max = 1000) + // @JsonProperty("villageIdPresent") + // private String villageIdPresent; + + // @Size(max = 10) + // @JsonProperty("poNoPresent") + // private String poNoPresent; + + // @Size(max = 64) + // @JsonProperty("brideGroomPresent") + // private String brideGroomPresent; + // ////Permanant + // @Size(max = 1000) + // @JsonProperty("permtaddressCountry") + // private String permtaddressCountry; + + // @Size(max = 64) + // @JsonProperty("permtaddressStateName") + // private String permtaddressStateName; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrLBName") + // private String permntInKeralaAdrLBName; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrDistrict") + // private String permntInKeralaAdrDistrict; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaCityVilgeEn") + // private String permntOutsideKeralaCityVilgeEn; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrTaluk") + // private String permntInKeralaAdrTaluk; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrVillage") + // private String permntInKeralaAdrVillage; + + // @Size(max = 1000) + // @JsonProperty("permntInKeralaAdrLocalityNameEn") + // private String permntInKeralaAdrLocalityNameEn; + + // @Size(max = 2000) + // @JsonProperty("permntInKeralaAdrStreetNameEn") + // private String permntInKeralaAdrStreetNameEn; + + // @Size(max = 2500) + // @JsonProperty("permntInKeralaAdrHouseNameEn") + // private String permntInKeralaAdrHouseNameEn; + // @Size(max = 2500) + // @JsonProperty("permntInKeralaAdrLocalityNameMl") + // private String permntInKeralaAdrLocalityNameMl; + + // @Size(max = 2500) + // @JsonProperty("permntInKeralaAdrStreetNameMl") + // private String permntInKeralaAdrStreetNameMl; + + // @Size(max = 2500) + // @JsonProperty("permntInKeralaAdrHouseNameMl") + // private String permntInKeralaAdrHouseNameMl; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrPincode") + // private String permntInKeralaAdrPincode; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaAdrPostOffice") + // private String permntInKeralaAdrPostOffice; + + // @Size(max = 64) + // @JsonProperty("permntInKeralaWardNo") + // private String permntInKeralaWardNo; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaDistrict") + // private String permntOutsideKeralaDistrict; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideKeralaTaluk") + // private String permntOutsideKeralaTaluk; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideKeralaVillage") + // private String permntOutsideKeralaVillage; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaPincode") + // private String permntOutsideKeralaPincode; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideKeralaLocalityNameEn") + // private String permntOutsideKeralaLocalityNameEn; + + // @Size(max = 2000) + // @JsonProperty("permntOutsideKeralaStreetNameEn") + // private String permntOutsideKeralaStreetNameEn; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideKeralaHouseNameEn") + // private String permntOutsideKeralaHouseNameEn; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideKeralaLocalityNameMl") + // private String permntOutsideKeralaLocalityNameMl; + + // @Size(max = 2000) + // @JsonProperty("permntOutsideKeralaStreetNameMl") + // private String permntOutsideKeralaStreetNameMl; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideKeralaHouseNameMl") + // private String permntOutsideKeralaHouseNameMl; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaPostOfficeEn") + // private String permntOutsideKeralaPostOfficeEn; + + // @Size(max = 64) + // @JsonProperty("permntOutsideKeralaPostOfficeMl") + // private String permntOutsideKeralaPostOfficeMl; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaLineoneEn") + // private String permntOutsideIndiaLineoneEn; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaLineoneMl") + // private String permntOutsideIndiaLineoneMl; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaLinetwoEn") + // private String permntOutsideIndiaLinetwoEn; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaLinetwoMl") + // private String permntOutsideIndiaLinetwoMl; + + // @Size(max = 2500) + // @JsonProperty("permntOutsideIndiaprovinceEn") + // private String permntOutsideIndiaprovinceEn; + + // @Size(max = 1000) + // @JsonProperty("permntOutsideIndiaVillage") + // private String permntOutsideIndiaVillage; + + // @Size(max = 64) + // @JsonProperty("permntOutsideIndiaCityTown") + // private String permntOutsideIndiaCityTown; + + // @Size(max = 10) + // @JsonProperty("permanentOutsideIndiaPostCode") + // private String permanentOutsideIndiaPostCode; + + // @Size(max = 64) + // @JsonProperty("permntOutsideIndiaCountry") + // private String permntOutsideIndiaCountry; + + + // ////Db Fields////// + + // @Size(max = 64) + // @JsonProperty("permanentUuid") + // private String permanentUuid; + // @Size(max = 64) + // @JsonProperty("countryIdPermanent") + // private String countryIdPermanent; + + // @Size(max = 64) + // @JsonProperty("stateIdPermanent") + // private String stateIdPermanent; + + // @Size(max = 64) + // @JsonProperty("districtIdPermanent") + // private String districtIdPermanent; + + // @Size(max = 64) + // @JsonProperty("pinNoPermanent") + // private String pinNoPermanent; + + // @Size(max = 1000) + // @JsonProperty("localityEnPermanent") + // private String localityEnPermanent; + + // @Size(max = 1000) + // @JsonProperty("localityMlPermanent") + // private String localityMlPermanent; + + // @Size(max = 1000) + // @JsonProperty("streetNameEnPermanent") + // private String streetNameEnPermanent; + + // @Size(max = 1000) + // @JsonProperty("streetNameMlPermanent") + // private String streetNameMlPermanent; + + // @Size(max = 1000) + // @JsonProperty("houseNameNoEnPermanent") + // private String houseNameNoEnPermanent; + + // @Size(max = 1000) + // @JsonProperty("houseNameNoMlPermanent") + // private String houseNameNoMlPermanent; + + // @Size(max = 1000) + // @JsonProperty("villageNamePermanent") + // private String villageNamePermanent; + + // @Size(max = 1000) + // @JsonProperty("villageIdPermanent") + // private String villageIdPermanent; + + // @Size(max = 10) + // @JsonProperty("poNoPermanent") + // private String poNoPermanent; + + // @Size(max = 64) + // @JsonProperty("brideGroomPermanent") + // private String brideGroomPermanent; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java index 9d05697fe97..efab9b07f34 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java @@ -184,9 +184,6 @@ public class MarriageRegistryDetails { @JsonProperty("modulecode") private String modulecode; - @JsonProperty("AuditDetails") - private AuditDetails auditDetails; - @JsonProperty("BrideDetails") private BrideRegistryDetails brideDetails; @@ -196,6 +193,15 @@ public class MarriageRegistryDetails { @JsonProperty("WitnessDetails") private WitnessRegistryDetails witnessDetails; + @JsonProperty("BrideAddressDetails") + private BrideRegistryAddressDetails brideAddressDetails; + + @JsonProperty("GroomAddressDetails") + private GroomRegistryAddressDetails groomAddressDetails; + + @JsonProperty("AuditDetails") + private AuditDetails auditDetails; + From 5127a84be95539aad5d0f0771dc875a566286d67 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 29 Mar 2023 03:44:47 +0530 Subject: [PATCH 059/420] registry create -address row mapper --- .../MarriageRegistryQueryBuilder.java | 9 ++- .../BrideRegistryAddressRowMapper.java | 80 +++++++++++++++++++ .../GroomRegistryAddressRowMapper.java | 78 ++++++++++++++++++ .../rowmapper/MarriageRegistryRowMapper.java | 8 +- 4 files changed, 167 insertions(+), 8 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 92640f9f455..4bbe50dcfa1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -49,6 +49,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") .append("GPMA.locality_en as GPMA_locality_en,GPMA.locality_ml as GPMA_locality_ml,GPMA.street_name_en as GPMA_street_name_en,GPMA.street_name_ml as GPMA_street_name_ml ,") @@ -56,7 +57,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") - .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml ,") + .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode,") .append("BPMA.id as BPMA_id ,BPMA.housename_en as BPMA_housename_en ,BPMA.housename_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") @@ -65,7 +66,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , ") .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") - .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml ,") + .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml , BPMA.ot_zipcode as BPMA_ot_zipcode,") .append("GPSA.id as GPSA_id ,GPSA.housename_en as GPSA_housename_en,GPSA.housename_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") @@ -74,7 +75,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom , ") .append("GPSA.ot_address1_en as GPSA_ot_address1_en,GPSA.ot_address1_ml as GPSA_ot_address1_ml , GPSA.ot_address2_en as GPSA_ot_address2_en , ") .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") - .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml,") + .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml, GPSA.ot_zipcode as GPSA_ot_zipcode,") .append("BPSA.id as BPSA_id ,BPSA.housename_en as BPSA_housename_en,BPSA.housename_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") .append("BPSA.talukid as BPSA_talukid , BPSA.taluk_name as BPSA_taluk_name , BPSA.tenantid as BPSA_tenantid , BPSA.ward_code as BPSA_ward_code ,") @@ -83,7 +84,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") - .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,") + .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode , ") .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java new file mode 100644 index 00000000000..bb2f3eba972 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java @@ -0,0 +1,80 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import java.sql.ResultSet; +import java.sql.SQLException; +import org.ksmart.marriage.marriageregistry.model.BrideRegistryAddressDetails; + +public interface BrideRegistryAddressRowMapper { + default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLException { + + return BrideRegistryAddressDetails.builder() + .countryIdPresent(rs.getString("BPSA_countryid")) + .stateIdPresent(rs.getString("BPSA_stateid")) + .districtIdPresent(rs.getString("BPSA_districtid")) + .poNoPresent(rs.getString("BPSA_poid")) + .presentaddressCountry(rs.getString("GPMA_countryid")) + .localityEnPresent(rs.getString("BPSA_locality_en")) + .localityMlPresent(rs.getString("BPSA_locality_ml")) + .streetNameEnPresent(rs.getString("BPSA_street_name_en")) + .streetNameMlPresent(rs.getString("BPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("BPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("BPSA_housename_ml")) + .villageNamePresent(rs.getString("BPSA_village_name")) + .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) + .presentInsideKeralaTaluk(rs.getString("BPSA_talukid")) + .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) + .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) + .presentWardNo(rs.getString("BPSA_ward_code")) + .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) + .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) + .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) +// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) + + + .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) + .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) + .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) + .presentOutSideIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) + .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) + .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) +// .presentOutSideIndiaadrsCityTown(rs.getString("stat_mother_resdnce_placetype")) + + .countryIdPermanent(rs.getString("BPMA_countryid")) + .stateIdPermanent(rs.getString("BPMA_stateid")) + .districtIdPermanent(rs.getString("BPMA_districtid")) + .poNoPermanent(rs.getString("BPMA_poid")) + .localityEnPermanent(rs.getString("BPMA_locality_en")) + .localityMlPermanent(rs.getString("BPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) + .villageNamePermanent(rs.getString("BPMA_village_name")) + .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) + .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) + .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) + .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) + .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) + .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) +// .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) + .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) + .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) +// .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) +// .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) + .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) + .permntOutsideIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) + .permntOutsideIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) + .permntOutsideIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) + .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) + .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) + + .presentUuid(rs.getString("BPSA_id")) + .permanentUuid(rs.getString("BPMA_id")) + + + .build(); + + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java new file mode 100644 index 00000000000..53ab787aa2c --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -0,0 +1,78 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +//import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; +import java.sql.ResultSet; +import java.sql.SQLException; +import org.ksmart.marriage.marriageregistry.model.GroomRegistryAddressDetails; + +public interface GroomRegistryAddressRowMapper { + default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws SQLException { + + return GroomRegistryAddressDetails.builder() + .countryIdPresent(rs.getString("GPSA_countryid")) + .stateIdPresent(rs.getString("GPSA_stateid")) + .districtIdPresent(rs.getString("GPSA_districtid")) + .poNoPresent(rs.getString("GPSA_poid")) + .presentaddressCountry(rs.getString("GPMA_countryid")) + .localityEnPresent(rs.getString("GPSA_locality_en")) + .localityMlPresent(rs.getString("GPSA_locality_ml")) + .streetNameEnPresent(rs.getString("GPSA_street_name_en")) + .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) + .villageNamePresent(rs.getString("GPSA_village_name")) + .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) + .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) + .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) + .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) + .presentWardNo(rs.getString("GPSA_ward_code")) + .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) + .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) + .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) +// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) + + + .presentOutSideIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) + .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) + .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) + .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) + .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) + .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) +// .presentOutSideIndiaadrsCityTown(rs.getString("stat_mother_resdnce_placetype")) + + .countryIdPermanent(rs.getString("GPMA_countryid")) + .stateIdPermanent(rs.getString("GPMA_stateid")) + .districtIdPermanent(rs.getString("GPMA_districtid")) + .poNoPermanent(rs.getString("GPMA_poid")) + .localityEnPermanent(rs.getString("GPMA_locality_en")) + .localityMlPermanent(rs.getString("GPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) + .villageNamePermanent(rs.getString("GPMA_village_name")) + .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) + .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) + .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) + .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) + .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) + .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) + .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) +// .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) + .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) + .permntOutsideKeralaPostOfficeMl(rs.getString("GPMA_poname_ml")) +// .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) +// .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) + .permntOutsideIndiaLineoneEn(rs.getString("GPMA_ot_address1_en")) + .permntOutsideIndiaLineoneMl(rs.getString("GPMA_ot_address1_ml")) + .permntOutsideIndiaLinetwoEn(rs.getString("GPMA_ot_address2_en")) + .permntOutsideIndiaLinetwoMl(rs.getString("GPMA_ot_address2_ml")) + .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) + .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) + + .presentUuid(rs.getString("GPSA_id")) + .permanentUuid(rs.getString("GPMA_id")) + + .build(); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index caf60fcb105..20a19467f43 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -14,7 +14,7 @@ @Component public class MarriageRegistryRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideRegistryRowMapper, - GroomRegistryRowMapper,MarriageAddressRegistryRowMapper, + GroomRegistryRowMapper,GroomRegistryAddressRowMapper,BrideRegistryAddressRowMapper, WitnessRegistryRowMapper{ @Override @@ -48,13 +48,13 @@ public List extractData(ResultSet rs) throws SQLExcepti .registrationno(rs.getString("MD_registrationno")) .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) + .brideAddressDetails(getBrideAddressDetails(rs)) .groomDetails(getGroomDetails(rs)) + .groomAddressDetails(getGroomAddressDetails(rs)) .witnessDetails(getWitnessDetails(rs)) - .auditDetails(getAuditDetails(rs)) + .auditDetails(getAuditDetails(rs)) .build()); } - - return result; } From 476e46fcaf8caf0775f80fa7982df20814d9aae2 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 29 Mar 2023 05:10:26 +0530 Subject: [PATCH 060/420] workflow integration --- .../MarriageApplicationConfiguration.java | 8 + .../model/MarriageApplicationDetails.java | 73 ++++--- .../model/marriage/MarriageDocument.java | 59 ++++++ .../MarriageRegistryController.java | 7 - .../marriage/utils/MarriageConstants.java | 38 ++++ .../marriage/workflow/WorkflowIntegrator.java | 180 ++++++++++++++++++ 6 files changed, 334 insertions(+), 31 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index 1709fb4d8fc..fe0b2ead79d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -51,6 +51,14 @@ public class MarriageApplicationConfiguration { @Value("${egov.bnd.max.limit}") private Integer maxSearchLimit; + //Workflow + + @Value("${egov.workflow.host}") + private String wfHost; + + @Value("${egov.workflow.path}") + private String wfTransitionPath; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index 966480b9b67..ad2f5835be3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -8,6 +8,11 @@ //import org.ksmart.marriage.common.model.Document; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.util.List; +import javax.swing.text.Document; +import javax.validation.Valid; + import javax.validation.constraints.Size; @Getter @@ -103,23 +108,7 @@ public class MarriageApplicationDetails { // @JsonProperty("marriageOthersSpecify") // private String othersspecify; - @NotNull - @Size(max = 64) - @JsonProperty("applicationType") - private String applicationtype; - - @JsonProperty("modulecode") - private String modulecode; - - @NotNull - @Size(max = 64) - @JsonProperty("businessService") - private String businessservice; - @NotNull - @Size(max = 64) - @JsonProperty("workflowCode") - private String workflowcode; // @Size(max = 64) // @JsonProperty("fileNo") @@ -140,13 +129,7 @@ public class MarriageApplicationDetails { // @JsonProperty("fileStatus") // private String file_status; - @Size(max = 64) - @JsonProperty("action") - private String action; - @Size(max = 64) - @JsonProperty("status") - private String status; @Size(max = 1000) @JsonProperty("placeid") private String placeid; @@ -203,12 +186,54 @@ public class MarriageApplicationDetails { @JsonProperty("GroomAddressDetails") private GroomAddressDetails groomAddressDetails; -// @JsonProperty("PresentAddressDetails") -// private PresentAddressDetails present ; @JsonProperty("WitnessDetails") private WitnessDetails witnessDetails; + //Workflow 29/03.2023 Jasmine + @Size(max = 64) + @JsonProperty("action") + private String action; + + @Size(max = 64) + @JsonProperty("status") + private String status; + + @JsonProperty("assignee") + private List assignees; + + + @NotNull + @Size(max = 64) + @JsonProperty("applicationType") + private String applicationtype; + + @JsonProperty("modulecode") + private String modulecode; + + @NotNull + @Size(max = 64) + @JsonProperty("businessService") + private String businessservice; + + @NotNull + @Size(max = 64) + @JsonProperty("workflowCode") + private String workflowcode; + + private String assignuser; + + @Size(max = 128) + // @Html + private String comment; + + @Valid + @JsonProperty("wfDocuments") + private List wfDocuments; + + // public void setStatus(String s) { + // } + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java new file mode 100644 index 00000000000..581327ad911 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java @@ -0,0 +1,59 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModel; + +import java.util.Objects; +import lombok.*; + +import org.ksmart.marriage.common.model.AuditDetails; +import org.springframework.validation.annotation.Validated; +import javax.validation.Valid; +import javax.validation.constraints.*; + +@Validated +@javax.annotation.Generated(value = "org.egov.codegen.SpringBootCodegen", date = "2018-09-18T17:06:11.263+05:30") + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@EqualsAndHashCode +public class MarriageDocument { + + @JsonProperty("Id") + private String id; + + @JsonProperty("Active") + private Boolean active; + + @JsonProperty("marriageTenantid") + private String marriageTenantid = null; + + @JsonProperty("documentType") + private String documentType = null; + + @JsonProperty("fileStoreId") + private String fileStoreId = null; + + @JsonProperty("fileName") + private String fileName = null; + + @JsonProperty("marriageId") + private String marriageId = null; + + @JsonProperty("documentOwner") + private String documentOwner = null; + + @JsonProperty("documentUid") + private String documentUid; + + @JsonProperty("applicationNumber") + private String deathACKNo = null; + + @JsonProperty("AuditDetails") + private AuditDetails deathDocAuditDetails = null; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java index 40eb1b68ce6..66794a41c20 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java @@ -17,14 +17,7 @@ import javax.validation.Valid; import java.util.List; -//import org.ksmart.marriage.marriageregistry.model.BirthCertificate; -//import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; -//import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetailsRequest; -//import org.ksmart.marriage.marriageregistry.model.RegisterBirthSearchCriteria; -//import org.ksmart.marriage.marriageregistry.service.RegisterBirthService; -//import org.ksmart.marriage.utils.ResponseInfoFactory; -//v1/marriagedetails/_createregistry @Slf4j @RestController @RequestMapping("/v1/marriagedetails") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 04508a0dcf3..a339d9c332e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -95,5 +95,43 @@ public class MarriageConstants { public static final String STATE_CODE_SMALL = "kl"; + //Jasmine 29.03.2023 + //mdms tenantId + public static final String MDMS_TENANTID = "kl"; + //workflow + public static final String BUSINESS_SERVICE_BND = "NewMarriage"; + + public static final String TENANTIDKEY = "tenantId"; + + public static final String BUSINESSSERVICEKEY = "businessService"; + + public static final String ACTIONKEY = "action"; + + public static final String COMMENTKEY = "comment"; + + public static final String MODULENAMEKEY = "moduleName"; + + public static final String BUSINESSIDKEY = "businessId"; + + public static final String DOCUMENTSKEY = "documents"; + + public static final String ASSIGNEEKEY = "assignees"; + + public static final String UUIDKEY = "uuid"; + + public static final String BNDMODULENAMEVALUE = "marriage-services"; + + public static final String WORKFLOWREQUESTARRAYKEY = "ProcessInstances"; + + public static final String REQUESTINFOKEY = "RequestInfo"; + + public static final String PROCESSINSTANCESJOSNKEY = "$.ProcessInstances"; + + public static final String BUSINESSIDJOSNKEY = "$.businessId"; + + public static final String STATUSJSONKEY = "$.state.applicationStatus"; + + public static final String TRIGGER_NOWORKFLOW = "NOWORKFLOW"; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java new file mode 100644 index 00000000000..d6a50ff9b9b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -0,0 +1,180 @@ +package org.ksmart.marriage.workflow; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Collections; +import org.apache.commons.collections4.CollectionUtils; + +// import org.ksmart.death.deathapplication.config.DeathConfiguration; +// import org.ksmart.death.deathapplication.repository.DeathApplnRepository; +// import org.ksmart.death.deathapplication.web.models.DeathDtlRequest; +// import org.ksmart.death.deathapplication.web.models.DeathSearchCriteria; +// import org.ksmart.death.deathapplication.util.DeathConstants; + +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; +import org.ksmart.marriage.utils.MarriageConstants; +// import org.ksmart.death.deathapplication.web.models.DeathCorrectionDtls; +// import org.ksmart.death.deathapplication.web.models.DeathCorrectionRequest; +// import org.ksmart.death.deathapplication.web.models.DeathAbandonedDtls; +// import org.ksmart.death.deathapplication.web.models.DeathAbandonedRequest; +// import org.ksmart.death.deathapplication.web.models.DeathDtl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.RestTemplate; + +import com.jayway.jsonpath.DocumentContext; +import com.jayway.jsonpath.JsonPath; +import com.jayway.jsonpath.PathNotFoundException; + +import lombok.extern.slf4j.Slf4j; +import net.minidev.json.JSONArray; +import net.minidev.json.JSONObject; +/** + * Created by Jasmine + * on 29.03.2023 + */ +@Service +@Slf4j +public class WorkflowIntegrator { + + + + private final MarriageApplicationConfiguration bndConfig; + private final RestTemplate restTemplate; + private final MarriageApplicationRepository repository; + @Autowired + public WorkflowIntegrator(RestTemplate restTemplate, MarriageApplicationConfiguration bndConfig ,MarriageApplicationRepository repository) { + this.restTemplate = restTemplate; + this.bndConfig = bndConfig; + this.repository=repository; + + } + + /** + * Method to integrate with workflow + * + * takes the Deathcert det request (now take applicant personal request) as + * parameter constructs the work-flow request + * + * and sets the resultant status from wf-response back to file details object + * + * @param request the {@link MarriageDetailsRequest} + */ + public void callWorkFlow(MarriageDetailsRequest request) { + + List currentFile = request.getMarriageDetails(); + JSONArray array = new JSONArray(); + for (MarriageApplicationDetails marriageDtl : request.getMarriageDetails()) { + String businessServiceFromMDMS=marriageDtl.getBusinessservice(); + if (businessServiceFromMDMS == null) { + businessServiceFromMDMS = MarriageConstants.BUSINESS_SERVICE_BND; + } + if (businessServiceFromMDMS.equals(MarriageConstants.BUSINESS_SERVICE_BND) || !request.getMarriageDetails() + .get(0).getAction().equalsIgnoreCase(MarriageConstants.TRIGGER_NOWORKFLOW)) { + + JSONObject obj = new JSONObject(); + // System.out.println("businessServiceFromMDMS"+businessServiceFromMDMS); + // Adding assignes to processInstance assignees + // List> uuidMaps = buildUUIDList(deathDtl.getAssignees()); + // System.out.println(uuidMaps); + // if (CollectionUtils.isNotEmpty(uuidMaps)) { + // obj.put(CrDeathConstants.ASSIGNEEKEY, uuidMaps.get(0).get("uuid")); + // } + currentFile + .forEach(marriagedtl -> { + obj.put(MarriageConstants.BUSINESSIDKEY, marriagedtl.getApplicationNumber()); + obj.put(MarriageConstants.TENANTIDKEY, marriagedtl.getTenantid()); + obj.put(MarriageConstants.BUSINESSSERVICEKEY, marriagedtl.getWorkflowcode()); + List> uuidMaps = buildUUIDList(marriagedtl.getAssignees()); + // System.out.println("uuidMaps"+uuidMaps); + if (CollectionUtils.isNotEmpty(uuidMaps)) { + obj.put(MarriageConstants.ASSIGNEEKEY, uuidMaps.get(0).get("uuid")); + } + }); + + obj.put(MarriageConstants.MODULENAMEKEY, MarriageConstants.BNDMODULENAMEVALUE); + obj.put(MarriageConstants.ACTIONKEY, marriageDtl.getAction()); + obj.put(MarriageConstants.COMMENTKEY, marriageDtl.getComment()); + obj.put(MarriageConstants.DOCUMENTSKEY, marriageDtl.getWfDocuments()); + array.add(obj); + } + } + + if (!CollectionUtils.isEmpty(array)) { + JSONObject workFlowRequest = new JSONObject(); + workFlowRequest.put(MarriageConstants.REQUESTINFOKEY, request.getRequestInfo()); + workFlowRequest.put(MarriageConstants.WORKFLOWREQUESTARRAYKEY, array); + String response = null; + // System.out.println("workflow Check :" + workFlowRequest); + log.info("workflow integrator request " + workFlowRequest); + + try { + response = restTemplate.postForObject(bndConfig.getWfHost().concat(bndConfig.getWfTransitionPath()), + workFlowRequest, String.class); + } catch (HttpClientErrorException e) { + /* + * extracting message from client error exception + */ + DocumentContext responseContext = JsonPath.parse(e.getResponseBodyAsString()); + List errros = null; + try { + errros = responseContext.read("$.Errors"); + } catch (PathNotFoundException pnfe) { + log.error("EG_BND_WF_ERROR_KEY_NOT_FOUND", + " Unable to read the json path in error object : " + pnfe.getMessage()); + throw new CustomException("EG_BND_WF_ERROR_KEY_NOT_FOUND", + " Unable to read the json path in error object : " + pnfe.getMessage()); + } + throw new CustomException("EG_WF_ERROR", errros.toString()); + } catch (Exception e) { + throw new CustomException("EG_WF_ERROR", + " Exception occured while integrating with workflow : " + e.getMessage()); + } + + log.info("workflow integrator response " + response); + + /* + * on success result from work-flow read the data and set the status back to TL + * object + */ + // System.out.println("response Check :" + response); + DocumentContext responseContext = JsonPath.parse(response); + List> responseArray = responseContext.read(MarriageConstants.PROCESSINSTANCESJOSNKEY); + Map idStatusMap = new HashMap<>(); + responseArray.forEach(object -> { + + DocumentContext instanceContext = JsonPath.parse(object); + idStatusMap.put(instanceContext.read(MarriageConstants.BUSINESSIDJOSNKEY), + instanceContext.read(MarriageConstants.STATUSJSONKEY)); + }); + + // setting the status back to TL object from wf response + + request.getMarriageDetails().forEach( + bndObj -> bndObj.setStatus(idStatusMap.get(bndObj.getApplicationNumber()))); + + } + + } +//Jasmine 08.03.2023 + + + + private List> buildUUIDList(List assignees) { + List> result = new LinkedList<>(); + + if (CollectionUtils.isNotEmpty(assignees)) { + + assignees.forEach(assignee -> result.add(Collections.singletonMap(MarriageConstants.UUIDKEY, assignee))); + } + + return result; + } +} \ No newline at end of file From 92b65591149e0ed752d10eae7b270c2260b5d28e Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 29 Mar 2023 16:03:29 +0530 Subject: [PATCH 061/420] UPDATE --- .../src/main/resources/marriage.yml | 440 +++++++++++++++++- .../enrichment/MarriageDetailsEnrichment.java | 24 +- .../MarriageApplicationQueryBuilder.java | 4 +- 3 files changed, 445 insertions(+), 23 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 8fa00bc8551..c8da5c33ddf 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -629,11 +629,11 @@ serviceMaps: isTransaction: true queryMaps: - query: UPDATE public.eg_marriage_details - SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, tenantid=?, placetype=?, placeid=?, placename_en=?, + SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, - applicationnumber=?, registrationno=?, registration_date=?, action=?, status=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=?, - WHERE id=?; + registrationno=?, registration_date=?, action=?, status=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=? + WHERE id=? and applicationnumber=? and tenantid=?; basePath: MarriageDetails.* jsonMaps: @@ -645,8 +645,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageLBtype - - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.marriagePlacetype - jsonPath: $.MarriageDetails.*.placeid @@ -685,8 +683,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.workflowCode - - jsonPath: $.MarriageDetails.*.applicationNumber - - jsonPath: $.MarriageDetails.*.registrationno - jsonPath: $.MarriageDetails.*.registration_date @@ -705,12 +701,18 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.applicationNumber + + - jsonPath: $.MarriageDetails.*.marriageTenantid + + + - query : UPDATE public.eg_marriage_bride_groom_details SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, - maritalstatusid=?, is_spouse_living=?, bride_groom=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? - WHERE marriageid=?; + maritalstatusid=?, is_spouse_living=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? + WHERE marriageid=? and bride_groom= 'B' ; basePath: MarriageDetails.*.BrideDetails jsonMaps: @@ -769,22 +771,434 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideIslivingSpouse - - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + + - jsonPath: $.MarriageDetails.*.id + + + + - query: UPDATE public.eg_marriage_bride_groom_details + SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, + middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, + fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, + maritalstatusid=?, is_spouse_living=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? + WHERE marriageid=? and bride_groom= 'G'; + + basePath: MarriageDetails.*.GroomDetails + jsonMaps: + + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAadharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAadharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAadharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardianAadharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomIsSpouseLiving - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse + + - jsonPath: $.MarriageDetails.*.id + + + - query : UPDATE public.eg_marriage_witness_details + SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, + lastmodifiedtime=?, lastmodifiedby=? + WHERE marriageid=? and serial_no= '1'; + + + basePath: MarriageDetails.*.WitnessDetails + jsonMaps: + + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AadharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Age + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Esigned + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + + - query: UPDATE public.eg_marriage_witness_details + SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, + lastmodifiedtime=?, lastmodifiedby=? + WHERE marriageid=? and serial_no= '2'; + + + basePath: MarriageDetails.*.WitnessDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AadharNo + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameEn + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Age + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddresSEn + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Mobile + + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Esigned + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + + - query : UPDATE public.eg_marriage_present_address_details + SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, + locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, + lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=? + WHERE marriageid=? and bride_groom='B' and tenantid=?; + + + basePath: MarriageDetails.*.BrideAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentWardNo + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPresent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.isPermanentAddress + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEnB + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + + + + + + + + - query : UPDATE public.eg_marriage_present_address_details + SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, + locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, + lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=? + WHERE marriageid=? and bride_groom='G' and tenantid=?; + + basePath: MarriageDetails.*.GroomAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentWardNo + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPresent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.isPermanentAddress + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEnB + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + + - query: UPDATE public.eg_marriage_permanent_address_details + SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, + ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, + pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?,poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, + ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=? + WHERE marriageid=? and bride_groom='B' and tenantid=?; + basePath: MarriageDetails.*.BrideAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaLBName + + + - query : UPDATE public.eg_marriage_permanent_address_details + SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, + ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, + pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, + poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, + ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=? + WHERE bride_groom='G' AND marriageid=? and tenantid=?; + + + basePath: MarriageDetails.*.GroomAddressDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaPostOffice + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaLBName diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index ac6433b85cf..10034204402 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -1,5 +1,6 @@ package org.ksmart.marriage.marriageapplication.enrichment; +import com.google.common.primitives.ImmutableDoubleArray; import org.apache.commons.collections4.CollectionUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; @@ -79,6 +80,21 @@ public void enrichCreate(MarriageDetailsRequest request) { } + public void enrichUpdate(MarriageDetailsRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); + + request.getMarriageDetails() + .forEach(marriage -> marriage.setAuditDetails(auditDetails)); + + + setBridePermanentAddress(request); + setBridePresentAddress(request); + setGroomPermanentAddress(request); + setGroomPresentAddress(request); + } private void setGroomPresentAddress(MarriageDetailsRequest request) { request.getMarriageDetails() @@ -567,15 +583,7 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { - public void enrichUpdate(MarriageDetailsRequest request) { - RequestInfo requestInfo = request.getRequestInfo(); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); - - request.getMarriageDetails() - .forEach(marriage -> marriage.setAuditDetails(auditDetails)); - } private List getIds(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { return idGenRepository.getIdList(requestInfo, tenantId, idName, moduleCode, fnType, count); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 3761ecb1599..996ae8e653e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -14,7 +14,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { CommonQueryBuilder commonQueryBuilder; private static final String QUERY = new StringBuilder() - .append(" SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") + .append("SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.houseno_and_name_en as MD_housenameno_en , MD.houseno_and_name_ml as MD_housenameno_ml ,") .append("MD.locality_en as MD_locality_en , MD.locality_ml as MD_locality_ml , MD.street_name_en as MD_street_name_en , MD.street_name_ml as MD_street_name_ml , ") @@ -113,7 +113,7 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri StringBuilder query = new StringBuilder(QUERY); StringBuilder orderBy = new StringBuilder(); - //addFilter("MD_id", criteria.getId(), query, preparedStmtValues); + // addFilter("MD_id", criteria.getId(), query, preparedStmtValues); addFilter("MD_tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD_applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); From cc7235feb86bffa3e9a00da51182973252824afa Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 29 Mar 2023 16:08:30 +0530 Subject: [PATCH 062/420] document attachment --- .../enrichment/MarriageDetailsEnrichment.java | 33 +++++++++++-------- .../model/MarriageApplicationDetails.java | 5 +++ .../model/marriage/GroomDetails.java | 21 ++++++++++++ .../model/marriage/MarriageDocument.java | 20 +++++------ .../model/MarriageRegistrySearchCriteria.java | 2 -- 5 files changed, 55 insertions(+), 26 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index ac6433b85cf..29d0af2a070 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -9,6 +9,7 @@ import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDocument; import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.enums.ErrorCodes; @@ -47,27 +48,23 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getGroomDetails().setBrideGroom("G"); } - -// marriage.getPermanentBride().setId1(UUID.randomUUID().toString()); -// marriage.getPermanentBride().setId2(UUID.randomUUID().toString()); - -// marriage.getPermanentBride().setBrideGroom("BRIDE"); -// marriage.getPermanentBride().setBrideGroom2("GROOM"); - - -// if(marriage.getPresent()!=null){ -// marriage.getPresent().setId(UUID.randomUUID().toString()); -//// marriage.getPresent().setBrideGroom("BRIDE"); -//// marriage.getPresent().setBrideGroom("GROOM"); -// } if(marriage.getWitnessDetails()!=null){ marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); marriage.getWitnessDetails().setSerial_no1(1); marriage.getWitnessDetails().setSerial_no2(2); - } + List marriagedocument = marriage.getMarriageDocuments(); + if (marriagedocument!=null){ + marriagedocument.forEach(document -> { + document.setId(UUID.randomUUID().toString()); + document.setActive(true); + document.setTenantid(marriage.getTenantid()); + document.setMarriageId(marriage.getId()); + document.setMarriageDocAuditDetails(auditDetails); + }); + } }); setApplicationNumbers(request); // setFileNumbers(request); @@ -548,6 +545,14 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { request.getMarriageDetails() .forEach(marriage -> { marriage.setApplicationNumber(itr.next()); + List marriagedocument = marriage.getMarriageDocuments(); + if (marriagedocument!=null){ + marriagedocument + .forEach(document -> { + document.setApplicationNumber(marriage.getApplicationNumber()); + }); + } + }); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index ad2f5835be3..a0b494e0410 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -44,6 +44,7 @@ public class MarriageApplicationDetails { private String lbtype; + @Size(max = 64) @JsonProperty("marriageTenantid") private String tenantid; @@ -231,6 +232,10 @@ public class MarriageApplicationDetails { @JsonProperty("wfDocuments") private List wfDocuments; + @JsonProperty("MarriageDocuments") + @Valid + private List MarriageDocuments = null; + // public void setStatus(String s) { // } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index a4027f2ad34..74cc257e7c5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -15,37 +15,48 @@ public class GroomDetails { @Size(max = 64) @JsonProperty("groomId") private String groomId; + @Size(max = 64) @JsonProperty("tenentId") private String tenentId; + @NotNull @Size(max = 64) @JsonProperty("brideGroom") private String brideGroom; + @Size(max = 64) @JsonProperty("marriageid") private String marriageid; + @Size(max = 64) @JsonProperty("groomResidentShip") private String residentship; + @Size(max = 15) @JsonProperty("groomAadharNo") private String aadharno; + @Size(max = 1000) @JsonProperty("groomPassportNo") private String passportno; + @Size(max = 64) @JsonProperty("groomSocialSecurityNo") private String socialsecurityno; + @Size(max = 200) @JsonProperty("groomFirstnameEn") private String firstname_en; + @Size(max = 200) @JsonProperty("groomFirstnameMl") private String firstname_ml; + @Size(max = 200) @JsonProperty("groomMiddlenameEn") private String middlename_en; + @Size(max = 200) @JsonProperty("groomMiddlenameMl") private String middlename_ml; @@ -53,25 +64,33 @@ public class GroomDetails { @Size(max = 200) @JsonProperty("groomLastnameEn") private String lastname_en; + @Size(max = 200) @JsonProperty("groomLastnameMl") private String lastname_ml; + @Size(max = 150) @JsonProperty("groomMobile") private String mobile; + @Size(max = 300) @JsonProperty("groomEmailid") private String emailid; + @Size(max = 20) @JsonProperty("groomGender") private String gender; + @JsonProperty("groomDOB") private long dateofbirth; + @JsonProperty("groomAge") private Integer age; + @Size(max = 64) @JsonProperty("groomParentGuardian") private String parent_guardian; + @Size(max = 200) @JsonProperty("groomFathernameEn") private String fathername_en; @@ -79,9 +98,11 @@ public class GroomDetails { @Size(max = 200) @JsonProperty("groomFathernameMl") private String fathername_ml; + @Size(max = 200) @JsonProperty("groomMothernameEn") private String mothername_en; + @Size(max = 200) @JsonProperty("groomMothernameMl") private String mothername_ml; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java index 581327ad911..5c1273ec97c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java @@ -30,30 +30,30 @@ public class MarriageDocument { private Boolean active; @JsonProperty("marriageTenantid") - private String marriageTenantid = null; + private String tenantid = null; @JsonProperty("documentType") private String documentType = null; + @JsonProperty("documentName") + private String documentName = null; + @JsonProperty("fileStoreId") private String fileStoreId = null; - @JsonProperty("fileName") - private String fileName = null; - @JsonProperty("marriageId") private String marriageId = null; - - @JsonProperty("documentOwner") +//bride or groom + @JsonProperty("documentOwner") private String documentOwner = null; - @JsonProperty("documentUid") - private String documentUid; + // @JsonProperty("documentUid") + // private String documentUid; @JsonProperty("applicationNumber") - private String deathACKNo = null; + private String applicationNumber = null; @JsonProperty("AuditDetails") - private AuditDetails deathDocAuditDetails = null; + private AuditDetails marriageDocAuditDetails = null; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java index 6c113b3ffdc..9ee7682afa6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java @@ -101,8 +101,6 @@ public enum SortOrder { @Valid private Integer limit; - - @JsonProperty("fromDate") private Long fromDate; From 11b0f2d7853fd3101a23c8f9f7b7a0d5f8eba5f2 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 30 Mar 2023 09:47:11 +0530 Subject: [PATCH 063/420] document attachment --- .../src/main/resources/marriage.yml | 39 +++++++++++++++++-- .../model/marriage/MarriageDocument.java | 8 ++-- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index c8da5c33ddf..8e0667472f2 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -621,6 +621,41 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + - query: INSERT INTO public.eg_death_document_dtls( id ,tenantid ,document_name ,document_type ,filestoreid , + document_link ,marriageid ,bride_groom ,active ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime ) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?); + + + basePath: MarriageDetails.*.MarriageDocuments.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.id + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.tenantId + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentName + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentType + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.active + + # - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber + + - jsonPath: $.MarriageDetails[*][?({Id} in @.MarriageDocuments[*].Id)].AuditDetails.createdBy + + - jsonPath: $.MarriageDetails[*][?({Id} in @.MarriageDocuments[*].Id)].AuditDetails.createdTime + + - jsonPath: $.MarriageDetails[*][?({Id} in @.MarriageDocuments[*].Id)].AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails[*][?({Id} in @.MarriageDocuments[*].Id)].AuditDetails.lastModifiedTime - version: 1.0 @@ -992,10 +1027,6 @@ serviceMaps: - - - - - query : UPDATE public.eg_marriage_present_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java index 5c1273ec97c..d3916e967e2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java @@ -23,10 +23,10 @@ @EqualsAndHashCode public class MarriageDocument { - @JsonProperty("Id") + @JsonProperty("id") private String id; - @JsonProperty("Active") + @JsonProperty("active") private Boolean active; @JsonProperty("marriageTenantid") @@ -47,8 +47,8 @@ public class MarriageDocument { @JsonProperty("documentOwner") private String documentOwner = null; - // @JsonProperty("documentUid") - // private String documentUid; + @JsonProperty("documentlink") + private String documentlink; @JsonProperty("applicationNumber") private String applicationNumber = null; From 4ad5f9effb2f9bfe4a1cd2ad56fa27e1d701c00c Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 30 Mar 2023 10:10:57 +0530 Subject: [PATCH 064/420] UPDATE --- .../src/main/resources/marriage.yml | 16 +++++----- .../enrichment/MarriageDetailsEnrichment.java | 5 ++-- ...30325112220__marriage_services_new_dll.sql | 2 +- ...30329160721__marriage_services_new_dll.sql | 29 +++++++++++++++++++ 4 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index c8da5c33ddf..f5266b81dae 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -428,7 +428,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaPostOffice + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPostOffice - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode @@ -446,7 +446,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn @@ -583,7 +583,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaPostOffice + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPostOffice - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode @@ -601,7 +601,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn @@ -1099,7 +1099,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaPostOffice + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntInKeralaAdrPostOffice - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode @@ -1129,7 +1129,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName - query : UPDATE public.eg_marriage_permanent_address_details @@ -1170,7 +1170,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaPostOffice + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntInKeralaAdrPostOffice - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode @@ -1200,5 +1200,5 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 10034204402..4364d625adc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -165,7 +165,6 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); } @@ -238,7 +237,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getGroomAddressDetails().setPoNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); } else { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); @@ -438,7 +437,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); } else { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql index 2ee5fb22014..aac214e7ba7 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql @@ -1,5 +1,5 @@ ALTER TABLE public.eg_marriage_bride_groom_details - DROP COLUMN no_of_spouse_living, +-- DROP COLUMN no_of_spouse_living, ADD COLUMN IF NOT EXISTS no_of_spouse_living bigint; ALTER TABLE public.eg_register_marriage_details diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql new file mode 100644 index 00000000000..53c1f10de81 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql @@ -0,0 +1,29 @@ +ALTER TABLE public.eg_marriage_bride_groom_details + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_witness_details + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_bride_groom_details_audit + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_witness_details_audit + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_document + ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_document_audit + ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_details + ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_details_audit + ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file From ac2903c0eea57830c42a342f1b955b1d5dfdf33b Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 30 Mar 2023 10:16:22 +0530 Subject: [PATCH 065/420] UPDATE --- .../main/V20230329160721__marriage_services_new_dll.sql | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql index 53c1f10de81..e2ce8c23121 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql @@ -26,4 +26,10 @@ ALTER TABLE public.eg_marriage_details ALTER TABLE public.eg_marriage_details_audit ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file + ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_details + RENAME COLUMN bridegurdiancorreflag TO brideguardiancorreflag; + +ALTER TABLE public.eg_marriage_details_audit + RENAME COLUMN bridegurdiancorreflag TO brideguardiancorreflag; \ No newline at end of file From d98366ad7281285f37cecaeac5d1c93279a73e85 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 30 Mar 2023 12:35:05 +0530 Subject: [PATCH 066/420] UPDATE --- .../MarriageApplicationQueryBuilder.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 996ae8e653e..2356d0d9a28 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -21,7 +21,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date ,") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") - .append("MD.applicationnumber as MD_applicationnumber ,") + .append("MD.applicationNumber as MD_applicationnumber ,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") @@ -113,21 +113,21 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri StringBuilder query = new StringBuilder(QUERY); StringBuilder orderBy = new StringBuilder(); - // addFilter("MD_id", criteria.getId(), query, preparedStmtValues); + addFilter("MD.id", criteria.getId(), query, preparedStmtValues); addFilter("MD_tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("MD_applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("MD.applicationNumber", criteria.getApplicationNo(), query, preparedStmtValues); addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); - addFilter("BD_aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); - addFilter("BD_firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); - addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); - addFilter("BD_lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); - addFilter("GD_aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); - addFilter("GD_firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); - addFilter("GD_middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); - addFilter("GD_lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); + addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); + addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + addFilter("BD.middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); + addFilter("BD.lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); + addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); + addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + addFilter("GD.middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); + addFilter("GD.lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); - addDateRangeFilter("MD_dateofmarriage", + addDateRangeFilter("MD.dateofmarriage", criteria.getFromDate(), criteria.getToDate(), query, From b29bbca8a77955bd050ee51f2d6f2e3add6b49ec Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 30 Mar 2023 14:24:45 +0530 Subject: [PATCH 067/420] UPDATE --- .../src/main/resources/marriage.yml | 117 +++++++++++++++--- 1 file changed, 103 insertions(+), 14 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index f5266b81dae..1fb9d56eb7e 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -87,8 +87,8 @@ serviceMaps: id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, is_spouse_living, marriageid, bride_groom, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living, tenantid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.BrideDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideId @@ -161,12 +161,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + - jsonPath: $.MarriageDetails.*.marriageTenantid + + - query: INSERT INTO public.eg_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, is_spouse_living, marriageid, bride_groom, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living, tenantid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.GroomDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomId @@ -240,11 +243,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse + - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: INSERT INTO public.eg_marriage_witness_details( id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, - lastmodifiedtime, lastmodifiedby, serial_no) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + lastmodifiedtime, lastmodifiedby, serial_no, tenantid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.WitnessDetails jsonMaps: @@ -278,10 +283,14 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 + - jsonPath: $.MarriageDetails.*.marriageTenantid + + + - query: INSERT INTO public.eg_marriage_witness_details( id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, - lastmodifiedtime, lastmodifiedby, serial_no) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + lastmodifiedtime, lastmodifiedby, serial_no, tenantid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetails jsonMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId2 @@ -314,6 +323,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 + - jsonPath: $.MarriageDetails.*.marriageTenantid + - query : INSERT INTO public.eg_marriage_present_address_details( id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, @@ -628,6 +639,15 @@ serviceMaps: fromTopic: update-marriage-application-topic isTransaction: true queryMaps: + +# - query: INSERT INTO public.eg_marriage_details_audit SELECT * FROM public.eg_marriage_details WHERE id = ? and tenantid=?; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: UPDATE public.eg_marriage_details SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, @@ -706,13 +726,20 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid +# - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'B'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid - query : UPDATE public.eg_marriage_bride_groom_details SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, maritalstatusid=?, is_spouse_living=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? - WHERE marriageid=? and bride_groom= 'B' ; + WHERE marriageid=? and bride_groom= 'B' and tenantid=? ; basePath: MarriageDetails.*.BrideDetails jsonMaps: @@ -779,14 +806,23 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.marriageTenantid + +# - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'G'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid - query: UPDATE public.eg_marriage_bride_groom_details SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, maritalstatusid=?, is_spouse_living=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? - WHERE marriageid=? and bride_groom= 'G'; + WHERE marriageid=? and bride_groom= 'G' and tenantid=?; basePath: MarriageDetails.*.GroomDetails jsonMaps: @@ -854,11 +890,20 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.marriageTenantid + +# - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '1'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid - query : UPDATE public.eg_marriage_witness_details SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, lastmodifiedtime=?, lastmodifiedby=? - WHERE marriageid=? and serial_no= '1'; + WHERE marriageid=? and serial_no= '1' and tenantid=?; basePath: MarriageDetails.*.WitnessDetails @@ -887,11 +932,20 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.marriageTenantid + +# - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '2'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid - query: UPDATE public.eg_marriage_witness_details SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, lastmodifiedtime=?, lastmodifiedby=? - WHERE marriageid=? and serial_no= '2'; + WHERE marriageid=? and serial_no= '2' and tenantid=?; basePath: MarriageDetails.*.WitnessDetails @@ -919,6 +973,16 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.marriageTenantid + +# - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + - query : UPDATE public.eg_marriage_present_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, @@ -993,8 +1057,14 @@ serviceMaps: - - +# - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName +# - query : UPDATE public.eg_marriage_present_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, @@ -1065,6 +1135,16 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + + +# - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - query: UPDATE public.eg_marriage_permanent_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, @@ -1132,6 +1212,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + +# - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - query : UPDATE public.eg_marriage_permanent_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, From 6c680b714b8162f7f759a76294ac76542cc57c77 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 30 Mar 2023 17:04:39 +0530 Subject: [PATCH 068/420] UPDATE --- .../src/main/resources/marriage.yml | 134 +++++++++--------- .../enrichment/MarriageDetailsEnrichment.java | 51 +++---- ...30330143022__marriage_services_new_dll.sql | 24 ++++ 3 files changed, 115 insertions(+), 94 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230330143022__marriage_services_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 1fb9d56eb7e..79a346eeba6 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -640,19 +640,19 @@ serviceMaps: isTransaction: true queryMaps: -# - query: INSERT INTO public.eg_marriage_details_audit SELECT * FROM public.eg_marriage_details WHERE id = ? and tenantid=?; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: INSERT INTO public.eg_marriage_details_audit SELECT * FROM public.eg_marriage_details WHERE id =? and tenantid=?; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageTenantid - query: UPDATE public.eg_marriage_details SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, - registrationno=?, registration_date=?, action=?, status=?, createdtime=?, createdby=?, lastmodifiedtime=?, lastmodifiedby=? + registrationno=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? WHERE id=? and applicationnumber=? and tenantid=?; basePath: MarriageDetails.* jsonMaps: @@ -711,10 +711,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.status - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy @@ -726,13 +722,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid -# - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'B'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'B'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageTenantid - query : UPDATE public.eg_marriage_bride_groom_details SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, @@ -809,13 +805,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid -# - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'G'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'G'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageTenantid - query: UPDATE public.eg_marriage_bride_groom_details SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, @@ -892,13 +888,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid -# - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '1'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '1'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageTenantid - query : UPDATE public.eg_marriage_witness_details SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, @@ -934,13 +930,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid -# - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '2'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '2'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageTenantid - query: UPDATE public.eg_marriage_witness_details SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, @@ -975,13 +971,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid -# - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName - query : UPDATE public.eg_marriage_present_address_details @@ -1057,14 +1053,14 @@ serviceMaps: -# - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName -# + - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + - query : UPDATE public.eg_marriage_present_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, @@ -1137,13 +1133,13 @@ serviceMaps: -# - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName - query: UPDATE public.eg_marriage_permanent_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, @@ -1213,13 +1209,13 @@ serviceMaps: -# - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName - query : UPDATE public.eg_marriage_permanent_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 4364d625adc..0a5bb779036 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -89,7 +89,8 @@ public void enrichUpdate(MarriageDetailsRequest request) { request.getMarriageDetails() .forEach(marriage -> marriage.setAuditDetails(auditDetails)); - + setApplicationNumbers(request); + setRegistrationNumber(request); setBridePermanentAddress(request); setBridePresentAddress(request); setGroomPermanentAddress(request); @@ -497,30 +498,30 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { } - // private void setRegistrationNumber(MarriageDetailsRequest request) { - - // RequestInfo requestInfo = request.getRequestInfo(); - // List marriageDetails = request.getMarriageDetails(); - // String tenantId = marriageDetails.get(0) - // .getTenantid(); - - // List filecodes = getIds(requestInfo, - // tenantId, - // config.getGetMarriageRegisNumberName(), - // request.getMarriageDetails().get(0).getApplicationtype(), - // "REG", - // marriageDetails.size()); - // validateFileCodes(filecodes, marriageDetails.size()); - // Long currentTime = Long.valueOf(System.currentTimeMillis()); - // ListIterator itr = filecodes.listIterator(); - // request.getMarriageDetails() - // .forEach(marriage -> { - // if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { - // marriage.setRegistrationno(itr.next()); - // marriage.setRegistrationDate(currentTime); - // } - // }); - // } + private void setRegistrationNumber(MarriageDetailsRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + List marriageDetails = request.getMarriageDetails(); + String tenantId = marriageDetails.get(0) + .getTenantid(); + + List filecodes = getIds(requestInfo, + tenantId, + config.getGetMarriageRegisNumberName(), + request.getMarriageDetails().get(0).getApplicationtype(), + "REG", + marriageDetails.size()); + validateFileCodes(filecodes, marriageDetails.size()); + Long currentTime = Long.valueOf(System.currentTimeMillis()); + ListIterator itr = filecodes.listIterator(); + request.getMarriageDetails() + .forEach(marriage -> { + // if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { + marriage.setRegistrationno(itr.next()); + marriage.setRegistrationDate(currentTime); + // } + }); + } // private void setFileNumbers(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230330143022__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230330143022__marriage_services_new_dll.sql new file mode 100644 index 00000000000..e2af5f0300e --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230330143022__marriage_services_new_dll.sql @@ -0,0 +1,24 @@ +ALTER TABLE public.eg_marriage_details_audit + DROP COLUMN operation, + DROP COLUMN stamp; + +ALTER TABLE public.eg_marriage_details_audit +DROP COLUMN filenumber, +DROP COLUMN file_date, +DROP COLUMN file_status; + +ALTER TABLE public.eg_marriage_bride_groom_details_audit + DROP COLUMN operation, + DROP COLUMN stamp; + +ALTER TABLE public.eg_marriage_permanent_address_details_audit + DROP COLUMN operation, + DROP COLUMN stamp; + +ALTER TABLE public.eg_marriage_present_address_details_audit + DROP COLUMN operation, + DROP COLUMN stamp; + +ALTER TABLE public.eg_marriage_witness_details_audit + DROP COLUMN operation, + DROP COLUMN stamp; \ No newline at end of file From a4ce34bc64a8b77ea1425aee421c0c84e9a34a70 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 30 Mar 2023 18:08:02 +0530 Subject: [PATCH 069/420] search with conditions --- .../enrichment/MarriageDetailsEnrichment.java | 4 ++- .../model/marriage/MarriageDocument.java | 2 +- .../model/marriage/WitnessDetails.java | 4 +-- .../model/MarriageRegistryDetails.java | 2 -- .../MarriageRegistryQueryBuilder.java | 26 +++++++++---------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index dd29329a271..36a919b417e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -55,13 +55,15 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getWitnessDetails().setSerial_no1(1); marriage.getWitnessDetails().setSerial_no2(2); + + marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ marriagedocument.forEach(document -> { document.setId(UUID.randomUUID().toString()); document.setActive(true); - document.setTenantid(marriage.getTenantid()); + // document.setTenantid(marriage.getTenantid()); document.setMarriageId(marriage.getId()); document.setMarriageDocAuditDetails(auditDetails); }); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java index d3916e967e2..d09b642ba9b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java @@ -30,7 +30,7 @@ public class MarriageDocument { private Boolean active; @JsonProperty("marriageTenantid") - private String tenantid = null; + private String tenantid ; @JsonProperty("documentType") private String documentType = null; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index c13550382a8..ca6a4be8216 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -97,8 +97,8 @@ public class WitnessDetails { @JsonProperty("witness2Esigned") private Boolean witness2Esigned; - @JsonProperty("AuditDetails") - private AuditDetails auditDetails; + @JsonProperty("auditDetails") + private AuditDetails witnessAuditDetails; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java index efab9b07f34..f6887289f61 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java @@ -29,7 +29,6 @@ public class MarriageRegistryDetails { @JsonProperty("marriageDOR") private Long dateofreporting; - @Size(max = 64) @JsonProperty("marriageDistrictid") private String districtid; @@ -38,7 +37,6 @@ public class MarriageRegistryDetails { @JsonProperty("marriageLBtype") private String lbtype; - @Size(max = 64) @JsonProperty("marriageTenantid") private String tenantid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 4bbe50dcfa1..9dab015fe91 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -116,21 +116,21 @@ public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCrit StringBuilder query = new StringBuilder(QUERY); StringBuilder orderBy = new StringBuilder(); - addFilter("MD_id", criteria.getId(), query, preparedStmtValues); - addFilter("MD_tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("MD_applicationnumber", criteria.getApplicationNumber(), query, preparedStmtValues); - addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + addFilter("MD.id", criteria.getId(), query, preparedStmtValues); + addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("MD.applicationnumber", criteria.getApplicationNumber(), query, preparedStmtValues); + addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); - addFilter("BD_aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); - addFilter("BD_firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); + addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); //addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); // addFilter("BD_lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); - addFilter("GD_aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); - addFilter("GD_firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); + addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); //addFilter("GD_middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); //addFilter("GD_lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); - addDateRangeFilter("MD_dateofmarriage", + addDateRangeFilter("MD.dateofmarriage", criteria.getFromDate(), criteria.getToDate(), query, @@ -140,13 +140,13 @@ public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCrit criteria.setSortOrder(MarriageRegistrySearchCriteria.SortOrder.ASC); } if (StringUtils.isEmpty(criteria.getSortBy())) - addOrderByColumns("MD_createdtime","ASC", orderBy); + addOrderByColumns("MD.createdtime","ASC", orderBy); else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.dateofmarriage) - addOrderByColumns("MD_dateofmarriage",criteria.getSortOrder().toString(), orderBy); + addOrderByColumns("MD.dateofmarriage",criteria.getSortOrder().toString(), orderBy); else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.applicationNumber) - addOrderByColumns("MD_applicationnumber",criteria.getSortOrder().toString(),orderBy); + addOrderByColumns("MD.applicationnumber",criteria.getSortOrder().toString(),orderBy); else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.tenantId) - addOrderByColumns("MD_tenantid",criteria.getSortOrder().toString(), orderBy); + addOrderByColumns("MD.tenantid",criteria.getSortOrder().toString(), orderBy); addOrderToQuery(orderBy, query); addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); From bb02078d3d270b123f49ed26a95e04337fbdf02e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 30 Mar 2023 20:10:07 +0530 Subject: [PATCH 070/420] document attachment --- .../src/main/resources/marriage.yml | 42 +++++++++---------- .../enrichment/MarriageDetailsEnrichment.java | 5 ++- .../model/marriage/MarriageDocument.java | 2 +- .../MarriageRegistryEnrichment.java | 1 + .../model/WitnessRegistryDetails.java | 2 +- 5 files changed, 28 insertions(+), 24 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 21fd0f86cfd..f176b533b6f 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -632,41 +632,41 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - - query: INSERT INTO public.eg_death_document_dtls( id ,tenantid ,document_name ,document_type ,filestoreid , - document_link ,marriageid ,bride_groom ,active ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime ) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?); - + - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , + document_link ,marriageid ,bride_groom ,active ,applicationnumber ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?); - basePath: MarriageDetails.*.MarriageDocuments.* - jsonMaps: - - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.id - - jsonPath: $.MarriageDetails.*.MarriageDocuments.tenantId + basePath: MarriageDetails.*.MarriageDocuments.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.id + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentName + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentName - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentType + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentType - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.active + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.active - # - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber - - jsonPath: $.MarriageDetails[*][?({Id} in @.MarriageDocuments[*].Id)].AuditDetails.createdBy + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdBy - - jsonPath: $.MarriageDetails[*][?({Id} in @.MarriageDocuments[*].Id)].AuditDetails.createdTime + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdTime - - jsonPath: $.MarriageDetails[*][?({Id} in @.MarriageDocuments[*].Id)].AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails[*][?({Id} in @.MarriageDocuments[*].Id)].AuditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime - version: 1.0 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 83834897198..b038fbd6932 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -58,14 +58,17 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } + System.out.println("HiDocument"); List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ + System.out.println("HiDocument1"); marriagedocument.forEach(document -> { document.setId(UUID.randomUUID().toString()); document.setActive(true); - // document.setTenantid(marriage.getTenantid()); + document.setMarriageTenantid(marriage.getTenantid()); document.setMarriageId(marriage.getId()); document.setMarriageDocAuditDetails(auditDetails); + }); } }); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java index d09b642ba9b..e1f6b1ea0c3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java @@ -30,7 +30,7 @@ public class MarriageDocument { private Boolean active; @JsonProperty("marriageTenantid") - private String tenantid ; + private String marriageTenantid ; @JsonProperty("documentType") private String documentType = null; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 0a45304c880..531690ffaf0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -73,6 +73,7 @@ public void enrichCreate(MarriageRegistryRequest request) { marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); marriage.getWitnessDetails().setSerial_no1(1); marriage.getWitnessDetails().setSerial_no2(2); + marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } }); setRegistrationNumber(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java index 969960b2391..ff2e6d924c1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java @@ -104,7 +104,7 @@ public class WitnessRegistryDetails { private Boolean witness2Esigned; @JsonProperty("AuditDetails") - private AuditDetails auditDetails; + private AuditDetails WitnessAuditDetails; } From 3c450724ea0d4493ae5d61b0a8d37b04d836b781 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Fri, 31 Mar 2023 10:30:55 +0530 Subject: [PATCH 071/420] MIGRATION --- ...30331100423__marriage_services_new_dll.sql | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriage_services_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriage_services_new_dll.sql new file mode 100644 index 00000000000..92622d1fbb3 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriage_services_new_dll.sql @@ -0,0 +1,29 @@ +ALTER TABLE public.eg_register_marriage_bride_groom_details + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_witness_details + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_bride_groom_details_audit + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_witness_details_audit + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_document + ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_document_audit + ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file From 8371c8bf15b65026e76ecf06e569ab512dc77a81 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Fri, 31 Mar 2023 10:50:29 +0530 Subject: [PATCH 072/420] MIGRATION --- .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../main/java/org/ksmart/marriage/utils/MarriageConstants.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index b038fbd6932..8ce64d1bbd9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -91,7 +91,7 @@ public void enrichUpdate(MarriageDetailsRequest request) { request.getMarriageDetails() .forEach(marriage -> marriage.setAuditDetails(auditDetails)); - setApplicationNumbers(request); +// setApplicationNumbers(request); setRegistrationNumber(request); setBridePermanentAddress(request); setBridePresentAddress(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index a339d9c332e..81627219dcf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -133,5 +133,8 @@ public class MarriageConstants { public static final String TRIGGER_NOWORKFLOW = "NOWORKFLOW"; + public static final String WORKFLOW_STATUS_APPROVED = "APPROVED"; + public static final String APPLICATION_NEW = "new"; + } From 64676c1461a2195440e350530e737b384f796602 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Fri, 31 Mar 2023 15:42:28 +0530 Subject: [PATCH 073/420] MIGRATION --- .../MarriageApplicationController.java | 36 ++++-- .../model/MarriageApplicationDetails.java | 77 +++++-------- .../MarriageRegistryRequestService.java | 104 ++++++++++++++++++ .../MarriageRegistryRepository.java | 1 + .../service/MarriageRegistryService.java | 1 + ...marriageAddNewFields_services_new_dll.sql} | 30 ++++- 6 files changed, 190 insertions(+), 59 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java rename municipal-services/marriage-services/src/main/resources/db/migration/main/{V20230331100423__marriage_services_new_dll.sql => V20230331100423__marriageAddNewFields_services_new_dll.sql} (51%) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index 5732fc96b49..0ea78cac754 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -7,6 +7,10 @@ import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; +import org.ksmart.marriage.marriageapplication.service.MarriageRegistryRequestService; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -16,6 +20,9 @@ import javax.validation.Valid; import java.util.List; + +import static org.ksmart.marriage.utils.MarriageConstants.APPLICATION_NEW; +import static org.ksmart.marriage.utils.MarriageConstants.WORKFLOW_STATUS_APPROVED; //import org.ksmart.marriage.marriageregistry.model.BirthCertificate; //import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; //import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetailsRequest; @@ -31,31 +38,44 @@ public class MarriageApplicationController { private final MarriageApplicationService crMarriageService; private final ResponseInfoFactory responseInfoFactory; + private final MarriageRegistryRequestService marriageRegistryRequestService; + + private final MarriageRegistryService marriageRegistryService; - public MarriageApplicationController( MarriageApplicationService crMarriageService, ResponseInfoFactory responseInfoFactory) { + public MarriageApplicationController(MarriageApplicationService crMarriageService, ResponseInfoFactory responseInfoFactory, MarriageRegistryRequestService marriageRegistryRequestService, MarriageRegistryService marriageRegistryService) { this.crMarriageService = crMarriageService; this.responseInfoFactory = responseInfoFactory; + this.marriageRegistryRequestService = marriageRegistryRequestService; + this.marriageRegistryService = marriageRegistryService; } @PostMapping(value = {"/_createmarriage"}) public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { - List marriageDetails=crMarriageService.saveMarriageDetails(request); - MarriageApplicationResponse response= MarriageApplicationResponse.builder() - .marriageApplicationDetails(marriageDetails) - .responseInfo( - responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),true)) + List marriageDetails = crMarriageService.saveMarriageDetails(request); + MarriageApplicationResponse response = MarriageApplicationResponse.builder() + .marriageApplicationDetails(marriageDetails) + .responseInfo( + responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) - .build(); + .build(); return new ResponseEntity<>(response, HttpStatus.OK); } - @PostMapping(value = { "/_updatemarriage"}) + + @PostMapping(value = {"/_updatemarriage"}) public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { List marriageDetails = crMarriageService.updateMarriageDetails(request); + if ((marriageDetails.get(0).getStatus() == WORKFLOW_STATUS_APPROVED && marriageDetails.get(0).getApplicationtype() == APPLICATION_NEW)) { + MarriageRegistryRequest marriageRegistryRequest = marriageRegistryRequestService.createRegistryRequest(request); + List marriageRegistryDetails = marriageRegistryService.createRegistry(marriageRegistryRequest); + + } + return new ResponseEntity<>(marriageDetails, HttpStatus.OK); } + @PostMapping(value = { "/_searchmarriage"}) public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index a0b494e0410..cd09308fe41 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -96,26 +96,11 @@ public class MarriageApplicationDetails { @Size(max = 64) @JsonProperty("marriageType") private String marriage_type; -// -// @Size(max = 64) -// @JsonProperty("marriagePlaceothers") -// private String placeothers; @Size(max = 200) @JsonProperty("othMarriageType") private String oth_marriage_type; -// @Size(max = 1000) -// @JsonProperty("marriageOthersSpecify") -// private String othersspecify; - - - -// @Size(max = 64) -// @JsonProperty("fileNo") -// private String fileno; - - @Size(max = 64) @JsonProperty("registrationno") private String registrationno; @@ -123,14 +108,6 @@ public class MarriageApplicationDetails { @JsonProperty("registration_date") private Long registrationDate; -// @JsonProperty("fileDate") -// private long file_date; -// -// @Size(max = 64) -// @JsonProperty("fileStatus") -// private String file_status; - - @Size(max = 1000) @JsonProperty("placeid") private String placeid; @@ -141,33 +118,33 @@ public class MarriageApplicationDetails { @Size(max = 2500) @JsonProperty("marriageHouseNoAndNameMl") private String marriageHouseNoAndNameMl; - - @Size(max = 1000) - @JsonProperty("marriageReligiousInstitutionOther") - private String marriageReligiousInstitutionOther; - - @Size(max = 1000) - @JsonProperty("marriagePublicOrPrivatePlace") - private String marriagePublicOrPrivatePlace; - - @Size(max = 2500) - @JsonProperty("marriagePublicOrPrivateNamePlaceEn") - private String marriagePublicOrPrivateNamePlaceEn; - @Size(max = 2500) - @JsonProperty("marriagePublicOrPrivateNamePlaceMl") - private String marriagePublicOrPrivateNamePlaceMl; - - - @Size(max = 1000) - @JsonProperty("marriageReligiousInstitution") - private String marriageReligiousInstitution; - - @Size(max = 2500) - @JsonProperty("marriageReligiousInstitutionOtherNameEn") - private String marriageReligiousInstitutionOtherNameEn; - @Size(max = 2500) - @JsonProperty("marriageReligiousInstitutionOtherNameMl") - private String marriageReligiousInstitutionOtherNameMl; +// +// @Size(max = 1000) +// @JsonProperty("marriageReligiousInstitutionOther") +// private String marriageReligiousInstitutionOther; +// +// @Size(max = 1000) +// @JsonProperty("marriagePublicOrPrivatePlace") +// private String marriagePublicOrPrivatePlace; +// +// @Size(max = 2500) +// @JsonProperty("marriagePublicOrPrivateNamePlaceEn") +// private String marriagePublicOrPrivateNamePlaceEn; +// @Size(max = 2500) +// @JsonProperty("marriagePublicOrPrivateNamePlaceMl") +// private String marriagePublicOrPrivateNamePlaceMl; +// +// +// @Size(max = 1000) +// @JsonProperty("marriageReligiousInstitution") +// private String marriageReligiousInstitution; +// +// @Size(max = 2500) +// @JsonProperty("marriageReligiousInstitutionOtherNameEn") +// private String marriageReligiousInstitutionOtherNameEn; +// @Size(max = 2500) +// @JsonProperty("marriageReligiousInstitutionOtherNameMl") +// private String marriageReligiousInstitutionOtherNameMl; @Size(max = 64) @JsonProperty("applicationNumber") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java new file mode 100644 index 00000000000..239025f0a30 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -0,0 +1,104 @@ +package org.ksmart.marriage.marriageapplication.service; + +import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageregistry.model.*; +import org.springframework.stereotype.Service; + +import java.util.LinkedList; +import java.util.List; +@Slf4j +@Service +public class MarriageRegistryRequestService { + public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marriagerequest) { + + MarriageRegistryRequest request = new MarriageRegistryRequest(); + List registerMarriageDetails = new LinkedList<>(); + MarriageRegistryDetails registerMarriageDetail = new MarriageRegistryDetails(); + registerMarriageDetail.setDateofmarriage(Marriagerequest.getMarriageDetails().get(0).getDateofmarriage()); + registerMarriageDetail.setDateofreporting(Marriagerequest.getMarriageDetails().get(0).getDateofreporting()); + registerMarriageDetail.setDistrictid(Marriagerequest.getMarriageDetails().get(0).getDistrictid()); + registerMarriageDetail.setLbtype(Marriagerequest.getMarriageDetails().get(0).getLbtype()); + registerMarriageDetail.setTenantid(Marriagerequest.getMarriageDetails().get(0).getTenantid()); + registerMarriageDetail.setPlaceid(Marriagerequest.getMarriageDetails().get(0).getPlaceid()); + registerMarriageDetail.setPlacetype(Marriagerequest.getMarriageDetails().get(0).getPlacetype()); + registerMarriageDetail.setPlacenameEn(Marriagerequest.getMarriageDetails().get(0).getPlacenameEn()); + registerMarriageDetail.setPlacenameMl(Marriagerequest.getMarriageDetails().get(0).getPlacenameMl()); + registerMarriageDetail.setWard_code(Marriagerequest.getMarriageDetails().get(0).getWard_code()); + registerMarriageDetail.setStreet_name_en(Marriagerequest.getMarriageDetails().get(0).getStreet_name_en()); + registerMarriageDetail.setStreet_name_ml(Marriagerequest.getMarriageDetails().get(0).getStreet_name_ml()); + registerMarriageDetail.setTalukid(Marriagerequest.getMarriageDetails().get(0).getTalukid()); + registerMarriageDetail.setVillage_name(Marriagerequest.getMarriageDetails().get(0).getVillage_name()); + registerMarriageDetail.setLandmark(Marriagerequest.getMarriageDetails().get(0).getLandmark()); + registerMarriageDetail.setLocality_en(Marriagerequest.getMarriageDetails().get(0).getLocality_en()); + registerMarriageDetail.setLocality_ml(Marriagerequest.getMarriageDetails().get(0).getLocality_ml()); + registerMarriageDetail.setMarriage_type(Marriagerequest.getMarriageDetails().get(0).getMarriage_type()); + registerMarriageDetail.setOth_marriage_type(Marriagerequest.getMarriageDetails().get(0).getOth_marriage_type()); + registerMarriageDetail.setRegistrationDate(Marriagerequest.getMarriageDetails().get(0).getRegistrationDate()); + registerMarriageDetail.setRegistrationno(Marriagerequest.getMarriageDetails().get(0).getRegistrationno()); + registerMarriageDetail.setMarriageHouseNoAndNameEn(Marriagerequest.getMarriageDetails().get(0).getMarriageHouseNoAndNameEn()); + registerMarriageDetail.setMarriageHouseNoAndNameMl(Marriagerequest.getMarriageDetails().get(0).getMarriageHouseNoAndNameMl()); + registerMarriageDetail.setApplicationNumber(Marriagerequest.getMarriageDetails().get(0).getApplicationNumber()); + registerMarriageDetail.setAction(Marriagerequest.getMarriageDetails().get(0).getAction()); + registerMarriageDetail.setStatus(Marriagerequest.getMarriageDetails().get(0).getStatus()); + registerMarriageDetail.setApplicationtype(Marriagerequest.getMarriageDetails().get(0).getApplicationtype()); + registerMarriageDetail.setModulecode(Marriagerequest.getMarriageDetails().get(0).getModulecode()); + registerMarriageDetail.setBrideDetails(brideRegistryDetails(Marriagerequest)); + registerMarriageDetail.setGroomDetails(groomRegistryDetails(Marriagerequest)); + registerMarriageDetail.setWitnessDetails(witnessRegistryDetails(Marriagerequest)); + registerMarriageDetail.setBrideAddressDetails(brideAddressRegistryDetails(Marriagerequest)); + registerMarriageDetail.setGroomAddressDetails(groomAddressRegistryDetails(Marriagerequest)); + + registerMarriageDetails.add(registerMarriageDetail); + request.setRequestInfo(Marriagerequest.getRequestInfo()); + request.setMarriageDetails(registerMarriageDetails); + + return request; + } + + private GroomRegistryAddressDetails groomAddressRegistryDetails(MarriageDetailsRequest marriagerequest) { + return null; + } + + private BrideRegistryAddressDetails brideAddressRegistryDetails(MarriageDetailsRequest marriagerequest) { + return null; + } + + private WitnessRegistryDetails witnessRegistryDetails(MarriageDetailsRequest marriagerequest) { + return null; + } + + private GroomRegistryDetails groomRegistryDetails(MarriageDetailsRequest marriagerequest) { + return null; + } + + private BrideRegistryDetails brideRegistryDetails (MarriageDetailsRequest MarriageBriderequest){ + BrideRegistryDetails brideRegistryDetails = new BrideRegistryDetails(); + brideRegistryDetails.setTenentId(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getTenentId()); + brideRegistryDetails.setResidentship(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getResidentship()); + brideRegistryDetails.setBrideGroom(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getBrideGroom()); + brideRegistryDetails.setBrideGroom(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getBrideGroom()); + brideRegistryDetails.setAadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getAadharno()); + brideRegistryDetails.setPassportno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getPassportno()); + brideRegistryDetails.setSocialsecurityno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getSocialsecurityno()); + brideRegistryDetails.setFather_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFather_aadharno()); + brideRegistryDetails.setFathername_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFathername_en()); + brideRegistryDetails.setFathername_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFathername_ml()); + brideRegistryDetails.setFirstname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFirstname_en()); + brideRegistryDetails.setFirstname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFirstname_ml()); + brideRegistryDetails.setMiddlename_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMiddlename_en()); + brideRegistryDetails.setMiddlename_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMiddlename_ml()); + brideRegistryDetails.setLastname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastname_en()); + brideRegistryDetails.setLastname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastname_ml()); + brideRegistryDetails.setMobile(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMobile()); + brideRegistryDetails.setEmailid(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getEmailid()); + brideRegistryDetails.setGender(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGender()); + brideRegistryDetails.setDateofbirth(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getDateofbirth()); + brideRegistryDetails.setAge(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getAge()); + brideRegistryDetails.setParent_guardian(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getParent_guardian()); + brideRegistryDetails.setFathername_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFathername_en()); + + return brideRegistryDetails; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index c52fd469666..3d8efbcf7d1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -61,6 +61,7 @@ public List searchMarriageRegistry(MarriageRegistrySear return result; } + // public List updateMarriageRegistry(MarriageRegistryRequest request) { // marriageRegistryEnrichment.enrichUpdate(request); // producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryTopic(), request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 68b7facb9c7..11094883b5a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -25,6 +25,7 @@ public List createRegistry(MarriageRegistryRequest requ return repository.createMarriageRegistry(request); } + // public List updateRegistry(MarriageRegistryRequest request) { // return repository.updateMarriageRegistry(request); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql similarity index 51% rename from municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriage_services_new_dll.sql rename to municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql index 92622d1fbb3..436e8cf4b09 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriage_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql @@ -26,4 +26,32 @@ ALTER TABLE public.eg_register_marriage_details ALTER TABLE public.eg_register_marriage_details_audit ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file + ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_details_audit + RENAME COLUMN grromAgeCorreflag TO groomAgeCorreflag; +ALTER TABLE public.eg_marriage_details + RENAME COLUMN grromAgeCorreflag TO groomAgeCorreflag; + + +ALTER TABLE public.eg_marriage_details + ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_marriage_details_audit + ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; From d1ccc5409c62fd25ce3d4d7070bfb50a0da5777a Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 31 Mar 2023 15:55:44 +0530 Subject: [PATCH 074/420] mdms validation --- .../MarriageApplicationConfiguration.java | 20 + .../enrichment/MarriageDetailsEnrichment.java | 53 ++- .../model/Demand/Demand.java | 121 ++++++ .../model/Demand/DemandDetail.java | 60 +++ .../model/Demand/DemandRequest.java | 32 ++ .../model/Demand/DemandResponse.java | 25 ++ .../MarriageApplicationRepository.java | 61 ++- .../service/MarriageApplicationService.java | 4 - .../validator/MarriageMDMSValidator.java | 107 +++++ .../ksmart/marriage/utils/IDGenerator.java | 4 +- .../marriage/utils/MarriageConstants.java | 41 ++ .../marriage/utils/MarriageMdmsUtil.java | 385 ++++++++++++++++++ 12 files changed, 882 insertions(+), 31 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/Demand.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandDetail.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index fe0b2ead79d..d810dc16242 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -59,6 +59,26 @@ public class MarriageApplicationConfiguration { @Value("${egov.workflow.path}") private String wfTransitionPath; + //Demand + + @Value("${egov.billingservice.host}") + private String billingHost; + @Value("${egov.bill.gen.endpoint}") + private String fetchBillEndpoint; + + @Value("${egov.demand.create.endpoint}") + private String demandCreateEndpoint; + + //MDMS + @Value("${egov.mdms.host}") + private String mdmsHost; + + @Value("${egov.mdms.search.endpoint}") + private String mdmsEndPoint; + + @Value("${egov.state.level.tenant.id}") + private String egovStateLevelTenant; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index b038fbd6932..a78be0fe4b6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -1,5 +1,6 @@ package org.ksmart.marriage.marriageapplication.enrichment; +import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.primitives.ImmutableDoubleArray; import org.apache.commons.collections4.CollectionUtils; import org.egov.common.contract.request.RequestInfo; @@ -7,14 +8,19 @@ import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; +import org.ksmart.marriage.common.repository.ServiceRequestRepository; import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.model.Demand.Demand; +import org.ksmart.marriage.marriageapplication.model.Demand.DemandRequest; +import org.ksmart.marriage.marriageapplication.model.Demand.DemandResponse; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDocument; import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.enums.ErrorCodes; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; import java.util.List; @@ -22,46 +28,50 @@ import java.util.UUID; @Component public class MarriageDetailsEnrichment implements BaseEnrichment { + @Autowired MarriageApplicationConfiguration config; + @Autowired IdGenRepository idGenRepository; + @Autowired IDGenerator idGenerator; + @Autowired + ServiceRequestRepository serviceRequestRepository; + + @Autowired + @Qualifier("objectMapperBnd") + private ObjectMapper mapper; + public void enrichCreate(MarriageDetailsRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); request.getMarriageDetails().forEach(marriage -> { - marriage.setId(UUID.randomUUID().toString()); - marriage.setAuditDetails(auditDetails); if(marriage.getBrideDetails()!=null){ marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); marriage.getBrideDetails().setBrideGroom("B"); - } if(marriage.getGroomDetails()!=null){ marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); marriage.getGroomDetails().setBrideGroom("G"); - } if(marriage.getWitnessDetails()!=null){ marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); - marriage.getWitnessDetails().setSerial_no1(1); marriage.getWitnessDetails().setSerial_no2(2); - marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } - System.out.println("HiDocument"); List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ - System.out.println("HiDocument1"); marriagedocument.forEach(document -> { document.setId(UUID.randomUUID().toString()); document.setActive(true); @@ -69,18 +79,14 @@ public void enrichCreate(MarriageDetailsRequest request) { document.setMarriageId(marriage.getId()); document.setMarriageDocAuditDetails(auditDetails); - }); - } + }); + } }); setApplicationNumbers(request); - // setFileNumbers(request); setBridePermanentAddress(request); setBridePresentAddress(request); setGroomPermanentAddress(request); setGroomPresentAddress(request); - // setRegistrationNumber(request); - - } public void enrichUpdate(MarriageDetailsRequest request) { @@ -189,9 +195,6 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); - - - } } } @@ -578,7 +581,21 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { } - +//Jasmine 30.03.2023 + public List saveDemand(RequestInfo requestInfo, List demands){ + StringBuilder url = new StringBuilder(config.getBillingHost()); + url.append(config.getDemandCreateEndpoint()); + DemandRequest request = new DemandRequest(requestInfo,demands); + Object result = serviceRequestRepository.fetchResult(url,request); + DemandResponse response = null; + try{ + response = mapper.convertValue(result,DemandResponse.class); + } + catch(IllegalArgumentException e){ + throw new CustomException("PARSING ERROR","Failed to parse response of create demand"); + } + return response.getDemands(); + } // private void setApplicationNumbers(MarriageDetailsRequest request) { // Long currentTime = Long.valueOf(System.currentTimeMillis()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/Demand.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/Demand.java new file mode 100644 index 00000000000..142431cc2a5 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/Demand.java @@ -0,0 +1,121 @@ +package org.ksmart.marriage.marriageapplication.model.Demand; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import javax.validation.Valid; +import org.egov.common.contract.request.User; +import org.ksmart.marriage.common.model.AuditDetails; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * Demand model created by Jasmine on 30.03.2023 + */ + +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class Demand { + @JsonProperty("id") + @Valid + private String id; + + @JsonProperty("tenantId") + @Valid + private String tenantId; + + @JsonProperty("consumerCode") + @Valid + private String consumerCode; + + @JsonProperty("consumerType") + @Valid + private String consumerType; + + @JsonProperty("businessService") + @Valid + private String businessService; + + @Valid + @JsonProperty("payer") + private User payer; + + @JsonProperty("taxPeriodFrom") + @Valid + private Long taxPeriodFrom; + + @JsonProperty("taxPeriodTo") + @Valid + private Long taxPeriodTo; + + @Builder.Default + @JsonProperty("demandDetails") + @Valid + private List demandDetails = new ArrayList<>(); + + @JsonProperty("auditDetails") + @Valid + private AuditDetails auditDetails; + + @JsonProperty("additionalDetails") + @Valid + private Object additionalDetails; + + @Builder.Default + @JsonProperty("minimumAmountPayable") + @Valid + private BigDecimal minimumAmountPayable = BigDecimal.ZERO; + + /** + * Gets or Sets status + */ + public enum StatusEnum { + + ACTIVE("ACTIVE"), + + CANCELLED("CANCELLED"), + + ADJUSTED("ADJUSTED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equalsIgnoreCase(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("status") + @Valid + private StatusEnum status; + + + public Demand addDemandDetailsItem(DemandDetail demandDetailsItem) { + this.demandDetails.add(demandDetailsItem); + return this; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandDetail.java new file mode 100644 index 00000000000..00f14cfb9c8 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandDetail.java @@ -0,0 +1,60 @@ +package org.ksmart.marriage.marriageapplication.model.Demand; + +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Builder.Default; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.Valid; + +import org.ksmart.marriage.common.model.AuditDetails; + +/** + * DemandDetail model created by Jasmine on 30.03.2023 + */ + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class DemandDetail { + + @JsonProperty("id") + @Valid + private String id; + + @JsonProperty("demandId") + @Valid + private String demandId; + + @JsonProperty("taxHeadMasterCode") + @Valid + private String taxHeadMasterCode; + + @JsonProperty("taxAmount") + @Valid + private BigDecimal taxAmount; + + @Default + @JsonProperty("collectionAmount") + @Valid + private BigDecimal collectionAmount = BigDecimal.ZERO; + + @JsonProperty("additionalDetails") + @Valid + private Object additionalDetails; + + @JsonProperty("auditDetails") + @Valid + private AuditDetails auditDetails; + + @JsonProperty("tenantId") + @Valid + private String tenantId; + + +} + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandRequest.java new file mode 100644 index 00000000000..3d9d55e2229 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandRequest.java @@ -0,0 +1,32 @@ +package org.ksmart.marriage.marriageapplication.model.Demand; + +import java.util.ArrayList; +import java.util.List; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import org.egov.common.contract.request.RequestInfo; +import com.fasterxml.jackson.annotation.JsonProperty; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * created by Jasmine 30.03.2023 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class DemandRequest { + @NotNull + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + @Valid + @NotNull + @JsonProperty("Demands") + private List demands = new ArrayList<>(); +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandResponse.java new file mode 100644 index 00000000000..deab98a29ae --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandResponse.java @@ -0,0 +1,25 @@ +package org.ksmart.marriage.marriageapplication.model.Demand; + +import java.util.ArrayList; +import java.util.List; +import org.egov.common.contract.response.ResponseInfo; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * Created by Jasmine on 30.03.2023 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class DemandResponse { + @JsonProperty("ResponseInfo") + private ResponseInfo responseInfo; + + @JsonProperty("Demands") + private List demands = new ArrayList<>(); +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 19a5421c7ea..6d53ef8e73e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -7,11 +7,16 @@ import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.model.Demand.Demand; //import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; +import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; +import org.ksmart.marriage.utils.MarriageConstants; +import org.ksmart.marriage.utils.MarriageMdmsUtil; +import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; @@ -25,35 +30,77 @@ @Repository public class MarriageApplicationRepository { private final MarriageProducer producer; - private final MarriageApplicationConfiguration marriageApplicationConfiguration; - private final MarriageDetailsEnrichment marriageDetailsEnrichment; private final MarriageApplicationQueryBuilder marriageQueryBuilder; private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; + private final WorkflowIntegrator workflowIntegrator; + private final MarriageMdmsUtil util; + private final MarriageMDMSValidator mdmsValidator; @Autowired - public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper) { + public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, + JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, + MarriageApplicationRowMapper marriageApplicationRowMapper,WorkflowIntegrator workflowIntegrator,MarriageMdmsUtil util,MarriageMDMSValidator mdmsValidator) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageDetailsEnrichment = marriageDetailsEnrichment; this.jdbcTemplate = jdbcTemplate; - this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; + this.workflowIntegrator = workflowIntegrator; + this.util = util; + this.mdmsValidator=mdmsValidator; } - - public List saveMarriageDetails(MarriageDetailsRequest request) { - + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + //validatorService.validateCommonFields( request); + mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + workflowIntegrator.callWorkFlow(request); + request.getMarriageDetails().forEach(marriage->{ + if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + List demands = new ArrayList<>(); + Demand demand = new Demand(); + demand.setTenantId(marriage.getTenantid()); + demand.setConsumerCode(marriage.getApplicationNumber()); + demands.add(demand); + marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + } + }); return request.getMarriageDetails(); + + // Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getTenantId()); + // validatorService.validateCommonFields( request); + // mdmsValidator.validateDeathMDMSData(request,mdmsData); + // enrichmentService.setPresentAddress(request); + // enrichmentService.setPermanentAddress(request); + // enrichmentService.enrichCreate(request); + // enrichmentService.setACKNumber(request); + // //RAkhi S ikm on 06.02.2023 + // producer.push(deathConfig.getSaveDeathDetailsTopic(), request); + // workflowIntegrator.callWorkFlow(request); + + // //Rakhi S on 21.03.2023 + // request.getDeathCertificateDtls().forEach(death->{ + // if(death.getApplicationStatus() == DeathConstants.STATUS_FOR_PAYMENT){ + // List demands = new ArrayList<>(); + // Demand demand = new Demand(); + // demand.setTenantId(death.getDeathBasicInfo().getTenantId()); + // demand.setConsumerCode(death.getDeathBasicInfo().getDeathACKNo()); + // demands.add(demand); + // enrichmentService.saveDemand(request.getRequestInfo(),demands); + // } + // }); + + // return request.getDeathCertificateDtls(); } public List updateMarriageDetails(MarriageDetailsRequest request) { marriageDetailsEnrichment.enrichUpdate(request); + workflowIntegrator.callWorkFlow(request); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); return request.getMarriageDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index e62cc361857..7671c2880d4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -23,10 +23,6 @@ public MarriageApplicationService(MarriageApplicationRepository repository) { } public List saveMarriageDetails(MarriageDetailsRequest request) { - - - - // workflowIntegrator.callWorkFlow(request); return repository.saveMarriageDetails(request); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java new file mode 100644 index 00000000000..e73d77d9277 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -0,0 +1,107 @@ +package org.ksmart.marriage.marriageapplication.validator; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.utils.MarriageConstants; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; +import com.jayway.jsonpath.JsonPath; +import lombok.extern.slf4j.Slf4j; + + /** + * Creates Jasmine 30.03.2023 + */ +@Component +@Slf4j +public class MarriageMDMSValidator { + //Rakhi S ikm on 14.02.2023 + public void validateMarriageMDMSData(MarriageDetailsRequest request,Object mdmsdata){ + Map errorMap = new HashMap<>(); + Map> masterData = getAttributeValues(mdmsdata); + + String[] masterArray = {MarriageConstants.TENANTS,MarriageConstants.GENDERTYPE}; + // ,DeathConstants.DEATH_PLACE_LIST,DeathConstants.DEATH_CAUSE_MAIN + // ,DeathConstants.DEATH_CAUSE_SUB}; + validateIfMasterPresent(masterArray,masterData); + + if(!masterData.get(MarriageConstants.TENANTS) + .contains(request.getMarriageDetails().get(0).getTenantid())) + errorMap.put("INVALID TENAND ID", "The tenand id "+ request.getMarriageDetails().get(0).getTenantid() + + " does not exists"); + + // if(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeceasedGender() != null) { + // if(!masterData.get(DeathConstants.GENDERTYPE) + // .contains(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeceasedGender())) + // errorMap.put("INVALID GENDER TYPE", "The gender of the deceased " + + // request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeceasedGender()+ " is invalid"); + // } + + // if(!masterData.get(DeathConstants.DEATH_PLACE_LIST) + // .contains(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeathPlace())) + // errorMap.put("DEATH PLACE DETAILS INVALID", "The deceased death place details " + + // request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeathPlace()+ " is invalid"); + + // if(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseMain() != null) { + // if(!masterData.get(DeathConstants.DEATH_CAUSE_MAIN) + // .contains(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseMain())) + // errorMap.put("DEATH CAUSE MAIN INVALID", "The deceased death cause main details " + + // request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseMain()+ " is invalid"); + // } + // if(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseSub() != null) { + // if(!masterData.get(DeathConstants.DEATH_CAUSE_SUB) + // .contains(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseSub())) + // errorMap.put("DEATH CAUSE SUB INVALID", "The deceased death cause sub details " + + // request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseSub()+ " is invalid"); + // } + // if(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getAgeUnit() != null) { + // if(!masterData.get(DeathConstants.AGE_UNIT) + // .contains(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getAgeUnit())) + // errorMap.put("AGE UNIT INVALID", "The deceased age unit details " + + // request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getAgeUnit()+ " is invalid"); + // } + + // if(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getMedicalAttentionType() != null) { + // if(!masterData.get(DeathConstants.MEDICAL_ATTENTION_TYPE) + // .contains(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getMedicalAttentionType())) + // errorMap.put("MEDICAL ATTENTION TYPE INVALID", "The deceased medical attention details " + + // request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getMedicalAttentionType()+ " is invalid"); + // } + if(!CollectionUtils.isEmpty(errorMap)) + throw new CustomException(errorMap); + + } + //Rakhi S ikm on 14.02.2023 + private Map> getAttributeValues(Object mdmsdata){ + List modulepaths = Arrays.asList(MarriageConstants.TENANT_JSONPATH, + MarriageConstants.COMMON_MASTER_JSONPATH, + MarriageConstants.BND_LIST_JSONPATH); + final Map> mdmsResMap = new HashMap<>(); + + modulepaths.forEach(modulepath -> { + try { + mdmsResMap.putAll(JsonPath.read(mdmsdata,modulepath)); + log.error("jsonpath1"+JsonPath.read(mdmsdata,modulepath)); + } catch (Exception e) { + log.error("Error while fetching MDMS data",e); + throw new CustomException( MarriageConstants .INVALID_TENANT_ID_MDMS_KEY, + MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); + } + + }); + return mdmsResMap; + } + //Rakhi S ikm on 14.02.2023 + private void validateIfMasterPresent(String[] masterNames, Map> codes){ + Map errorMap = new HashMap<>(); + for(String masterName : masterNames){ + if(!codes.containsKey(masterName)){ + errorMap.put("MDMS DATA ERROR ","Unable to fetch "+ masterName + " codes from MDMS "); + } + } + if(!errorMap.isEmpty()) + throw new CustomException(errorMap); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java index 0cf360e00f1..d7853d9417c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java @@ -21,14 +21,14 @@ @Slf4j public class IDGenerator { - private final MdmsUtil mdmsUtil; + private final MarriageMdmsUtil mdmsUtil; private final MdmsTenantService mdmsTenantService; private final JdbcTemplate jdbcTemplate; private final MarriageApplicationQueryBuilder queryBuilder; @Autowired - public IDGenerator(MdmsUtil mdmsUtil, MdmsTenantService mdmsTenantService, + public IDGenerator(MarriageMdmsUtil mdmsUtil, MdmsTenantService mdmsTenantService, JdbcTemplate jdbcTemplate, MarriageApplicationQueryBuilder queryBuilder) { this.mdmsTenantService = mdmsTenantService; this.mdmsUtil = mdmsUtil; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index a339d9c332e..ff7342bb154 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -1,7 +1,19 @@ package org.ksmart.marriage.utils; public class MarriageConstants { + public static final String TENANTS = "tenants"; + public static final String TENANT_MODULE_NAME = "tenant"; + public static final String GENDERTYPE = "GenderType"; + public static final String COMMON_MASTER_MODULE_NAME = "common-masters"; + //mdms path codes + public static final String COMMON_MASTER_JSONPATH = "$.MdmsRes.common-masters"; + public static final String TENANT_JSONPATH = "$.MdmsRes.tenant"; + public static final String BND_LIST_JSONPATH = "$.MdmsRes.birth-death-service"; + //error constants + public static final String INVALID_TENANT_ID_MDMS_KEY = "INVALID TENANTID"; + public static final String INVALID_TENANT_ID_MDMS_MSG = "No data found for this tenantID"; + //mdms tenantId // public static final String CR_MDMS_TENANT = "kl"; // public static final String CR_MDMS_MODULE = "birth-death-service"; // public static final String COMMON_MDMS_MODULE = "common-masters"; @@ -133,5 +145,34 @@ public class MarriageConstants { public static final String TRIGGER_NOWORKFLOW = "NOWORKFLOW"; + public static final String STATUS_FOR_PAYMENT = "PENDINGPAYMENT"; +//MDMS Fields Common + public static final String DISTRICT = "District"; + + public static final String STATE = "State"; + + public static final String COUNTRY = "Country"; + + public static final String RELIGION = "Religion"; + + public static final String TALUK = "Taluk"; + + public static final String LBTYPE = "LBType"; + + public static final String VILLAGE = "Village"; + + public static final String POSTOFFICE = "PostOffice"; + + + + + + + + + + + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java new file mode 100644 index 00000000000..00a2923fa4d --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -0,0 +1,385 @@ +package org.ksmart.marriage.utils; + +import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; +import org.egov.mdms.model.MasterDetail; +import org.egov.mdms.model.MdmsCriteria; +import org.egov.mdms.model.MdmsCriteriaReq; +import org.egov.mdms.model.ModuleDetail; +import org.ksmart.marriage.common.repository.ServiceRequestRepository; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +/*Jasmine 31.03.2023 */ +@Slf4j +@Component +public class MarriageMdmsUtil { + + @Autowired + private RestTemplate restTemplate; + + @Value("${egov.mdms.host}") + private String mdmsHost; + + @Value("${egov.mdms.search.endpoint}") + private String mdmsUrl; + + @Value("${egov.mdms.module.name}") + + private String moduleName; + private ServiceRequestRepository serviceRequestRepository; + private MarriageApplicationConfiguration config; + + @Autowired + public MarriageMdmsUtil(MarriageApplicationConfiguration config, ServiceRequestRepository serviceRequestRepository) { + this.config = config; + this.serviceRequestRepository = serviceRequestRepository; + } + + public Object mDMSCall(RequestInfo requestInfo, String tenantId) { + MdmsCriteriaReq mdmsCriteriaReq = getMDMSRequest(requestInfo, tenantId); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + return result; + } + + private MdmsCriteriaReq getMDMSRequest(RequestInfo requestInfo, String tenantId) { + ModuleDetail tenantIdRequest = getTenantIdRequest(tenantId); + ModuleDetail commomMasterRequest = getCommonMastersRequest(); + List BNDListRequest = getBNDListRequest(); + + List moduleDetails = new LinkedList<>(); + moduleDetails.add(tenantIdRequest); + moduleDetails.add(commomMasterRequest); + moduleDetails.addAll(BNDListRequest); + + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) + .build(); + + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + return mdmsCriteriaReq; + } + public StringBuilder getMdmsSearchUrl() { + return new StringBuilder().append(config.getMdmsHost()).append(config.getMdmsEndPoint()); + } + private ModuleDetail getTenantIdRequest(String tenantId) { + + // master details for Marriage module + List marriageMasterDetails = new ArrayList<>(); + // filter to only get code field from master data + final String filterCode = "$.[?(@.code=='"+tenantId+"')].*"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.TENANTS).filter(filterCode).build()); + + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) + .moduleName(MarriageConstants.TENANT_MODULE_NAME).build(); + + return marriageModuleDtls; + } + private ModuleDetail getCommonMastersRequest() { + + List marriageMasterDetails = new ArrayList<>(); + //Country + final String filterCodeCountry = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.COUNTRY).filter(filterCodeCountry).build()); + //State + final String filterCodeState = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.STATE).filter(filterCodeState).build()); + //District + final String filterCodeDistrict = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.DISTRICT).filter(filterCodeDistrict).build()); + //Taluk + final String filterCodeTaluk = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.TALUK).filter(filterCodeTaluk).build()); + //LbType + final String filterCodeLbType = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.LBTYPE).filter(filterCodeLbType).build()); + //Village + final String filterCodeVillage = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.VILLAGE).filter(filterCodeVillage).build()); + //Gender + final String filterCodeGender = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.GENDERTYPE).filter(filterCodeGender).build()); + //Religion + final String filterCodeReligion = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.RELIGION).filter(filterCodeReligion).build()); + //Religion + final String filterCodePostOffice = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); + + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) + .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); + + return marriageModuleDtls; + } + private List getBNDListRequest() { + + List crDeathMasterDetails = new ArrayList<>(); + final String filterCodeDeathCauseMain = "$.[?(@.active==true)].code"; + crDeathMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.DEATH_CAUSE_MAIN).filter(filterCodeDeathCauseMain).build()); + + final String filterCodeDeathCauseSub = "$.[?(@.active==true)].code"; + crDeathMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.DEATH_CAUSE_SUB).filter(filterCodeDeathCauseSub).build()); + + final String filterCodeAgeUnit = "$.[?(@.active==true)].code"; + crDeathMasterDetails + .add(MasterDetail.builder().name(DeathConstants.AGE_UNIT).filter(filterCodeAgeUnit).build()); + + final String filterCodeMedicalAttention = "$.[?(@.active==true)].code"; + crDeathMasterDetails + .add(MasterDetail.builder().name(DeathConstants.MEDICAL_ATTENTION_TYPE).filter(filterCodeMedicalAttention).build()); + + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(crDeathMasterDetails) + .moduleName(DeathConstants.BND_MODULE_NAME).build(); + + + return Arrays.asList(marriageModuleDtls); + } + public Object mdmsCall(RequestInfo requestInfo) { + // Call MDMS microservice with MdmsCriteriaReq as params + + MdmsCriteriaReq mdmsCriteriaReq = getMdmsRequest(requestInfo); + String mdmsUri = String.format("%s%s", mdmsHost, mdmsUrl); + Object result = null; + try { + result = restTemplate.postForObject(mdmsUri, mdmsCriteriaReq, Map.class); + } catch (Exception e) { + log.error("Exception occurred while fetching MDMS data: ", e); + } + return result; + } +// public Object mdmsCallForLocation (RequestInfo requestInfo, String tenantId) { +// // Call MDMS microservice with MdmsCriteriaReq as params +// +// MdmsCriteriaReq mdmsCriteriaReq = getLocRequest(requestInfo, tenantId); +// String mdmsUri = String.format("%s%s", mdmsHost, mdmsUrl); +// Object result = null; +// try { +// result = restTemplate.postForObject(mdmsUri, mdmsCriteriaReq, Map.class); +// } catch (Exception e) { +// log.error("Exception occurred while fetching MDMS data: ", e); +// } +// return result; +// } +// +// private MdmsCriteriaReq getLocRequest(RequestInfo requestInfo, String tenantId) { +// +// List moduleDetails = new LinkedList<>(); +// +// moduleDetails.addAll(getBoundaryDetails()); +// +// //Prepare MDMS Criteria wih all modules in birth-death services and common services +// +// MdmsCriteria mdmsCriteria = MdmsCriteria.builder() +// .moduleDetails(moduleDetails) +// .tenantId(tenantId) +// .build(); +// //Return MDMS criteria request for calling MDMS microservice +// return MdmsCriteriaReq.builder() +// .mdmsCriteria(mdmsCriteria) +// .requestInfo(requestInfo) +// .build(); +// } +// + private MdmsCriteriaReq getMdmsRequest(RequestInfo requestInfo) { + + List moduleDetails = new LinkedList<>(); + + List moduleDetailsLoc = new LinkedList<>(); + + //Add all modules of birth-death services + //moduleDetails.addAll(getCRModuleDetails()); + + //Add all modules of common services + // moduleDetails.addAll(getCommonModuleDetails()); + + //moduleDetails.addAll(getTenantModuleDetails()); + + //Prepare MDMS Criteria wih all modules in birth-death services and common services + + MdmsCriteria mdmsCriteria = MdmsCriteria.builder() + .moduleDetails(moduleDetails) + // .tenantId(BirthConstants.CR_MDMS_TENANT) + .build(); + //Return MDMS criteria request for calling MDMS microservice + return MdmsCriteriaReq.builder() + .mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo) + .build(); + } +// +// public List getBoundaryDetails() { +// // master details for Boundary +// +//// List crMasterDetails = new LinkedList<>(); +//// +//// List masterHospital = Collections.singletonList(MasterDetail.builder() +//// .name(BirthConstants.LOCATION_MDMS_HOSPITAL) +//// .build()); +//// crMasterDetails.addAll(masterHospital); +//// +//// List masterInstitution = Collections.singletonList(MasterDetail.builder() +//// .name(BirthConstants.LOCATION_MDMS_INSTITUTION) +//// .build()); +//// crMasterDetails.addAll(masterInstitution); +//// +//// ModuleDetail crModuleDetail = ModuleDetail.builder() +//// .masterDetails(crMasterDetails) +//// .moduleName(BirthConstants.LOCATION_MDMS_MODULE) +//// .build(); +// +// return Collections.singletonList(crModuleDetail); + + // } + +// public List getCRModuleDetails() { +// // master details for CR module +// +// List crMasterDetails = new LinkedList<>(); +// +// // +// List masterProfession = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_PROFESSION) +// .build()); +// crMasterDetails.addAll(masterProfession); +// +// // Add Module Qualification +// List masterQualification = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_QUALIFICATION) +// .build()); +// crMasterDetails.addAll(masterQualification); +// +// // Add Module Medical Attention Type +// List masterMedicalAttentionType = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_MEDICAL_ATTENTION_TYPE) +// .build()); +// crMasterDetails.addAll(masterMedicalAttentionType); +// +// // Add Module InstitutionType +// List masterInstitutionType = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_INSTITUTIONTYPE) +// .build()); +// crMasterDetails.addAll(masterInstitutionType); +// +// // Add Module DeliveryMethod +// List masterDeliveryMethod = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_DELIVERYMETHOD) +// .build()); +// crMasterDetails.addAll(masterDeliveryMethod); +// +// +// //Add masters to modules +// ModuleDetail crModuleDetail = ModuleDetail.builder() +// .masterDetails(crMasterDetails) +// .moduleName(BirthConstants.CR_MDMS_MODULE) +// .build(); +// +// return Collections.singletonList(crModuleDetail); +// +// } +// +// public List getCommonModuleDetails() { +// // master details for Common module +// +// List commonMasterDetails = new LinkedList<>(); +// // Add Module Religion +// List masterReligion = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_RELIGION) +// .build()); +// +// commonMasterDetails.addAll(masterReligion); +// // Add Module Taluk +// List masterTaluk = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_TALUK) +// .build()); +// +// commonMasterDetails.addAll(masterTaluk); +// // Add Module State +// List masterState = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_STATE) +// .build()); +// commonMasterDetails.addAll(masterState); +// // Add Module Country +// List masterCountry = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_COUNTRY) +// .build()); +// commonMasterDetails.addAll(masterCountry); +// +// +// // Add Module Village +// List masterVillage = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_VILLAGE) +// .build()); +// commonMasterDetails.addAll(masterVillage); +// +// // Add Module District +// List masterDistrict = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_DISTRICT) +// .build()); +// commonMasterDetails.addAll(masterDistrict); +// +// // Add Module Postoffice +// List masterPostOffice = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_POSTOFFICE) +// .build()); +// commonMasterDetails.addAll(masterPostOffice); +// +// // Add Module LbType +// List masterLbType = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_LBTYPE) +// .build()); +// commonMasterDetails.addAll(masterLbType); +// +// // Add Module PlaceMaster +// List masterBirthPlace = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.COMMON_MDMS_PLACEMASTER) +// .build()); +// commonMasterDetails.addAll(masterBirthPlace); +// +// ModuleDetail commonModuleDetail = ModuleDetail.builder() +// .masterDetails(commonMasterDetails) +// .moduleName(BirthConstants.COMMON_MDMS_MODULE) +// .build(); +// +// return Collections.singletonList(commonModuleDetail); +// +// } +// +// public List getTenantModuleDetails() { +// // master details for Tenant module +// moduleName = "tenant"; +// List tenantDetails = new LinkedList<>(); +// +// List masterTenants = Collections.singletonList(MasterDetail.builder() +// .name(BirthConstants.CR_MDMS_TENANTS) +// .build()); +// tenantDetails.addAll(masterTenants); +// +// ModuleDetail tenantModuleDetail = ModuleDetail.builder() +// .masterDetails(tenantDetails) +// .moduleName(BirthConstants.TENANTS_MODULE) +// .build(); +// +// return Collections.singletonList(tenantModuleDetail); +// +// } +} \ No newline at end of file From d9d86d0c80250934d5b5dcbcf9f1c5308de9c1aa Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 1 Apr 2023 16:26:47 +0530 Subject: [PATCH 075/420] service updation --- .../MarriageApplicationRepository.java | 20 +++---- .../service/MarriageApplicationService.java | 56 ++++++++++++++++--- 2 files changed, 57 insertions(+), 19 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 4bd14761238..d03d122b93d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -56,19 +56,19 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat this.util = util; this.mdmsValidator=mdmsValidator; } - public List saveMarriageDetails(MarriageDetailsRequest request) { + // public List saveMarriageDetails(MarriageDetailsRequest request) { - // marriageDetailsEnrichment.enrichCreate(request); - producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - return request.getMarriageDetails(); - } + // // marriageDetailsEnrichment.enrichCreate(request); + // producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + // return request.getMarriageDetails(); + // } - public List updateMarriageDetails(MarriageDetailsRequest request) { + // public List updateMarriageDetails(MarriageDetailsRequest request) { - // workflowIntegrator.callWorkFlow(request); - producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); - return request.getMarriageDetails(); - } + // // workflowIntegrator.callWorkFlow(request); + // producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); + // return request.getMarriageDetails(); + // } //Jasmine 31.03.2023 // public List saveMarriageDetails(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index bd43c179a56..862ed5da7a6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -2,6 +2,8 @@ import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.model.Demand.Demand; @@ -20,33 +22,69 @@ @Slf4j @Service public class MarriageApplicationService { + private final MarriageProducer producer; private final MarriageApplicationRepository repository; private final WorkflowIntegrator workflowIntegrator; private final MarriageDetailsEnrichment marriageDetailsEnrichment; private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; + private final MarriageApplicationConfiguration marriageApplicationConfiguration; - public MarriageApplicationService(MarriageApplicationRepository repository , + public MarriageApplicationService(MarriageProducer producer,MarriageApplicationRepository repository , WorkflowIntegrator workflowIntegrator, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageMdmsUtil util, - MarriageMDMSValidator mdmsValidator) { + MarriageMDMSValidator mdmsValidator, + MarriageApplicationConfiguration marriageApplicationConfiguration) { this.repository = repository; this.workflowIntegrator = workflowIntegrator; this. marriageDetailsEnrichment= marriageDetailsEnrichment; this.util = util; this.mdmsValidator=mdmsValidator; + this.producer = producer; + this.marriageApplicationConfiguration = marriageApplicationConfiguration; } + + // private final MarriageProducer producer; + // private final MarriageApplicationConfiguration marriageApplicationConfiguration; + // private final MarriageDetailsEnrichment marriageDetailsEnrichment; + // private final MarriageApplicationQueryBuilder marriageQueryBuilder; + // private final MarriageApplicationRowMapper marriageApplicationRowMapper; + // private final JdbcTemplate jdbcTemplate; + // private final WorkflowIntegrator workflowIntegrator; + // private final MarriageMdmsUtil util; + // private final MarriageMDMSValidator mdmsValidator; + + // @Autowired + // public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, + // JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, + // MarriageApplicationRowMapper marriageApplicationRowMapper, + // WorkflowIntegrator workflowIntegrator, + // MarriageMdmsUtil util, + // MarriageMDMSValidator mdmsValidator) { + // this.producer = producer; + // this.marriageApplicationConfiguration = marriageApplicationConfiguration; + // this.marriageDetailsEnrichment = marriageDetailsEnrichment; + // this.jdbcTemplate = jdbcTemplate; + // this.marriageQueryBuilder = marriageQueryBuilder; + // this.marriageApplicationRowMapper = marriageApplicationRowMapper; + // this.workflowIntegrator = workflowIntegrator; + // this.util = util; + // this.mdmsValidator=mdmsValidator; + // } + public List saveMarriageDetails(MarriageDetailsRequest request) { // validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); - List marriageApplicationDetails = repository.saveMarriageDetails(request); + + producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + // List marriageApplicationDetails = repository.saveMarriageDetails(request); // workflowIntegrator.callWorkFlow(request); - marriageApplicationDetails.forEach(marriage->{ + request.getMarriageDetails().forEach(marriage->{ if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); Demand demand = new Demand(); @@ -56,7 +94,7 @@ public List saveMarriageDetails(MarriageDetailsReque marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); } }); - return marriageApplicationDetails; + return request.getMarriageDetails(); } @@ -66,9 +104,9 @@ public List updateMarriageDetails(MarriageDetailsReq mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichUpdate(request); // workflowIntegrator.callWorkFlow(request); - List marriageApplicationDetails =repository.updateMarriageDetails(request); - - marriageApplicationDetails.forEach(marriage->{ + // List marriageApplicationDetails =repository.updateMarriageDetails(request); + producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); + request.getMarriageDetails().forEach(marriage->{ if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); Demand demand = new Demand(); @@ -78,7 +116,7 @@ public List updateMarriageDetails(MarriageDetailsReq marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); } }); - return marriageApplicationDetails; + return request.getMarriageDetails(); } From d524e3ffa9dad0768cd3c3984045fea7692918ee Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 1 Apr 2023 11:30:36 +0530 Subject: [PATCH 076/420] UPDATE --- .../model/marriage/BrideDetails.java | 3 - .../service/MarriageApplicationService.java | 9 + .../MarriageRegistryRequestService.java | 168 +++++++++++++++++- 3 files changed, 168 insertions(+), 12 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index 52f61847f27..e6f47b14ea9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -148,7 +148,4 @@ public class BrideDetails { @JsonProperty("auditDetails") private AuditDetails auditDetails; - - - } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 862ed5da7a6..ff2ee27adad 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -96,6 +96,15 @@ public List saveMarriageDetails(MarriageDetailsReque }); return request.getMarriageDetails(); +<<<<<<< HEAD +======= + + + + // workflowIntegrator.callWorkFlow(request); + + return repository.saveMarriageDetails(request); +>>>>>>> b8d9a2aee7 (UPDATE) } public List updateMarriageDetails(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index 239025f0a30..e9ca52043f1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -57,20 +57,163 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr return request; } - private GroomRegistryAddressDetails groomAddressRegistryDetails(MarriageDetailsRequest marriagerequest) { - return null; + private GroomRegistryAddressDetails groomAddressRegistryDetails(MarriageDetailsRequest marriageGroomAddressrequest) { + GroomRegistryAddressDetails groomRegistryAddressDetails = new GroomRegistryAddressDetails(); + groomRegistryAddressDetails.setCountryIdPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPresent()); + groomRegistryAddressDetails.setCountryIdPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent()); + groomRegistryAddressDetails.setStateIdPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPresent()); + groomRegistryAddressDetails.setStateIdPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPermanent()); + groomRegistryAddressDetails.setDistrictIdPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getDistrictIdPresent()); + groomRegistryAddressDetails.setDistrictIdPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getDistrictIdPermanent()); + groomRegistryAddressDetails.setPinNoPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPinNoPresent()); + groomRegistryAddressDetails.setPinNoPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPinNoPermanent()); + groomRegistryAddressDetails.setLocalityEnPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getLocalityEnPermanent()); + groomRegistryAddressDetails.setLocalityEnPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getLocalityEnPresent()); + groomRegistryAddressDetails.setLocalityMlPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getLocalityMlPermanent()); + groomRegistryAddressDetails.setLocalityMlPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getLocalityMlPresent()); + groomRegistryAddressDetails.setStreetNameEnPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getStreetNameEnPermanent()); + groomRegistryAddressDetails.setStreetNameMlPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getStreetNameMlPermanent()); + groomRegistryAddressDetails.setStreetNameEnPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getStreetNameEnPresent()); + groomRegistryAddressDetails.setStreetNameMlPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getStreetNameMlPresent()); + groomRegistryAddressDetails.setHouseNameNoEnPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getHouseNameNoEnPermanent()); + groomRegistryAddressDetails.setHouseNameNoMlPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getHouseNameNoMlPermanent()); + groomRegistryAddressDetails.setHouseNameNoEnPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getHouseNameNoEnPresent()); + groomRegistryAddressDetails.setHouseNameNoMlPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getHouseNameNoMlPresent()); + groomRegistryAddressDetails.setVillageNamePermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getVillageNamePermanent()); + groomRegistryAddressDetails.setVillageNamePresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getVillageNamePresent()); + groomRegistryAddressDetails.setTownOrVillagePermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getTownOrVillagePermanent()); + groomRegistryAddressDetails.setTownOrVillagePresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getTownOrVillagePresent()); + groomRegistryAddressDetails.setPoNoPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPoNoPermanent()); + groomRegistryAddressDetails.setPoNoPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPoNoPresent()); + groomRegistryAddressDetails.setPresentOthrTalukName(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOthrTalukName()); + groomRegistryAddressDetails.setPermntOthrTalukName(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOthrTalukName()); + groomRegistryAddressDetails.setPresentOthPostOfficeEn(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOthPostOfficeEn()); + groomRegistryAddressDetails.setPermntOthPostOfficeEn(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOthPostOfficeEn()); + groomRegistryAddressDetails.setBrideGroomPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getBrideGroomPermanent()); + groomRegistryAddressDetails.setBrideGroomPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getBrideGroomPresent()); + groomRegistryAddressDetails.setPresentOthrIndiaAdressEn(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOthrIndiaAdressEn()); + groomRegistryAddressDetails.setPresentOthrIndiaAdressMl(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOthrIndiaAdressMl()); + groomRegistryAddressDetails.setPresentOthrIndiaAdressEnB(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOthrIndiaAdressEnB()); + groomRegistryAddressDetails.setPresentOthrIndiaAdressMlB(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOthrIndiaAdressMlB()); + groomRegistryAddressDetails.setPresentOthrIndiaProvinceEn(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); + groomRegistryAddressDetails.setPresentOthrIndiaProvinceMl(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); + groomRegistryAddressDetails.setPermntOthrIndiaLineoneEn(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); + groomRegistryAddressDetails.setPermntOthrIndiaLineoneMl(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); + groomRegistryAddressDetails.setPermntOthrIndiaLinetwoEn(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); + groomRegistryAddressDetails.setPermntOthrIndiaLinetwoMl(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); + groomRegistryAddressDetails.setPermntOthrIndiaprovinceEn(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOthrIndiaprovinceEn()); + groomRegistryAddressDetails.setPermntOthrIndiaprovinceMl(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOthrIndiaprovinceMl()); + return groomRegistryAddressDetails; } - private BrideRegistryAddressDetails brideAddressRegistryDetails(MarriageDetailsRequest marriagerequest) { - return null; + private BrideRegistryAddressDetails brideAddressRegistryDetails(MarriageDetailsRequest marriageBrideAddressrequest) { + BrideRegistryAddressDetails brideRegistryAddressDetails = new BrideRegistryAddressDetails(); + brideRegistryAddressDetails.setCountryIdPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getCountryIdPresent()); + brideRegistryAddressDetails.setCountryIdPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getCountryIdPermanent()); + brideRegistryAddressDetails.setStateIdPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getStateIdPresent()); + brideRegistryAddressDetails.setStateIdPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getStateIdPermanent()); + brideRegistryAddressDetails.setDistrictIdPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getDistrictIdPresent()); + brideRegistryAddressDetails.setDistrictIdPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getDistrictIdPermanent()); + brideRegistryAddressDetails.setPinNoPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPinNoPresent()); + brideRegistryAddressDetails.setPinNoPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPinNoPermanent()); + brideRegistryAddressDetails.setLocalityEnPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getLocalityEnPermanent()); + brideRegistryAddressDetails.setLocalityEnPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getLocalityEnPresent()); + brideRegistryAddressDetails.setLocalityMlPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getLocalityMlPermanent()); + brideRegistryAddressDetails.setLocalityMlPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getLocalityMlPresent()); + brideRegistryAddressDetails.setStreetNameEnPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getStreetNameEnPermanent()); + brideRegistryAddressDetails.setStreetNameMlPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getStreetNameMlPermanent()); + brideRegistryAddressDetails.setStreetNameEnPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getStreetNameEnPresent()); + brideRegistryAddressDetails.setStreetNameMlPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getStreetNameMlPresent()); + brideRegistryAddressDetails.setHouseNameNoEnPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getHouseNameNoEnPermanent()); + brideRegistryAddressDetails.setHouseNameNoMlPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getHouseNameNoMlPermanent()); + brideRegistryAddressDetails.setHouseNameNoEnPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getHouseNameNoEnPresent()); + brideRegistryAddressDetails.setHouseNameNoMlPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getHouseNameNoMlPresent()); + brideRegistryAddressDetails.setVillageNamePermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getVillageNamePermanent()); + brideRegistryAddressDetails.setVillageNamePresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getVillageNamePresent()); + brideRegistryAddressDetails.setTownOrVillagePermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getTownOrVillagePermanent()); + brideRegistryAddressDetails.setTownOrVillagePresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getTownOrVillagePresent()); + brideRegistryAddressDetails.setPoNoPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPoNoPermanent()); + brideRegistryAddressDetails.setPoNoPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPoNoPresent()); + brideRegistryAddressDetails.setPresentOthrTalukName(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOthrTalukName()); + brideRegistryAddressDetails.setPermntOthrTalukName(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOthrTalukName()); + brideRegistryAddressDetails.setPresentOthPostOfficeEn(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOthPostOfficeEn()); + brideRegistryAddressDetails.setPermntOthPostOfficeEn(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOthPostOfficeEn()); + brideRegistryAddressDetails.setBrideGroomPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getBrideGroomPermanent()); + brideRegistryAddressDetails.setBrideGroomPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getBrideGroomPresent()); + brideRegistryAddressDetails.setPresentOthrIndiaAdressEn(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOthrIndiaAdressEn()); + brideRegistryAddressDetails.setPresentOthrIndiaAdressMl(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOthrIndiaAdressMl()); + brideRegistryAddressDetails.setPresentOthrIndiaAdressEnB(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOthrIndiaAdressEnB()); + brideRegistryAddressDetails.setPresentOthrIndiaAdressMlB(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOthrIndiaAdressMlB()); + brideRegistryAddressDetails.setPresentOthrIndiaProvinceEn(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOthrIndiaProvinceEn()); + brideRegistryAddressDetails.setPresentOthrIndiaProvinceMl(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOthrIndiaProvinceMl()); + brideRegistryAddressDetails.setPermntOthrIndiaLineoneEn(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOthrIndiaLineoneEn()); + brideRegistryAddressDetails.setPermntOthrIndiaLineoneMl(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOthrIndiaLineoneMl()); + brideRegistryAddressDetails.setPermntOthrIndiaLinetwoEn(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOthrIndiaLinetwoEn()); + brideRegistryAddressDetails.setPermntOthrIndiaLinetwoMl(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOthrIndiaLinetwoMl()); + brideRegistryAddressDetails.setPermntOthrIndiaprovinceEn(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOthrIndiaprovinceEn()); + brideRegistryAddressDetails.setPermntOthrIndiaprovinceMl(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOthrIndiaprovinceMl()); + return brideRegistryAddressDetails; } - private WitnessRegistryDetails witnessRegistryDetails(MarriageDetailsRequest marriagerequest) { + private WitnessRegistryDetails witnessRegistryDetails(MarriageDetailsRequest marriageWitnessrequest) { + WitnessRegistryDetails witnessRegistryDetails = new WitnessRegistryDetails(); + witnessRegistryDetails.setWitness1AadharNo(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1AadharNo()); + witnessRegistryDetails.setTenentId(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getTenentId()); + witnessRegistryDetails.setWitness1Age(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1Age()); + witnessRegistryDetails.setWitness1NameEn(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1NameEn()); + witnessRegistryDetails.setWitness1NameMl(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1NameMl()); + witnessRegistryDetails.setWitness1AddresSEn(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1AddresSEn()); + witnessRegistryDetails.setWitness1AddressMl(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1AddressMl()); + witnessRegistryDetails.setWitness1Mobile(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1Mobile()); + witnessRegistryDetails.setSerial_no2(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getSerial_no2()); + witnessRegistryDetails.setSerial_no1(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getSerial_no1()); + witnessRegistryDetails.setWitness2Age(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2Age()); + witnessRegistryDetails.setWitness2NameEn(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2NameEn()); + witnessRegistryDetails.setWitness2NameMl(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2NameMl()); + witnessRegistryDetails.setWitness2AddresSEn(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2AddresSEn()); + witnessRegistryDetails.setWitness2AddressMl(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2AddressMl()); + witnessRegistryDetails.setWitness2Mobile(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2Mobile()); + witnessRegistryDetails.setWitness2AadharNo(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2AadharNo()); + witnessRegistryDetails.setWitness1Esigned(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1Esigned()); + witnessRegistryDetails.setWitness2Esigned(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2Esigned()); + return null; } - private GroomRegistryDetails groomRegistryDetails(MarriageDetailsRequest marriagerequest) { - return null; + private GroomRegistryDetails groomRegistryDetails(MarriageDetailsRequest marriageGroomrequest) { + GroomRegistryDetails groomRegistryDetails = new GroomRegistryDetails(); + groomRegistryDetails.setTenentId(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getTenentId()); + groomRegistryDetails.setResidentship(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getResidentship()); + groomRegistryDetails.setBrideGroom(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getBrideGroom()); + groomRegistryDetails.setAadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getAadharno()); + groomRegistryDetails.setPassportno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getPassportno()); + groomRegistryDetails.setSocialsecurityno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getSocialsecurityno()); + groomRegistryDetails.setFather_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFather_aadharno()); + groomRegistryDetails.setFathername_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFathername_en()); + groomRegistryDetails.setFathername_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFathername_ml()); + groomRegistryDetails.setFirstname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFirstname_en()); + groomRegistryDetails.setFirstname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFirstname_ml()); + groomRegistryDetails.setMiddlename_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMiddlename_en()); + groomRegistryDetails.setMiddlename_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMiddlename_ml()); + groomRegistryDetails.setLastname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastname_en()); + groomRegistryDetails.setLastname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastname_ml()); + groomRegistryDetails.setMobile(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMobile()); + groomRegistryDetails.setEmailid(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getEmailid()); + groomRegistryDetails.setGender(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGender()); + groomRegistryDetails.setDateofbirth(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getDateofbirth()); + groomRegistryDetails.setAge(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getAge()); + groomRegistryDetails.setParent_guardian(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getParent_guardian()); + groomRegistryDetails.setMothername_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMothername_en()); + groomRegistryDetails.setMothername_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMothername_ml()); + groomRegistryDetails.setMother_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMother_aadharno()); + groomRegistryDetails.setGuardian_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardian_aadharno()); + groomRegistryDetails.setGuardianname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardianname_en()); + groomRegistryDetails.setGuardianname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardianname_ml()); + groomRegistryDetails.setMaritalstatusid(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid()); + groomRegistryDetails.setGroomNoOfSpouse(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGroomNoOfSpouse()); + groomRegistryDetails.setGroomIsSpouseLiving(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGroomIsSpouseLiving()); + + return groomRegistryDetails; } private BrideRegistryDetails brideRegistryDetails (MarriageDetailsRequest MarriageBriderequest){ @@ -78,7 +221,6 @@ private BrideRegistryDetails brideRegistryDetails (MarriageDetailsRequest Marria brideRegistryDetails.setTenentId(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getTenentId()); brideRegistryDetails.setResidentship(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getResidentship()); brideRegistryDetails.setBrideGroom(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getBrideGroom()); - brideRegistryDetails.setBrideGroom(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getBrideGroom()); brideRegistryDetails.setAadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getAadharno()); brideRegistryDetails.setPassportno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getPassportno()); brideRegistryDetails.setSocialsecurityno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getSocialsecurityno()); @@ -97,7 +239,15 @@ private BrideRegistryDetails brideRegistryDetails (MarriageDetailsRequest Marria brideRegistryDetails.setDateofbirth(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getDateofbirth()); brideRegistryDetails.setAge(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getAge()); brideRegistryDetails.setParent_guardian(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getParent_guardian()); - brideRegistryDetails.setFathername_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFathername_en()); + brideRegistryDetails.setMothername_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMothername_en()); + brideRegistryDetails.setMothername_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMothername_ml()); + brideRegistryDetails.setMother_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMother_aadharno()); + brideRegistryDetails.setGuardian_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardian_aadharno()); + brideRegistryDetails.setGuardianname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardianname_en()); + brideRegistryDetails.setGuardianname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardianname_ml()); + brideRegistryDetails.setMaritalstatusid(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMaritalstatusid()); + brideRegistryDetails.setBrideNoOfSpouse(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getBrideNoOfSpouse()); + // brideRegistryDetails.setBrideIsSpouseLiving(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getbrideIsSpouseLiving()); return brideRegistryDetails; } From 6fed230dc4e54d26d521851c87bdef6d9f34e430 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 1 Apr 2023 11:31:40 +0530 Subject: [PATCH 077/420] UPDATE --- .../controller/MarriageApplicationController.java | 7 ++++++- ...401110024__marriageFieldSizeChange_services_new_dll.sql | 0 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index f4e468695aa..59fc737c438 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -65,12 +65,17 @@ public ResponseEntity saveMarriageDetails(@RequestB @PostMapping(value = {"/_updatemarriage"}) public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { +<<<<<<< HEAD List marriageDetails = MarriageService.updateMarriageDetails(request); if ((marriageDetails.get(0).getStatus() == WORKFLOW_STATUS_APPROVED && marriageDetails.get(0).getApplicationtype() == APPLICATION_NEW)) { +======= + List marriageDetails = crMarriageService.updateMarriageDetails(request); + // if ((marriageDetails.get(0).getStatus() == WORKFLOW_STATUS_APPROVED && marriageDetails.get(0).getApplicationtype() == APPLICATION_NEW)) { +>>>>>>> 067a9092e4 (UPDATE) MarriageRegistryRequest marriageRegistryRequest = marriageRegistryRequestService.createRegistryRequest(request); List marriageRegistryDetails = marriageRegistryService.createRegistry(marriageRegistryRequest); - } + // } return new ResponseEntity<>(marriageDetails, HttpStatus.OK); } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql new file mode 100644 index 00000000000..e69de29bb2d From cc1d4c1e6b0893ae840062e261a26955081eb86f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 1 Apr 2023 16:54:11 +0530 Subject: [PATCH 078/420] MIGRATION UPDATION --- .../src/main/resources/marriage-registry.yml | 36 ++-- .../builder/CommonQueryBuilder.java | 156 +++++++++--------- .../MarriageApplicationController.java | 8 +- .../enrichment/MarriageDetailsEnrichment.java | 1 - .../model/marriage/BrideDetails.java | 4 +- .../model/marriage/GroomDetails.java | 3 +- .../model/marriage/WitnessDetails.java | 1 - .../MarriageApplicationRepository.java | 39 ++++- .../MarriageApplicationQueryBuilder.java | 9 +- .../rowmapper/BrideDetailsRowMapper.java | 2 +- .../rowmapper/GroomDetailsRowMapper.java | 2 +- .../service/MarriageApplicationService.java | 18 +- .../MarriageRegistryRequestService.java | 16 +- .../model/BrideRegistryDetails.java | 3 +- .../model/GroomRegistryDetails.java | 3 +- .../MarriageRegistryQueryBuilder.java | 6 +- .../rowmapper/BrideRegistryRowMapper.java | 2 +- .../rowmapper/GroomRegistryRowMapper.java | 2 +- .../src/main/resources/application.properties | 4 +- ..._marriageAddNewFields_services_new_dll.sql | 57 +++++++ ...rriageFieldSizeChange_services_new_dll.sql | 15 ++ 21 files changed, 244 insertions(+), 143 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index cec5ada736b..12239774fe1 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -241,9 +241,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy - query: INSERT INTO public.eg_register_marriage_witness_details( - id, aadharno, name_en, name_ml, age, address_en,address_ml, mobile, is_esigned, marriageid, createdtime, createdby, - lastmodifiedtime, lastmodifiedby, serial_no) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?); + id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, + lastmodifiedtime, lastmodifiedby, serial_no, tenantid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.WitnessDetails jsonMaps: @@ -259,7 +259,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn - - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddressMl + - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile @@ -267,20 +267,24 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 + - jsonPath: $.MarriageDetails.*.marriageTenantid + + + - query: INSERT INTO public.eg_register_marriage_witness_details( - id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, - lastmodifiedtime, lastmodifiedby, serial_no) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, aadharno, name_en, name_ml, age, address_en, address_ml, mobile, is_esigned, marriageid, createdtime, createdby, + lastmodifiedtime, lastmodifiedby, serial_no, tenantid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.WitnessDetails jsonMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.witnessId2 @@ -303,16 +307,18 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 + - jsonPath: $.MarriageDetails.*.marriageTenantid + - query : INSERT INTO public.eg_register_marriage_present_address_details( id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java index cc2bb9fe86f..ed648120f0d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/builder/CommonQueryBuilder.java @@ -1,78 +1,78 @@ -package org.ksmart.marriage.common.repository.builder; - -import lombok.extern.slf4j.Slf4j; -import org.apache.kafka.common.protocol.types.Field; -import org.springframework.stereotype.Component; - -@Slf4j -@Component -public class CommonQueryBuilder { - - private static final String QUERY_BRIDE_DETAILS = new StringBuilder() - .append("mbd.id as bd_id,mbd.residentship as bd_residentship,mbd.adharno as bd_adharno,mbd.passportno as bd_passportno,") - .append("mbd.socialsecurityno as bd_socialsecurityno,mbd.firstname_en as bd_firstname_en,mbd.firstname_mal as bd_firstname_mal,mbd.middlename_en as bd_middlename_en,") - .append("mbd.fathername_mal as bd_fathername_mal,mbd.middlename_mal as bd_middlename_mal,mbd.lastname_en as bd_lastname_en,mbd.lastname_mal as bd_lastname_mal,mbd.mobile as bd_mobile,") - .append("mbd.emailid as bd_emailid,mbd.gender as bd_gender,mbd.dateofbirth as bd_dateofbirth,mbd.age as bd_age,mbd.parent_guardian as bd_parent_guardian,mbd.fathername_en as bd_fathername_en,") - .append("mbd.mothername_en as bd_mothername_en,mbd.mothername_mal as bd_mothername_mal,mbd.father_adharno as bd_father_adharno,mbd.mother_adharno as bd_mother_adharno,") - .append("mbd.guardianname_en as bd_guardianname_en,mbd.guardianname_mal as bd_guardianname_mal,mbd.guardian_adhar as bd_guardian_adhar,mbd.profession_en as bd_profession_en,") - .append("mbd.profession_mal as bd_profession_mal,mbd.maritalstatusid as bd_maritalstatusid,mbd.is_spouse_living as bd_is_spouse_living,mbd.no_of_spouse_living as bd_no_of_spouse_living,") - .append("mbd.marriageid as bd_marriageid,mbd.photo_url as bd_photo_url,mbd.createdtime as bd_createdtime,mbd.createdby as bd_createdby,mbd.lastmodifiedtime as bd_lastmodifiedtime,mbd.lastmodifiedby as bd_lastmodifiedby").toString(); - - - private static final String QUERY_GROOM_DETAILS = new StringBuilder() - .append("mrd.id as gd_id,mrd.residentship as gd_residentship,mrd.adharno as gd_adharno,mrd.passportno as gd_passportno,mrd.socialsecurityno as gd_socialsecurityno,mrd.firstname_en as gd_firstname_en,mrd.firstname_mal as gd_firstname_mal,") - .append("mrd.middlename_en as gd_middlename_en,mrd.middlename_mal as gd_middlename_mal,mrd.lastname_en as gd_lastname_en,mrd.lastname_mal as gd_lastname_mal,mrd.mobile as gd_mobile,mrd.emailid as gd_emailid,mrd.gender as gd_gender,") - .append("mrd.dateofbirth as gd_dateofbirth,mrd.age as gd_age,mrd.parent_guardian as gd_parent_guardian,mrd.fathername_en as gd_fathername_en,mrd.fathername_mal as gd_fathername_mal,mrd.mothername_en as gd_mothername_en,") - .append("mrd.mothername_mal as gd_mothername_mal,mrd.father_adharno as gd_father_adharno,mrd.mother_adharno as gd_mother_adharno,mrd.guardianname_en as gd_guardianname_en,mrd.guardianname_mal as gd_guardianname_mal,") - .append("mrd.profession_en as gd_profession_en,mrd.profession_mal as gd_profession_mal,mrd.maritalstatusid as gd_maritalstatusid,mrd.guardian_adhar as gd_guardian_adhar,") - .append("mrd.is_spouse_living as gd_is_spouse_living,mrd.no_of_spouse_living as gd_no_of_spouse_living,mrd.marriageid as gd_marriageid,mrd.photo_url as gd_photo_url") - .toString(); - - private static final String QUERY_PRESENTADDRESS_DETAILS = new StringBuilder() - .append("mpress.id as pes_id,mpress.houseno as pes_houseno,mpress.housename_no_en as pes_housename_no_en,mpress.housename_no_ml as pes_housename_no_ml,mpress.villageid as pes_villageid,mpress.village_name as pes_village_name,") - .append("mpress.talukid as pes_talukid,mpress.taluk_name as pes_taluk_name,mpress.ward_code as pes_ward_code,mpress.doorno as pes_doorno,mpress.locality_en as pes_locality_en,mpress.locality_ml as pes_locality_ml,mpress.street_name_en as pes_street_name_en,") - .append("mpress.street_name_ml as pes_street_name_ml,mpress.districtid as pes_districtid,mpress.stateid as pes_stateid,mpress.poid as pes_poid,mpress.pinno as pes_pinno,mpress.countryid as pes_countryid,mpress.marriageid as pes_marriageid") - .toString(); - - - private static final String QUERY_PERMANENTADDRESS_DETAILS = new StringBuilder() - .append("mper.id as per_id,mper.houseno as per_houseno,mper.housename_no_en as per_housename_no_en,mper.housename_no_ml as per_housename_no_ml,mper.villageid as per_villageid,mper.village_name as per_village_name,") - .append("mper.talukid as per_talukid,mper.taluk_name as per_taluk_name,mper.ward_code as per_ward_code,mper.doorno as per_doorno,mper.locality_en as per_locality_en,mper.locality_ml as per_locality_ml,mper.street_name_en as per_street_name_en,") - .append("mper.street_name_ml as per_street_name_ml,mper.districtid as per_districtid,mper.stateid as per_stateid,mper.poid as per_poid,mper.pinno as per_pinno,mper.countryid as per_countryid,mper.marriageid as per_marriageid") - .toString(); - - private static final String QUERY_WITNESS_DETAILS = new StringBuilder() - .append("mwd.id as wd_id,mwd.adharno as wd_adharno,mwd.name_en as wd_name_en,mwd.name_mal as wd_name_mal,mwd.age as wd_age,mwd.address_en as wd_address_en,mwd.address_mal as wd_address_mal,mwd.mobile as wd_mobile,mwd.is_message_received as wd_is_message_received,") - .append("mwd.is_esigned as wd_is_esigned,mwd.marriageid as wd_marriageid,mwd.w2_adharno as wd_w2_adharno,mwd.w2_name_en as wd_w2_name_en,mwd.w2_name_mal as wd_w2_name_mal,mwd.w2_age as wd_w2_age,mwd.w2_address_en as wd_w2_address_en,") - .append("mwd.w2_address_mal as wd_w2_address_mal,mwd.w2_mobile as wd_w2_mobile,mwd.w2_is_message_received as wd_w2_is_message_received,mwd.w2_is_esigned as wd_w2_is_esigned") - .toString(); - - public String getQueryBrideDetails() { - - return QUERY_BRIDE_DETAILS; - } - public String getGroomDetails(){ - - return QUERY_GROOM_DETAILS; - } - - public String getPresentAddressDetails(){ - - return QUERY_PRESENTADDRESS_DETAILS; - } - - public String getPermanentAddressDetails(){ - - return QUERY_PERMANENTADDRESS_DETAILS; - } - - public String getWitnessDetails(){ - - return QUERY_WITNESS_DETAILS; - } -} - - - - - +//package org.ksmart.marriage.common.repository.builder; +// +//import lombok.extern.slf4j.Slf4j; +//import org.apache.kafka.common.protocol.types.Field; +//import org.springframework.stereotype.Component; +// +//@Slf4j +//@Component +//public class CommonQueryBuilder { +// +// private static final String QUERY_BRIDE_DETAILS = new StringBuilder() +// .append("mbd.id as bd_id,mbd.residentship as bd_residentship,mbd.adharno as bd_adharno,mbd.passportno as bd_passportno,") +// .append("mbd.socialsecurityno as bd_socialsecurityno,mbd.firstname_en as bd_firstname_en,mbd.firstname_mal as bd_firstname_mal,mbd.middlename_en as bd_middlename_en,") +// .append("mbd.fathername_mal as bd_fathername_mal,mbd.middlename_mal as bd_middlename_mal,mbd.lastname_en as bd_lastname_en,mbd.lastname_mal as bd_lastname_mal,mbd.mobile as bd_mobile,") +// .append("mbd.emailid as bd_emailid,mbd.gender as bd_gender,mbd.dateofbirth as bd_dateofbirth,mbd.age as bd_age,mbd.parent_guardian as bd_parent_guardian,mbd.fathername_en as bd_fathername_en,") +// .append("mbd.mothername_en as bd_mothername_en,mbd.mothername_mal as bd_mothername_mal,mbd.father_adharno as bd_father_adharno,mbd.mother_adharno as bd_mother_adharno,") +// .append("mbd.guardianname_en as bd_guardianname_en,mbd.guardianname_mal as bd_guardianname_mal,mbd.guardian_adhar as bd_guardian_adhar,mbd.profession_en as bd_profession_en,") +// .append("mbd.profession_mal as bd_profession_mal,mbd.maritalstatusid as bd_maritalstatusid,mbd.is_spouse_living as bd_is_spouse_living,mbd.no_of_spouse_living as bd_no_of_spouse_living,") +// .append("mbd.marriageid as bd_marriageid,mbd.photo_url as bd_photo_url,mbd.createdtime as bd_createdtime,mbd.createdby as bd_createdby,mbd.lastmodifiedtime as bd_lastmodifiedtime,mbd.lastmodifiedby as bd_lastmodifiedby").toString(); +// +// +// private static final String QUERY_GROOM_DETAILS = new StringBuilder() +// .append("mrd.id as gd_id,mrd.residentship as gd_residentship,mrd.adharno as gd_adharno,mrd.passportno as gd_passportno,mrd.socialsecurityno as gd_socialsecurityno,mrd.firstname_en as gd_firstname_en,mrd.firstname_mal as gd_firstname_mal,") +// .append("mrd.middlename_en as gd_middlename_en,mrd.middlename_mal as gd_middlename_mal,mrd.lastname_en as gd_lastname_en,mrd.lastname_mal as gd_lastname_mal,mrd.mobile as gd_mobile,mrd.emailid as gd_emailid,mrd.gender as gd_gender,") +// .append("mrd.dateofbirth as gd_dateofbirth,mrd.age as gd_age,mrd.parent_guardian as gd_parent_guardian,mrd.fathername_en as gd_fathername_en,mrd.fathername_mal as gd_fathername_mal,mrd.mothername_en as gd_mothername_en,") +// .append("mrd.mothername_mal as gd_mothername_mal,mrd.father_adharno as gd_father_adharno,mrd.mother_adharno as gd_mother_adharno,mrd.guardianname_en as gd_guardianname_en,mrd.guardianname_mal as gd_guardianname_mal,") +// .append("mrd.profession_en as gd_profession_en,mrd.profession_mal as gd_profession_mal,mrd.maritalstatusid as gd_maritalstatusid,mrd.guardian_adhar as gd_guardian_adhar,") +// .append("mrd.is_spouse_living as gd_is_spouse_living,mrd.no_of_spouse_living as gd_no_of_spouse_living,mrd.marriageid as gd_marriageid,mrd.photo_url as gd_photo_url") +// .toString(); +// +// private static final String QUERY_PRESENTADDRESS_DETAILS = new StringBuilder() +// .append("mpress.id as pes_id,mpress.houseno as pes_houseno,mpress.housename_no_en as pes_housename_no_en,mpress.housename_no_ml as pes_housename_no_ml,mpress.villageid as pes_villageid,mpress.village_name as pes_village_name,") +// .append("mpress.talukid as pes_talukid,mpress.taluk_name as pes_taluk_name,mpress.ward_code as pes_ward_code,mpress.doorno as pes_doorno,mpress.locality_en as pes_locality_en,mpress.locality_ml as pes_locality_ml,mpress.street_name_en as pes_street_name_en,") +// .append("mpress.street_name_ml as pes_street_name_ml,mpress.districtid as pes_districtid,mpress.stateid as pes_stateid,mpress.poid as pes_poid,mpress.pinno as pes_pinno,mpress.countryid as pes_countryid,mpress.marriageid as pes_marriageid") +// .toString(); +// +// +// private static final String QUERY_PERMANENTADDRESS_DETAILS = new StringBuilder() +// .append("mper.id as per_id,mper.houseno as per_houseno,mper.housename_no_en as per_housename_no_en,mper.housename_no_ml as per_housename_no_ml,mper.villageid as per_villageid,mper.village_name as per_village_name,") +// .append("mper.talukid as per_talukid,mper.taluk_name as per_taluk_name,mper.ward_code as per_ward_code,mper.doorno as per_doorno,mper.locality_en as per_locality_en,mper.locality_ml as per_locality_ml,mper.street_name_en as per_street_name_en,") +// .append("mper.street_name_ml as per_street_name_ml,mper.districtid as per_districtid,mper.stateid as per_stateid,mper.poid as per_poid,mper.pinno as per_pinno,mper.countryid as per_countryid,mper.marriageid as per_marriageid") +// .toString(); +// +// private static final String QUERY_WITNESS_DETAILS = new StringBuilder() +// .append("mwd.id as wd_id,mwd.adharno as wd_adharno,mwd.name_en as wd_name_en,mwd.name_mal as wd_name_mal,mwd.age as wd_age,mwd.address_en as wd_address_en,mwd.address_mal as wd_address_mal,mwd.mobile as wd_mobile,mwd.is_message_received as wd_is_message_received,") +// .append("mwd.is_esigned as wd_is_esigned,mwd.marriageid as wd_marriageid,mwd.w2_adharno as wd_w2_adharno,mwd.w2_name_en as wd_w2_name_en,mwd.w2_name_mal as wd_w2_name_mal,mwd.w2_age as wd_w2_age,mwd.w2_address_en as wd_w2_address_en,") +// .append("mwd.w2_address_mal as wd_w2_address_mal,mwd.w2_mobile as wd_w2_mobile,mwd.w2_is_message_received as wd_w2_is_message_received,mwd.w2_is_esigned as wd_w2_is_esigned") +// .toString(); +// +// public String getQueryBrideDetails() { +// +// return QUERY_BRIDE_DETAILS; +// } +// public String getGroomDetails(){ +// +// return QUERY_GROOM_DETAILS; +// } +// +// public String getPresentAddressDetails(){ +// +// return QUERY_PRESENTADDRESS_DETAILS; +// } +// +// public String getPermanentAddressDetails(){ +// +// return QUERY_PERMANENTADDRESS_DETAILS; +// } +// +// public String getWitnessDetails(){ +// +// return QUERY_WITNESS_DETAILS; +// } +//} +// +// +// +// +// diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index 59fc737c438..4ec30b0a917 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -65,13 +65,8 @@ public ResponseEntity saveMarriageDetails(@RequestB @PostMapping(value = {"/_updatemarriage"}) public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { -<<<<<<< HEAD List marriageDetails = MarriageService.updateMarriageDetails(request); - if ((marriageDetails.get(0).getStatus() == WORKFLOW_STATUS_APPROVED && marriageDetails.get(0).getApplicationtype() == APPLICATION_NEW)) { -======= - List marriageDetails = crMarriageService.updateMarriageDetails(request); - // if ((marriageDetails.get(0).getStatus() == WORKFLOW_STATUS_APPROVED && marriageDetails.get(0).getApplicationtype() == APPLICATION_NEW)) { ->>>>>>> 067a9092e4 (UPDATE) + // if ((marriageDetails.get(0).getStatus() == WORKFLOW_STATUS_APPROVED && marriageDetails.get(0).getApplicationtype() == APPLICATION_NEW)) { MarriageRegistryRequest marriageRegistryRequest = marriageRegistryRequestService.createRegistryRequest(request); List marriageRegistryDetails = marriageRegistryService.createRegistry(marriageRegistryRequest); @@ -80,7 +75,6 @@ public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsReque return new ResponseEntity<>(marriageDetails, HttpStatus.OK); } - @PostMapping(value = { "/_searchmarriage"}) public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index e69f8c0228f..fc8762386fe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -95,7 +95,6 @@ public void enrichUpdate(MarriageDetailsRequest request) { request.getMarriageDetails() .forEach(marriage -> marriage.setAuditDetails(auditDetails)); -// setApplicationNumbers(request); setRegistrationNumber(request); setBridePermanentAddress(request); setBridePresentAddress(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index e6f47b14ea9..b7987015296 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -68,9 +68,9 @@ public class BrideDetails { @JsonProperty("brideLastnameMl") private String lastname_ml; - @Size(max = 150) + @JsonProperty("brideMobile") - private String mobile; + private Long mobile; @Size(max = 300) @JsonProperty("brideEmailid") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index 74cc257e7c5..80421f3cbaf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -69,9 +69,8 @@ public class GroomDetails { @JsonProperty("groomLastnameMl") private String lastname_ml; - @Size(max = 150) @JsonProperty("groomMobile") - private String mobile; + private Long mobile; @Size(max = 300) @JsonProperty("groomEmailid") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java index ca6a4be8216..92653670403 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java @@ -54,7 +54,6 @@ public class WitnessDetails { @JsonProperty("witness1AddressMl") private String witness1AddressMl; - @Size(max = 150) @JsonProperty("witness1Mobile") private Long witness1Mobile; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index d03d122b93d..2f589d8cabf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -7,14 +7,15 @@ import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.model.Demand.Demand; //import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; -import org.ksmart.marriage.utils.MarriageConstants; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; @@ -34,28 +35,32 @@ public class MarriageApplicationRepository { private final MarriageDetailsEnrichment marriageDetailsEnrichment; private final MarriageApplicationQueryBuilder marriageQueryBuilder; private final MarriageApplicationRowMapper marriageApplicationRowMapper; + private final MarriageRegistryRowMapper marriageRegistryRowMapper; + private final JdbcTemplate jdbcTemplate; private final WorkflowIntegrator workflowIntegrator; private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; @Autowired - public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, - JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, - MarriageApplicationRowMapper marriageApplicationRowMapper, - WorkflowIntegrator workflowIntegrator, - MarriageMdmsUtil util, - MarriageMDMSValidator mdmsValidator) { + public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, + JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, + MarriageApplicationRowMapper marriageApplicationRowMapper, + MarriageRegistryRowMapper marriageRegistryRowMapper, WorkflowIntegrator workflowIntegrator, + MarriageMdmsUtil util, + MarriageMDMSValidator mdmsValidator) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageDetailsEnrichment = marriageDetailsEnrichment; this.jdbcTemplate = jdbcTemplate; this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; + this.marriageRegistryRowMapper = marriageRegistryRowMapper; this.workflowIntegrator = workflowIntegrator; this.util = util; - this.mdmsValidator=mdmsValidator; + this.mdmsValidator = mdmsValidator; } +<<<<<<< HEAD // public List saveMarriageDetails(MarriageDetailsRequest request) { // // marriageDetailsEnrichment.enrichCreate(request); @@ -69,6 +74,22 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat // producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); // return request.getMarriageDetails(); // } +======= + + public List saveMarriageDetails(MarriageDetailsRequest request) { + + // marriageDetailsEnrichment.enrichCreate(request); + producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + return request.getMarriageDetails(); + } + + public List updateMarriageDetails(MarriageDetailsRequest request) { + + // workflowIntegrator.callWorkFlow(request); + producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); + return request.getMarriageDetails(); + } +>>>>>>> 9698db07e0 (MIGRATION UPDATION) //Jasmine 31.03.2023 // public List saveMarriageDetails(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 2356d0d9a28..3126b302ff0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -1,17 +1,18 @@ package org.ksmart.marriage.marriageapplication.repository.querybuilder; -import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; +//import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; import javax.validation.constraints.NotNull; import java.util.List; @Component public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { - @Autowired - CommonQueryBuilder commonQueryBuilder; +// @Autowired +// CommonQueryBuilder commonQueryBuilder; private static final String QUERY = new StringBuilder() .append("SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") @@ -156,4 +157,6 @@ public String getNextIDQuery() { return query.toString(); } + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 997b997aaac..d34911e48a8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -20,7 +20,7 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ .middlename_ml(rs.getString("BD_middlename_ml")) .lastname_en(rs.getString("BD_lastname_en")) .lastname_ml(rs.getString("BD_lastname_ml")) - .mobile(rs.getString("BD_mobile")) + .mobile(Long.valueOf(Integer.valueOf(rs.getString("BD_mobile")))) .emailid(rs.getString("BD_emailid")) .gender(rs.getString("BD_gender")) .dateofbirth(rs.getLong("BD_dateofbirth")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 68f9c3ac74a..911e247d0ce 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -20,7 +20,7 @@ default GroomDetails getGroomDetails (ResultSet rs) throws SQLException{ .middlename_ml(rs.getString("GD_middlename_ml")) .lastname_en(rs.getString("GD_lastname_en")) .lastname_ml(rs.getString("GD_lastname_ml")) - .mobile(rs.getString("GD_mobile")) + .mobile(Long.valueOf(Integer.valueOf(rs.getString("GD_mobile")))) .emailid(rs.getString("GD_emailid")) .gender(rs.getString("GD_gender")) .dateofbirth(rs.getLong("GD_dateofbirth")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index ff2ee27adad..68e0b2da3d9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -96,26 +96,30 @@ public List saveMarriageDetails(MarriageDetailsReque }); return request.getMarriageDetails(); -<<<<<<< HEAD -======= - - // workflowIntegrator.callWorkFlow(request); - - return repository.saveMarriageDetails(request); ->>>>>>> b8d9a2aee7 (UPDATE) } public List updateMarriageDetails(MarriageDetailsRequest request) { // validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); mdmsValidator.validateMarriageMDMSData(request,mdmsData); + + + + marriageDetailsEnrichment.enrichUpdate(request); // workflowIntegrator.callWorkFlow(request); +<<<<<<< HEAD // List marriageApplicationDetails =repository.updateMarriageDetails(request); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); request.getMarriageDetails().forEach(marriage->{ +======= + + List marriageApplicationDetails =repository.updateMarriageDetails(request); + + marriageApplicationDetails.forEach(marriage->{ +>>>>>>> 9698db07e0 (MIGRATION UPDATION) if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); Demand demand = new Demand(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index e9ca52043f1..126c50ce57d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -1,8 +1,8 @@ package org.ksmart.marriage.marriageapplication.service; import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.marriageregistry.model.*; import org.springframework.stereotype.Service; @@ -11,6 +11,13 @@ @Slf4j @Service public class MarriageRegistryRequestService { + + private final MarriageApplicationRepository repository; + + public MarriageRegistryRequestService(MarriageApplicationRepository repository) { + this.repository = repository; + } + public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marriagerequest) { MarriageRegistryRequest request = new MarriageRegistryRequest(); @@ -49,7 +56,6 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr registerMarriageDetail.setWitnessDetails(witnessRegistryDetails(Marriagerequest)); registerMarriageDetail.setBrideAddressDetails(brideAddressRegistryDetails(Marriagerequest)); registerMarriageDetail.setGroomAddressDetails(groomAddressRegistryDetails(Marriagerequest)); - registerMarriageDetails.add(registerMarriageDetail); request.setRequestInfo(Marriagerequest.getRequestInfo()); request.setMarriageDetails(registerMarriageDetails); @@ -177,7 +183,7 @@ private WitnessRegistryDetails witnessRegistryDetails(MarriageDetailsRequest mar witnessRegistryDetails.setWitness1Esigned(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1Esigned()); witnessRegistryDetails.setWitness2Esigned(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2Esigned()); - return null; + return witnessRegistryDetails; } private GroomRegistryDetails groomRegistryDetails(MarriageDetailsRequest marriageGroomrequest) { @@ -197,7 +203,7 @@ private GroomRegistryDetails groomRegistryDetails(MarriageDetailsRequest marriag groomRegistryDetails.setMiddlename_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMiddlename_ml()); groomRegistryDetails.setLastname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastname_en()); groomRegistryDetails.setLastname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastname_ml()); - groomRegistryDetails.setMobile(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMobile()); + groomRegistryDetails.setMobile(Long.valueOf(String.valueOf(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMobile()))); groomRegistryDetails.setEmailid(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getEmailid()); groomRegistryDetails.setGender(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGender()); groomRegistryDetails.setDateofbirth(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getDateofbirth()); @@ -233,7 +239,7 @@ private BrideRegistryDetails brideRegistryDetails (MarriageDetailsRequest Marria brideRegistryDetails.setMiddlename_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMiddlename_ml()); brideRegistryDetails.setLastname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastname_en()); brideRegistryDetails.setLastname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastname_ml()); - brideRegistryDetails.setMobile(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMobile()); + brideRegistryDetails.setMobile(Long.valueOf(String.valueOf(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMobile()))); brideRegistryDetails.setEmailid(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getEmailid()); brideRegistryDetails.setGender(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGender()); brideRegistryDetails.setDateofbirth(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getDateofbirth()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java index c7a444299fc..3236c2cd974 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java @@ -69,9 +69,8 @@ public class BrideRegistryDetails { @JsonProperty("brideLastnameMl") private String lastname_ml; - @Size(max = 150) @JsonProperty("brideMobile") - private String mobile; + private Long mobile; @Size(max = 300) @JsonProperty("brideEmailid") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java index 5c53453557e..31e02438fa5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java @@ -69,9 +69,8 @@ public class GroomRegistryDetails { @JsonProperty("groomLastnameMl") private String lastname_ml; - @Size(max = 150) @JsonProperty("groomMobile") - private String mobile; + private Long mobile; @Size(max = 300) @JsonProperty("groomEmailid") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 9dab015fe91..ab7230aa430 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -1,5 +1,5 @@ package org.ksmart.marriage.marriageregistry.repository.querybuilder; -import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; +//import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; import org.springframework.beans.factory.annotation.Autowired; @@ -13,8 +13,8 @@ */ @Component public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { - @Autowired - CommonQueryBuilder commonQueryBuilder; +// @Autowired +// CommonQueryBuilder commonQueryBuilder; //Jasmine 26.03.2023 private static final String QUERY = new StringBuilder() .append(" SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index 01f6160e219..48409dbc80c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -25,7 +25,7 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ .middlename_ml(rs.getString("BD_middlename_ml")) .lastname_en(rs.getString("BD_lastname_en")) .lastname_ml(rs.getString("BD_lastname_ml")) - .mobile(rs.getString("BD_mobile")) + .mobile(Long.valueOf(rs.getString("BD_mobile"))) .emailid(rs.getString("BD_emailid")) .gender(rs.getString("BD_gender")) .dateofbirth(rs.getLong("BD_dateofbirth")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index ffe9482bf97..cc716155f51 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -21,7 +21,7 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ .middlename_ml(rs.getString("GD_middlename_ml")) .lastname_en(rs.getString("GD_lastname_en")) .lastname_ml(rs.getString("GD_lastname_ml")) - .mobile(rs.getString("GD_mobile")) + .mobile(Long.valueOf(rs.getString("GD_mobile"))) .emailid(rs.getString("GD_emailid")) .gender(rs.getString("GD_gender")) .dateofbirth(rs.getLong("GD_dateofbirth")) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 67762ad07d8..b31a483b262 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql new file mode 100644 index 00000000000..436e8cf4b09 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql @@ -0,0 +1,57 @@ +ALTER TABLE public.eg_register_marriage_bride_groom_details + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_witness_details + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_bride_groom_details_audit + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_witness_details_audit + ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", + ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_document + ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_document_audit + ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_details_audit + RENAME COLUMN grromAgeCorreflag TO groomAgeCorreflag; +ALTER TABLE public.eg_marriage_details + RENAME COLUMN grromAgeCorreflag TO groomAgeCorreflag; + + +ALTER TABLE public.eg_marriage_details + ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_marriage_details_audit + ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; + + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", + ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql index e69de29bb2d..5fc52926416 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql @@ -0,0 +1,15 @@ +ALTER TABLE eg_marriage_bride_groom_details +ALTER COLUMN mobile TYPE bigint +USING mobile::bigint; + +ALTER TABLE eg_marriage_bride_groom_details_audit +ALTER COLUMN mobile TYPE bigint +USING mobile::bigint; + +ALTER TABLE eg_register_marriage_bride_groom_details +ALTER COLUMN mobile TYPE bigint +USING mobile::bigint; + +ALTER TABLE eg_register_marriage_bride_groom_details_audit +ALTER COLUMN mobile TYPE bigint +USING mobile::bigint; \ No newline at end of file From cdc1f3c7202e9e63e5eea4d212ed27bdaf3aa8f7 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 2 Apr 2023 10:33:59 +0530 Subject: [PATCH 079/420] Searching --- .../MarriageApplicationRepository.java | 14 +++----- .../service/MarriageApplicationService.java | 33 ++++++++++--------- 2 files changed, 21 insertions(+), 26 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 2f589d8cabf..2ecda8359f4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -3,6 +3,7 @@ // import lombok.extern.slf4j.Slf4j; //import org.ksmart.marriage.common.producer.BndProducer; +import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; @@ -60,7 +61,6 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat this.util = util; this.mdmsValidator = mdmsValidator; } -<<<<<<< HEAD // public List saveMarriageDetails(MarriageDetailsRequest request) { // // marriageDetailsEnrichment.enrichCreate(request); @@ -74,7 +74,6 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat // producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); // return request.getMarriageDetails(); // } -======= public List saveMarriageDetails(MarriageDetailsRequest request) { @@ -82,14 +81,6 @@ public List saveMarriageDetails(MarriageDetailsReque producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); return request.getMarriageDetails(); } - - public List updateMarriageDetails(MarriageDetailsRequest request) { - - // workflowIntegrator.callWorkFlow(request); - producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); - return request.getMarriageDetails(); - } ->>>>>>> 9698db07e0 (MIGRATION UPDATION) //Jasmine 31.03.2023 // public List saveMarriageDetails(MarriageDetailsRequest request) { @@ -113,4 +104,7 @@ public List searchMarriageDetails(MarriageApplicatio } + public List getMarriageApplication(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { + return null; + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 68e0b2da3d9..4dc252fca17 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -10,6 +10,7 @@ import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; +import org.ksmart.marriage.marriageapplication.validator.MarriageApplicationValidator; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.MarriageMdmsUtil; @@ -29,14 +30,15 @@ public class MarriageApplicationService { private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; private final MarriageApplicationConfiguration marriageApplicationConfiguration; - - - public MarriageApplicationService(MarriageProducer producer,MarriageApplicationRepository repository , - WorkflowIntegrator workflowIntegrator, - MarriageDetailsEnrichment marriageDetailsEnrichment, - MarriageMdmsUtil util, - MarriageMDMSValidator mdmsValidator, - MarriageApplicationConfiguration marriageApplicationConfiguration) { + + private final MarriageApplicationValidator validatorService; + + public MarriageApplicationService(MarriageProducer producer, MarriageApplicationRepository repository , + WorkflowIntegrator workflowIntegrator, + MarriageDetailsEnrichment marriageDetailsEnrichment, + MarriageMdmsUtil util, + MarriageMDMSValidator mdmsValidator, + MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageApplicationValidator validatorService) { this.repository = repository; this.workflowIntegrator = workflowIntegrator; this. marriageDetailsEnrichment= marriageDetailsEnrichment; @@ -44,6 +46,7 @@ public MarriageApplicationService(MarriageProducer producer,MarriageApplicationR this.mdmsValidator=mdmsValidator; this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; + this.validatorService = validatorService; } @@ -104,22 +107,20 @@ public List updateMarriageDetails(MarriageDetailsReq // validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); mdmsValidator.validateMarriageMDMSData(request,mdmsData); - + String applicationNumber = request.getMarriageDetails().get(0).getApplicationNumber(); + MarriageApplicationSearchCriteria criteria =(MarriageApplicationSearchCriteria.builder() + .applicationNo(applicationNumber) + .build()); + List searchResult = repository.getMarriageApplication(criteria,request.getRequestInfo()); + // validatorService.validateUpdate(request, searchResult); marriageDetailsEnrichment.enrichUpdate(request); // workflowIntegrator.callWorkFlow(request); -<<<<<<< HEAD // List marriageApplicationDetails =repository.updateMarriageDetails(request); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); request.getMarriageDetails().forEach(marriage->{ -======= - - List marriageApplicationDetails =repository.updateMarriageDetails(request); - - marriageApplicationDetails.forEach(marriage->{ ->>>>>>> 9698db07e0 (MIGRATION UPDATION) if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); Demand demand = new Demand(); From 115ecc511323dbb67dbac23168d1bcb0cfc8b538 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 2 Apr 2023 14:14:38 +0530 Subject: [PATCH 080/420] SEARCH ACKNUMBER --- .../MarriageApplicationSearchCriteria.java | 6 ++-- .../MarriageApplicationRepository.java | 10 +++++-- .../MarriageApplicationQueryBuilder.java | 28 +++++++++---------- .../rowmapper/BrideDetailsRowMapper.java | 2 +- .../rowmapper/GroomDetailsRowMapper.java | 2 +- .../service/MarriageApplicationService.java | 2 +- .../MarriageApplicationValidator.java | 28 +++++++++++++++++++ 7 files changed, 56 insertions(+), 22 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java index f164d8b20d7..645a053ddf9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java @@ -78,8 +78,9 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("brideLastnameMl") private String brideLastnameMl; + @JsonProperty("sortBy") - private MarriageRegistrySearchCriteria.SortBy sortBy; + private SortBy sortBy; public enum SortBy { applicationNumber, @@ -88,8 +89,7 @@ public enum SortBy { dateofmarriage } @JsonProperty("sortOrder") - private MarriageRegistrySearchCriteria.SortOrder sortOrder; - + private SortOrder sortOrder;; public enum SortOrder { ASC, DESC diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 2ecda8359f4..08489d1b1fe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -105,6 +105,12 @@ public List searchMarriageDetails(MarriageApplicatio public List getMarriageApplication(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { - return null; + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + // System.out.println("Query:"+query); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + + return result; + } + } -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 3126b302ff0..eee4e671029 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -115,7 +115,7 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri StringBuilder query = new StringBuilder(QUERY); StringBuilder orderBy = new StringBuilder(); addFilter("MD.id", criteria.getId(), query, preparedStmtValues); - addFilter("MD_tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD.applicationNumber", criteria.getApplicationNo(), query, preparedStmtValues); addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); @@ -134,19 +134,19 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri query, preparedStmtValues); - // if(criteria.getSortOrder() == null){ - // criteria.setSortOrder(MarriageRegistrySearchCriteria.SortOrder.ASC); - // } - // if (StringUtils.isEmpty(criteria.getSortBy())) - // addOrderByColumns("MD_createdtime","ASC", orderBy); - // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.dateofmarriage) - // addOrderByColumns("MD_dateofmarriage",criteria.getSortOrder().toString(), orderBy); - // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.applicationNumber) - // addOrderByColumns("MD_applicationnumber",criteria.getSortOrder().toString(),orderBy); - // else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.tenantId) - // addOrderByColumns("MD_tenantid",criteria.getSortOrder().toString(), orderBy); - // addOrderToQuery(orderBy, query); - // //addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); + if(criteria.getSortOrder() == null){ + criteria.setSortOrder(MarriageApplicationSearchCriteria.SortOrder.ASC); + } + if (StringUtils.isEmpty(criteria.getSortBy())) + addOrderByColumns("MD.createdtime","ASC", orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.dateofmarriage) + addOrderByColumns("MD.dateofmarriage",criteria.getSortOrder().toString(), orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.applicationNumber) + addOrderByColumns("MD.applicationNumber",criteria.getSortOrder().toString(),orderBy); + else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenantId) + addOrderByColumns("MD.tenantid",criteria.getSortOrder().toString(), orderBy); + addOrderToQuery(orderBy, query); + //addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); return query.toString(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index d34911e48a8..96c6bfb81f7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -20,7 +20,7 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ .middlename_ml(rs.getString("BD_middlename_ml")) .lastname_en(rs.getString("BD_lastname_en")) .lastname_ml(rs.getString("BD_lastname_ml")) - .mobile(Long.valueOf(Integer.valueOf(rs.getString("BD_mobile")))) + .mobile(rs.getLong("BD_mobile")) .emailid(rs.getString("BD_emailid")) .gender(rs.getString("BD_gender")) .dateofbirth(rs.getLong("BD_dateofbirth")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 911e247d0ce..546c2be7411 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -20,7 +20,7 @@ default GroomDetails getGroomDetails (ResultSet rs) throws SQLException{ .middlename_ml(rs.getString("GD_middlename_ml")) .lastname_en(rs.getString("GD_lastname_en")) .lastname_ml(rs.getString("GD_lastname_ml")) - .mobile(Long.valueOf(Integer.valueOf(rs.getString("GD_mobile")))) + .mobile(rs.getLong("GD_mobile")) .emailid(rs.getString("GD_emailid")) .gender(rs.getString("GD_gender")) .dateofbirth(rs.getLong("GD_dateofbirth")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 4dc252fca17..dfb3861b767 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -112,7 +112,7 @@ public List updateMarriageDetails(MarriageDetailsReq .applicationNo(applicationNumber) .build()); List searchResult = repository.getMarriageApplication(criteria,request.getRequestInfo()); - // validatorService.validateUpdate(request, searchResult); + validatorService.validateUpdate(request, searchResult); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 546624bc7bb..06db1cd71f2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1,12 +1,40 @@ package org.ksmart.marriage.marriageapplication.validator; +import org.apache.commons.collections4.CollectionUtils; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.springframework.stereotype.Component; +import java.util.List; + +import static org.ksmart.marriage.utils.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_UPDATE; +import static org.ksmart.marriage.utils.enums.ErrorCodes.MARRIAGE_DETAILS_REQUIRED; + //import static org.ksmart.marriage.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; @Component public class MarriageApplicationValidator { + public void validateUpdate(MarriageDetailsRequest request, List searchResult) { + List deathdetails = request.getMarriageDetails(); + + if (CollectionUtils.isEmpty(deathdetails)) { + throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), "Marriage registration is required."); + } + + if (deathdetails.size() > 1) { // NOPMD + throw new CustomException( MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Supports only single Marriage registration update request."); + } + + if (deathdetails.size() != searchResult.size()) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Marriage registration(s) not found in database."); + } + //IMP:Have to enable after URI submission + //validateCommonFields( request); + } } From c4168574b41397aea0fa31e0d0c59f30bf785ddb Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 2 Apr 2023 14:29:21 +0530 Subject: [PATCH 081/420] mdms validation --- .../MarriageApplicationController.java | 1 - .../service/MarriageApplicationService.java | 28 ------- .../validator/MarriageMDMSValidator.java | 76 ++++++++----------- .../marriage/utils/MarriageConstants.java | 12 +-- .../marriage/utils/MarriageMdmsUtil.java | 70 ++++++++--------- 5 files changed, 69 insertions(+), 118 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java index f4e468695aa..824df1eae92 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java @@ -58,7 +58,6 @@ public ResponseEntity saveMarriageDetails(@RequestB .marriageApplicationDetails(marriageDetails) .responseInfo( responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) - .build(); return new ResponseEntity<>(response, HttpStatus.OK); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 862ed5da7a6..bdc8cb808aa 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -47,34 +47,6 @@ public MarriageApplicationService(MarriageProducer producer,MarriageApplicationR } - // private final MarriageProducer producer; - // private final MarriageApplicationConfiguration marriageApplicationConfiguration; - // private final MarriageDetailsEnrichment marriageDetailsEnrichment; - // private final MarriageApplicationQueryBuilder marriageQueryBuilder; - // private final MarriageApplicationRowMapper marriageApplicationRowMapper; - // private final JdbcTemplate jdbcTemplate; - // private final WorkflowIntegrator workflowIntegrator; - // private final MarriageMdmsUtil util; - // private final MarriageMDMSValidator mdmsValidator; - - // @Autowired - // public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, - // JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, - // MarriageApplicationRowMapper marriageApplicationRowMapper, - // WorkflowIntegrator workflowIntegrator, - // MarriageMdmsUtil util, - // MarriageMDMSValidator mdmsValidator) { - // this.producer = producer; - // this.marriageApplicationConfiguration = marriageApplicationConfiguration; - // this.marriageDetailsEnrichment = marriageDetailsEnrichment; - // this.jdbcTemplate = jdbcTemplate; - // this.marriageQueryBuilder = marriageQueryBuilder; - // this.marriageApplicationRowMapper = marriageApplicationRowMapper; - // this.workflowIntegrator = workflowIntegrator; - // this.util = util; - // this.mdmsValidator=mdmsValidator; - // } - public List saveMarriageDetails(MarriageDetailsRequest request) { // validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index d49c0b68557..531bd298360 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -17,72 +17,62 @@ @Component @Slf4j public class MarriageMDMSValidator { - //Rakhi S ikm on 14.02.2023 + public void validateMarriageMDMSData(MarriageDetailsRequest request,Object mdmsdata){ Map errorMap = new HashMap<>(); Map> masterData = getAttributeValues(mdmsdata); - String[] masterArray = {MarriageConstants.TENANTS,MarriageConstants.GENDERTYPE}; - // ,DeathConstants.DEATH_PLACE_LIST,DeathConstants.DEATH_CAUSE_MAIN - // ,DeathConstants.DEATH_CAUSE_SUB}; - System.out.println("JasminemasterArray"+masterArray); + String[] masterArray = {MarriageConstants.TENANTS,MarriageConstants.GENDERTYPE, + MarriageConstants.MARITAL_STATUS,MarriageConstants.MARRIAGE_TYPE, + MarriageConstants.MARRIAGE_PLACE_TYPE}; + //MarriageConstants.MARRIAGE_PLACE + // System.out.println("Jasminemdmsdata"+mdmsdata) + validateIfMasterPresent(masterArray,masterData); if(!masterData.get(MarriageConstants.TENANTS) .contains(request.getMarriageDetails().get(0).getTenantid())) errorMap.put("INVALID TENAND ID", "The tenand id "+ request.getMarriageDetails().get(0).getTenantid() + " does not exists"); -//System.out.println("JasminemasterData"+masterData); - - // if(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeceasedGender() != null) { - // if(!masterData.get(DeathConstants.GENDERTYPE) - // .contains(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeceasedGender())) - // errorMap.put("INVALID GENDER TYPE", "The gender of the deceased " + - // request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeceasedGender()+ " is invalid"); - // } + if(request.getMarriageDetails().get(0).getGroomDetails().getGender() != null) { + if(!masterData.get(MarriageConstants.GENDERTYPE) + .contains(request.getMarriageDetails().get(0).getGroomDetails().getGender())) + errorMap.put("INVALID GENDER TYPE", "The gender of the groom " + + request.getMarriageDetails().get(0).getGroomDetails().getGender()+ " is invalid"); + } - // if(!masterData.get(DeathConstants.DEATH_PLACE_LIST) - // .contains(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeathPlace())) - // errorMap.put("DEATH PLACE DETAILS INVALID", "The deceased death place details " + - // request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getDeathPlace()+ " is invalid"); + if(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid() != null) { + if(!masterData.get(MarriageConstants.MARITAL_STATUS) + .contains(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid())) + errorMap.put("MARITAL STATUS INVALID", "The marital status of groom " + + request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid()+ " is invalid"); + } - // if(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseMain() != null) { - // if(!masterData.get(DeathConstants.DEATH_CAUSE_MAIN) - // .contains(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseMain())) - // errorMap.put("DEATH CAUSE MAIN INVALID", "The deceased death cause main details " + - // request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseMain()+ " is invalid"); - // } - // if(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseSub() != null) { - // if(!masterData.get(DeathConstants.DEATH_CAUSE_SUB) - // .contains(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseSub())) - // errorMap.put("DEATH CAUSE SUB INVALID", "The deceased death cause sub details " + - // request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getDeathCauseSub()+ " is invalid"); - // } - // if(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getAgeUnit() != null) { - // if(!masterData.get(DeathConstants.AGE_UNIT) - // .contains(request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getAgeUnit())) - // errorMap.put("AGE UNIT INVALID", "The deceased age unit details " + - // request.getDeathCertificateDtls().get(0).getDeathBasicInfo().getAgeUnit()+ " is invalid"); - // } + if(request.getMarriageDetails().get(0).getMarriage_type() != null) { + if(!masterData.get(MarriageConstants.MARRIAGE_TYPE) + .contains(request.getMarriageDetails().get(0).getMarriage_type())) + errorMap.put("TYPE OF MARRIAGE INVALID", "The marriage type " + + request.getMarriageDetails().get(0).getMarriage_type()+ " is invalid"); + } - // if(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getMedicalAttentionType() != null) { - // if(!masterData.get(DeathConstants.MEDICAL_ATTENTION_TYPE) - // .contains(request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getMedicalAttentionType())) - // errorMap.put("MEDICAL ATTENTION TYPE INVALID", "The deceased medical attention details " + - // request.getDeathCertificateDtls().get(0).getDeathStatisticalInfo().getMedicalAttentionType()+ " is invalid"); - // } + if(request.getMarriageDetails().get(0).getPlacetype() != null) { + if(!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE) + .contains(request.getMarriageDetails().get(0).getPlacetype())) + errorMap.put(" MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + + request.getMarriageDetails().get(0).getPlacetype()+ " is invalid"); + } if(!CollectionUtils.isEmpty(errorMap)) throw new CustomException(errorMap); } //Rakhi S ikm on 14.02.2023 private Map> getAttributeValues(Object mdmsdata){ - List modulepaths = Arrays.asList(MarriageConstants.TENANT_JSONPATH, + List modulepaths = Arrays.asList(MarriageConstants.TENANT_JSONPATH, MarriageConstants.COMMON_MASTER_JSONPATH, MarriageConstants.BND_LIST_JSONPATH); final Map> mdmsResMap = new HashMap<>(); - + //System.out.println("Jasminemodulepaths"+modulepaths); modulepaths.forEach(modulepath -> { try { mdmsResMap.putAll(JsonPath.read(mdmsdata,modulepath)); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index a358ec8e168..a653e3276e9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -95,18 +95,8 @@ public class MarriageConstants { public static final String MARRIAGE_TYPE = "TypeOfMarriage"; - - - - - - - - - - - public static final String WORKFLOW_STATUS_APPROVED = "APPROVED"; + public static final String APPLICATION_NEW = "new"; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index a3534ced548..f916177ac3b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -54,12 +54,12 @@ public Object mDMSCall(RequestInfo requestInfo, String tenantId) { private MdmsCriteriaReq getMDMSRequest(RequestInfo requestInfo, String tenantId) { ModuleDetail tenantIdRequest = getTenantIdRequest(tenantId); ModuleDetail commomMasterRequest = getCommonMastersRequest(); - List BNDListRequest = getMarriageListRequest(); + // List BNDListRequest = getMarriageListRequest(); List moduleDetails = new LinkedList<>(); moduleDetails.add(tenantIdRequest); moduleDetails.add(commomMasterRequest); - moduleDetails.addAll(BNDListRequest); + //moduleDetails.addAll(BNDListRequest); MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) .build(); @@ -82,48 +82,48 @@ private ModuleDetail getTenantIdRequest(String tenantId) { ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) .moduleName(MarriageConstants.TENANT_MODULE_NAME).build(); - + //System.out.println("JasmineTenantId"+marriageModuleDtls); return marriageModuleDtls; } private ModuleDetail getCommonMastersRequest() { List marriageMasterDetails = new ArrayList<>(); - //Country - final String filterCodeCountry = "$.[?(@.active==true)].code"; - marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.COUNTRY).filter(filterCodeCountry).build()); - //State - final String filterCodeState = "$.[?(@.active==true)].code"; - marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.STATE).filter(filterCodeState).build()); - //District - final String filterCodeDistrict = "$.[?(@.active==true)].code"; - marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.DISTRICT).filter(filterCodeDistrict).build()); - //Taluk - final String filterCodeTaluk = "$.[?(@.active==true)].code"; - marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.TALUK).filter(filterCodeTaluk).build()); - //LbType - final String filterCodeLbType = "$.[?(@.active==true)].code"; - marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.LBTYPE).filter(filterCodeLbType).build()); - //Village - final String filterCodeVillage = "$.[?(@.active==true)].code"; - marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.VILLAGE).filter(filterCodeVillage).build()); + // //Country + // final String filterCodeCountry = "$.[?(@.active==true)].code"; + // marriageMasterDetails + // .add(MasterDetail.builder().name(MarriageConstants.COUNTRY).filter(filterCodeCountry).build()); + // //State + // final String filterCodeState = "$.[?(@.active==true)].code"; + // marriageMasterDetails + // .add(MasterDetail.builder().name(MarriageConstants.STATE).filter(filterCodeState).build()); + // //District + // final String filterCodeDistrict = "$.[?(@.active==true)].code"; + // marriageMasterDetails + // .add(MasterDetail.builder().name(MarriageConstants.DISTRICT).filter(filterCodeDistrict).build()); + // //Taluk + // final String filterCodeTaluk = "$.[?(@.active==true)].code"; + // marriageMasterDetails + // .add(MasterDetail.builder().name(MarriageConstants.TALUK).filter(filterCodeTaluk).build()); + // //LbType + // final String filterCodeLbType = "$.[?(@.active==true)].code"; + // marriageMasterDetails + // .add(MasterDetail.builder().name(MarriageConstants.LBTYPE).filter(filterCodeLbType).build()); + // //Village + // final String filterCodeVillage = "$.[?(@.active==true)].code"; + // marriageMasterDetails + // .add(MasterDetail.builder().name(MarriageConstants.VILLAGE).filter(filterCodeVillage).build()); //Gender final String filterCodeGender = "$.[?(@.active==true)].code"; marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.GENDERTYPE).filter(filterCodeGender).build()); - //Religion - final String filterCodeReligion = "$.[?(@.active==true)].code"; - marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.RELIGION).filter(filterCodeReligion).build()); - //Religion - final String filterCodePostOffice = "$.[?(@.active==true)].code"; - marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); + // //Religion + // final String filterCodeReligion = "$.[?(@.active==true)].code"; + // marriageMasterDetails + // .add(MasterDetail.builder().name(MarriageConstants.RELIGION).filter(filterCodeReligion).build()); + // //Religion + // final String filterCodePostOffice = "$.[?(@.active==true)].code"; + // marriageMasterDetails + // .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); From b30a40c0e6799a61eac95777dd23e68816bcf45d Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Sun, 2 Apr 2023 16:26:22 +0530 Subject: [PATCH 082/420] fix --- .../model/marriage/BrideDetails.java | 151 -------- .../model/marriage/GroomDetails.java | 145 -------- .../MarriageApplicationValidator.java | 325 ++++++++++++++++++ .../marriage/utils/MarriageConstants.java | 42 +++ 4 files changed, 367 insertions(+), 296 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java deleted file mode 100644 index b7987015296..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ /dev/null @@ -1,151 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.marriage.common.model.AuditDetails; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class BrideDetails { - - @Size(max = 64) - @JsonProperty("brideId") - private String brideId; - @NotNull - @Size(max = 64) - @JsonProperty("brideGroom") - private String brideGroom; - @Size(max = 64) - @JsonProperty("tenentId") - private String tenentId; - - @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; - - @Size(max = 64) - @JsonProperty("brideResidentShip") - private String residentship; - - @Size(max = 15) - @JsonProperty("brideAadharNo") - private String aadharno; - - @Size(max = 1000) - @JsonProperty("bridePassportNo") - private String passportno; - - @Size(max = 64) - @JsonProperty("brideSocialSecurityNo") - private String socialsecurityno; - - @Size(max = 200) - @JsonProperty("brideFirstnameEn") - private String firstname_en; - - @Size(max = 200) - @JsonProperty("brideFirstnameMl") - private String firstname_ml; - - @Size(max = 200) - @JsonProperty("brideMiddlenameEn") - private String middlename_en; - - @Size(max = 200) - @JsonProperty("brideMiddlenameMl") - private String middlename_ml; - - @Size(max = 200) - @JsonProperty("brideLastnameEn") - private String lastname_en; - - @Size(max = 200) - @JsonProperty("brideLastnameMl") - private String lastname_ml; - - - @JsonProperty("brideMobile") - private Long mobile; - - @Size(max = 300) - @JsonProperty("brideEmailid") - private String emailid; - - @Size(max = 20) - @JsonProperty("brideGender") - private String gender; - - @JsonProperty("brideDOB") - private long dateofbirth; - - @JsonProperty("brideAge") - private Integer age; - - @Size(max = 64) - @JsonProperty("brideParentGuardian") - private String parent_guardian; - - @Size(max = 200) - @JsonProperty("brideFathernameEn") - private String fathername_en; - - @Size(max = 200) - @JsonProperty("brideFathernameMl") - private String fathername_ml; - - @Size(max = 200) - @JsonProperty("brideMothernameEn") - private String mothername_en; - - @Size(max = 200) - @JsonProperty("brideMothernameMl") - private String mothername_ml; - - @Size(max = 15) - @JsonProperty("brideFatherAadharNo") - private String father_aadharno; - - @Size(max = 15) - @JsonProperty("brideMotherAadharNo") - private String mother_aadharno; - - @Size(max = 200) - @JsonProperty("brideGuardiannameEn") - private String guardianname_en; - - @Size(max = 200) - @JsonProperty("brideGuardiannameMl") - private String guardianname_ml; - - @Size(max = 15) - @JsonProperty("brideGuardianAadharNo") - private String guardian_aadharno; - - -// @Size(max = 200) -// @JsonProperty("brideProfessionEn") -// private String profession_en; -// -// @Size(max = 200) -// @JsonProperty("brideProfessionMal") -// private String profession_mal; - - @Size(max = 64) - @JsonProperty("brideMaritalstatusID") - private String maritalstatusid; - - @JsonProperty("brideIsSpouseLiving") - private boolean brideIsSpouseLiving; - - @JsonProperty("brideNoOfSpouse") - private Integer brideNoOfSpouse; - - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java deleted file mode 100644 index 80421f3cbaf..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ /dev/null @@ -1,145 +0,0 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.ksmart.marriage.common.model.AuditDetails; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -public class GroomDetails { - @Size(max = 64) - @JsonProperty("groomId") - private String groomId; - - @Size(max = 64) - @JsonProperty("tenentId") - private String tenentId; - - @NotNull - @Size(max = 64) - @JsonProperty("brideGroom") - private String brideGroom; - - @Size(max = 64) - @JsonProperty("marriageid") - private String marriageid; - - @Size(max = 64) - @JsonProperty("groomResidentShip") - private String residentship; - - @Size(max = 15) - @JsonProperty("groomAadharNo") - private String aadharno; - - @Size(max = 1000) - @JsonProperty("groomPassportNo") - private String passportno; - - @Size(max = 64) - @JsonProperty("groomSocialSecurityNo") - private String socialsecurityno; - - @Size(max = 200) - @JsonProperty("groomFirstnameEn") - private String firstname_en; - - @Size(max = 200) - @JsonProperty("groomFirstnameMl") - private String firstname_ml; - - @Size(max = 200) - @JsonProperty("groomMiddlenameEn") - private String middlename_en; - - @Size(max = 200) - @JsonProperty("groomMiddlenameMl") - private String middlename_ml; - - @Size(max = 200) - @JsonProperty("groomLastnameEn") - private String lastname_en; - - @Size(max = 200) - @JsonProperty("groomLastnameMl") - private String lastname_ml; - - @JsonProperty("groomMobile") - private Long mobile; - - @Size(max = 300) - @JsonProperty("groomEmailid") - private String emailid; - - @Size(max = 20) - @JsonProperty("groomGender") - private String gender; - - @JsonProperty("groomDOB") - private long dateofbirth; - - @JsonProperty("groomAge") - private Integer age; - - @Size(max = 64) - @JsonProperty("groomParentGuardian") - private String parent_guardian; - - @Size(max = 200) - @JsonProperty("groomFathernameEn") - private String fathername_en; - - @Size(max = 200) - @JsonProperty("groomFathernameMl") - private String fathername_ml; - - @Size(max = 200) - @JsonProperty("groomMothernameEn") - private String mothername_en; - - @Size(max = 200) - @JsonProperty("groomMothernameMl") - private String mothername_ml; - - @Size(max = 15) - @JsonProperty("groomFatherAadharNo") - private String father_aadharno; - @Size(max = 15) - @JsonProperty("groomMotherAadharNo") - private String mother_aadharno; - @Size(max = 200) - @JsonProperty("groomGuardiannameEn") - private String guardianname_en; - @Size(max = 200) - @JsonProperty("groomGuardiannameMl") - private String guardianname_ml; - @Size(max = 15) - @JsonProperty("groomGuardianAadharNo") - private String guardian_aadharno; - -// @Size(max = 200) -// @JsonProperty("groomProfessionEn") -// private String profession_en; -// -// -// @Size(max = 200) -// @JsonProperty("groomProfessionMal") -// private String profession_mal; - - @Size(max = 64) - @JsonProperty("groomMaritalstatusID") - private String maritalstatusid; - @JsonProperty("groomIsSpouseLiving") - private Boolean groomIsSpouseLiving; - @JsonProperty("groomNoOfSpouse") - private Integer groomNoOfSpouse; - @JsonProperty("auditDetails") - private AuditDetails auditDetails; - - -} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 06db1cd71f2..256fa1019ff 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1,10 +1,26 @@ package org.ksmart.marriage.marriageapplication.validator; +<<<<<<< HEAD import org.apache.commons.collections4.CollectionUtils; import org.egov.tracer.model.CustomException; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +======= +import java.util.List; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.checkerframework.checker.units.qual.g; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.BrideAddressDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.GroomAddressDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.GroomDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; +import org.ksmart.marriage.utils.MarriageConstants; +>>>>>>> bed9061267 (Field validation) import org.springframework.stereotype.Component; import java.util.List; @@ -17,7 +33,9 @@ @Component public class MarriageApplicationValidator { + public void validateCommonFields(MarriageDetailsRequest request) { +<<<<<<< HEAD public void validateUpdate(MarriageDetailsRequest request, List searchResult) { List deathdetails = request.getMarriageDetails(); @@ -36,5 +54,312 @@ public void validateUpdate(MarriageDetailsRequest request, List marriageApplication = request.getMarriageDetails(); + if (marriageApplication != null) { + marriageApplication + .forEach(marriagedtls -> { + GroomDetails groomInfo = marriagedtls.getGroomDetails(); + GroomAddressDetails groomaddressInfo = marriagedtls.getGroomAddressDetails(); + BrideDetails brideInfo = marriagedtls.getBrideDetails(); + BrideAddressDetails brideaddressInfo = marriagedtls.getBrideAddressDetails(); + WitnessDetails witnessDtls = marriagedtls.getWitnessDetails(); + + if(marriagedtls.getDateofmarriage() <= 0){ + throw new CustomException("DECEASED DATE OF MARRIAGE INVALID", "The deceased Date of marriage" + + groomInfo.getResidentship() + " is invalid"); + } + + if(StringUtils.isEmpty(marriagedtls.getDistrictid())){ + throw new CustomException("DECEASED DISTRICT INVALID", "The deceased District" + + marriagedtls.getDistrictid() + " is invalid"); + } + + if(StringUtils.isEmpty(marriagedtls.getTalukid())){ + throw new CustomException("DECEASED TALUK INVALID", "The deceased Taluk" + + marriagedtls.getTalukid() + " is invalid"); + } + if(StringUtils.isEmpty(marriagedtls.getVillage_name())){ + throw new CustomException("DECEASED VILLAGE INVALID", "The deceased Village" + + marriagedtls.getVillage_name() + " is invalid"); + } + + if(StringUtils.isEmpty(marriagedtls.getLbtype())){ + throw new CustomException("DECEASED LB TYPE INVALID", "The deceased LB type " + + marriagedtls.getLbtype() + " is invalid"); + } + + if(StringUtils.isEmpty(marriagedtls.getWard_code())){ + throw new CustomException("DECEASED LB TYPE INVALID", "The deceased LB type " + + marriagedtls.getWard_code() + " is invalid"); + } + + + + if(StringUtils.isEmpty(marriagedtls.getPlacetype())){ + throw new CustomException("DECEASED MARRIAGE PLACE TYPE INVALID", "The deceased Place type " + + marriagedtls.getPlacetype() + " is invalid"); + } + else{ + if(marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_HOUSE)){ + if(StringUtils.isEmpty(marriagedtls.getLocality_en())){ + throw new CustomException("DECEASED MARRIAGE PLACE LOCALITY ENGLISH INVALID", "The deceased Place Locality Name in English " + + marriagedtls.getLocality_en()+ " is invalid"); + } + if(StringUtils.isEmpty(marriagedtls.getLocality_ml())){ + throw new CustomException("DECEASED MARRIAGE PLACE LOCALITY MALAYALAM INVALID", "The deceased Place Locality Name in Malayalam " + + marriagedtls.getLocality_ml()+ " is invalid"); + } + if(StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameEn())){ + throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", "The deceased House Name English " + + marriagedtls.getMarriageHouseNoAndNameEn()+ " is invalid"); + } + if(StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameMl())){ + throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", "The deceased House Name Malayalam " + + marriagedtls.getMarriageHouseNoAndNameMl()+ " is invalid"); + } + if(StringUtils.isEmpty(marriagedtls.getLandmark())){ + throw new CustomException("DECEASED LANDMARK IS INVALID", "The deceased Landmark" + + marriagedtls.getLandmark()+ " is invalid"); + } + } + if(marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION)){ + if(StringUtils.isEmpty(marriagedtls.getPlacenameEn())){ + throw new CustomException("DECEASED PLACE NAME ENGLISH IS INVALID", "The deceased Place Name English" + + marriagedtls.getPlacenameEn()+ " is invalid"); + } + else { + if(marriagedtls.getPlacenameEn().equals(MarriageConstants.PLACE_OTHER)){ + if(StringUtils.isEmpty(marriagedtls.getPlacenameEn())){ + throw new CustomException("DECEASED PLACE NAME ENGLISH IS INVALID", "The deceased Place Name English" + + marriagedtls.getPlacenameEn()+ " is invalid"); + } + if(StringUtils.isEmpty(marriagedtls.getPlacenameMl())){ + throw new CustomException("DECEASED PLACE NAME MALAYALAM IS INVALID", "The deceased Place Name Malayalam" + + marriagedtls.getPlacenameMl()+ " is invalid"); + } + } + + + } + + } + } + + + + + + + + if (StringUtils.isEmpty(groomInfo.getResidentship())) { + throw new CustomException("DECEASED RESIDENTSHIP INVALID", "The deceased resident" + + groomInfo.getResidentship() + " is invalid"); + + } else { + if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_INDIAN)) { + if (StringUtils.isEmpty(groomInfo.getAadharno())) { + throw new CustomException("DECEASED AADHAR INVALID", "The deceased Aadhar number" + + groomInfo.getAadharno() + " is invalid"); + } + + } else if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_NRI)) { + if (StringUtils.isEmpty(groomInfo.getPassportno())) { + throw new CustomException("DECEASED PASSPORT NUMBER INVALID", + "The deceased Passport number" + + groomInfo.getPassportno() + " is invalid"); + } + } else if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_FOREIGN)) { + if (StringUtils.isEmpty(groomInfo.getPassportno()) + && StringUtils.isEmpty(groomInfo.getSocialsecurityno())) { + throw new CustomException( + "DECEASED PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID", + "The deceased Passport number and Social security number" + + groomInfo.getPassportno() + "and" + groomInfo.getSocialsecurityno() + + " is invalid"); + } + } + + } + + if (StringUtils.isEmpty(groomInfo.getFirstname_en())) { + throw new CustomException("DECEASED NAME INVALID", "The deceased name in english" + + groomInfo.getFirstname_en() + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getFirstname_ml())) { + throw new CustomException("DECEASED NAME INVALID", "The deceased name in malayalam" + + groomInfo.getFirstname_ml() + " is invalid"); + } + if (groomInfo.getMobile() <= 0) { + throw new CustomException("CONTACT NUMBER INVALID", "The groom mobile number " + + groomInfo.getMobile() + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getGender())) { + throw new CustomException("DECEASED GENDER INVALID", "The deceased gender" + + groomInfo.getGender() + " is invalid"); + } + if ((groomInfo.getDateofbirth() <= 0)) { + throw new CustomException("DEATH DATE INVALID", "The date can't be null"); + } + + if (StringUtils.isEmpty(groomInfo.getFather_aadharno())) { + throw new CustomException("DECEASED AADHAR INVALID", "The deceased Father Aadhar number" + + groomInfo.getFather_aadharno() + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getMother_aadharno())) { + throw new CustomException("DECEASED AADHAR INVALID", "The deceased Father Aadhar number" + + groomInfo.getMother_aadharno() + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getMaritalstatusid())) { + throw new CustomException("DECEASED MARITAL STATUS INVALID", + "The deceased Marital status" + + groomInfo.getMaritalstatusid() + " is invalid"); + } + // else { + // if (groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) { + // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", + // "The deceased Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) { + // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", + // "The deceased Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) { + // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", + // "The deceased Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) { + // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", + // "The deceased Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // } + + if (StringUtils.isEmpty(brideInfo.getResidentship())) { + throw new CustomException("DECEASED RESIDENTSHIP INVALID", "The deceased resident" + + brideInfo.getResidentship() + " is invalid"); + + } else { + if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_INDIAN)) { + if (StringUtils.isEmpty(brideInfo.getAadharno())) { + throw new CustomException("DECEASED AADHAR INVALID", "The deceased Aadhar number" + + brideInfo.getAadharno() + " is invalid"); + } + + } else if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_NRI)) { + if (StringUtils.isEmpty(brideInfo.getPassportno())) { + throw new CustomException("DECEASED PASSPORT NUMBER INVALID", + "The deceased Passport number" + + brideInfo.getPassportno() + " is invalid"); + } + } else if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_FOREIGN)) { + if (StringUtils.isEmpty(brideInfo.getPassportno()) + && StringUtils.isEmpty(brideInfo.getSocialsecurityno())) { + throw new CustomException( + "DECEASED PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID", + "The deceased Passport number and Social security number" + + brideInfo.getPassportno() + "and" + brideInfo.getSocialsecurityno() + + " is invalid"); + } + } + + } + + if (StringUtils.isEmpty(brideInfo.getFirstname_en())) { + throw new CustomException("DECEASED NAME INVALID", "The deceased name in english" + + brideInfo.getFirstname_en() + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getFirstname_ml())) { + throw new CustomException("DECEASED NAME INVALID", "The deceased name in malayalam" + + brideInfo.getFirstname_ml() + " is invalid"); + } + if (brideInfo.getMobile() <= 0) { + throw new CustomException("CONTACT NUMBER INVALID", "The groom mobile number " + + brideInfo.getMobile() + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getGender())) { + throw new CustomException("DECEASED GENDER INVALID", "The deceased gender" + + brideInfo.getGender() + " is invalid"); + } + if ((brideInfo.getDateofbirth() <= 0)) { + throw new CustomException("DEATH DATE INVALID", "The date can't be null"); + } + + if (StringUtils.isEmpty(brideInfo.getFather_aadharno())) { + throw new CustomException("DECEASED AADHAR INVALID", "The deceased Father Aadhar number" + + brideInfo.getFather_aadharno() + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getMother_aadharno())) { + throw new CustomException("DECEASED AADHAR INVALID", "The deceased Father Aadhar number" + + brideInfo.getMother_aadharno() + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getMaritalstatusid())) { + throw new CustomException("DECEASED MARITAL STATUS INVALID", + "The deceased Marital status" + + brideInfo.getMaritalstatusid() + " is invalid"); + } + // else { + // if (brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) { + // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", + // "The deceased Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) { + // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", + // "The deceased Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) { + // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", + // "The deceased Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) { + // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", + // "The deceased Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // } + + + + }); + } +>>>>>>> bed9061267 (Field validation) } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index a653e3276e9..43c470c6f1c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -66,6 +66,48 @@ public class MarriageConstants { public static final String STATUSJSONKEY = "$.state.applicationStatus"; public static final String TRIGGER_NOWORKFLOW = "NOWORKFLOW"; + + public static final String RESIDENTSHIP_INDIAN= "INDIAN"; + + public static final String RESIDENTSHIP_NRI = "NRI"; + + public static final String RESIDENTSHIP_FOREIGN= "FOREIGN"; + + public static final String MARITAL_STATUS_UNMARRIED= "UNMARRIED"; + + public static final String MARITAL_STATUS_MARRIED= "MARRIED"; + + public static final String MARITAL_STATUS_WIDOWED= "WIDOWED"; + + public static final String MARITAL_STATUS_DIVORCED= "DIVORCED"; + + public static final String MARITAL_STATUS_ANNULLED= "ANNULLED"; + + public static final Integer VALUE_TRUE = 1; + + public static final Integer VALUE_FALSE = 0; + + public static final String PLACE_TYPE_RELIGIOUS_INSTITUTION = "RELIGIOUS_INSTITUTION"; + + + public static final String PLACE_TYPE_MANDAPAM_OTHER ="MANDAPAM_HALL_AND_OTHER"; + + + public static final String PLACE_TYPE_REGISTRAR_OFFICE = "SUB_REGISTRAR_OFFICE"; + + + public static final String PLACE_TYPE_HOUSE = "HOUSE"; + + + public static final String PLACE_TYPE_PRIVATE_PLACE = "PRIVATE_PLACE"; + + + public static final String PLACE_TYPE_PUBLIC_PLACE = "PUBLIC_PLACE"; + +/*AFTER UPDATING MDMS HAVE TO BE CHANGE */ + public static final String PLACE_OTHER = "OTHER"; + // public static final String RESIDENTSHIP_FOREIGN= "FOREIGN"; + public static final String STATUS_FOR_PAYMENT = "PENDINGPAYMENT"; //MDMS Fields Common From 34db173547f59eff39e8b45c05b12e0049214889 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 10:20:05 +0530 Subject: [PATCH 083/420] SEARCH ACKNUMBER --- .../validator/MarriageApplicationValidator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 256fa1019ff..f7918bcfb22 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -28,7 +28,6 @@ >>>>>>> bed9061267 (Field validation) import static org.ksmart.marriage.utils.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_UPDATE; import static org.ksmart.marriage.utils.enums.ErrorCodes.MARRIAGE_DETAILS_REQUIRED; -//import static org.ksmart.marriage.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; @Component public class MarriageApplicationValidator { From e7a0c17d800e029c95018b99e7648d11ea3b5b4e Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 10:46:05 +0530 Subject: [PATCH 084/420] SEARCH ACKNUMBER --- .../model/marriage/BrideDetails.java | 151 ++++++++++++++++++ .../model/marriage/GroomDetails.java | 146 +++++++++++++++++ 2 files changed, 297 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java new file mode 100644 index 00000000000..e6f47b14ea9 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -0,0 +1,151 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class BrideDetails { + + @Size(max = 64) + @JsonProperty("brideId") + private String brideId; + @NotNull + @Size(max = 64) + @JsonProperty("brideGroom") + private String brideGroom; + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; + + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + + @Size(max = 64) + @JsonProperty("brideResidentShip") + private String residentship; + + @Size(max = 15) + @JsonProperty("brideAadharNo") + private String aadharno; + + @Size(max = 1000) + @JsonProperty("bridePassportNo") + private String passportno; + + @Size(max = 64) + @JsonProperty("brideSocialSecurityNo") + private String socialsecurityno; + + @Size(max = 200) + @JsonProperty("brideFirstnameEn") + private String firstname_en; + + @Size(max = 200) + @JsonProperty("brideFirstnameMl") + private String firstname_ml; + + @Size(max = 200) + @JsonProperty("brideMiddlenameEn") + private String middlename_en; + + @Size(max = 200) + @JsonProperty("brideMiddlenameMl") + private String middlename_ml; + + @Size(max = 200) + @JsonProperty("brideLastnameEn") + private String lastname_en; + + @Size(max = 200) + @JsonProperty("brideLastnameMl") + private String lastname_ml; + + @Size(max = 150) + @JsonProperty("brideMobile") + private String mobile; + + @Size(max = 300) + @JsonProperty("brideEmailid") + private String emailid; + + @Size(max = 20) + @JsonProperty("brideGender") + private String gender; + + @JsonProperty("brideDOB") + private long dateofbirth; + + @JsonProperty("brideAge") + private Integer age; + + @Size(max = 64) + @JsonProperty("brideParentGuardian") + private String parent_guardian; + + @Size(max = 200) + @JsonProperty("brideFathernameEn") + private String fathername_en; + + @Size(max = 200) + @JsonProperty("brideFathernameMl") + private String fathername_ml; + + @Size(max = 200) + @JsonProperty("brideMothernameEn") + private String mothername_en; + + @Size(max = 200) + @JsonProperty("brideMothernameMl") + private String mothername_ml; + + @Size(max = 15) + @JsonProperty("brideFatherAadharNo") + private String father_aadharno; + + @Size(max = 15) + @JsonProperty("brideMotherAadharNo") + private String mother_aadharno; + + @Size(max = 200) + @JsonProperty("brideGuardiannameEn") + private String guardianname_en; + + @Size(max = 200) + @JsonProperty("brideGuardiannameMl") + private String guardianname_ml; + + @Size(max = 15) + @JsonProperty("brideGuardianAadharNo") + private String guardian_aadharno; + + +// @Size(max = 200) +// @JsonProperty("brideProfessionEn") +// private String profession_en; +// +// @Size(max = 200) +// @JsonProperty("brideProfessionMal") +// private String profession_mal; + + @Size(max = 64) + @JsonProperty("brideMaritalstatusID") + private String maritalstatusid; + + @JsonProperty("brideIsSpouseLiving") + private boolean brideIsSpouseLiving; + + @JsonProperty("brideNoOfSpouse") + private Integer brideNoOfSpouse; + + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java new file mode 100644 index 00000000000..74cc257e7c5 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -0,0 +1,146 @@ +package org.ksmart.marriage.marriageapplication.model.marriage; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class GroomDetails { + @Size(max = 64) + @JsonProperty("groomId") + private String groomId; + + @Size(max = 64) + @JsonProperty("tenentId") + private String tenentId; + + @NotNull + @Size(max = 64) + @JsonProperty("brideGroom") + private String brideGroom; + + @Size(max = 64) + @JsonProperty("marriageid") + private String marriageid; + + @Size(max = 64) + @JsonProperty("groomResidentShip") + private String residentship; + + @Size(max = 15) + @JsonProperty("groomAadharNo") + private String aadharno; + + @Size(max = 1000) + @JsonProperty("groomPassportNo") + private String passportno; + + @Size(max = 64) + @JsonProperty("groomSocialSecurityNo") + private String socialsecurityno; + + @Size(max = 200) + @JsonProperty("groomFirstnameEn") + private String firstname_en; + + @Size(max = 200) + @JsonProperty("groomFirstnameMl") + private String firstname_ml; + + @Size(max = 200) + @JsonProperty("groomMiddlenameEn") + private String middlename_en; + + @Size(max = 200) + @JsonProperty("groomMiddlenameMl") + private String middlename_ml; + + @Size(max = 200) + @JsonProperty("groomLastnameEn") + private String lastname_en; + + @Size(max = 200) + @JsonProperty("groomLastnameMl") + private String lastname_ml; + + @Size(max = 150) + @JsonProperty("groomMobile") + private String mobile; + + @Size(max = 300) + @JsonProperty("groomEmailid") + private String emailid; + + @Size(max = 20) + @JsonProperty("groomGender") + private String gender; + + @JsonProperty("groomDOB") + private long dateofbirth; + + @JsonProperty("groomAge") + private Integer age; + + @Size(max = 64) + @JsonProperty("groomParentGuardian") + private String parent_guardian; + + @Size(max = 200) + @JsonProperty("groomFathernameEn") + private String fathername_en; + + @Size(max = 200) + @JsonProperty("groomFathernameMl") + private String fathername_ml; + + @Size(max = 200) + @JsonProperty("groomMothernameEn") + private String mothername_en; + + @Size(max = 200) + @JsonProperty("groomMothernameMl") + private String mothername_ml; + + @Size(max = 15) + @JsonProperty("groomFatherAadharNo") + private String father_aadharno; + @Size(max = 15) + @JsonProperty("groomMotherAadharNo") + private String mother_aadharno; + @Size(max = 200) + @JsonProperty("groomGuardiannameEn") + private String guardianname_en; + @Size(max = 200) + @JsonProperty("groomGuardiannameMl") + private String guardianname_ml; + @Size(max = 15) + @JsonProperty("groomGuardianAadharNo") + private String guardian_aadharno; + +// @Size(max = 200) +// @JsonProperty("groomProfessionEn") +// private String profession_en; +// +// +// @Size(max = 200) +// @JsonProperty("groomProfessionMal") +// private String profession_mal; + + @Size(max = 64) + @JsonProperty("groomMaritalstatusID") + private String maritalstatusid; + @JsonProperty("groomIsSpouseLiving") + private Boolean groomIsSpouseLiving; + @JsonProperty("groomNoOfSpouse") + private Integer groomNoOfSpouse; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + + +} From b36cd58f1dea51938b85df2c2174c920dcb6cd73 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 10:51:53 +0530 Subject: [PATCH 085/420] SEARCH ACKNUMBER --- .../marriageapplication/model/marriage/BrideDetails.java | 3 +-- .../marriageapplication/model/marriage/GroomDetails.java | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index e6f47b14ea9..7a064a952f1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -68,9 +68,8 @@ public class BrideDetails { @JsonProperty("brideLastnameMl") private String lastname_ml; - @Size(max = 150) @JsonProperty("brideMobile") - private String mobile; + private Long mobile; @Size(max = 300) @JsonProperty("brideEmailid") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index 74cc257e7c5..80421f3cbaf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -69,9 +69,8 @@ public class GroomDetails { @JsonProperty("groomLastnameMl") private String lastname_ml; - @Size(max = 150) @JsonProperty("groomMobile") - private String mobile; + private Long mobile; @Size(max = 300) @JsonProperty("groomEmailid") From 86077a3641533bbb6253f38e3e0808081ff4a81c Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 11:00:31 +0530 Subject: [PATCH 086/420] SEARCH ACKNUMBER --- .../validator/MarriageApplicationValidator.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index f7918bcfb22..6cf65719207 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1,12 +1,4 @@ package org.ksmart.marriage.marriageapplication.validator; - -<<<<<<< HEAD - -import org.apache.commons.collections4.CollectionUtils; -import org.egov.tracer.model.CustomException; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; -======= import java.util.List; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -20,7 +12,6 @@ import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; import org.ksmart.marriage.utils.MarriageConstants; ->>>>>>> bed9061267 (Field validation) import org.springframework.stereotype.Component; import java.util.List; @@ -32,9 +23,7 @@ >>>>>>> bed9061267 (Field validation) @Component public class MarriageApplicationValidator { - public void validateCommonFields(MarriageDetailsRequest request) { -<<<<<<< HEAD public void validateUpdate(MarriageDetailsRequest request, List searchResult) { List deathdetails = request.getMarriageDetails(); @@ -43,7 +32,7 @@ public void validateUpdate(MarriageDetailsRequest request, List 1) { // NOPMD - throw new CustomException( MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), "Supports only single Marriage registration update request."); } @@ -51,9 +40,10 @@ public void validateUpdate(MarriageDetailsRequest request, List marriageApplication = request.getMarriageDetails(); if (marriageApplication != null) { marriageApplication @@ -359,6 +349,5 @@ public void validateUpdate(MarriageDetailsRequest request, List>>>>>> bed9061267 (Field validation) } } From 1762e41b7f430914597da7859ca020e83130355f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 14:50:00 +0530 Subject: [PATCH 087/420] fix --- .../src/main/resources/marriage.yml | 56 +++++++++---------- .../enrichment/MarriageDetailsEnrichment.java | 9 +++ .../model/marriage/BrideAddressDetails.java | 17 +++++- .../model/marriage/GroomAddressDetails.java | 16 +++++- 4 files changed, 68 insertions(+), 30 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index f176b533b6f..c48f1367a98 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -397,7 +397,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaPostCode - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl @@ -417,11 +417,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk @@ -439,9 +439,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPostOffice + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent @@ -471,9 +471,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodepermanent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl @@ -551,7 +551,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaPostCode - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl @@ -572,11 +572,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk @@ -594,9 +594,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPostOffice + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent @@ -626,9 +626,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodepermanent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl @@ -1077,7 +1077,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaPostCode - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl @@ -1158,7 +1158,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaPostCode - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl @@ -1188,11 +1188,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk @@ -1210,9 +1210,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntInKeralaAdrPostOffice + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent @@ -1232,9 +1232,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrVillage - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodepermanent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl @@ -1268,11 +1268,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrVillage - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk @@ -1290,9 +1290,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntInKeralaAdrPostOffice + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent @@ -1312,9 +1312,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrVillage - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodepermanent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index fc8762386fe..0f6d988575b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -182,6 +182,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaPostCode()); marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); @@ -226,6 +227,8 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { if (marriage.getGroomAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrTalukId(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermanentAddrVillageId(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); @@ -285,6 +288,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); @@ -317,6 +321,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); if (marriage.getBrideAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); + } } } @@ -390,6 +395,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); @@ -428,6 +434,8 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermanentAddrTalukId(marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermanentAddrVillageId(marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); @@ -486,6 +494,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java index 6589875814a..fd27f3686e2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java @@ -162,6 +162,9 @@ public class BrideAddressDetails { @Size(max = 64) @JsonProperty("presentOutSideIndiaadrsCityTown") private String presentOutSideIndiaadrsCityTown; + @Size(max = 10) + @JsonProperty("presentOutSideIndiaPostCode") + private String presentOutSideIndiaPostCode; ////Db Fields////// @@ -256,7 +259,9 @@ public class BrideAddressDetails { @JsonProperty("presentOthrIndiaProvinceMl") private String presentOthrIndiaProvinceMl; - + @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePresent") + private String outSideIndiaPostCodePresent; ////Permanant @JsonProperty("isPermanentAddress") @@ -424,6 +429,12 @@ public class BrideAddressDetails { @JsonProperty("isPermanentAddressInt") private Integer isPermanentAddressInt; + @JsonProperty("PermanentAddrTalukId") + private String permanentAddrTalukId ; + + + @JsonProperty("PermanentAddrVillageId") + private String permanentAddrVillageId ; @Size(max = 64) @JsonProperty("countryIdPermanent") private String countryIdPermanent; @@ -511,4 +522,8 @@ public class BrideAddressDetails { @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; + @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePermanent") + private String outSideIndiaPostCodepermanent; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java index f375387064c..4f699fdd10d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java @@ -162,7 +162,9 @@ public class GroomAddressDetails { @Size(max = 64) @JsonProperty("presentOutSideIndiaadrsCityTown") private String presentOutSideIndiaadrsCityTown; - + @Size(max = 10) + @JsonProperty("presentOutSideIndiaPostCode") + private String presentOutSideIndiaPostCode; ////Db Fields////// @@ -255,6 +257,9 @@ public class GroomAddressDetails { @Size(max = 2500) @JsonProperty("presentOthrIndiaProvinceMl") private String presentOthrIndiaProvinceMl; + @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePresent") + private String outSideIndiaPostCodePresent; ////Permanant @@ -415,6 +420,7 @@ public class GroomAddressDetails { private String permntOutsideIndiaCountry; + ////Db Fields////// @Size(max = 64) @@ -423,7 +429,12 @@ public class GroomAddressDetails { @JsonProperty("isPermanentAddressInt") private Integer isPermanentAddressInt; + @JsonProperty("PermanentAddrTalukId") + private String permanentAddrTalukId ; + + @JsonProperty("PermanentAddrVillageId") + private String permanentAddrVillageId ; @Size(max = 64) @JsonProperty("countryIdPermanent") private String countryIdPermanent; @@ -510,5 +521,8 @@ public class GroomAddressDetails { @Size(max = 64) @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; + @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePermanent") + private String outSideIndiaPostCodepermanent; } From cac7046f74c9f652e1b96733f5afcc86834ae0a8 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Mon, 3 Apr 2023 16:13:05 +0530 Subject: [PATCH 088/420] Field validation --- .../marriage-services/.vscode/settings.json | 3 +- .../model/marriage/BrideDetails.java | 4 +- .../model/marriage/GroomDetails.java | 5 +- .../MarriageApplicationValidator.java | 912 +++++++++++++++--- .../marriage/utils/MarriageConstants.java | 3 + 5 files changed, 781 insertions(+), 146 deletions(-) diff --git a/municipal-services/marriage-services/.vscode/settings.json b/municipal-services/marriage-services/.vscode/settings.json index 7b016a89fba..e012065081a 100644 --- a/municipal-services/marriage-services/.vscode/settings.json +++ b/municipal-services/marriage-services/.vscode/settings.json @@ -1,3 +1,4 @@ { - "java.compile.nullAnalysis.mode": "automatic" + "java.compile.nullAnalysis.mode": "automatic", + "java.configuration.updateBuildConfiguration": "interactive" } \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java index 7a064a952f1..f8c0214778b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java @@ -68,10 +68,12 @@ public class BrideDetails { @JsonProperty("brideLastnameMl") private String lastname_ml; + @JsonProperty("brideMobile") private Long mobile; - @Size(max = 300) + + @Size(max = 10) @JsonProperty("brideEmailid") private String emailid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java index 80421f3cbaf..d4b3ea69e85 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java @@ -1,6 +1,8 @@ package org.ksmart.marriage.marriageapplication.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; + +import io.micrometer.core.instrument.step.StepLong; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; @@ -69,6 +71,7 @@ public class GroomDetails { @JsonProperty("groomLastnameMl") private String lastname_ml; + @JsonProperty("groomMobile") private Long mobile; @@ -142,4 +145,4 @@ public class GroomDetails { private AuditDetails auditDetails; -} +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 6cf65719207..1ba5d2a5d91 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1,29 +1,27 @@ package org.ksmart.marriage.marriageapplication.validator; -import java.util.List; + import org.apache.commons.collections4.CollectionUtils; -import org.apache.commons.lang3.StringUtils; -import org.checkerframework.checker.units.qual.g; import org.egov.tracer.model.CustomException; import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.checkerframework.checker.units.qual.g; import org.ksmart.marriage.marriageapplication.model.marriage.BrideAddressDetails; import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.model.marriage.GroomAddressDetails; import org.ksmart.marriage.marriageapplication.model.marriage.GroomDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.stereotype.Component; - -import java.util.List; - import static org.ksmart.marriage.utils.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_UPDATE; import static org.ksmart.marriage.utils.enums.ErrorCodes.MARRIAGE_DETAILS_REQUIRED; +//import static org.ksmart.marriage.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; @Component public class MarriageApplicationValidator { - public void validateUpdate(MarriageDetailsRequest request, List searchResult) { List deathdetails = request.getMarriageDetails(); @@ -40,10 +38,12 @@ public void validateUpdate(MarriageDetailsRequest request, List marriageApplication = request.getMarriageDetails(); if (marriageApplication != null) { marriageApplication @@ -54,93 +54,92 @@ public void validateCommonFields(MarriageDetailsRequest request) { BrideAddressDetails brideaddressInfo = marriagedtls.getBrideAddressDetails(); WitnessDetails witnessDtls = marriagedtls.getWitnessDetails(); - if(marriagedtls.getDateofmarriage() <= 0){ - throw new CustomException("DECEASED DATE OF MARRIAGE INVALID", "The deceased Date of marriage" + - groomInfo.getResidentship() + " is invalid"); + if (marriagedtls.getDateofmarriage() <= 0) { + throw new CustomException("DECEASED DATE OF MARRIAGE INVALID", + "The deceased Date of marriage" + + groomInfo.getResidentship() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getDistrictid())){ + if (StringUtils.isEmpty(marriagedtls.getDistrictid())) { throw new CustomException("DECEASED DISTRICT INVALID", "The deceased District" + - marriagedtls.getDistrictid() + " is invalid"); + marriagedtls.getDistrictid() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getTalukid())){ + if (StringUtils.isEmpty(marriagedtls.getTalukid())) { throw new CustomException("DECEASED TALUK INVALID", "The deceased Taluk" + - marriagedtls.getTalukid() + " is invalid"); + marriagedtls.getTalukid() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getVillage_name())){ + if (StringUtils.isEmpty(marriagedtls.getVillage_name())) { throw new CustomException("DECEASED VILLAGE INVALID", "The deceased Village" + - marriagedtls.getVillage_name() + " is invalid"); + marriagedtls.getVillage_name() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getLbtype())){ + if (StringUtils.isEmpty(marriagedtls.getLbtype())) { throw new CustomException("DECEASED LB TYPE INVALID", "The deceased LB type " + - marriagedtls.getLbtype() + " is invalid"); + marriagedtls.getLbtype() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getWard_code())){ + if (StringUtils.isEmpty(marriagedtls.getWard_code())) { throw new CustomException("DECEASED LB TYPE INVALID", "The deceased LB type " + - marriagedtls.getWard_code() + " is invalid"); + marriagedtls.getWard_code() + " is invalid"); } - - - if(StringUtils.isEmpty(marriagedtls.getPlacetype())){ - throw new CustomException("DECEASED MARRIAGE PLACE TYPE INVALID", "The deceased Place type " + - marriagedtls.getPlacetype() + " is invalid"); - } - else{ - if(marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_HOUSE)){ - if(StringUtils.isEmpty(marriagedtls.getLocality_en())){ - throw new CustomException("DECEASED MARRIAGE PLACE LOCALITY ENGLISH INVALID", "The deceased Place Locality Name in English " + - marriagedtls.getLocality_en()+ " is invalid"); + if (StringUtils.isEmpty(marriagedtls.getPlacetype())) { + throw new CustomException("DECEASED MARRIAGE PLACE TYPE INVALID", + "The deceased Place type " + + marriagedtls.getPlacetype() + " is invalid"); + } else { + if (marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_HOUSE)) { + if (StringUtils.isEmpty(marriagedtls.getLocality_en())) { + throw new CustomException("DECEASED MARRIAGE PLACE LOCALITY ENGLISH INVALID", + "The deceased Place Locality Name in English " + + marriagedtls.getLocality_en() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getLocality_ml())){ - throw new CustomException("DECEASED MARRIAGE PLACE LOCALITY MALAYALAM INVALID", "The deceased Place Locality Name in Malayalam " + - marriagedtls.getLocality_ml()+ " is invalid"); + if (StringUtils.isEmpty(marriagedtls.getLocality_ml())) { + throw new CustomException("DECEASED MARRIAGE PLACE LOCALITY MALAYALAM INVALID", + "The deceased Place Locality Name in Malayalam " + + marriagedtls.getLocality_ml() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameEn())){ - throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", "The deceased House Name English " + - marriagedtls.getMarriageHouseNoAndNameEn()+ " is invalid"); + if (StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameEn())) { + throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", + "The deceased House Name English " + + marriagedtls.getMarriageHouseNoAndNameEn() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameMl())){ - throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", "The deceased House Name Malayalam " + - marriagedtls.getMarriageHouseNoAndNameMl()+ " is invalid"); + if (StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameMl())) { + throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", + "The deceased House Name Malayalam " + + marriagedtls.getMarriageHouseNoAndNameMl() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getLandmark())){ + if (StringUtils.isEmpty(marriagedtls.getLandmark())) { throw new CustomException("DECEASED LANDMARK IS INVALID", "The deceased Landmark" + - marriagedtls.getLandmark()+ " is invalid"); + marriagedtls.getLandmark() + " is invalid"); } } - if(marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION)){ - if(StringUtils.isEmpty(marriagedtls.getPlacenameEn())){ - throw new CustomException("DECEASED PLACE NAME ENGLISH IS INVALID", "The deceased Place Name English" + - marriagedtls.getPlacenameEn()+ " is invalid"); - } - else { - if(marriagedtls.getPlacenameEn().equals(MarriageConstants.PLACE_OTHER)){ - if(StringUtils.isEmpty(marriagedtls.getPlacenameEn())){ - throw new CustomException("DECEASED PLACE NAME ENGLISH IS INVALID", "The deceased Place Name English" + - marriagedtls.getPlacenameEn()+ " is invalid"); + if (marriagedtls.getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION)) { + if (StringUtils.isEmpty(marriagedtls.getPlacenameEn())) { + throw new CustomException("DECEASED PLACE NAME ENGLISH IS INVALID", + "The deceased Place Name English" + + marriagedtls.getPlacenameEn() + " is invalid"); + } else { + if (marriagedtls.getPlacenameEn().equals(MarriageConstants.PLACE_OTHER)) { + if (StringUtils.isEmpty(marriagedtls.getPlacenameEn())) { + throw new CustomException("DECEASED PLACE NAME ENGLISH IS INVALID", + "The deceased Place Name English" + + marriagedtls.getPlacenameEn() + " is invalid"); } - if(StringUtils.isEmpty(marriagedtls.getPlacenameMl())){ - throw new CustomException("DECEASED PLACE NAME MALAYALAM IS INVALID", "The deceased Place Name Malayalam" + - marriagedtls.getPlacenameMl()+ " is invalid"); + if (StringUtils.isEmpty(marriagedtls.getPlacenameMl())) { + throw new CustomException("DECEASED PLACE NAME MALAYALAM IS INVALID", + "The deceased Place Name Malayalam" + + marriagedtls.getPlacenameMl() + " is invalid"); } } - } - + } } - - - - - - if (StringUtils.isEmpty(groomInfo.getResidentship())) { throw new CustomException("DECEASED RESIDENTSHIP INVALID", "The deceased resident" + groomInfo.getResidentship() + " is invalid"); @@ -203,46 +202,58 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException("DECEASED MARITAL STATUS INVALID", "The deceased Marital status" + groomInfo.getMaritalstatusid() + " is invalid"); - } + } // else { - // if (groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) { - // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", - // "The deceased Is spouse living and no of spouse living" + - // groomInfo.getGroomIsSpouseLiving() + "and" - // + groomInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) { - // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", - // "The deceased Is spouse living and no of spouse living" + - // groomInfo.getGroomIsSpouseLiving() + "and" - // + groomInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) { - // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", - // "The deceased Is spouse living and no of spouse living" + - // groomInfo.getGroomIsSpouseLiving() + "and" - // + groomInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) { - // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", - // "The deceased Is spouse living and no of spouse living" + - // groomInfo.getGroomIsSpouseLiving() + "and" - // + groomInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } + // if + // (groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) + // { + // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The deceased Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); // } - + // } + // else + // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) + // { + // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The deceased Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) + // { + // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The deceased Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) + // { + // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The deceased Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // } + if (StringUtils.isEmpty(brideInfo.getResidentship())) { throw new CustomException("DECEASED RESIDENTSHIP INVALID", "The deceased resident" + brideInfo.getResidentship() + " is invalid"); @@ -305,49 +316,664 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException("DECEASED MARITAL STATUS INVALID", "The deceased Marital status" + brideInfo.getMaritalstatusid() + " is invalid"); - } + } // else { - // if (brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) { - // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", - // "The deceased Is spouse living and no of spouse living" + - // brideInfo.getGroomIsSpouseLiving() + "and" - // + brideInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) { - // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", - // "The deceased Is spouse living and no of spouse living" + - // brideInfo.getGroomIsSpouseLiving() + "and" - // + brideInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) { - // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", - // "The deceased Is spouse living and no of spouse living" + - // brideInfo.getGroomIsSpouseLiving() + "and" - // + brideInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) { - // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE INVALID", - // "The deceased Is spouse living and no of spouse living" + - // brideInfo.getGroomIsSpouseLiving() + "and" - // + brideInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } + // if + // (brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) + // { + // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The deceased Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) + // { + // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The deceased Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) + // { + // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The deceased Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) + // { + // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { + // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The deceased Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } // } - + // groom permanent address start + + if (groomaddressInfo.getPermtaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty(groomaddressInfo.getPermtaddressStateName())) { + throw new CustomException("DECEASED STATE INVALID", + "The deceased State" + + groomaddressInfo.getPermtaddressStateName() + " is invalid"); + } else { + if (groomaddressInfo.getPermtaddressStateName() + .equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrDistrict())) { + throw new CustomException("DECEASED DISTRICT INVALID", + "The deceased District" + + groomaddressInfo.getPermntInKeralaAdrDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrTaluk())) { + throw new CustomException("DECEASED TALUK INVALID", + "The deceased Taluk" + + groomaddressInfo.getPermntInKeralaAdrTaluk() + " is invalid"); + } + + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrVillage())) { + throw new CustomException("DECEASED VILLAGE INVALID", + "The deceased Village" + + groomaddressInfo.getPresentInsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLBName())) { + throw new CustomException("DECEASED LOCALBODY NAME INVALID", + "The deceased Localbody Name" + + groomaddressInfo.getPermntInKeralaAdrLBName() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaWardNo())) { + throw new CustomException("DECEASED WARD INVALID", + "The deceased Ward" + + groomaddressInfo.getPermntInKeralaWardNo() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrPostOffice())) { + throw new CustomException("DECEASED POSTOFFICE INVALID", + "The deceased Postofficef" + + groomaddressInfo.getPermntInKeralaAdrPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrPincode())) { + throw new CustomException("DECEASED PINCODE INVALID", + "The deceased Pincode" + + groomaddressInfo.getPermntInKeralaAdrPincode() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLocalityNameEn())) { + throw new CustomException("DECEASED LOCALITY NAME ENGLISH IS INVALID", + "The deceased Locality English" + + groomaddressInfo.getPermntInKeralaAdrLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLocalityNameMl())) { + throw new CustomException("DECEASED LOCALITY NAME MALAYALAM IS INVALID", + "The deceased Locality Malayalam" + + groomaddressInfo.getPermntInKeralaAdrLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrHouseNameEn())) { + throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", + "The deceased House Name English" + + groomaddressInfo.getPermntInKeralaAdrHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrHouseNameMl())) { + throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", + "The deceased House Name Malayalam" + + groomaddressInfo.getPermntInKeralaAdrHouseNameMl() + + " is invalid"); + } + } + } + } else { + if (StringUtils.isEmpty(groomaddressInfo.getPermntOutSideIndiaProvinceEn())) { + throw new CustomException("DECEASED PROVINCE ENGLISH INVALID", + "The deceased Province English" + + groomaddressInfo.getPermntOutSideIndiaProvinceEn() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntOutSideIndiaProvinceMl())) { + throw new CustomException("DECEASED PROVINCE MALAYALAM INVALID", + "The deceased Province Malayalam" + + groomaddressInfo.getPermntOutSideIndiaProvinceMl() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaVillage())) { + throw new CustomException("DECEASED VILLAGE INVALID", + "The deceased Village" + + groomaddressInfo.getPermntOutsideIndiaVillage() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaCityTown())) { + throw new CustomException("DECEASED CITY INVALID", + "The deceased City" + + groomaddressInfo.getPermntOutsideIndiaCityTown() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermanentOutsideIndiaPostCode())) { + throw new CustomException("DECEASED POST CODE INVALID", + "The deceased Post Code" + + groomaddressInfo.getPermanentOutsideIndiaPostCode() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLineoneEn())) { + throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", + "The deceased Adress Line One English" + + groomaddressInfo.getPermntOutsideIndiaLineoneEn() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLinetwoEn())) { + throw new CustomException("DECEASED ADDRESS LINE Two ENGLISH INVALID", + "The deceased Adress Line Two English" + + groomaddressInfo.getPermntOutsideIndiaLinetwoEn() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLineoneMl())) { + throw new CustomException("DECEASED ADDRESS LINE ONE MALAYALAM INVALID", + "The deceased Adress Line One Malayalam" + + groomaddressInfo.getPermntOutsideIndiaLineoneMl() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLinetwoMl())) { + throw new CustomException("DECEASED ADDRESS LINE TWO MALAYALAM INVALID", + "The deceased Adress Line Two Malayalam" + + groomaddressInfo.getPermntOutsideIndiaLinetwoMl() + " is invalid"); + } + + } + // groom permanent address end + // groom present address start + if (groomaddressInfo.getPresentaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty(groomaddressInfo.getPresentaddressStateName())) { + throw new CustomException("DECEASED STATE INVALID", + "The deceased State" + + groomaddressInfo.getPresentaddressStateName() + " is invalid"); + } else { + if (groomaddressInfo.getPresentaddressStateName() + .equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaDistrict())) { + throw new CustomException("DECEASED DISTRICT INVALID", + "The deceased District" + + groomaddressInfo.getPresentInsideKeralaDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaTaluk())) { + throw new CustomException("DECEASED TALUK INVALID", + "The deceased Taluk" + + groomaddressInfo.getPresentInsideKeralaTaluk() + " is invalid"); + } + + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaVillage())) { + throw new CustomException("DECEASED VILLAGE INVALID", + "The deceased Village" + + groomaddressInfo.getPresentInsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLBName())) { + throw new CustomException("DECEASED LOCALBODY NAME INVALID", + "The deceased Localbody Name" + + groomaddressInfo.getPresentInsideKeralaLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentWardNo())) { + throw new CustomException("DECEASED WARD INVALID", + "The deceased Ward" + + groomaddressInfo.getPresentWardNo() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaPostOffice())) { + throw new CustomException("DECEASED POSTOFFICE INVALID", + "The deceased Postofficef" + + groomaddressInfo.getPresentInsideKeralaPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaPincode())) { + throw new CustomException("DECEASED PINCODE INVALID", + "The deceased Pincode" + + groomaddressInfo.getPresentInsideKeralaPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLocalityNameEn())) { + throw new CustomException("DECEASED LOCALITY NAME ENGLISH IS INVALID", + "The deceased Locality English" + + groomaddressInfo.getPresentInsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLocalityNameMl())) { + throw new CustomException("DECEASED LOCALITY NAME MALAYALAM IS INVALID", + "The deceased Locality Malayalam" + + groomaddressInfo.getPresentInsideKeralaLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaHouseNameEn())) { + throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", + "The deceased House Name English" + + groomaddressInfo.getPresentInsideKeralaHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaHouseNameMl())) { + throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", + "The deceased House Name Malayalam" + + groomaddressInfo.getPresentInsideKeralaHouseNameMl() + + " is invalid"); + } + } + } + } else { + if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaProvinceEn())) { + throw new CustomException("DECEASED PROVINCE ENGLISH INVALID", + "The deceased Province English" + + groomaddressInfo.getPresentOutSideIndiaProvinceEn() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaProvinceMl())) { + throw new CustomException("DECEASED PROVINCE MALAYALAM INVALID", + "The deceased Province Malayalam" + + groomaddressInfo.getPresentOutSideIndiaProvinceMl() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaadrsVillage())) { + throw new CustomException("DECEASED VILLAGE INVALID", + "The deceased Village" + + groomaddressInfo.getPresentOutSideIndiaadrsVillage() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaadrsCityTown())) { + throw new CustomException("DECEASED CITY INVALID", + "The deceased City" + + groomaddressInfo.getPresentOutSideIndiaadrsCityTown() + " is invalid"); + } + // if(StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaPostCode())) + // { + // throw new CustomException("DECEASED POST CODE INVALID", + // "The deceased Post Code" + + // groomaddressInfo.getPresentOutSideIndiaPostCode() + " is invalid"); + // } + if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressEn())) { + throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", + "The deceased Adress Line One English" + + groomaddressInfo.getPresentOutSideIndiaAdressEn() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressEnB())) { + throw new CustomException("DECEASED ADDRESS LINE Two ENGLISH INVALID", + "The deceased Adress Line Two English" + + groomaddressInfo.getPresentOutSideIndiaAdressEnB() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressMl())) { + throw new CustomException("DECEASED ADDRESS LINE ONE MALAYALAM INVALID", + "The deceased Adress Line One Malayalam" + + groomaddressInfo.getPresentOutSideIndiaAdressMl() + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressMlB())) { + throw new CustomException("DECEASED ADDRESS LINE TWO MALAYALAM INVALID", + "The deceased Adress Line Two Malayalam" + + groomaddressInfo.getPresentOutSideIndiaAdressMlB() + " is invalid"); + } + + } + // groom present address end + // bride permanent address start + + if (brideaddressInfo.getPermtaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty(brideaddressInfo.getPermtaddressStateName())) { + throw new CustomException("DECEASED STATE INVALID", + "The deceased State" + + brideaddressInfo.getPermtaddressStateName() + " is invalid"); + } else { + if (brideaddressInfo.getPermtaddressStateName() + .equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrDistrict())) { + throw new CustomException("DECEASED DISTRICT INVALID", + "The deceased District" + + brideaddressInfo.getPermntInKeralaAdrDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrTaluk())) { + throw new CustomException("DECEASED TALUK INVALID", + "The deceased Taluk" + + brideaddressInfo.getPermntInKeralaAdrTaluk() + " is invalid"); + } + + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrVillage())) { + throw new CustomException("DECEASED VILLAGE INVALID", + "The deceased Village" + + brideaddressInfo.getPresentInsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLBName())) { + throw new CustomException("DECEASED LOCALBODY NAME INVALID", + "The deceased Localbody Name" + + brideaddressInfo.getPermntInKeralaAdrLBName() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaWardNo())) { + throw new CustomException("DECEASED WARD INVALID", + "The deceased Ward" + + brideaddressInfo.getPermntInKeralaWardNo() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrPostOffice())) { + throw new CustomException("DECEASED POSTOFFICE INVALID", + "The deceased Postofficef" + + brideaddressInfo.getPermntInKeralaAdrPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrPincode())) { + throw new CustomException("DECEASED PINCODE INVALID", + "The deceased Pincode" + + brideaddressInfo.getPermntInKeralaAdrPincode() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLocalityNameEn())) { + throw new CustomException("DECEASED LOCALITY NAME ENGLISH IS INVALID", + "The deceased Locality English" + + brideaddressInfo.getPermntInKeralaAdrLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLocalityNameMl())) { + throw new CustomException("DECEASED LOCALITY NAME MALAYALAM IS INVALID", + "The deceased Locality Malayalam" + + brideaddressInfo.getPermntInKeralaAdrLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrHouseNameEn())) { + throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", + "The deceased House Name English" + + brideaddressInfo.getPermntInKeralaAdrHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrHouseNameMl())) { + throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", + "The deceased House Name Malayalam" + + brideaddressInfo.getPermntInKeralaAdrHouseNameMl() + + " is invalid"); + } + } + } + } else { + if (StringUtils.isEmpty(brideaddressInfo.getPermntOutSideIndiaProvinceEn())) { + throw new CustomException("DECEASED PROVINCE ENGLISH INVALID", + "The deceased Province English" + + brideaddressInfo.getPermntOutSideIndiaProvinceEn() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntOutSideIndiaProvinceMl())) { + throw new CustomException("DECEASED PROVINCE MALAYALAM INVALID", + "The deceased Province Malayalam" + + brideaddressInfo.getPermntOutSideIndiaProvinceMl() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaVillage())) { + throw new CustomException("DECEASED VILLAGE INVALID", + "The deceased Village" + + brideaddressInfo.getPermntOutsideIndiaVillage() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaCityTown())) { + throw new CustomException("DECEASED CITY INVALID", + "The deceased City" + + brideaddressInfo.getPermntOutsideIndiaCityTown() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermanentOutsideIndiaPostCode())) { + throw new CustomException("DECEASED POST CODE INVALID", + "The deceased Post Code" + + brideaddressInfo.getPermanentOutsideIndiaPostCode() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLineoneEn())) { + throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", + "The deceased Adress Line One English" + + brideaddressInfo.getPermntOutsideIndiaLineoneEn() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLinetwoEn())) { + throw new CustomException("DECEASED ADDRESS LINE Two ENGLISH INVALID", + "The deceased Adress Line Two English" + + brideaddressInfo.getPermntOutsideIndiaLinetwoEn() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLineoneMl())) { + throw new CustomException("DECEASED ADDRESS LINE ONE MALAYALAM INVALID", + "The deceased Adress Line One Malayalam" + + brideaddressInfo.getPermntOutsideIndiaLineoneMl() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLinetwoMl())) { + throw new CustomException("DECEASED ADDRESS LINE TWO MALAYALAM INVALID", + "The deceased Adress Line Two Malayalam" + + brideaddressInfo.getPermntOutsideIndiaLinetwoMl() + " is invalid"); + } + + } + // bride permanent address end + // bride present address start + if (brideaddressInfo.getPresentaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty(brideaddressInfo.getPresentaddressStateName())) { + throw new CustomException("DECEASED STATE INVALID", + "The deceased State" + + brideaddressInfo.getPresentaddressStateName() + " is invalid"); + } else { + if (brideaddressInfo.getPresentaddressStateName() + .equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaDistrict())) { + throw new CustomException("DECEASED DISTRICT INVALID", + "The deceased District" + + brideaddressInfo.getPresentInsideKeralaDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaTaluk())) { + throw new CustomException("DECEASED TALUK INVALID", + "The deceased Taluk" + + brideaddressInfo.getPresentInsideKeralaTaluk() + " is invalid"); + } + + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaVillage())) { + throw new CustomException("DECEASED VILLAGE INVALID", + "The deceased Village" + + brideaddressInfo.getPresentInsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLBName())) { + throw new CustomException("DECEASED LOCALBODY NAME INVALID", + "The deceased Localbody Name" + + brideaddressInfo.getPresentInsideKeralaLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentWardNo())) { + throw new CustomException("DECEASED WARD INVALID", + "The deceased Ward" + + brideaddressInfo.getPresentWardNo() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaPostOffice())) { + throw new CustomException("DECEASED POSTOFFICE INVALID", + "The deceased Postofficef" + + brideaddressInfo.getPresentInsideKeralaPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaPincode())) { + throw new CustomException("DECEASED PINCODE INVALID", + "The deceased Pincode" + + brideaddressInfo.getPresentInsideKeralaPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLocalityNameEn())) { + throw new CustomException("DECEASED LOCALITY NAME ENGLISH IS INVALID", + "The deceased Locality English" + + brideaddressInfo.getPresentInsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLocalityNameMl())) { + throw new CustomException("DECEASED LOCALITY NAME MALAYALAM IS INVALID", + "The deceased Locality Malayalam" + + brideaddressInfo.getPresentInsideKeralaLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaHouseNameEn())) { + throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", + "The deceased House Name English" + + brideaddressInfo.getPresentInsideKeralaHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaHouseNameMl())) { + throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", + "The deceased House Name Malayalam" + + brideaddressInfo.getPresentInsideKeralaHouseNameMl() + + " is invalid"); + } + } + } + } else { + if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaProvinceEn())) { + throw new CustomException("DECEASED PROVINCE ENGLISH INVALID", + "The deceased Province English" + + brideaddressInfo.getPresentOutSideIndiaProvinceEn() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaProvinceMl())) { + throw new CustomException("DECEASED PROVINCE MALAYALAM INVALID", + "The deceased Province Malayalam" + + brideaddressInfo.getPresentOutSideIndiaProvinceMl() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaadrsVillage())) { + throw new CustomException("DECEASED VILLAGE INVALID", + "The deceased Village" + + brideaddressInfo.getPresentOutSideIndiaadrsVillage() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaadrsCityTown())) { + throw new CustomException("DECEASED CITY INVALID", + "The deceased City" + + brideaddressInfo.getPresentOutSideIndiaadrsCityTown() + " is invalid"); + } + // if(StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaPostCode())) + // { + // throw new CustomException("DECEASED POST CODE INVALID", + // "The deceased Post Code" + + // brideaddressInfo.getPresentOutSideIndiaPostCode() + " is invalid"); + // } + if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressEn())) { + throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", + "The deceased Adress Line One English" + + brideaddressInfo.getPresentOutSideIndiaAdressEn() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressEnB())) { + throw new CustomException("DECEASED ADDRESS LINE Two ENGLISH INVALID", + "The deceased Adress Line Two English" + + brideaddressInfo.getPresentOutSideIndiaAdressEnB() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressMl())) { + throw new CustomException("DECEASED ADDRESS LINE ONE MALAYALAM INVALID", + "The deceased Adress Line One Malayalam" + + brideaddressInfo.getPresentOutSideIndiaAdressMl() + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressMlB())) { + throw new CustomException("DECEASED ADDRESS LINE TWO MALAYALAM INVALID", + "The deceased Adress Line Two Malayalam" + + brideaddressInfo.getPresentOutSideIndiaAdressMlB() + " is invalid"); + } + + } + // witness1 + if(StringUtils.isEmpty(witnessDtls.getWitness1AadharNo())){ + + throw new CustomException("DECEASED WITNESS1 AADHAR NUMBER INVALID", + "The deceased Witness1 Aadhar Number" + + witnessDtls.getWitness1AadharNo() + " is invalid"); + } + if(StringUtils.isEmpty(witnessDtls.getWitness1NameEn())){ + throw new CustomException("DECEASED WITNESS1 NAME ENGLISH INVALID", + "The deceased Witness1 Name English" + + witnessDtls.getWitness1NameEn() + " is invalid"); + } + if(StringUtils.isEmpty(witnessDtls.getWitness1NameMl())){ + + throw new CustomException("DECEASED WITNESS1 NAME MALAYALAM INVALID", + "The deceased Witness1 Name Malayalam" + + witnessDtls.getWitness1NameMl() + " is invalid"); + } + if((witnessDtls.getWitness1Age()<18 && witnessDtls.getWitness1Age()==0)){ + + throw new CustomException("DECEASED WITNESS1 AGE INVALID", + "The deceased Witness1 Age" + + witnessDtls.getWitness1Age() + " is invalid"); + } + if((StringUtils.isEmpty(witnessDtls.getWitness1AddresSEn()))){ + + throw new CustomException("DECEASED WITNESS1 ADDRESS ENGLISH INVALID", + "The deceased Witness1 Address English" + + witnessDtls.getWitness1AddresSEn() + " is invalid"); + } + if((StringUtils.isEmpty(witnessDtls.getWitness1AddressMl()))){ + + throw new CustomException("DECEASED WITNESS1 ADDRESS MALAYALAM INVALID", + "The deceased Witness1 Address Malayalam" + + witnessDtls.getWitness1AddressMl() + " is invalid"); + } + if((witnessDtls.getWitness1Mobile()<=0 )){ + + throw new CustomException("DECEASED WITNESS1 MOBILE NUMBER INVALID", + "The deceased Witness1 Mobile Number " + + witnessDtls.getWitness1Mobile() + " is invalid"); + } + if((witnessDtls.getWitness1Esigned().equals(MarriageConstants.VALUE_FALSE))){ + + throw new CustomException("DECEASED WITNESS1 E-SIGN INVALID", + "The deceased Witness1 E-sign " + + witnessDtls.getWitness1Esigned()+ " is invalid"); + } + + + + + + + + //witness2 + if(StringUtils.isEmpty(witnessDtls.getWitness2AadharNo())){ + + throw new CustomException("DECEASED WITNESS2 AADHAR NUMBER INVALID", + "The deceased Witness2 Aadhar Number" + + witnessDtls.getWitness2AadharNo() + " is invalid"); + } + if(StringUtils.isEmpty(witnessDtls.getWitness2NameEn())){ + + throw new CustomException("DECEASED WITNESS2 NAME ENGLISH INVALID", + "The deceased Witness2 Name English" + + witnessDtls.getWitness2NameEn() + " is invalid"); + } + if(StringUtils.isEmpty(witnessDtls.getWitness2NameMl())){ + + throw new CustomException("DECEASED WITNESS2 NAME MALAYALAM INVALID", + "The deceased Witness2 Name Malayalam" + + witnessDtls.getWitness2NameMl() + " is invalid"); + } + if((witnessDtls.getWitness2Age()<18 && witnessDtls.getWitness2Age()==0)){ + + throw new CustomException("DECEASED WITNESS2 AGE INVALID", + "The deceased Witness2 Age" + + witnessDtls.getWitness2Age() + " is invalid"); + } + if((StringUtils.isEmpty(witnessDtls.getWitness2AddresSEn()))){ + + throw new CustomException("DECEASED WITNESS2 ADDRESS ENGLISH INVALID", + "The deceased Witness2 Address English" + + witnessDtls.getWitness2AddresSEn() + " is invalid"); + } + if((StringUtils.isEmpty(witnessDtls.getWitness2AddressMl()))){ + + throw new CustomException("DECEASED WITNESS2 ADDRESS MALAYALAM INVALID", + "The deceased Witness2 Address Malayalam" + + witnessDtls.getWitness2AddressMl() + " is invalid"); + } + if((witnessDtls.getWitness2Mobile()<=0 )){ + + throw new CustomException("DECEASED WITNESS2 MOBILE NUMBER INVALID", + "The deceased Witness2 Mobile Number " + + witnessDtls.getWitness2Mobile() + " is invalid"); + } + if((witnessDtls.getWitness2Esigned().equals(MarriageConstants.VALUE_FALSE))){ + + throw new CustomException("DECEASED WITNESS2 E-SIGN INVALID", + "The deceased Witness2 E-sign " + + witnessDtls.getWitness2Esigned()+ " is invalid"); + } }); } + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 43c470c6f1c..33fd95bf039 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -104,6 +104,9 @@ public class MarriageConstants { public static final String PLACE_TYPE_PUBLIC_PLACE = "PUBLIC_PLACE"; + public static final String ADDRESS_INDIA = "COUNTRY_INDIA"; + + public static final String ADDRESS_KERALA = "kl"; /*AFTER UPDATING MDMS HAVE TO BE CHANGE */ public static final String PLACE_OTHER = "OTHER"; // public static final String RESIDENTSHIP_FOREIGN= "FOREIGN"; From c91d6dcd71b9c11ae030778d61354caccb2ed37e Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Mon, 3 Apr 2023 16:02:55 +0530 Subject: [PATCH 089/420] Field validations --- .../validator/MarriageApplicationValidator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 1ba5d2a5d91..5e5859a385f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -187,7 +187,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomInfo.getGender() + " is invalid"); } if ((groomInfo.getDateofbirth() <= 0)) { - throw new CustomException("DEATH DATE INVALID", "The date can't be null"); + throw new CustomException("GROOM BIRTH DATE INVALID", "The date can't be null"); } if (StringUtils.isEmpty(groomInfo.getFather_aadharno())) { @@ -301,7 +301,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideInfo.getGender() + " is invalid"); } if ((brideInfo.getDateofbirth() <= 0)) { - throw new CustomException("DEATH DATE INVALID", "The date can't be null"); + throw new CustomException("BRIDE BIRTH DATE INVALID", "The date can't be null"); } if (StringUtils.isEmpty(brideInfo.getFather_aadharno())) { From 711f416beb5e6a7c21a9ac13cf09ec0c12406e07 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Mon, 3 Apr 2023 16:15:15 +0530 Subject: [PATCH 090/420] Field validation --- .../validator/MarriageApplicationValidator.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 5e5859a385f..8b71099de5c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -839,12 +839,12 @@ public void validateCommonFields(MarriageDetailsRequest request) { "The deceased City" + brideaddressInfo.getPresentOutSideIndiaadrsCityTown() + " is invalid"); } - // if(StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaPostCode())) - // { - // throw new CustomException("DECEASED POST CODE INVALID", - // "The deceased Post Code" + - // brideaddressInfo.getPresentOutSideIndiaPostCode() + " is invalid"); - // } + if(StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaPostCode())) + { + throw new CustomException("DECEASED POST CODE INVALID", + "The deceased Post Code" + + brideaddressInfo.getPresentOutSideIndiaPostCode() + " is invalid"); + } if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressEn())) { throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", "The deceased Adress Line One English" + From b43d5fedfb21e547d84d83c8ba79d7e178512fc5 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 14:59:24 +0530 Subject: [PATCH 091/420] migration --- .../main/V20230403144525__newFieldAdd_services_new_dll.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql new file mode 100644 index 00000000000..e69de29bb2d From a02b71e2c62d81d1b448e280335c616e8174c366 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 15:05:06 +0530 Subject: [PATCH 092/420] migration --- .../validator/MarriageApplicationValidator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 8b71099de5c..d338776e091 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -23,18 +23,18 @@ public class MarriageApplicationValidator { public void validateUpdate(MarriageDetailsRequest request, List searchResult) { - List deathdetails = request.getMarriageDetails(); + List marriageDetails = request.getMarriageDetails(); - if (CollectionUtils.isEmpty(deathdetails)) { + if (CollectionUtils.isEmpty(marriageDetails)) { throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), "Marriage registration is required."); } - if (deathdetails.size() > 1) { // NOPMD + if (marriageDetails.size() > 1) { // NOPMD throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), "Supports only single Marriage registration update request."); } - if (deathdetails.size() != searchResult.size()) { + if (marriageDetails.size() != searchResult.size()) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), "Marriage registration(s) not found in database."); } From b311e6e51dc10522513823e224ffe34700cc9ae7 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 16:58:13 +0530 Subject: [PATCH 093/420] migration --- .../src/main/resources/marriage.yml | 32 ++++++++++++++----- .../enrichment/MarriageDetailsEnrichment.java | 2 ++ .../model/marriage/BrideAddressDetails.java | 4 ++- .../model/marriage/GroomAddressDetails.java | 2 +- ...03144525__newFieldAdd_services_new_dll.sql | 23 +++++++++++++ 5 files changed, 53 insertions(+), 10 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index c48f1367a98..4f950992f2f 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -329,7 +329,7 @@ serviceMaps: id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, - ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: @@ -401,12 +401,14 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePresent + - query : INSERT INTO public.eg_marriage_permanent_address_details( id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails @@ -477,13 +479,14 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent - query: INSERT INTO public.eg_marriage_present_address_details( id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, - ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: @@ -555,13 +558,14 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent - query : INSERT INTO public.eg_marriage_permanent_address_details( id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails @@ -632,6 +636,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + + - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , document_link ,marriageid ,bride_groom ,active ,applicationnumber ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?); @@ -1019,7 +1026,7 @@ serviceMaps: SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, - ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=? + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? WHERE marriageid=? and bride_groom='B' and tenantid=?; @@ -1081,6 +1088,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePresent + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName @@ -1101,7 +1110,7 @@ serviceMaps: SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, - ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=? + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? WHERE marriageid=? and bride_groom='G' and tenantid=?; basePath: MarriageDetails.*.GroomAddressDetails @@ -1162,6 +1171,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent + + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName @@ -1180,7 +1192,7 @@ serviceMaps: SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?,poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, - ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=? + ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? WHERE marriageid=? and bride_groom='B' and tenantid=?; basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: @@ -1238,6 +1250,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName @@ -1257,7 +1271,7 @@ serviceMaps: ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, - ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=? + ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? WHERE bride_groom='G' AND marriageid=? and tenantid=?; @@ -1318,6 +1332,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 0f6d988575b..ff7eb137bfa 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -278,6 +278,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); @@ -471,6 +472,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java index fd27f3686e2..1b8d24540a4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java @@ -407,7 +407,7 @@ public class BrideAddressDetails { @JsonProperty("permntOutsideIndiaVillage") private String permntOutsideIndiaVillage; - @Size(max = 64) + @Size(max = 1000) @JsonProperty("permntOutsideIndiaCityTown") private String permntOutsideIndiaCityTown; @@ -525,5 +525,7 @@ public class BrideAddressDetails { @Size(max = 10) @JsonProperty("outSideIndiaPostCodePermanent") private String outSideIndiaPostCodepermanent; + @JsonProperty("PermanentAddrCityOrVillageEn") + private String permanentAddrCityOrVillageEn ; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java index 4f699fdd10d..9a698cf7793 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java @@ -407,7 +407,7 @@ public class GroomAddressDetails { @JsonProperty("permntOutsideIndiaVillage") private String permntOutsideIndiaVillage; - @Size(max = 64) + @Size(max = 1000) @JsonProperty("permntOutsideIndiaCityTown") private String permntOutsideIndiaCityTown; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql index e69de29bb2d..090da6c2f90 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql @@ -0,0 +1,23 @@ +ALTER TABLE public.eg_marriage_permanent_address_details +ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_permanent_address_details_audit +ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_present_address_details +ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_present_address_details_audit +ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_permanent_address_details +ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_permanent_address_details_audit +ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_present_address_details +ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_present_address_details_audit +ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file From a47e56df2f0d8ec5e092da3ef0b269d852486c3e Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 17:10:51 +0530 Subject: [PATCH 094/420] migration --- .../egov-persister/src/main/resources/marriage.yml | 8 ++++---- .../enrichment/MarriageDetailsEnrichment.java | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 4f950992f2f..e48defd1400 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -330,7 +330,7 @@ serviceMaps: street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentUuid @@ -409,7 +409,7 @@ serviceMaps: locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: @@ -487,7 +487,7 @@ serviceMaps: street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentUuid @@ -566,7 +566,7 @@ serviceMaps: locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index ff7eb137bfa..ee51157e7fa 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -144,7 +144,6 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameMl()); marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); @@ -251,6 +250,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); @@ -278,7 +278,6 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); @@ -347,7 +346,6 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameMl()); marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); @@ -472,7 +470,6 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); From 0557f7a61cc380f0b6a5d7fa40ec70febf5168b0 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 3 Apr 2023 17:11:47 +0530 Subject: [PATCH 095/420] migration --- .../validator/MarriageApplicationValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index d338776e091..fbe3dd7b104 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -39,7 +39,7 @@ public void validateUpdate(MarriageDetailsRequest request, List Date: Tue, 4 Apr 2023 11:39:01 +0530 Subject: [PATCH 096/420] mdms validation --- .../common/repository/IdGenRepository.java | 123 ++++++-- .../model/MarriageApplicationDetails.java | 1 - .../service/MarriageApplicationService.java | 10 +- .../validator/MarriageMDMSValidator.java | 86 +++++- .../marriage/utils/MarriageMdmsUtil.java | 68 ++--- .../org/ksmart/marriage/utils/MdmsUtil.java | 264 ------------------ .../marriage/workflow/WorkflowIntegrator.java | 9 +- 7 files changed, 216 insertions(+), 345 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MdmsUtil.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java index 81b4f524689..354cfb25f8b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java @@ -39,6 +39,67 @@ public class IdGenRepository { @Autowired private ServiceRequestRepository restRepo; + + +//Jasmine -03.04.2023 + + // @Autowired + // private RestTemplate restTemplate; + + // @Autowired + // private BirthDeathConfiguration config; + + public IdGenerationResponse getId(RequestInfo requestInfo, String tenantId, String name, String format, int count) { + + List reqList = new ArrayList<>(); + for (int i = 0; i < count; i++) { + reqList.add(IdRequest.builder().idName(name).format(format).tenantId(tenantId).build()); + } + IdGenerationRequest req = IdGenerationRequest.builder().idRequests(reqList).requestInfo(requestInfo).build(); + IdGenerationResponse response = null; + try { + response = restTemplate.postForObject( config.getIdGenHost()+ config.getIdGenPath(), req, IdGenerationResponse.class); + } catch (HttpClientErrorException e) { + throw new ServiceCallException(e.getResponseBodyAsString()); + } catch (Exception e) { + Map map = new HashMap<>(); + map.put(e.getCause().getClass().getName(),e.getMessage()); + throw new CustomException(map); + } + return response; + } + //Jasmine + public List getIdList(RequestInfo requestInfo, String tenantId, String idName, String moduleCode,String fnType, int count) { + List idResponses = getMarriageIds(requestInfo, tenantId, idName, moduleCode, fnType, count).getIdResponses(); + + if (CollectionUtils.isEmpty(idResponses)) + throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); + + return idResponses.stream() + .map(IdResponse::getId).collect(Collectors.toList()); + } + + //Jasmine + public IdGenerationResponse getMarriageIds(RequestInfo requestInfo, String tenantId, String Idname, String modulecode, String functionType ,int count) { + //System.out.println("modulecode"+modulecode); + List reqList = new ArrayList<>(); + for (int i = 0; i < count; i++) { + reqList.add(IdRequest.builder().idName(Idname).moduleCode(modulecode).tenantId(tenantId).fnType(functionType).build()); + } + IdGenerationRequest req = IdGenerationRequest.builder().idRequests(reqList).requestInfo(requestInfo).build(); + IdGenerationResponse response = null; + try { + response = restTemplate.postForObject( config.getIdGenHost()+ config.getIdGenPath(), req, IdGenerationResponse.class); + } catch (HttpClientErrorException e) { + throw new ServiceCallException(e.getResponseBodyAsString()); + } catch (Exception e) { + Map map = new HashMap<>(); + map.put(e.getCause().getClass().getName(),e.getMessage()); + throw new CustomException(map); + } + return response; + } + // public IdGenerationResponse getIdOld(RequestInfo requestInfo, String tenantId, String name, String format, int count) { // // List reqList = new ArrayList<>(); @@ -114,37 +175,37 @@ public class IdGenRepository { // .map(IdResponse::getId) // .collect(Collectors.toList()); // } - - public List getIdList(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { - List reqList = new ArrayList<>(); - for (int i = 0; i < count; i++) { - reqList.add(IdRequest.builder() - .idName(idName) - .tenantId(tenantId) - .moduleCode(moduleCode) - .fnType(fnType) - .build()); - } - - IdGenerationRequest request = IdGenerationRequest.builder() - .idRequests(reqList) - .requestInfo(requestInfo) - .build(); - StringBuilder uri = new StringBuilder(config.getIdGenHost()).append(config.getIdGenPath()); - System.out.println("req :"+request); - IdGenerationResponse response = mapper.convertValue(restRepo.fetchResult(uri, request), - IdGenerationResponse.class); - - List idResponses = response.getIdResponses(); - - if (CollectionUtils.isEmpty(idResponses)) { - throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); - } - - return idResponses.stream() - .map(IdResponse::getId) - .collect(Collectors.toList()); - } +//comment from here on 3.04.2023 + // public List getIdList(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { + // List reqList = new ArrayList<>(); + // for (int i = 0; i < count; i++) { + // reqList.add(IdRequest.builder() + // .idName(idName) + // .tenantId(tenantId) + // .moduleCode(moduleCode) + // .fnType(fnType) + // .build()); + // } + + // IdGenerationRequest request = IdGenerationRequest.builder() + // .idRequests(reqList) + // .requestInfo(requestInfo) + // .build(); + // StringBuilder uri = new StringBuilder(config.getIdGenHost()).append(config.getIdGenPath()); + // System.out.println("req :"+request); + // IdGenerationResponse response = mapper.convertValue(restRepo.fetchResult(uri, request), + // IdGenerationResponse.class); + + // List idResponses = response.getIdResponses(); + + // if (CollectionUtils.isEmpty(idResponses)) { + // throw new CustomException("IDGEN ERROR", "No ids returned from idgen Service"); + // } + + // return idResponses.stream() + // .map(IdResponse::getId) + // .collect(Collectors.toList()); + // } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index cd09308fe41..f52aa9ae111 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -44,7 +44,6 @@ public class MarriageApplicationDetails { private String lbtype; - @Size(max = 64) @JsonProperty("marriageTenantid") private String tenantid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index eb3c73a8d87..04cf98b7d84 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -58,7 +58,7 @@ public List saveMarriageDetails(MarriageDetailsReque producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); // List marriageApplicationDetails = repository.saveMarriageDetails(request); - // workflowIntegrator.callWorkFlow(request); + // workflowIntegrator.callWorkFlow(request); request.getMarriageDetails().forEach(marriage->{ if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); @@ -71,8 +71,6 @@ public List saveMarriageDetails(MarriageDetailsReque }); return request.getMarriageDetails(); - - } public List updateMarriageDetails(MarriageDetailsRequest request) { @@ -81,13 +79,11 @@ public List updateMarriageDetails(MarriageDetailsReq mdmsValidator.validateMarriageMDMSData(request,mdmsData); String applicationNumber = request.getMarriageDetails().get(0).getApplicationNumber(); MarriageApplicationSearchCriteria criteria =(MarriageApplicationSearchCriteria.builder() - .applicationNo(applicationNumber) - .build()); + .applicationNo(applicationNumber) + .build()); List searchResult = repository.getMarriageApplication(criteria,request.getRequestInfo()); validatorService.validateUpdate(request, searchResult); - - marriageDetailsEnrichment.enrichUpdate(request); // workflowIntegrator.callWorkFlow(request); // List marriageApplicationDetails =repository.updateMarriageDetails(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index 531bd298360..d31175b9157 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -38,30 +38,108 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request,Object mdmsd if(request.getMarriageDetails().get(0).getGroomDetails().getGender() != null) { if(!masterData.get(MarriageConstants.GENDERTYPE) .contains(request.getMarriageDetails().get(0).getGroomDetails().getGender())) - errorMap.put("INVALID GENDER TYPE", "The gender of the groom " + + errorMap.put("GROOM:INVALID GENDER TYPE", "The gender of the groom " + request.getMarriageDetails().get(0).getGroomDetails().getGender()+ " is invalid"); } if(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid() != null) { if(!masterData.get(MarriageConstants.MARITAL_STATUS) .contains(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid())) - errorMap.put("MARITAL STATUS INVALID", "The marital status of groom " + + errorMap.put("GROOM:MARITAL STATUS INVALID", "The marital status of groom " + request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid()+ " is invalid"); } if(request.getMarriageDetails().get(0).getMarriage_type() != null) { if(!masterData.get(MarriageConstants.MARRIAGE_TYPE) .contains(request.getMarriageDetails().get(0).getMarriage_type())) - errorMap.put("TYPE OF MARRIAGE INVALID", "The marriage type " + + errorMap.put("GROOM:TYPE OF MARRIAGE INVALID", "The marriage type " + request.getMarriageDetails().get(0).getMarriage_type()+ " is invalid"); } if(request.getMarriageDetails().get(0).getPlacetype() != null) { if(!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE) .contains(request.getMarriageDetails().get(0).getPlacetype())) - errorMap.put(" MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + + errorMap.put("GROOM: MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + request.getMarriageDetails().get(0).getPlacetype()+ " is invalid"); } + + //Jasmine 03.04.2023 + + if(request.getMarriageDetails().get(0).getBrideDetails().getGender() != null) { + if(!masterData.get(MarriageConstants.GENDERTYPE) + .contains(request.getMarriageDetails().get(0).getGroomDetails().getGender())) + errorMap.put("BRIDE:INVALID GENDER TYPE", "The gender of the groom " + + request.getMarriageDetails().get(0).getGroomDetails().getGender()+ " is invalid"); + } + + if(request.getMarriageDetails().get(0).getBrideDetails().getMaritalstatusid() != null) { + if(!masterData.get(MarriageConstants.MARITAL_STATUS) + .contains(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid())) + errorMap.put("BRIDE:MARITAL STATUS INVALID", "The marital status of groom " + + request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid()+ " is invalid"); + } + //MASTER DETAILS VALIDATION + + if(request.getMarriageDetails().get(0).getDistrictid() != null) { + if(!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getDistrictid())) + errorMap.put(" DISTRICT NAME INVALID", "The district name of marriage place " + + request.getMarriageDetails().get(0).getDistrictid()+ " is invalid"); + } + if(request.getMarriageDetails().get(0).getTalukid() != null) { + if(!masterData.get(MarriageConstants.TALUK) + .contains(request.getMarriageDetails().get(0).getTalukid())) + errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + + request.getMarriageDetails().get(0).getTalukid()+ " is invalid"); + } + //have to change as villageId + if(request.getMarriageDetails().get(0).getVillage_name() != null) { + if(!masterData.get(MarriageConstants.VILLAGE) + .contains(request.getMarriageDetails().get(0).getVillage_name())) + errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + + request.getMarriageDetails().get(0).getVillage_name()+ " is invalid"); + } + if(request.getMarriageDetails().get(0).getLbtype() != null) { + if(!masterData.get(MarriageConstants.LBTYPE) + .contains(request.getMarriageDetails().get(0).getLbtype())) + errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + + request.getMarriageDetails().get(0).getLbtype()+ " is invalid"); + } + // if(request.getMarriageDetails().get(0).getWard_code() != null) { + // if(!masterData.get(MarriageConstants.WARD) + // .contains(request.getMarriageDetails().get(0).getWard_code())) + // errorMap.put(" LB TYPE INVALID", "The LBTYpe of marriage place " + + // request.getMarriageDetails().get(0).getWard_code()+ " is invalid"); + // } + + //ADDRESS VALIDATION + + if(request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent() != null) { + if(!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent())) + errorMap.put("GROOM: COUNTRY NAME INVALID", "The country name of groom " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent()+ " is invalid"); + } + // if(request.getMarriageDetails().get(0).getTalukid() != null) { + // if(!masterData.get(MarriageConstants.TALUK) + // .contains(request.getMarriageDetails().get(0).getTalukid())) + // errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + + // request.getMarriageDetails().get(0).getTalukid()+ " is invalid"); + // } + // //have to change as villageId + // if(request.getMarriageDetails().get(0).getVillage_name() != null) { + // if(!masterData.get(MarriageConstants.VILLAGE) + // .contains(request.getMarriageDetails().get(0).getVillage_name())) + // errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + + // request.getMarriageDetails().get(0).getVillage_name()+ " is invalid"); + // } + // if(request.getMarriageDetails().get(0).getLbtype() != null) { + // if(!masterData.get(MarriageConstants.LBTYPE) + // .contains(request.getMarriageDetails().get(0).getLbtype())) + // errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + + // request.getMarriageDetails().get(0).getLbtype()+ " is invalid"); + + if(!CollectionUtils.isEmpty(errorMap)) throw new CustomException(errorMap); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index f916177ac3b..af014d74912 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -54,12 +54,12 @@ public Object mDMSCall(RequestInfo requestInfo, String tenantId) { private MdmsCriteriaReq getMDMSRequest(RequestInfo requestInfo, String tenantId) { ModuleDetail tenantIdRequest = getTenantIdRequest(tenantId); ModuleDetail commomMasterRequest = getCommonMastersRequest(); - // List BNDListRequest = getMarriageListRequest(); + List BNDListRequest = getMarriageListRequest(); List moduleDetails = new LinkedList<>(); moduleDetails.add(tenantIdRequest); moduleDetails.add(commomMasterRequest); - //moduleDetails.addAll(BNDListRequest); + moduleDetails.addAll(BNDListRequest); MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) .build(); @@ -88,42 +88,42 @@ private ModuleDetail getTenantIdRequest(String tenantId) { private ModuleDetail getCommonMastersRequest() { List marriageMasterDetails = new ArrayList<>(); - // //Country - // final String filterCodeCountry = "$.[?(@.active==true)].code"; - // marriageMasterDetails - // .add(MasterDetail.builder().name(MarriageConstants.COUNTRY).filter(filterCodeCountry).build()); - // //State - // final String filterCodeState = "$.[?(@.active==true)].code"; - // marriageMasterDetails - // .add(MasterDetail.builder().name(MarriageConstants.STATE).filter(filterCodeState).build()); - // //District - // final String filterCodeDistrict = "$.[?(@.active==true)].code"; - // marriageMasterDetails - // .add(MasterDetail.builder().name(MarriageConstants.DISTRICT).filter(filterCodeDistrict).build()); - // //Taluk - // final String filterCodeTaluk = "$.[?(@.active==true)].code"; - // marriageMasterDetails - // .add(MasterDetail.builder().name(MarriageConstants.TALUK).filter(filterCodeTaluk).build()); - // //LbType - // final String filterCodeLbType = "$.[?(@.active==true)].code"; - // marriageMasterDetails - // .add(MasterDetail.builder().name(MarriageConstants.LBTYPE).filter(filterCodeLbType).build()); - // //Village - // final String filterCodeVillage = "$.[?(@.active==true)].code"; - // marriageMasterDetails - // .add(MasterDetail.builder().name(MarriageConstants.VILLAGE).filter(filterCodeVillage).build()); + //Country + final String filterCodeCountry = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.COUNTRY).filter(filterCodeCountry).build()); + //State + final String filterCodeState = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.STATE).filter(filterCodeState).build()); + //District + final String filterCodeDistrict = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.DISTRICT).filter(filterCodeDistrict).build()); + //Taluk + final String filterCodeTaluk = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.TALUK).filter(filterCodeTaluk).build()); + //LbType + final String filterCodeLbType = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.LBTYPE).filter(filterCodeLbType).build()); + //Village + final String filterCodeVillage = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.VILLAGE).filter(filterCodeVillage).build()); //Gender final String filterCodeGender = "$.[?(@.active==true)].code"; marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.GENDERTYPE).filter(filterCodeGender).build()); - // //Religion - // final String filterCodeReligion = "$.[?(@.active==true)].code"; - // marriageMasterDetails - // .add(MasterDetail.builder().name(MarriageConstants.RELIGION).filter(filterCodeReligion).build()); - // //Religion - // final String filterCodePostOffice = "$.[?(@.active==true)].code"; - // marriageMasterDetails - // .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); + //Religion + final String filterCodeReligion = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.RELIGION).filter(filterCodeReligion).build()); + //Religion + final String filterCodePostOffice = "$.[?(@.active==true)].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MdmsUtil.java deleted file mode 100644 index 6844b2faf87..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MdmsUtil.java +++ /dev/null @@ -1,264 +0,0 @@ -package org.ksmart.marriage.utils; - -import lombok.extern.slf4j.Slf4j; -import org.egov.common.contract.request.RequestInfo; -import org.egov.mdms.model.MasterDetail; -import org.egov.mdms.model.MdmsCriteria; -import org.egov.mdms.model.MdmsCriteriaReq; -import org.egov.mdms.model.ModuleDetail; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import org.springframework.web.client.RestTemplate; - -import java.util.Collections; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -@Slf4j -@Component -public class MdmsUtil { - - @Autowired - private RestTemplate restTemplate; - - @Value("${egov.mdms.host}") - private String mdmsHost; - - @Value("${egov.mdms.search.endpoint}") - private String mdmsUrl; - - @Value("${egov.mdms.module.name}") - private String moduleName; - - - public Object mdmsCall(RequestInfo requestInfo) { - // Call MDMS microservice with MdmsCriteriaReq as params - - MdmsCriteriaReq mdmsCriteriaReq = getMdmsRequest(requestInfo); - String mdmsUri = String.format("%s%s", mdmsHost, mdmsUrl); - Object result = null; - try { - result = restTemplate.postForObject(mdmsUri, mdmsCriteriaReq, Map.class); - } catch (Exception e) { - log.error("Exception occurred while fetching MDMS data: ", e); - } - return result; - } -// public Object mdmsCallForLocation (RequestInfo requestInfo, String tenantId) { -// // Call MDMS microservice with MdmsCriteriaReq as params -// -// MdmsCriteriaReq mdmsCriteriaReq = getLocRequest(requestInfo, tenantId); -// String mdmsUri = String.format("%s%s", mdmsHost, mdmsUrl); -// Object result = null; -// try { -// result = restTemplate.postForObject(mdmsUri, mdmsCriteriaReq, Map.class); -// } catch (Exception e) { -// log.error("Exception occurred while fetching MDMS data: ", e); -// } -// return result; -// } -// -// private MdmsCriteriaReq getLocRequest(RequestInfo requestInfo, String tenantId) { -// -// List moduleDetails = new LinkedList<>(); -// -// moduleDetails.addAll(getBoundaryDetails()); -// -// //Prepare MDMS Criteria wih all modules in birth-death services and common services -// -// MdmsCriteria mdmsCriteria = MdmsCriteria.builder() -// .moduleDetails(moduleDetails) -// .tenantId(tenantId) -// .build(); -// //Return MDMS criteria request for calling MDMS microservice -// return MdmsCriteriaReq.builder() -// .mdmsCriteria(mdmsCriteria) -// .requestInfo(requestInfo) -// .build(); -// } -// - private MdmsCriteriaReq getMdmsRequest(RequestInfo requestInfo) { - - List moduleDetails = new LinkedList<>(); - - List moduleDetailsLoc = new LinkedList<>(); - - //Add all modules of birth-death services - //moduleDetails.addAll(getCRModuleDetails()); - - //Add all modules of common services - // moduleDetails.addAll(getCommonModuleDetails()); - - //moduleDetails.addAll(getTenantModuleDetails()); - - //Prepare MDMS Criteria wih all modules in birth-death services and common services - - MdmsCriteria mdmsCriteria = MdmsCriteria.builder() - .moduleDetails(moduleDetails) - // .tenantId(BirthConstants.CR_MDMS_TENANT) - .build(); - //Return MDMS criteria request for calling MDMS microservice - return MdmsCriteriaReq.builder() - .mdmsCriteria(mdmsCriteria) - .requestInfo(requestInfo) - .build(); - } -// -// public List getBoundaryDetails() { -// // master details for Boundary -// -//// List crMasterDetails = new LinkedList<>(); -//// -//// List masterHospital = Collections.singletonList(MasterDetail.builder() -//// .name(BirthConstants.LOCATION_MDMS_HOSPITAL) -//// .build()); -//// crMasterDetails.addAll(masterHospital); -//// -//// List masterInstitution = Collections.singletonList(MasterDetail.builder() -//// .name(BirthConstants.LOCATION_MDMS_INSTITUTION) -//// .build()); -//// crMasterDetails.addAll(masterInstitution); -//// -//// ModuleDetail crModuleDetail = ModuleDetail.builder() -//// .masterDetails(crMasterDetails) -//// .moduleName(BirthConstants.LOCATION_MDMS_MODULE) -//// .build(); -// -// return Collections.singletonList(crModuleDetail); - - // } - -// public List getCRModuleDetails() { -// // master details for CR module -// -// List crMasterDetails = new LinkedList<>(); -// -// // -// List masterProfession = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.CR_MDMS_PROFESSION) -// .build()); -// crMasterDetails.addAll(masterProfession); -// -// // Add Module Qualification -// List masterQualification = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.CR_MDMS_QUALIFICATION) -// .build()); -// crMasterDetails.addAll(masterQualification); -// -// // Add Module Medical Attention Type -// List masterMedicalAttentionType = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_MEDICAL_ATTENTION_TYPE) -// .build()); -// crMasterDetails.addAll(masterMedicalAttentionType); -// -// // Add Module InstitutionType -// List masterInstitutionType = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.CR_MDMS_INSTITUTIONTYPE) -// .build()); -// crMasterDetails.addAll(masterInstitutionType); -// -// // Add Module DeliveryMethod -// List masterDeliveryMethod = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.CR_MDMS_DELIVERYMETHOD) -// .build()); -// crMasterDetails.addAll(masterDeliveryMethod); -// -// -// //Add masters to modules -// ModuleDetail crModuleDetail = ModuleDetail.builder() -// .masterDetails(crMasterDetails) -// .moduleName(BirthConstants.CR_MDMS_MODULE) -// .build(); -// -// return Collections.singletonList(crModuleDetail); -// -// } -// -// public List getCommonModuleDetails() { -// // master details for Common module -// -// List commonMasterDetails = new LinkedList<>(); -// // Add Module Religion -// List masterReligion = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_RELIGION) -// .build()); -// -// commonMasterDetails.addAll(masterReligion); -// // Add Module Taluk -// List masterTaluk = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_TALUK) -// .build()); -// -// commonMasterDetails.addAll(masterTaluk); -// // Add Module State -// List masterState = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_STATE) -// .build()); -// commonMasterDetails.addAll(masterState); -// // Add Module Country -// List masterCountry = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_COUNTRY) -// .build()); -// commonMasterDetails.addAll(masterCountry); -// -// -// // Add Module Village -// List masterVillage = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_VILLAGE) -// .build()); -// commonMasterDetails.addAll(masterVillage); -// -// // Add Module District -// List masterDistrict = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_DISTRICT) -// .build()); -// commonMasterDetails.addAll(masterDistrict); -// -// // Add Module Postoffice -// List masterPostOffice = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_POSTOFFICE) -// .build()); -// commonMasterDetails.addAll(masterPostOffice); -// -// // Add Module LbType -// List masterLbType = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_LBTYPE) -// .build()); -// commonMasterDetails.addAll(masterLbType); -// -// // Add Module PlaceMaster -// List masterBirthPlace = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.COMMON_MDMS_PLACEMASTER) -// .build()); -// commonMasterDetails.addAll(masterBirthPlace); -// -// ModuleDetail commonModuleDetail = ModuleDetail.builder() -// .masterDetails(commonMasterDetails) -// .moduleName(BirthConstants.COMMON_MDMS_MODULE) -// .build(); -// -// return Collections.singletonList(commonModuleDetail); -// -// } -// -// public List getTenantModuleDetails() { -// // master details for Tenant module -// moduleName = "tenant"; -// List tenantDetails = new LinkedList<>(); -// -// List masterTenants = Collections.singletonList(MasterDetail.builder() -// .name(BirthConstants.CR_MDMS_TENANTS) -// .build()); -// tenantDetails.addAll(masterTenants); -// -// ModuleDetail tenantModuleDetail = ModuleDetail.builder() -// .masterDetails(tenantDetails) -// .moduleName(BirthConstants.TENANTS_MODULE) -// .build(); -// -// return Collections.singletonList(tenantModuleDetail); -// -// } -} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java index ec40c498270..10bba581b63 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -31,14 +31,15 @@ public class WorkflowIntegrator { private final MarriageApplicationConfiguration bndConfig; private final RestTemplate restTemplate; - // private final MarriageApplicationRepository repository; + //private final MarriageApplicationRepository repository; @Autowired - public WorkflowIntegrator(RestTemplate restTemplate, MarriageApplicationConfiguration bndConfig ) { - // MarriageApplicationRepository repository + public WorkflowIntegrator(RestTemplate restTemplate, MarriageApplicationConfiguration bndConfig + ) { + // MarriageApplicationRepository repository this.restTemplate = restTemplate; this.bndConfig = bndConfig; - // this.repository=repository; + // this.repository = repository; } From 834de91336d9a81961ba8929e837d8dfa7d70e58 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Tue, 4 Apr 2023 13:17:52 +0530 Subject: [PATCH 097/420] MDMS validation --- .../validator/MarriageMDMSValidator.java | 258 +++++++++--------- 1 file changed, 134 insertions(+), 124 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index d31175b9157..007e615061e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -1,4 +1,5 @@ package org.ksmart.marriage.marriageapplication.validator; + import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -10,169 +11,178 @@ import org.springframework.util.CollectionUtils; import com.jayway.jsonpath.JsonPath; import lombok.extern.slf4j.Slf4j; - - /** - * Creates Jasmine 30.03.2023 - */ + +/** + * Creates Jasmine 30.03.2023 + */ @Component @Slf4j public class MarriageMDMSValidator { - public void validateMarriageMDMSData(MarriageDetailsRequest request,Object mdmsdata){ - Map errorMap = new HashMap<>(); - Map> masterData = getAttributeValues(mdmsdata); - - String[] masterArray = {MarriageConstants.TENANTS,MarriageConstants.GENDERTYPE, - MarriageConstants.MARITAL_STATUS,MarriageConstants.MARRIAGE_TYPE, - MarriageConstants.MARRIAGE_PLACE_TYPE}; - //MarriageConstants.MARRIAGE_PLACE - // System.out.println("Jasminemdmsdata"+mdmsdata) + public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdmsdata) { + Map errorMap = new HashMap<>(); + Map> masterData = getAttributeValues(mdmsdata); + + String[] masterArray = { MarriageConstants.TENANTS, MarriageConstants.GENDERTYPE, + MarriageConstants.MARITAL_STATUS, MarriageConstants.MARRIAGE_TYPE, + MarriageConstants.MARRIAGE_PLACE_TYPE }; + // MarriageConstants.MARRIAGE_PLACE + // System.out.println("Jasminemdmsdata"+mdmsdata) - validateIfMasterPresent(masterArray,masterData); + validateIfMasterPresent(masterArray, masterData); - if(!masterData.get(MarriageConstants.TENANTS) + if (!masterData.get(MarriageConstants.TENANTS) .contains(request.getMarriageDetails().get(0).getTenantid())) - errorMap.put("INVALID TENAND ID", "The tenand id "+ request.getMarriageDetails().get(0).getTenantid() + + errorMap.put("INVALID TENAND ID", "The tenand id " + request.getMarriageDetails().get(0).getTenantid() + " does not exists"); - if(request.getMarriageDetails().get(0).getGroomDetails().getGender() != null) { - if(!masterData.get(MarriageConstants.GENDERTYPE) + if (request.getMarriageDetails().get(0).getGroomDetails().getGender() != null) { + if (!masterData.get(MarriageConstants.GENDERTYPE) .contains(request.getMarriageDetails().get(0).getGroomDetails().getGender())) - errorMap.put("GROOM:INVALID GENDER TYPE", "The gender of the groom " + - request.getMarriageDetails().get(0).getGroomDetails().getGender()+ " is invalid"); - } - - if(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid() != null) { - if(!masterData.get(MarriageConstants.MARITAL_STATUS) - .contains(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid())) - errorMap.put("GROOM:MARITAL STATUS INVALID", "The marital status of groom " + - request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid()+ " is invalid"); + errorMap.put("GROOM:INVALID GENDER TYPE", "The gender of the groom " + + request.getMarriageDetails().get(0).getGroomDetails().getGender() + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid() != null) { + if (!masterData.get(MarriageConstants.MARITAL_STATUS) + .contains(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid())) + errorMap.put("GROOM:MARITAL STATUS INVALID", "The marital status of groom " + + request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid() + " is invalid"); } - if(request.getMarriageDetails().get(0).getMarriage_type() != null) { - if(!masterData.get(MarriageConstants.MARRIAGE_TYPE) - .contains(request.getMarriageDetails().get(0).getMarriage_type())) - errorMap.put("GROOM:TYPE OF MARRIAGE INVALID", "The marriage type " + - request.getMarriageDetails().get(0).getMarriage_type()+ " is invalid"); + if (request.getMarriageDetails().get(0).getMarriage_type() != null) { + if (!masterData.get(MarriageConstants.MARRIAGE_TYPE) + .contains(request.getMarriageDetails().get(0).getMarriage_type())) + errorMap.put("GROOM:TYPE OF MARRIAGE INVALID", "The marriage type " + + request.getMarriageDetails().get(0).getMarriage_type() + " is invalid"); } - if(request.getMarriageDetails().get(0).getPlacetype() != null) { - if(!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE) - .contains(request.getMarriageDetails().get(0).getPlacetype())) - errorMap.put("GROOM: MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + - request.getMarriageDetails().get(0).getPlacetype()+ " is invalid"); + if (request.getMarriageDetails().get(0).getPlacetype() != null) { + if (!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE) + .contains(request.getMarriageDetails().get(0).getPlacetype())) + errorMap.put("GROOM: MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + + request.getMarriageDetails().get(0).getPlacetype() + " is invalid"); } - //Jasmine 03.04.2023 + // Jasmine 03.04.2023 - if(request.getMarriageDetails().get(0).getBrideDetails().getGender() != null) { - if(!masterData.get(MarriageConstants.GENDERTYPE) - .contains(request.getMarriageDetails().get(0).getGroomDetails().getGender())) - errorMap.put("BRIDE:INVALID GENDER TYPE", "The gender of the groom " + - request.getMarriageDetails().get(0).getGroomDetails().getGender()+ " is invalid"); - } + if (request.getMarriageDetails().get(0).getBrideDetails().getGender() != null) { + if (!masterData.get(MarriageConstants.GENDERTYPE) + .contains(request.getMarriageDetails().get(0).getGroomDetails().getGender())) + errorMap.put("BRIDE:INVALID GENDER TYPE", "The gender of the groom " + + request.getMarriageDetails().get(0).getGroomDetails().getGender() + " is invalid"); + } - if(request.getMarriageDetails().get(0).getBrideDetails().getMaritalstatusid() != null) { - if(!masterData.get(MarriageConstants.MARITAL_STATUS) - .contains(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid())) - errorMap.put("BRIDE:MARITAL STATUS INVALID", "The marital status of groom " + - request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid()+ " is invalid"); + if (request.getMarriageDetails().get(0).getBrideDetails().getMaritalstatusid() != null) { + if (!masterData.get(MarriageConstants.MARITAL_STATUS) + .contains(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid())) + errorMap.put("BRIDE:MARITAL STATUS INVALID", "The marital status of groom " + + request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid() + " is invalid"); + } + // MASTER DETAILS VALIDATION + + if (request.getMarriageDetails().get(0).getDistrictid() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getDistrictid())) + errorMap.put(" DISTRICT NAME INVALID", "The district name of marriage place " + + request.getMarriageDetails().get(0).getDistrictid() + " is invalid"); + } + if (request.getMarriageDetails().get(0).getTalukid() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains(request.getMarriageDetails().get(0).getTalukid())) + errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + + request.getMarriageDetails().get(0).getTalukid() + " is invalid"); } - //MASTER DETAILS VALIDATION - - if(request.getMarriageDetails().get(0).getDistrictid() != null) { - if(!masterData.get(MarriageConstants.DISTRICT) - .contains(request.getMarriageDetails().get(0).getDistrictid())) - errorMap.put(" DISTRICT NAME INVALID", "The district name of marriage place " + - request.getMarriageDetails().get(0).getDistrictid()+ " is invalid"); - } - if(request.getMarriageDetails().get(0).getTalukid() != null) { - if(!masterData.get(MarriageConstants.TALUK) - .contains(request.getMarriageDetails().get(0).getTalukid())) - errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + - request.getMarriageDetails().get(0).getTalukid()+ " is invalid"); - } - //have to change as villageId - if(request.getMarriageDetails().get(0).getVillage_name() != null) { - if(!masterData.get(MarriageConstants.VILLAGE) - .contains(request.getMarriageDetails().get(0).getVillage_name())) - errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + - request.getMarriageDetails().get(0).getVillage_name()+ " is invalid"); - } - if(request.getMarriageDetails().get(0).getLbtype() != null) { - if(!masterData.get(MarriageConstants.LBTYPE) - .contains(request.getMarriageDetails().get(0).getLbtype())) - errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + - request.getMarriageDetails().get(0).getLbtype()+ " is invalid"); - } - // if(request.getMarriageDetails().get(0).getWard_code() != null) { - // if(!masterData.get(MarriageConstants.WARD) - // .contains(request.getMarriageDetails().get(0).getWard_code())) - // errorMap.put(" LB TYPE INVALID", "The LBTYpe of marriage place " + - // request.getMarriageDetails().get(0).getWard_code()+ " is invalid"); - // } - - //ADDRESS VALIDATION - - if(request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent() != null) { - if(!masterData.get(MarriageConstants.DISTRICT) + // have to change as villageId + if (request.getMarriageDetails().get(0).getVillage_name() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains(request.getMarriageDetails().get(0).getVillage_name())) + errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + + request.getMarriageDetails().get(0).getVillage_name() + " is invalid"); + } + if (request.getMarriageDetails().get(0).getLbtype() != null) { + if (!masterData.get(MarriageConstants.LBTYPE) + .contains(request.getMarriageDetails().get(0).getLbtype())) + errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + + request.getMarriageDetails().get(0).getLbtype() + " is invalid"); + } + // if(request.getMarriageDetails().get(0).getWard_code() != null) { + // if(!masterData.get(MarriageConstants.WARD) + // .contains(request.getMarriageDetails().get(0).getWard_code())) + // errorMap.put(" LB TYPE INVALID", "The LBTYpe of marriage place " + + // request.getMarriageDetails().get(0).getWard_code()+ " is invalid"); + // } + + // ADDRESS VALIDATION + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent() != null) { + if (!masterData.get(MarriageConstants.COUNTRY) .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent())) - errorMap.put("GROOM: COUNTRY NAME INVALID", "The country name of groom " + - request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent()+ " is invalid"); + errorMap.put("GROOM PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent() + + " is invalid"); } - // if(request.getMarriageDetails().get(0).getTalukid() != null) { - // if(!masterData.get(MarriageConstants.TALUK) - // .contains(request.getMarriageDetails().get(0).getTalukid())) - // errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + - // request.getMarriageDetails().get(0).getTalukid()+ " is invalid"); + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPermanent() != null) { + if (!masterData.get(MarriageConstants.STATE) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPermanent())) + errorMap.put("GROOM PERMANENT ADDRESS: STATE NAME INVALID", "The state name of groom " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPermanent() + + " is invalid"); + } + // if(request.getMarriageDetails().get(0).getTalukid() != null) { + // if(!masterData.get(MarriageConstants.TALUK) + // .contains(request.getMarriageDetails().get(0).getTalukid())) + // errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + + // request.getMarriageDetails().get(0).getTalukid()+ " is invalid"); // } // //have to change as villageId - // if(request.getMarriageDetails().get(0).getVillage_name() != null) { - // if(!masterData.get(MarriageConstants.VILLAGE) - // .contains(request.getMarriageDetails().get(0).getVillage_name())) - // errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + - // request.getMarriageDetails().get(0).getVillage_name()+ " is invalid"); + // if(request.getMarriageDetails().get(0).getVillage_name() != null) { + // if(!masterData.get(MarriageConstants.VILLAGE) + // .contains(request.getMarriageDetails().get(0).getVillage_name())) + // errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + + // request.getMarriageDetails().get(0).getVillage_name()+ " is invalid"); // } - // if(request.getMarriageDetails().get(0).getLbtype() != null) { - // if(!masterData.get(MarriageConstants.LBTYPE) - // .contains(request.getMarriageDetails().get(0).getLbtype())) - // errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + - // request.getMarriageDetails().get(0).getLbtype()+ " is invalid"); - + // if(request.getMarriageDetails().get(0).getLbtype() != null) { + // if(!masterData.get(MarriageConstants.LBTYPE) + // .contains(request.getMarriageDetails().get(0).getLbtype())) + // errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + + // request.getMarriageDetails().get(0).getLbtype()+ " is invalid"); - if(!CollectionUtils.isEmpty(errorMap)) + if (!CollectionUtils.isEmpty(errorMap)) throw new CustomException(errorMap); } - //Rakhi S ikm on 14.02.2023 - private Map> getAttributeValues(Object mdmsdata){ + + // Rakhi S ikm on 14.02.2023 + private Map> getAttributeValues(Object mdmsdata) { List modulepaths = Arrays.asList(MarriageConstants.TENANT_JSONPATH, - MarriageConstants.COMMON_MASTER_JSONPATH, - MarriageConstants.BND_LIST_JSONPATH); + MarriageConstants.COMMON_MASTER_JSONPATH, + MarriageConstants.BND_LIST_JSONPATH); final Map> mdmsResMap = new HashMap<>(); - //System.out.println("Jasminemodulepaths"+modulepaths); + // System.out.println("Jasminemodulepaths"+modulepaths); modulepaths.forEach(modulepath -> { try { - mdmsResMap.putAll(JsonPath.read(mdmsdata,modulepath)); - log.error("jsonpath1"+JsonPath.read(mdmsdata,modulepath)); + mdmsResMap.putAll(JsonPath.read(mdmsdata, modulepath)); + log.error("jsonpath1" + JsonPath.read(mdmsdata, modulepath)); } catch (Exception e) { - log.error("Error while fetching MDMS data",e); - throw new CustomException( MarriageConstants .INVALID_TENANT_ID_MDMS_KEY, - MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); + log.error("Error while fetching MDMS data", e); + throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, + MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); } - + }); return mdmsResMap; } - //Rakhi S ikm on 14.02.2023 - private void validateIfMasterPresent(String[] masterNames, Map> codes){ - Map errorMap = new HashMap<>(); - for(String masterName : masterNames){ - if(!codes.containsKey(masterName)){ - errorMap.put("MDMS DATA ERROR ","Unable to fetch "+ masterName + " codes from MDMS "); + + // Rakhi S ikm on 14.02.2023 + private void validateIfMasterPresent(String[] masterNames, Map> codes) { + Map errorMap = new HashMap<>(); + for (String masterName : masterNames) { + if (!codes.containsKey(masterName)) { + errorMap.put("MDMS DATA ERROR ", "Unable to fetch " + masterName + " codes from MDMS "); } } - if(!errorMap.isEmpty()) + if (!errorMap.isEmpty()) throw new CustomException(errorMap); } } From 1596ef98f28e9b6e64ce8502cbdb5072068d7b2f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 4 Apr 2023 13:46:57 +0530 Subject: [PATCH 098/420] fix --- .../src/main/resources/marriage.yml | 16 ++++----- .../enrichment/MarriageDetailsEnrichment.java | 28 +++++++-------- .../model/MarriageApplicationDetails.java | 35 +++++-------------- 3 files changed, 28 insertions(+), 51 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index e48defd1400..4b240ef57d9 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -393,11 +393,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOutSideIndiaProvinceEn - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaPostCode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePresent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl @@ -550,11 +550,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOutSideIndiaProvinceEn - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaPostCode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl @@ -1080,11 +1080,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOutSideIndiaProvinceEn - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaPostCode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePresent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl @@ -1163,11 +1163,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOutSideIndiaProvinceEn - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaPostCode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index ee51157e7fa..32419c02d20 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -111,9 +111,9 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setBrideGroomPresent("G"); } - if (marriage.getGroomAddressDetails() != null && marriage.getGroomAddressDetails().getIsPermanentAddress() != null) { + if (marriage.getGroomAddressDetails() != null && marriage.getGroomAddressDetails().getIsPermanentAddress() != null) { marriage.getGroomAddressDetails().setIsPermanentAddressInt(marriage.getGroomAddressDetails().getIsPermanentAddress() == true ? 1 : 0); - if(marriage.getGroomAddressDetails().getIsPermanentAddress()) { + if (marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { @@ -127,7 +127,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { if (marriage.getGroomAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { if (marriage.getGroomAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { - if(!marriage.getGroomAddressDetails().getIsPermanentAddress()){ + if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); } @@ -147,8 +147,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); - } - else { + } else { if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); @@ -174,8 +173,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { } } - - else { + } else { if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); @@ -194,13 +192,13 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { } } - } } + }); @@ -276,7 +274,9 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { else { if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); @@ -329,7 +329,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { if (marriage.getBrideAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { - if(!marriage.getBrideAddressDetails().getIsPermanentAddress()){ + if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); } @@ -349,8 +349,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); - } - else { + } else { if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); @@ -376,9 +375,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); } - } - - else { + } else { if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentOutSideCountry()); marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); @@ -397,11 +394,10 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); - } } - } + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java index f52aa9ae111..1af711f7efe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java @@ -117,33 +117,6 @@ public class MarriageApplicationDetails { @Size(max = 2500) @JsonProperty("marriageHouseNoAndNameMl") private String marriageHouseNoAndNameMl; -// -// @Size(max = 1000) -// @JsonProperty("marriageReligiousInstitutionOther") -// private String marriageReligiousInstitutionOther; -// -// @Size(max = 1000) -// @JsonProperty("marriagePublicOrPrivatePlace") -// private String marriagePublicOrPrivatePlace; -// -// @Size(max = 2500) -// @JsonProperty("marriagePublicOrPrivateNamePlaceEn") -// private String marriagePublicOrPrivateNamePlaceEn; -// @Size(max = 2500) -// @JsonProperty("marriagePublicOrPrivateNamePlaceMl") -// private String marriagePublicOrPrivateNamePlaceMl; -// -// -// @Size(max = 1000) -// @JsonProperty("marriageReligiousInstitution") -// private String marriageReligiousInstitution; -// -// @Size(max = 2500) -// @JsonProperty("marriageReligiousInstitutionOtherNameEn") -// private String marriageReligiousInstitutionOtherNameEn; -// @Size(max = 2500) -// @JsonProperty("marriageReligiousInstitutionOtherNameMl") -// private String marriageReligiousInstitutionOtherNameMl; @Size(max = 64) @JsonProperty("applicationNumber") @@ -176,6 +149,14 @@ public class MarriageApplicationDetails { @JsonProperty("status") private String status; + @Size(max = 64) + @JsonProperty("villageId") + private String villageId; + + @Size(max = 1000) + @JsonProperty("talukName") + private String talukName; + @JsonProperty("assignee") private List assignees; From 2d08db6899e8a4f0b8c506cc0e57b4ef53495e43 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Wed, 5 Apr 2023 10:14:12 +0530 Subject: [PATCH 099/420] MDMS validations --- .../validator/MarriageMDMSValidator.java | 403 +++++++++++++++++- .../marriage/utils/MarriageConstants.java | 2 + 2 files changed, 398 insertions(+), 7 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index 007e615061e..ddb83c1591c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -114,21 +114,410 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms // } // ADDRESS VALIDATION - - if (request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent() != null) { + // Anu.l.s + // groom PERMANENT address details////////////////////// + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry() != null) { if (!masterData.get(MarriageConstants.COUNTRY) - .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent())) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry())) errorMap.put("GROOM PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + - request.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent() + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry() + " is invalid"); } - if (request.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPermanent() != null) { + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressStateName() != null) { if (!masterData.get(MarriageConstants.STATE) - .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPermanent())) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressStateName())) errorMap.put("GROOM PERMANENT ADDRESS: STATE NAME INVALID", "The state name of groom " + - request.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPermanent() + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressStateName() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPermntInKeralaAdrDistrict())) + errorMap.put("GROOM PERMANENT ADDRESS: DISTRICT NAME INVALID", + "groom district inside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPermntInKeralaAdrDistrict() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPermntOutsideKeralaDistrict())) + errorMap.put("GROOM PERMANENT ADDRESS: DISTRICT INVALID", "groom district outside kerala is " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaDistrict() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrTaluk())) + errorMap.put("GROOM PERMANENT ADDRESS: TALUK NAME INVALID", "groom taluk inside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrTaluk() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains( + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk())) + errorMap.put("GROOM PERMANENT ADDRESS: TALUK NAME INVALID", "groom taluk outside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaVillage() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPermntOutsideKeralaVillage())) + errorMap.put("GROOM PERMANENT ADDRESS: VILLAGE NAME INVALID", + "groom village outside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPermntOutsideKeralaVillage() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains( + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrVillage())) + errorMap.put("GROOM PERMANENT ADDRESS: VILLAGE NAME INVALID", + "groom village inside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPermntInKeralaAdrVillage() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { + if (!masterData.get(MarriageConstants.TENANTS) + .contains( + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrLBName())) + errorMap.put("GROOM PERMANENT ADDRESS: LB NAME INVALID", "groom lbname inside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrLBName() + + " is invalid"); + } + // System.out.println("ousidetaluk"+request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaWardNo() + // ); + // if + // (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaWardNo() + // != null) { + // if (!masterData.get(MarriageConstants.WARD) + // .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaWardNo())) + // errorMap.put("GROOM PERMANENT ADDRESS: WARD INVALID", "The ward of groom " + + // request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaWardNo() + // + " is invalid"); + // } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + if (!masterData.get(MarriageConstants.POSTOFFICE) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPermntInKeralaAdrPostOffice())) + errorMap.put("GROOM PERMANENT ADDRESS: POST OFFICE INVALID", + "groom post office inside kerala is invalid" + + request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPermntInKeralaAdrPostOffice() + + " is invalid"); + } + + // GROOM PRESENT ADDRESS//////////// + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressCountry() != null) { + System.out.println("isExists"); + if (!masterData.get(MarriageConstants.COUNTRY) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressCountry())) + errorMap.put("GROOM PRESENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressCountry() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressStateName() != null) { + if (!masterData.get(MarriageConstants.STATE) + .contains( + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressStateName())) + errorMap.put("GROOM PRESENT ADDRESS: STATE NAME INVALID", "The state name of groom " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressStateName() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaDistrict() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPresentInsideKeralaDistrict())) + errorMap.put("GROOM PRESENT ADDRESS: DISTRICT INVALID", "groom district inside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaDistrict() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPresentOutsideKeralaDistrict())) + errorMap.put("GROOM PRESENT ADDRESS: DISTRICT INVALID", "groom district outside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaDistrict() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaTaluk() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains( + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaTaluk())) + errorMap.put("GROOM PRESENT ADDRESS: TALUK NAME INVALID", "groom taluk inside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaTaluk() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPresentOutsideKeralaTalukName())) + errorMap.put("GROOM PRESENT ADDRESS: TALUK NAME INVALID", "groom taluk outside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaTalukName() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPresentOutsideKeralaVillageName())) + errorMap.put("GROOM PRESENT ADDRESS: VILLAGE NAME INVALID", "groom village outdide kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPresentOutsideKeralaVillageName() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPresentInsideKeralaVillage())) + errorMap.put("GROOM PRESENT ADDRESS: VILLAGE NAME INVALID", "groom village inside kerala" + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaVillage() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { + if (!masterData.get(MarriageConstants.TENANTS) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPresentInsideKeralaLBName())) + errorMap.put("GROOM PRESENT ADDRESS: LB NAME INVALID", "groom lbname inside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaLBName() + + " is invalid"); + } + // // + // System.out.println("ousidetaluk"+request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaWardNo() + // ); + // // if + // (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaWardNo() + // != null) { + // // if (!masterData.get(MarriageConstants.WARD) + // // + // .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaWardNo())) + // // errorMap.put("GROOM PERMANENT ADDRESS: WARD INVALID", "The ward of groom " + // + + // // + // request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaWardNo() + // // + " is invalid"); + // // } + if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null) { + if (!masterData.get(MarriageConstants.POSTOFFICE) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + .getPresentInsideKeralaPostOffice())) + errorMap.put("GROOM PRESENT ADDRESS: POST OFFICE INVALID", "groom post office inside kerala " + + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaPostOffice() + + " is invalid"); + } + ///////////////////////////// end of groom address + ///////////////////////////// details///////////////////////////////////////////// + // bride PERMANENT address details////////////////////// + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressCountry() != null) { + if (!masterData.get(MarriageConstants.COUNTRY) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressCountry())) + errorMap.put("BRIDE PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of bride " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressCountry() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressStateName() != null) { + if (!masterData.get(MarriageConstants.STATE) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressStateName())) + errorMap.put("BRIDE PERMANENT ADDRESS: STATE NAME INVALID", "The state name of bride " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressStateName() + " is invalid"); } + + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPermntInKeralaAdrDistrict())) + errorMap.put("BRIDE PERMANENT ADDRESS: DISTRICT NAME INVALID", "bride district inside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrDistrict() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPermntOutsideKeralaDistrict())) + errorMap.put("BRIDE PERMANENT ADDRESS: DISTRICT INVALID", "bride district ouside kerala" + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaDistrict() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrTaluk())) + errorMap.put("BRIDE PERMANENT ADDRESS: TALUK NAME INVALID", "bride taluk inside kerala" + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrTaluk() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains( + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk())) + errorMap.put("BRIDE PERMANENT ADDRESS: TALUK NAME INVALID", "bride taluk ouside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaVillage() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPermntOutsideKeralaVillage())) + errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "bride village outside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaVillage() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains( + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage())) + errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "Tbride village inside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName() != null) { + if (!masterData.get(MarriageConstants.TENANTS) + .contains( + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName())) + errorMap.put("BRIDE PERMANENT ADDRESS: LB NAME INVALID", "bride lbname inside kerala" + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName() + + " is invalid"); + } + // // + // System.out.println("ousidetaluk"+request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // // ); + // // if + // (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // != null) { + // if (!masterData.get(MarriageConstants.WARD) + // .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo())) + // errorMap.put("GROOM PERMANENT ADDRESS: WARD INVALID", "The ward of bride " + + // request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // + " is invalid"); + // } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + if (!masterData.get(MarriageConstants.POSTOFFICE) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPermntInKeralaAdrPostOffice())) + errorMap.put("BRIDE PERMANENT ADDRESS: POST OFFICE INVALID", "bride post office inside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrPostOffice() + + " is invalid"); + } + + // BRIDE PRESENT ADDRESS//////////// + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentaddressCountry() != null) { + System.out.println("isExists"); + if (!masterData.get(MarriageConstants.COUNTRY) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentaddressCountry())) + errorMap.put("BRIDE PRESENT ADDRESS: COUNTRY NAME INVALID", "The country name of bride " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentaddressCountry() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentaddressStateName() != null) { + if (!masterData.get(MarriageConstants.STATE) + .contains( + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentaddressStateName())) + errorMap.put("BRIDE PRESENT ADDRESS: STATE NAME INVALID", "The state name of bride " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentaddressStateName() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaDistrict() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPresentInsideKeralaDistrict())) + errorMap.put("BRIDE PRESENT ADDRESS: DISTRICT INVALID", "bride district inside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaDistrict() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaDistrict() != null) { + if (!masterData.get(MarriageConstants.DISTRICT) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPresentOutsideKeralaDistrict())) + errorMap.put("BRIDE PRESENT ADDRESS: DISTRICT INVALID", "bride district outside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaDistrict() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaTaluk() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains( + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaTaluk())) + errorMap.put("BRIDE PRESENT ADDRESS: TALUK NAME INVALID", "bride taluk inside kerala" + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaTaluk() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaTalukName() != null) { + if (!masterData.get(MarriageConstants.TALUK) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPresentOutsideKeralaTalukName())) + errorMap.put("BRIDE PRESENT ADDRESS: TALUK NAME INVALID", "bride taluk outside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaTalukName() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaVillageName() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPresentOutsideKeralaVillageName())) + errorMap.put("BRIDE PRESENT ADDRESS: VILLAGE NAME INVALID", "bride village outside kerala" + + request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPresentOutsideKeralaVillageName() + + " is invalid"); + } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaVillage() != null) { + if (!masterData.get(MarriageConstants.VILLAGE) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPresentInsideKeralaVillage())) + errorMap.put("BRIDE PRESENT ADDRESS: VILLAGE NAME INVALID", "bride village inside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaVillage() + + " is invalid"); + } + + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaLBName() != null) { + if (!masterData.get(MarriageConstants.TENANTS) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPresentInsideKeralaLBName())) + errorMap.put("BRIDE PRESENT ADDRESS: LB NAME INVALID", "bride lbname inside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaLBName() + + " is invalid"); + } + + // System.out.println("ousidetaluk"+request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // ); + // // if + // (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // != null) { + // // if (!masterData.get(MarriageConstants.WARD) + // // + // .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo())) + // // errorMap.put("GROOM PERMANENT ADDRESS: WARD INVALID", "The ward of bride " + // + + // // + // request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // // + " is invalid"); + // } + if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaPostOffice() != null) { + if (!masterData.get(MarriageConstants.POSTOFFICE) + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + .getPresentInsideKeralaPostOffice())) + errorMap.put("BRIDE PRESENT ADDRESS: POST OFFICE INVALID", "bride post office inside kerala " + + request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaPostOffice() + + " is invalid"); + } + ///////////////////////////// end of bride address + ///////////////////////////// details///////////////////////////////////////////// + // if(request.getMarriageDetails().get(0).getTalukid() != null) { // if(!masterData.get(MarriageConstants.TALUK) // .contains(request.getMarriageDetails().get(0).getTalukid())) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 33fd95bf039..60cb7111439 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -130,6 +130,8 @@ public class MarriageConstants { public static final String POSTOFFICE = "PostOffice"; + public static final String WARD="TenantBoundary"; + public static final String BND_MODULE_NAME = "birth-death-service"; public static final String MARRIAGE_PLACE_TYPE = "MarriagePlaceType"; From 6192de09cc24bb5b7d6575844d82e46dbeb4dcb7 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Wed, 5 Apr 2023 10:25:12 +0530 Subject: [PATCH 100/420] MDMS validations --- .../validator/MarriageMDMSValidator.java | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index ddb83c1591c..1a7ef91fdb7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -115,7 +115,7 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms // ADDRESS VALIDATION // Anu.l.s - // groom PERMANENT address details////////////////////// + // ***********************************groom PERMANENT address detail*********************************************************// if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry() != null) { if (!masterData.get(MarriageConstants.COUNTRY) .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry())) @@ -217,7 +217,7 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms + " is invalid"); } - // GROOM PRESENT ADDRESS//////////// + //************************************************* */ GROOM PRESENT ADDRESS***************************************************// if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressCountry() != null) { System.out.println("isExists"); if (!masterData.get(MarriageConstants.COUNTRY) @@ -318,9 +318,8 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaPostOffice() + " is invalid"); } - ///////////////////////////// end of groom address - ///////////////////////////// details///////////////////////////////////////////// - // bride PERMANENT address details////////////////////// + //****************************** */ end of groom address details***************************************// + //****************************** */ bride PERMANENT address details********************************************// if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressCountry() != null) { if (!masterData.get(MarriageConstants.COUNTRY) .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressCountry())) @@ -394,15 +393,15 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms + " is invalid"); } // // - // System.out.println("ousidetaluk"+request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // System.out.println("ousidetaluk"+request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentWardNo() // // ); // // if - // (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentWardNo() // != null) { // if (!masterData.get(MarriageConstants.WARD) - // .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo())) - // errorMap.put("GROOM PERMANENT ADDRESS: WARD INVALID", "The ward of bride " + - // request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaWardNo() + // .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentWardNo())) + // errorMap.put("BRIDE PERMANENT ADDRESS: WARD INVALID", "The ward of bride " + + // request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentWardNo() // + " is invalid"); // } if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null) { @@ -515,8 +514,7 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaPostOffice() + " is invalid"); } - ///////////////////////////// end of bride address - ///////////////////////////// details///////////////////////////////////////////// + //********************************* * end of bride address details************************************************// // if(request.getMarriageDetails().get(0).getTalukid() != null) { // if(!masterData.get(MarriageConstants.TALUK) From c88387a563d9c8f5841236d66bfaf8e87f2ed6d2 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Wed, 5 Apr 2023 10:38:59 +0530 Subject: [PATCH 101/420] Field validation --- .../MarriageApplicationValidator.java | 531 +++++++++--------- 1 file changed, 265 insertions(+), 266 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index fbe3dd7b104..58c3ba51fd0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -55,82 +55,82 @@ public void validateCommonFields(MarriageDetailsRequest request) { WitnessDetails witnessDtls = marriagedtls.getWitnessDetails(); if (marriagedtls.getDateofmarriage() <= 0) { - throw new CustomException("DECEASED DATE OF MARRIAGE INVALID", - "The deceased Date of marriage" + + throw new CustomException(" DATE OF MARRIAGE INVALID", + "The Date of marriage" + groomInfo.getResidentship() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getDistrictid())) { - throw new CustomException("DECEASED DISTRICT INVALID", "The deceased District" + + throw new CustomException(" DISTRICT INVALID", "The District" + marriagedtls.getDistrictid() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getTalukid())) { - throw new CustomException("DECEASED TALUK INVALID", "The deceased Taluk" + + throw new CustomException(" TALUK INVALID", "The Taluk" + marriagedtls.getTalukid() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getVillage_name())) { - throw new CustomException("DECEASED VILLAGE INVALID", "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", "The Village" + marriagedtls.getVillage_name() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getLbtype())) { - throw new CustomException("DECEASED LB TYPE INVALID", "The deceased LB type " + + throw new CustomException(" LB TYPE INVALID", "The LB type " + marriagedtls.getLbtype() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getWard_code())) { - throw new CustomException("DECEASED LB TYPE INVALID", "The deceased LB type " + + throw new CustomException(" LB TYPE INVALID", "The LB type " + marriagedtls.getWard_code() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getPlacetype())) { - throw new CustomException("DECEASED MARRIAGE PLACE TYPE INVALID", - "The deceased Place type " + + throw new CustomException(" MARRIAGE PLACE TYPE INVALID", + "The Place type " + marriagedtls.getPlacetype() + " is invalid"); } else { if (marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_HOUSE)) { if (StringUtils.isEmpty(marriagedtls.getLocality_en())) { - throw new CustomException("DECEASED MARRIAGE PLACE LOCALITY ENGLISH INVALID", - "The deceased Place Locality Name in English " + + throw new CustomException(" MARRIAGE PLACE LOCALITY ENGLISH INVALID", + "The Place Locality Name in English " + marriagedtls.getLocality_en() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getLocality_ml())) { - throw new CustomException("DECEASED MARRIAGE PLACE LOCALITY MALAYALAM INVALID", - "The deceased Place Locality Name in Malayalam " + + throw new CustomException(" MARRIAGE PLACE LOCALITY MALAYALAM INVALID", + "The Place Locality Name in Malayalam " + marriagedtls.getLocality_ml() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameEn())) { - throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", - "The deceased House Name English " + + throw new CustomException(" HOUSE NAME ENGLISH INVALID", + "The House Name English " + marriagedtls.getMarriageHouseNoAndNameEn() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameMl())) { - throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", - "The deceased House Name Malayalam " + + throw new CustomException(" HOUSE NAME MALAYALAM INVALID", + "The House Name Malayalam " + marriagedtls.getMarriageHouseNoAndNameMl() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getLandmark())) { - throw new CustomException("DECEASED LANDMARK IS INVALID", "The deceased Landmark" + + throw new CustomException(" LANDMARK IS INVALID", "The Landmark" + marriagedtls.getLandmark() + " is invalid"); } } if (marriagedtls.getPlacetype() .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION)) { if (StringUtils.isEmpty(marriagedtls.getPlacenameEn())) { - throw new CustomException("DECEASED PLACE NAME ENGLISH IS INVALID", - "The deceased Place Name English" + + throw new CustomException(" PLACE NAME ENGLISH IS INVALID", + "The Place Name English" + marriagedtls.getPlacenameEn() + " is invalid"); } else { if (marriagedtls.getPlacenameEn().equals(MarriageConstants.PLACE_OTHER)) { if (StringUtils.isEmpty(marriagedtls.getPlacenameEn())) { - throw new CustomException("DECEASED PLACE NAME ENGLISH IS INVALID", - "The deceased Place Name English" + + throw new CustomException(" PLACE NAME ENGLISH IS INVALID", + "The Place Name English" + marriagedtls.getPlacenameEn() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getPlacenameMl())) { - throw new CustomException("DECEASED PLACE NAME MALAYALAM IS INVALID", - "The deceased Place Name Malayalam" + + throw new CustomException(" PLACE NAME MALAYALAM IS INVALID", + "The Place Name Malayalam" + marriagedtls.getPlacenameMl() + " is invalid"); } } @@ -141,28 +141,28 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(groomInfo.getResidentship())) { - throw new CustomException("DECEASED RESIDENTSHIP INVALID", "The deceased resident" + + throw new CustomException(" RESIDENTSHIP INVALID", "The resident" + groomInfo.getResidentship() + " is invalid"); } else { if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_INDIAN)) { if (StringUtils.isEmpty(groomInfo.getAadharno())) { - throw new CustomException("DECEASED AADHAR INVALID", "The deceased Aadhar number" + + throw new CustomException(" AADHAR INVALID", "The Aadhar number" + groomInfo.getAadharno() + " is invalid"); } } else if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_NRI)) { if (StringUtils.isEmpty(groomInfo.getPassportno())) { - throw new CustomException("DECEASED PASSPORT NUMBER INVALID", - "The deceased Passport number" + + throw new CustomException(" PASSPORT NUMBER INVALID", + "The Passport number" + groomInfo.getPassportno() + " is invalid"); } } else if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_FOREIGN)) { if (StringUtils.isEmpty(groomInfo.getPassportno()) && StringUtils.isEmpty(groomInfo.getSocialsecurityno())) { throw new CustomException( - "DECEASED PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID", - "The deceased Passport number and Social security number" + + " PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID", + "The Passport number and Social security number" + groomInfo.getPassportno() + "and" + groomInfo.getSocialsecurityno() + " is invalid"); } @@ -171,11 +171,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(groomInfo.getFirstname_en())) { - throw new CustomException("DECEASED NAME INVALID", "The deceased name in english" + + throw new CustomException(" NAME INVALID", "The name in english" + groomInfo.getFirstname_en() + " is invalid"); } if (StringUtils.isEmpty(groomInfo.getFirstname_ml())) { - throw new CustomException("DECEASED NAME INVALID", "The deceased name in malayalam" + + throw new CustomException(" NAME INVALID", "The name in malayalam" + groomInfo.getFirstname_ml() + " is invalid"); } if (groomInfo.getMobile() <= 0) { @@ -183,7 +183,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomInfo.getMobile() + " is invalid"); } if (StringUtils.isEmpty(groomInfo.getGender())) { - throw new CustomException("DECEASED GENDER INVALID", "The deceased gender" + + throw new CustomException(" GENDER INVALID", "The gender" + groomInfo.getGender() + " is invalid"); } if ((groomInfo.getDateofbirth() <= 0)) { @@ -191,16 +191,16 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(groomInfo.getFather_aadharno())) { - throw new CustomException("DECEASED AADHAR INVALID", "The deceased Father Aadhar number" + + throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + groomInfo.getFather_aadharno() + " is invalid"); } if (StringUtils.isEmpty(groomInfo.getMother_aadharno())) { - throw new CustomException("DECEASED AADHAR INVALID", "The deceased Father Aadhar number" + + throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + groomInfo.getMother_aadharno() + " is invalid"); } if (StringUtils.isEmpty(groomInfo.getMaritalstatusid())) { - throw new CustomException("DECEASED MARITAL STATUS INVALID", - "The deceased Marital status" + + throw new CustomException(" MARITAL STATUS INVALID", + "The Marital status" + groomInfo.getMaritalstatusid() + " is invalid"); } // else { @@ -209,9 +209,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { // { // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE // INVALID", - // "The deceased Is spouse living and no of spouse living" + + // "The Is spouse living and no of spouse living" + // groomInfo.getGroomIsSpouseLiving() + "and" // + groomInfo.getGroomNoOfSpouse() + " is invalid"); // } @@ -221,9 +221,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { // { // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE // INVALID", - // "The deceased Is spouse living and no of spouse living" + + // "The Is spouse living and no of spouse living" + // groomInfo.getGroomIsSpouseLiving() + "and" // + groomInfo.getGroomNoOfSpouse() + " is invalid"); // } @@ -233,9 +233,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { // { // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE // INVALID", - // "The deceased Is spouse living and no of spouse living" + + // "The Is spouse living and no of spouse living" + // groomInfo.getGroomIsSpouseLiving() + "and" // + groomInfo.getGroomNoOfSpouse() + " is invalid"); // } @@ -245,9 +245,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { // { // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE // INVALID", - // "The deceased Is spouse living and no of spouse living" + + // "The Is spouse living and no of spouse living" + // groomInfo.getGroomIsSpouseLiving() + "and" // + groomInfo.getGroomNoOfSpouse() + " is invalid"); // } @@ -255,28 +255,28 @@ public void validateCommonFields(MarriageDetailsRequest request) { // } if (StringUtils.isEmpty(brideInfo.getResidentship())) { - throw new CustomException("DECEASED RESIDENTSHIP INVALID", "The deceased resident" + + throw new CustomException("DECESED RESIDENTSHIP INVALID", "The resident" + brideInfo.getResidentship() + " is invalid"); } else { if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_INDIAN)) { if (StringUtils.isEmpty(brideInfo.getAadharno())) { - throw new CustomException("DECEASED AADHAR INVALID", "The deceased Aadhar number" + + throw new CustomException(" AADHAR INVALID", "The Aadhar number" + brideInfo.getAadharno() + " is invalid"); } } else if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_NRI)) { if (StringUtils.isEmpty(brideInfo.getPassportno())) { - throw new CustomException("DECEASED PASSPORT NUMBER INVALID", - "The deceased Passport number" + + throw new CustomException(" PASSPORT NUMBER INVALID", + "The Passport number" + brideInfo.getPassportno() + " is invalid"); } } else if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_FOREIGN)) { if (StringUtils.isEmpty(brideInfo.getPassportno()) && StringUtils.isEmpty(brideInfo.getSocialsecurityno())) { throw new CustomException( - "DECEASED PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID", - "The deceased Passport number and Social security number" + + " PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID", + "The Passport number and Social security number" + brideInfo.getPassportno() + "and" + brideInfo.getSocialsecurityno() + " is invalid"); } @@ -285,11 +285,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(brideInfo.getFirstname_en())) { - throw new CustomException("DECEASED NAME INVALID", "The deceased name in english" + + throw new CustomException(" NAME INVALID", "The name in english" + brideInfo.getFirstname_en() + " is invalid"); } if (StringUtils.isEmpty(brideInfo.getFirstname_ml())) { - throw new CustomException("DECEASED NAME INVALID", "The deceased name in malayalam" + + throw new CustomException(" NAME INVALID", "The name in malayalam" + brideInfo.getFirstname_ml() + " is invalid"); } if (brideInfo.getMobile() <= 0) { @@ -297,7 +297,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideInfo.getMobile() + " is invalid"); } if (StringUtils.isEmpty(brideInfo.getGender())) { - throw new CustomException("DECEASED GENDER INVALID", "The deceased gender" + + throw new CustomException(" GENDER INVALID", "The gender" + brideInfo.getGender() + " is invalid"); } if ((brideInfo.getDateofbirth() <= 0)) { @@ -305,16 +305,16 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(brideInfo.getFather_aadharno())) { - throw new CustomException("DECEASED AADHAR INVALID", "The deceased Father Aadhar number" + + throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + brideInfo.getFather_aadharno() + " is invalid"); } if (StringUtils.isEmpty(brideInfo.getMother_aadharno())) { - throw new CustomException("DECEASED AADHAR INVALID", "The deceased Father Aadhar number" + + throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + brideInfo.getMother_aadharno() + " is invalid"); } if (StringUtils.isEmpty(brideInfo.getMaritalstatusid())) { - throw new CustomException("DECEASED MARITAL STATUS INVALID", - "The deceased Marital status" + + throw new CustomException(" MARITAL STATUS INVALID", + "The Marital status" + brideInfo.getMaritalstatusid() + " is invalid"); } // else { @@ -323,9 +323,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { // { // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE // INVALID", - // "The deceased Is spouse living and no of spouse living" + + // "The Is spouse living and no of spouse living" + // brideInfo.getGroomIsSpouseLiving() + "and" // + brideInfo.getGroomNoOfSpouse() + " is invalid"); // } @@ -335,9 +335,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { // { // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE // INVALID", - // "The deceased Is spouse living and no of spouse living" + + // "The Is spouse living and no of spouse living" + // brideInfo.getGroomIsSpouseLiving() + "and" // + brideInfo.getGroomNoOfSpouse() + " is invalid"); // } @@ -347,9 +347,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { // { // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE // INVALID", - // "The deceased Is spouse living and no of spouse living" + + // "The Is spouse living and no of spouse living" + // brideInfo.getGroomIsSpouseLiving() + "and" // + brideInfo.getGroomNoOfSpouse() + " is invalid"); // } @@ -359,9 +359,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { // { // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException("DECEASED IS SPOUSE LIVING AND NO OF SPOUSE + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE // INVALID", - // "The deceased Is spouse living and no of spouse living" + + // "The Is spouse living and no of spouse living" + // brideInfo.getGroomIsSpouseLiving() + "and" // + brideInfo.getGroomNoOfSpouse() + " is invalid"); // } @@ -372,72 +372,72 @@ public void validateCommonFields(MarriageDetailsRequest request) { if (groomaddressInfo.getPermtaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { if (StringUtils.isEmpty(groomaddressInfo.getPermtaddressStateName())) { - throw new CustomException("DECEASED STATE INVALID", - "The deceased State" + + throw new CustomException(" STATE INVALID", + "The State" + groomaddressInfo.getPermtaddressStateName() + " is invalid"); } else { if (groomaddressInfo.getPermtaddressStateName() .equals(MarriageConstants.ADDRESS_KERALA)) { if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrDistrict())) { - throw new CustomException("DECEASED DISTRICT INVALID", - "The deceased District" + + throw new CustomException(" DISTRICT INVALID", + "The District" + groomaddressInfo.getPermntInKeralaAdrDistrict() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrTaluk())) { - throw new CustomException("DECEASED TALUK INVALID", - "The deceased Taluk" + + throw new CustomException(" TALUK INVALID", + "The Taluk" + groomaddressInfo.getPermntInKeralaAdrTaluk() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrVillage())) { - throw new CustomException("DECEASED VILLAGE INVALID", - "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", + "The Village" + groomaddressInfo.getPresentInsideKeralaVillage() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLBName())) { - throw new CustomException("DECEASED LOCALBODY NAME INVALID", - "The deceased Localbody Name" + + throw new CustomException(" LOCALBODY NAME INVALID", + "The Localbody Name" + groomaddressInfo.getPermntInKeralaAdrLBName() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaWardNo())) { - throw new CustomException("DECEASED WARD INVALID", - "The deceased Ward" + + throw new CustomException(" WARD INVALID", + "The Ward" + groomaddressInfo.getPermntInKeralaWardNo() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrPostOffice())) { - throw new CustomException("DECEASED POSTOFFICE INVALID", - "The deceased Postofficef" + + throw new CustomException(" POSTOFFICE INVALID", + "The Postofficef" + groomaddressInfo.getPermntInKeralaAdrPostOffice() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrPincode())) { - throw new CustomException("DECEASED PINCODE INVALID", - "The deceased Pincode" + + throw new CustomException(" PINCODE INVALID", + "The Pincode" + groomaddressInfo.getPermntInKeralaAdrPincode() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLocalityNameEn())) { - throw new CustomException("DECEASED LOCALITY NAME ENGLISH IS INVALID", - "The deceased Locality English" + + throw new CustomException(" LOCALITY NAME ENGLISH IS INVALID", + "The Locality English" + groomaddressInfo.getPermntInKeralaAdrLocalityNameEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLocalityNameMl())) { - throw new CustomException("DECEASED LOCALITY NAME MALAYALAM IS INVALID", - "The deceased Locality Malayalam" + + throw new CustomException(" LOCALITY NAME MALAYALAM IS INVALID", + "The Locality Malayalam" + groomaddressInfo.getPermntInKeralaAdrLocalityNameMl() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrHouseNameEn())) { - throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", - "The deceased House Name English" + + throw new CustomException(" HOUSE NAME ENGLISH INVALID", + "The House Name English" + groomaddressInfo.getPermntInKeralaAdrHouseNameEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrHouseNameMl())) { - throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", - "The deceased House Name Malayalam" + + throw new CustomException(" HOUSE NAME MALAYALAM INVALID", + "The House Name Malayalam" + groomaddressInfo.getPermntInKeralaAdrHouseNameMl() + " is invalid"); } @@ -445,48 +445,48 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } else { if (StringUtils.isEmpty(groomaddressInfo.getPermntOutSideIndiaProvinceEn())) { - throw new CustomException("DECEASED PROVINCE ENGLISH INVALID", - "The deceased Province English" + + throw new CustomException(" PROVINCE ENGLISH INVALID", + "The Province English" + groomaddressInfo.getPermntOutSideIndiaProvinceEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntOutSideIndiaProvinceMl())) { - throw new CustomException("DECEASED PROVINCE MALAYALAM INVALID", - "The deceased Province Malayalam" + + throw new CustomException(" PROVINCE MALAYALAM INVALID", + "The Province Malayalam" + groomaddressInfo.getPermntOutSideIndiaProvinceMl() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaVillage())) { - throw new CustomException("DECEASED VILLAGE INVALID", - "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", + "The Village" + groomaddressInfo.getPermntOutsideIndiaVillage() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaCityTown())) { - throw new CustomException("DECEASED CITY INVALID", - "The deceased City" + + throw new CustomException(" CITY INVALID", + "The City" + groomaddressInfo.getPermntOutsideIndiaCityTown() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermanentOutsideIndiaPostCode())) { - throw new CustomException("DECEASED POST CODE INVALID", - "The deceased Post Code" + + throw new CustomException(" POST CODE INVALID", + "The Post Code" + groomaddressInfo.getPermanentOutsideIndiaPostCode() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLineoneEn())) { - throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", - "The deceased Adress Line One English" + + throw new CustomException(" ADDRESS LINE ONE ENGLISH INVALID", + "The Adress Line One English" + groomaddressInfo.getPermntOutsideIndiaLineoneEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLinetwoEn())) { - throw new CustomException("DECEASED ADDRESS LINE Two ENGLISH INVALID", - "The deceased Adress Line Two English" + + throw new CustomException(" ADDRESS LINE Two ENGLISH INVALID", + "The Adress Line Two English" + groomaddressInfo.getPermntOutsideIndiaLinetwoEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLineoneMl())) { - throw new CustomException("DECEASED ADDRESS LINE ONE MALAYALAM INVALID", - "The deceased Adress Line One Malayalam" + + throw new CustomException(" ADDRESS LINE ONE MALAYALAM INVALID", + "The Adress Line One Malayalam" + groomaddressInfo.getPermntOutsideIndiaLineoneMl() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLinetwoMl())) { - throw new CustomException("DECEASED ADDRESS LINE TWO MALAYALAM INVALID", - "The deceased Adress Line Two Malayalam" + + throw new CustomException(" ADDRESS LINE TWO MALAYALAM INVALID", + "The Adress Line Two Malayalam" + groomaddressInfo.getPermntOutsideIndiaLinetwoMl() + " is invalid"); } @@ -495,74 +495,73 @@ public void validateCommonFields(MarriageDetailsRequest request) { // groom present address start if (groomaddressInfo.getPresentaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { if (StringUtils.isEmpty(groomaddressInfo.getPresentaddressStateName())) { - throw new CustomException("DECEASED STATE INVALID", - "The deceased State" + + throw new CustomException(" STATE INVALID", + "The State" + groomaddressInfo.getPresentaddressStateName() + " is invalid"); } else { if (groomaddressInfo.getPresentaddressStateName() .equals(MarriageConstants.ADDRESS_KERALA)) { if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaDistrict())) { - throw new CustomException("DECEASED DISTRICT INVALID", - "The deceased District" + + throw new CustomException(" DISTRICT INVALID", groomaddressInfo.getPresentInsideKeralaDistrict() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaTaluk())) { - throw new CustomException("DECEASED TALUK INVALID", - "The deceased Taluk" + + throw new CustomException(" TALUK INVALID", + "The Taluk" + groomaddressInfo.getPresentInsideKeralaTaluk() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaVillage())) { - throw new CustomException("DECEASED VILLAGE INVALID", - "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", + "The Village" + groomaddressInfo.getPresentInsideKeralaVillage() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLBName())) { - throw new CustomException("DECEASED LOCALBODY NAME INVALID", - "The deceased Localbody Name" + + throw new CustomException(" LOCALBODY NAME INVALID", + "The Localbody Name" + groomaddressInfo.getPresentInsideKeralaLBName() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentWardNo())) { - throw new CustomException("DECEASED WARD INVALID", - "The deceased Ward" + + throw new CustomException(" WARD INVALID", + "The Ward" + groomaddressInfo.getPresentWardNo() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaPostOffice())) { - throw new CustomException("DECEASED POSTOFFICE INVALID", - "The deceased Postofficef" + + throw new CustomException(" POSTOFFICE INVALID", + "The Postofficef" + groomaddressInfo.getPresentInsideKeralaPostOffice() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaPincode())) { - throw new CustomException("DECEASED PINCODE INVALID", - "The deceased Pincode" + + throw new CustomException(" PINCODE INVALID", + "The Pincode" + groomaddressInfo.getPresentInsideKeralaPincode() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLocalityNameEn())) { - throw new CustomException("DECEASED LOCALITY NAME ENGLISH IS INVALID", - "The deceased Locality English" + + throw new CustomException(" LOCALITY NAME ENGLISH IS INVALID", + "The Locality English" + groomaddressInfo.getPresentInsideKeralaLocalityNameEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLocalityNameMl())) { - throw new CustomException("DECEASED LOCALITY NAME MALAYALAM IS INVALID", - "The deceased Locality Malayalam" + + throw new CustomException(" LOCALITY NAME MALAYALAM IS INVALID", + "The Locality Malayalam" + groomaddressInfo.getPresentInsideKeralaLocalityNameMl() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaHouseNameEn())) { - throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", - "The deceased House Name English" + + throw new CustomException(" HOUSE NAME ENGLISH INVALID", + "The House Name English" + groomaddressInfo.getPresentInsideKeralaHouseNameEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaHouseNameMl())) { - throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", - "The deceased House Name Malayalam" + + throw new CustomException(" HOUSE NAME MALAYALAM INVALID", + "The House Name Malayalam" + groomaddressInfo.getPresentInsideKeralaHouseNameMl() + " is invalid"); } @@ -570,49 +569,49 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } else { if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaProvinceEn())) { - throw new CustomException("DECEASED PROVINCE ENGLISH INVALID", - "The deceased Province English" + + throw new CustomException(" PROVINCE ENGLISH INVALID", + "The Province English" + groomaddressInfo.getPresentOutSideIndiaProvinceEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaProvinceMl())) { - throw new CustomException("DECEASED PROVINCE MALAYALAM INVALID", - "The deceased Province Malayalam" + + throw new CustomException(" PROVINCE MALAYALAM INVALID", + "The Province Malayalam" + groomaddressInfo.getPresentOutSideIndiaProvinceMl() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaadrsVillage())) { - throw new CustomException("DECEASED VILLAGE INVALID", - "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", + "The Village" + groomaddressInfo.getPresentOutSideIndiaadrsVillage() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaadrsCityTown())) { - throw new CustomException("DECEASED CITY INVALID", - "The deceased City" + + throw new CustomException(" CITY INVALID", + "The City" + groomaddressInfo.getPresentOutSideIndiaadrsCityTown() + " is invalid"); } // if(StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaPostCode())) // { - // throw new CustomException("DECEASED POST CODE INVALID", - // "The deceased Post Code" + + // throw new CustomException(" POST CODE INVALID", + // "The Post Code" + // groomaddressInfo.getPresentOutSideIndiaPostCode() + " is invalid"); // } if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressEn())) { - throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", - "The deceased Adress Line One English" + + throw new CustomException(" ADDRESS LINE ONE ENGLISH INVALID", + "The Adress Line One English" + groomaddressInfo.getPresentOutSideIndiaAdressEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressEnB())) { - throw new CustomException("DECEASED ADDRESS LINE Two ENGLISH INVALID", - "The deceased Adress Line Two English" + + throw new CustomException(" ADDRESS LINE Two ENGLISH INVALID", + "The Adress Line Two English" + groomaddressInfo.getPresentOutSideIndiaAdressEnB() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressMl())) { - throw new CustomException("DECEASED ADDRESS LINE ONE MALAYALAM INVALID", - "The deceased Adress Line One Malayalam" + + throw new CustomException(" ADDRESS LINE ONE MALAYALAM INVALID", + "The Adress Line One Malayalam" + groomaddressInfo.getPresentOutSideIndiaAdressMl() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressMlB())) { - throw new CustomException("DECEASED ADDRESS LINE TWO MALAYALAM INVALID", - "The deceased Adress Line Two Malayalam" + + throw new CustomException(" ADDRESS LINE TWO MALAYALAM INVALID", + "The Adress Line Two Malayalam" + groomaddressInfo.getPresentOutSideIndiaAdressMlB() + " is invalid"); } @@ -622,72 +621,72 @@ public void validateCommonFields(MarriageDetailsRequest request) { if (brideaddressInfo.getPermtaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { if (StringUtils.isEmpty(brideaddressInfo.getPermtaddressStateName())) { - throw new CustomException("DECEASED STATE INVALID", - "The deceased State" + + throw new CustomException(" STATE INVALID", + "The State" + brideaddressInfo.getPermtaddressStateName() + " is invalid"); } else { if (brideaddressInfo.getPermtaddressStateName() .equals(MarriageConstants.ADDRESS_KERALA)) { if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrDistrict())) { - throw new CustomException("DECEASED DISTRICT INVALID", - "The deceased District" + + throw new CustomException(" DISTRICT INVALID", + "The District" + brideaddressInfo.getPermntInKeralaAdrDistrict() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrTaluk())) { - throw new CustomException("DECEASED TALUK INVALID", - "The deceased Taluk" + + throw new CustomException(" TALUK INVALID", + "The Taluk" + brideaddressInfo.getPermntInKeralaAdrTaluk() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrVillage())) { - throw new CustomException("DECEASED VILLAGE INVALID", - "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", + "The Village" + brideaddressInfo.getPresentInsideKeralaVillage() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLBName())) { - throw new CustomException("DECEASED LOCALBODY NAME INVALID", - "The deceased Localbody Name" + + throw new CustomException(" LOCALBODY NAME INVALID", + "The Localbody Name" + brideaddressInfo.getPermntInKeralaAdrLBName() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaWardNo())) { - throw new CustomException("DECEASED WARD INVALID", - "The deceased Ward" + + throw new CustomException("WARD INVALID", + "The Ward" + brideaddressInfo.getPermntInKeralaWardNo() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrPostOffice())) { - throw new CustomException("DECEASED POSTOFFICE INVALID", - "The deceased Postofficef" + + throw new CustomException(" POSTOFFICE INVALID", + "The Postofficef" + brideaddressInfo.getPermntInKeralaAdrPostOffice() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrPincode())) { - throw new CustomException("DECEASED PINCODE INVALID", - "The deceased Pincode" + + throw new CustomException(" PINCODE INVALID", + "The Pincode" + brideaddressInfo.getPermntInKeralaAdrPincode() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLocalityNameEn())) { - throw new CustomException("DECEASED LOCALITY NAME ENGLISH IS INVALID", - "The deceased Locality English" + + throw new CustomException(" LOCALITY NAME ENGLISH IS INVALID", + "The Locality English" + brideaddressInfo.getPermntInKeralaAdrLocalityNameEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLocalityNameMl())) { - throw new CustomException("DECEASED LOCALITY NAME MALAYALAM IS INVALID", - "The deceased Locality Malayalam" + + throw new CustomException(" LOCALITY NAME MALAYALAM IS INVALID", + "The Locality Malayalam" + brideaddressInfo.getPermntInKeralaAdrLocalityNameMl() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrHouseNameEn())) { - throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", - "The deceased House Name English" + + throw new CustomException(" HOUSE NAME ENGLISH INVALID", + "The House Name English" + brideaddressInfo.getPermntInKeralaAdrHouseNameEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrHouseNameMl())) { - throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", - "The deceased House Name Malayalam" + + throw new CustomException(" HOUSE NAME MALAYALAM INVALID", + "The House Name Malayalam" + brideaddressInfo.getPermntInKeralaAdrHouseNameMl() + " is invalid"); } @@ -695,48 +694,48 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } else { if (StringUtils.isEmpty(brideaddressInfo.getPermntOutSideIndiaProvinceEn())) { - throw new CustomException("DECEASED PROVINCE ENGLISH INVALID", - "The deceased Province English" + + throw new CustomException(" PROVINCE ENGLISH INVALID", + "The Province English" + brideaddressInfo.getPermntOutSideIndiaProvinceEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntOutSideIndiaProvinceMl())) { - throw new CustomException("DECEASED PROVINCE MALAYALAM INVALID", - "The deceased Province Malayalam" + + throw new CustomException(" PROVINCE MALAYALAM INVALID", + "The Province Malayalam" + brideaddressInfo.getPermntOutSideIndiaProvinceMl() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaVillage())) { - throw new CustomException("DECEASED VILLAGE INVALID", - "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", + "The Village" + brideaddressInfo.getPermntOutsideIndiaVillage() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaCityTown())) { - throw new CustomException("DECEASED CITY INVALID", - "The deceased City" + + throw new CustomException(" CITY INVALID", + "The City" + brideaddressInfo.getPermntOutsideIndiaCityTown() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermanentOutsideIndiaPostCode())) { - throw new CustomException("DECEASED POST CODE INVALID", - "The deceased Post Code" + + throw new CustomException(" POST CODE INVALID", + "The Post Code" + brideaddressInfo.getPermanentOutsideIndiaPostCode() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLineoneEn())) { - throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", - "The deceased Adress Line One English" + + throw new CustomException(" ADDRESS LINE ONE ENGLISH INVALID", + "The Adress Line One English" + brideaddressInfo.getPermntOutsideIndiaLineoneEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLinetwoEn())) { - throw new CustomException("DECEASED ADDRESS LINE Two ENGLISH INVALID", - "The deceased Adress Line Two English" + + throw new CustomException(" ADDRESS LINE Two ENGLISH INVALID", + "The Adress Line Two English" + brideaddressInfo.getPermntOutsideIndiaLinetwoEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLineoneMl())) { - throw new CustomException("DECEASED ADDRESS LINE ONE MALAYALAM INVALID", - "The deceased Adress Line One Malayalam" + + throw new CustomException(" ADDRESS LINE ONE MALAYALAM INVALID", + "The Adress Line One Malayalam" + brideaddressInfo.getPermntOutsideIndiaLineoneMl() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLinetwoMl())) { - throw new CustomException("DECEASED ADDRESS LINE TWO MALAYALAM INVALID", - "The deceased Adress Line Two Malayalam" + + throw new CustomException(" ADDRESS LINE TWO MALAYALAM INVALID", + "The Adress Line Two Malayalam" + brideaddressInfo.getPermntOutsideIndiaLinetwoMl() + " is invalid"); } @@ -745,74 +744,74 @@ public void validateCommonFields(MarriageDetailsRequest request) { // bride present address start if (brideaddressInfo.getPresentaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { if (StringUtils.isEmpty(brideaddressInfo.getPresentaddressStateName())) { - throw new CustomException("DECEASED STATE INVALID", - "The deceased State" + + throw new CustomException(" STATE INVALID", + "The State" + brideaddressInfo.getPresentaddressStateName() + " is invalid"); } else { if (brideaddressInfo.getPresentaddressStateName() .equals(MarriageConstants.ADDRESS_KERALA)) { if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaDistrict())) { - throw new CustomException("DECEASED DISTRICT INVALID", - "The deceased District" + + throw new CustomException(" DISTRICT INVALID", + "The District" + brideaddressInfo.getPresentInsideKeralaDistrict() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaTaluk())) { - throw new CustomException("DECEASED TALUK INVALID", - "The deceased Taluk" + + throw new CustomException(" TALUK INVALID", + "The Taluk" + brideaddressInfo.getPresentInsideKeralaTaluk() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaVillage())) { - throw new CustomException("DECEASED VILLAGE INVALID", - "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", + "The Village" + brideaddressInfo.getPresentInsideKeralaVillage() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLBName())) { - throw new CustomException("DECEASED LOCALBODY NAME INVALID", - "The deceased Localbody Name" + + throw new CustomException(" LOCALBODY NAME INVALID", + "The Localbody Name" + brideaddressInfo.getPresentInsideKeralaLBName() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentWardNo())) { - throw new CustomException("DECEASED WARD INVALID", - "The deceased Ward" + + throw new CustomException(" WARD INVALID", + "The Ward" + brideaddressInfo.getPresentWardNo() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaPostOffice())) { - throw new CustomException("DECEASED POSTOFFICE INVALID", - "The deceased Postofficef" + + throw new CustomException(" POSTOFFICE INVALID", + "The Postofficef" + brideaddressInfo.getPresentInsideKeralaPostOffice() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaPincode())) { - throw new CustomException("DECEASED PINCODE INVALID", - "The deceased Pincode" + + throw new CustomException(" PINCODE INVALID", + "The Pincode" + brideaddressInfo.getPresentInsideKeralaPincode() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLocalityNameEn())) { - throw new CustomException("DECEASED LOCALITY NAME ENGLISH IS INVALID", - "The deceased Locality English" + + throw new CustomException(" LOCALITY NAME ENGLISH IS INVALID", + "The Locality English" + brideaddressInfo.getPresentInsideKeralaLocalityNameEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLocalityNameMl())) { - throw new CustomException("DECEASED LOCALITY NAME MALAYALAM IS INVALID", - "The deceased Locality Malayalam" + + throw new CustomException(" LOCALITY NAME MALAYALAM IS INVALID", + "The Locality Malayalam" + brideaddressInfo.getPresentInsideKeralaLocalityNameMl() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaHouseNameEn())) { - throw new CustomException("DECEASED HOUSE NAME ENGLISH INVALID", - "The deceased House Name English" + + throw new CustomException(" HOUSE NAME ENGLISH INVALID", + "The House Name English" + brideaddressInfo.getPresentInsideKeralaHouseNameEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaHouseNameMl())) { - throw new CustomException("DECEASED HOUSE NAME MALAYALAM INVALID", - "The deceased House Name Malayalam" + + throw new CustomException(" HOUSE NAME MALAYALAM INVALID", + "The House Name Malayalam" + brideaddressInfo.getPresentInsideKeralaHouseNameMl() + " is invalid"); } @@ -820,49 +819,49 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } else { if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaProvinceEn())) { - throw new CustomException("DECEASED PROVINCE ENGLISH INVALID", - "The deceased Province English" + + throw new CustomException(" PROVINCE ENGLISH INVALID", + "The Province English" + brideaddressInfo.getPresentOutSideIndiaProvinceEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaProvinceMl())) { - throw new CustomException("DECEASED PROVINCE MALAYALAM INVALID", - "The deceased Province Malayalam" + + throw new CustomException(" PROVINCE MALAYALAM INVALID", + "The Province Malayalam" + brideaddressInfo.getPresentOutSideIndiaProvinceMl() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaadrsVillage())) { - throw new CustomException("DECEASED VILLAGE INVALID", - "The deceased Village" + + throw new CustomException(" VILLAGE INVALID", + "The Village" + brideaddressInfo.getPresentOutSideIndiaadrsVillage() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaadrsCityTown())) { - throw new CustomException("DECEASED CITY INVALID", - "The deceased City" + + throw new CustomException(" CITY INVALID", + "The City" + brideaddressInfo.getPresentOutSideIndiaadrsCityTown() + " is invalid"); } if(StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaPostCode())) { - throw new CustomException("DECEASED POST CODE INVALID", - "The deceased Post Code" + + throw new CustomException(" POST CODE INVALID", + "The Post Code" + brideaddressInfo.getPresentOutSideIndiaPostCode() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressEn())) { - throw new CustomException("DECEASED ADDRESS LINE ONE ENGLISH INVALID", - "The deceased Adress Line One English" + + throw new CustomException(" ADDRESS LINE ONE ENGLISH INVALID", + "The Adress Line One English" + brideaddressInfo.getPresentOutSideIndiaAdressEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressEnB())) { - throw new CustomException("DECEASED ADDRESS LINE Two ENGLISH INVALID", - "The deceased Adress Line Two English" + + throw new CustomException(" ADDRESS LINE Two ENGLISH INVALID", + "The Adress Line Two English" + brideaddressInfo.getPresentOutSideIndiaAdressEnB() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressMl())) { - throw new CustomException("DECEASED ADDRESS LINE ONE MALAYALAM INVALID", - "The deceased Adress Line One Malayalam" + + throw new CustomException(" ADDRESS LINE ONE MALAYALAM INVALID", + "The Adress Line One Malayalam" + brideaddressInfo.getPresentOutSideIndiaAdressMl() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressMlB())) { - throw new CustomException("DECEASED ADDRESS LINE TWO MALAYALAM INVALID", - "The deceased Adress Line Two Malayalam" + + throw new CustomException(" ADDRESS LINE TWO MALAYALAM INVALID", + "The Adress Line Two Malayalam" + brideaddressInfo.getPresentOutSideIndiaAdressMlB() + " is invalid"); } @@ -870,50 +869,50 @@ public void validateCommonFields(MarriageDetailsRequest request) { // witness1 if(StringUtils.isEmpty(witnessDtls.getWitness1AadharNo())){ - throw new CustomException("DECEASED WITNESS1 AADHAR NUMBER INVALID", - "The deceased Witness1 Aadhar Number" + + throw new CustomException(" WITNESS1 AADHAR NUMBER INVALID", + "The Witness1 Aadhar Number" + witnessDtls.getWitness1AadharNo() + " is invalid"); } if(StringUtils.isEmpty(witnessDtls.getWitness1NameEn())){ - throw new CustomException("DECEASED WITNESS1 NAME ENGLISH INVALID", - "The deceased Witness1 Name English" + + throw new CustomException(" WITNESS1 NAME ENGLISH INVALID", + "The Witness1 Name English" + witnessDtls.getWitness1NameEn() + " is invalid"); } if(StringUtils.isEmpty(witnessDtls.getWitness1NameMl())){ - throw new CustomException("DECEASED WITNESS1 NAME MALAYALAM INVALID", - "The deceased Witness1 Name Malayalam" + + throw new CustomException(" WITNESS1 NAME MALAYALAM INVALID", + "The Witness1 Name Malayalam" + witnessDtls.getWitness1NameMl() + " is invalid"); } if((witnessDtls.getWitness1Age()<18 && witnessDtls.getWitness1Age()==0)){ - throw new CustomException("DECEASED WITNESS1 AGE INVALID", - "The deceased Witness1 Age" + + throw new CustomException(" WITNESS1 AGE INVALID", + "The Witness1 Age" + witnessDtls.getWitness1Age() + " is invalid"); } if((StringUtils.isEmpty(witnessDtls.getWitness1AddresSEn()))){ - throw new CustomException("DECEASED WITNESS1 ADDRESS ENGLISH INVALID", - "The deceased Witness1 Address English" + + throw new CustomException(" WITNESS1 ADDRESS ENGLISH INVALID", + "The Witness1 Address English" + witnessDtls.getWitness1AddresSEn() + " is invalid"); } if((StringUtils.isEmpty(witnessDtls.getWitness1AddressMl()))){ - throw new CustomException("DECEASED WITNESS1 ADDRESS MALAYALAM INVALID", - "The deceased Witness1 Address Malayalam" + + throw new CustomException(" WITNESS1 ADDRESS MALAYALAM INVALID", + "The Witness1 Address Malayalam" + witnessDtls.getWitness1AddressMl() + " is invalid"); } if((witnessDtls.getWitness1Mobile()<=0 )){ - throw new CustomException("DECEASED WITNESS1 MOBILE NUMBER INVALID", - "The deceased Witness1 Mobile Number " + + throw new CustomException(" WITNESS1 MOBILE NUMBER INVALID", + "The Witness1 Mobile Number " + witnessDtls.getWitness1Mobile() + " is invalid"); } if((witnessDtls.getWitness1Esigned().equals(MarriageConstants.VALUE_FALSE))){ - throw new CustomException("DECEASED WITNESS1 E-SIGN INVALID", - "The deceased Witness1 E-sign " + + throw new CustomException(" WITNESS1 E-SIGN INVALID", + "The Witness1 E-sign " + witnessDtls.getWitness1Esigned()+ " is invalid"); } @@ -926,50 +925,50 @@ public void validateCommonFields(MarriageDetailsRequest request) { //witness2 if(StringUtils.isEmpty(witnessDtls.getWitness2AadharNo())){ - throw new CustomException("DECEASED WITNESS2 AADHAR NUMBER INVALID", - "The deceased Witness2 Aadhar Number" + + throw new CustomException(" WITNESS2 AADHAR NUMBER INVALID", + "The Witness2 Aadhar Number" + witnessDtls.getWitness2AadharNo() + " is invalid"); } if(StringUtils.isEmpty(witnessDtls.getWitness2NameEn())){ - throw new CustomException("DECEASED WITNESS2 NAME ENGLISH INVALID", - "The deceased Witness2 Name English" + + throw new CustomException(" WITNESS2 NAME ENGLISH INVALID", + "The Witness2 Name English" + witnessDtls.getWitness2NameEn() + " is invalid"); } if(StringUtils.isEmpty(witnessDtls.getWitness2NameMl())){ - throw new CustomException("DECEASED WITNESS2 NAME MALAYALAM INVALID", - "The deceased Witness2 Name Malayalam" + + throw new CustomException(" WITNESS2 NAME MALAYALAM INVALID", + "The Witness2 Name Malayalam" + witnessDtls.getWitness2NameMl() + " is invalid"); } if((witnessDtls.getWitness2Age()<18 && witnessDtls.getWitness2Age()==0)){ - throw new CustomException("DECEASED WITNESS2 AGE INVALID", - "The deceased Witness2 Age" + + throw new CustomException(" WITNESS2 AGE INVALID", + "The Witness2 Age" + witnessDtls.getWitness2Age() + " is invalid"); } if((StringUtils.isEmpty(witnessDtls.getWitness2AddresSEn()))){ - throw new CustomException("DECEASED WITNESS2 ADDRESS ENGLISH INVALID", - "The deceased Witness2 Address English" + + throw new CustomException(" WITNESS2 ADDRESS ENGLISH INVALID", + "The Witness2 Address English" + witnessDtls.getWitness2AddresSEn() + " is invalid"); } if((StringUtils.isEmpty(witnessDtls.getWitness2AddressMl()))){ - throw new CustomException("DECEASED WITNESS2 ADDRESS MALAYALAM INVALID", - "The deceased Witness2 Address Malayalam" + + throw new CustomException(" WITNESS2 ADDRESS MALAYALAM INVALID", + "The Witness2 Address Malayalam" + witnessDtls.getWitness2AddressMl() + " is invalid"); } if((witnessDtls.getWitness2Mobile()<=0 )){ - throw new CustomException("DECEASED WITNESS2 MOBILE NUMBER INVALID", - "The deceased Witness2 Mobile Number " + + throw new CustomException(" WITNESS2 MOBILE NUMBER INVALID", + "The Witness2 Mobile Number " + witnessDtls.getWitness2Mobile() + " is invalid"); } if((witnessDtls.getWitness2Esigned().equals(MarriageConstants.VALUE_FALSE))){ - throw new CustomException("DECEASED WITNESS2 E-SIGN INVALID", - "The deceased Witness2 E-sign " + + throw new CustomException(" WITNESS2 E-SIGN INVALID", + "The Witness2 E-sign " + witnessDtls.getWitness2Esigned()+ " is invalid"); } }); From aecf327ffb3081d694bfbb3ef69c8bc69b7898c7 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 5 Apr 2023 10:52:05 +0530 Subject: [PATCH 102/420] folder structure change --- .../common/repository/IdGenRepository.java | 2 +- .../MarriageApplicationConfiguration.java | 2 +- .../enrichment/MarriageDetailsEnrichment.java | 17 ++++++------- .../MarriageApplicationRepository.java | 10 +++----- .../BaseMarriageQueryBuilder.java | 3 +-- .../MarriageApplicationQueryBuilder.java | 3 +-- .../BrideAddressDetailsRowMapper.java | 2 +- .../rowmapper/BrideDetailsRowMapper.java | 2 +- .../GroomAddressDetailsRowMapper.java | 4 +-- .../rowmapper/GroomDetailsRowMapper.java | 2 +- .../MarriageApplicationRowMapper.java | 2 +- .../rowmapper/WitnessDetailsRowMapper.java | 2 +- .../service/MarriageApplicationService.java | 10 ++++---- .../MarriageRegistryRequestService.java | 4 +-- .../MarriageApplicationValidator.java | 21 ++++++++-------- .../validator/MarriageMDMSValidator.java | 2 +- .../MarriageApplicationController.java | 25 ++++++++----------- .../web}/enums/ErrorCodes.java | 2 +- .../{ => web}/model/Demand/Demand.java | 2 +- .../{ => web}/model/Demand/DemandDetail.java | 2 +- .../{ => web}/model/Demand/DemandRequest.java | 2 +- .../model/Demand/DemandResponse.java | 2 +- .../model/MarriageApplicationDetails.java | 6 ++--- .../model/marriage/BrideAddressDetails.java | 2 +- .../model/marriage/BrideDetails.java | 2 +- .../model/marriage/GroomAddressDetails.java | 2 +- .../model/marriage/GroomDetails.java | 3 +-- .../marriage/MarriageApplicationResponse.java | 4 +-- .../MarriageApplicationSearchCriteria.java | 3 +-- .../marriage/MarriageDetailsRequest.java | 4 +-- .../model/marriage/MarriageDocument.java | 7 +----- .../model/marriage/WitnessDetails.java | 2 +- .../MarriageRegistryEnrichment.java | 15 ++++++----- .../MarriageRegistryRepository.java | 8 +++--- .../querybuilder/BaseMarriageQuery.java | 3 +-- .../querybuilder/BaseQueryBuilder copy.java | 2 +- .../MarriageRegistryQueryBuilder.java | 4 +-- .../BrideRegistryAddressRowMapper.java | 2 +- .../rowmapper/BrideRegistryRowMapper.java | 2 +- .../GroomRegistryAddressRowMapper.java | 4 +-- .../rowmapper/GroomRegistryRowMapper.java | 2 +- .../rowmapper/MarriageRegistryRowMapper.java | 3 +-- .../rowmapper/WitnessRegistryRowMapper.java | 2 +- .../service/MarriageRegistryService.java | 6 ++--- .../MarriageRegistryController.java | 11 ++++---- .../model/BrideRegistryAddressDetails.java | 4 +-- .../{ => web}/model/BrideRegistryDetails.java | 2 +- .../model/GroomRegistryAddressDetails.java | 4 +-- .../{ => web}/model/GroomRegistryDetails.java | 3 +-- .../model/MarriageRegistryDetails.java | 4 +-- .../model/MarriageRegistryRequest.java | 2 +- .../model/MarriageRegistryResponse.java | 4 +-- .../model/MarriageRegistrySearchCriteria.java | 2 +- .../model/WitnessRegistryDetails.java | 4 +-- .../ksmart/marriage/utils/IDGenerator.java | 2 +- .../marriage/utils/MarriageMdmsUtil.java | 3 +-- .../marriage/workflow/WorkflowIntegrator.java | 6 ++--- 57 files changed, 115 insertions(+), 147 deletions(-) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/{ => marriageapplication}/config/MarriageApplicationConfiguration.java (97%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/controller/MarriageApplicationController.java (78%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/{utils => marriageapplication/web}/enums/ErrorCodes.java (89%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/Demand/Demand.java (97%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/Demand/DemandDetail.java (94%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/Demand/DemandRequest.java (91%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/Demand/DemandResponse.java (89%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/MarriageApplicationDetails.java (96%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/BrideAddressDetails.java (99%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/BrideDetails.java (98%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/GroomAddressDetails.java (99%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/GroomDetails.java (96%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/MarriageApplicationResponse.java (85%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/MarriageApplicationSearchCriteria.java (95%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/MarriageDetailsRequest.java (83%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/MarriageDocument.java (86%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/{ => web}/model/marriage/WitnessDetails.java (97%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/controller/MarriageRegistryController.java (86%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/BrideRegistryAddressDetails.java (99%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/BrideRegistryDetails.java (98%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/GroomRegistryAddressDetails.java (99%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/GroomRegistryDetails.java (97%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/MarriageRegistryDetails.java (97%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/MarriageRegistryRequest.java (94%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/MarriageRegistryResponse.java (89%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/MarriageRegistrySearchCriteria.java (98%) rename municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/{ => web}/model/WitnessRegistryDetails.java (96%) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java index 354cfb25f8b..0edb440669a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/IdGenRepository.java @@ -9,7 +9,7 @@ import org.ksmart.marriage.common.Idgen.IdGenerationResponse; import org.ksmart.marriage.common.Idgen.IdRequest; import org.ksmart.marriage.common.Idgen.IdResponse; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java similarity index 97% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index d810dc16242..25f5285ae7b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.config; +package org.ksmart.marriage.marriageapplication.config; import lombok.*; import org.springframework.beans.factory.annotation.Value; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 32419c02d20..b70cf635dee 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -1,7 +1,6 @@ package org.ksmart.marriage.marriageapplication.enrichment; import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.primitives.ImmutableDoubleArray; import org.apache.commons.collections4.CollectionUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; @@ -9,16 +8,16 @@ import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; import org.ksmart.marriage.common.repository.ServiceRequestRepository; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.model.Demand.Demand; -import org.ksmart.marriage.marriageapplication.model.Demand.DemandRequest; -import org.ksmart.marriage.marriageapplication.model.Demand.DemandResponse; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDocument; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; +import org.ksmart.marriage.marriageapplication.web.model.Demand.DemandRequest; +import org.ksmart.marriage.marriageapplication.web.model.Demand.DemandResponse; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; -import org.ksmart.marriage.utils.enums.ErrorCodes; +import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 08489d1b1fe..7542ddb491e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -5,17 +5,15 @@ import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.common.producer.MarriageProducer; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; //import org.ksmart.marriage.common.producer.MarriageProducer; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.ksmart.marriage.workflow.WorkflowIntegrator; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java index ab3be1fd6a8..8e1fd17080f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java @@ -2,8 +2,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index eee4e671029..2a73e473833 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -2,8 +2,7 @@ //import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; -import org.springframework.beans.factory.annotation.Autowired; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index c8ce5018177..a819c6a0624 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -1,7 +1,7 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.BrideAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 96c6bfb81f7..9ee0a9d47a4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 9b7756a7715..36199d08236 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -1,8 +1,8 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -//import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; +//import org.ksmart.marriage.marriageapplication.web.model.marriage.PresentAddressDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.GroomAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 546c2be7411..e749418343b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.GroomDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 725034f6bf0..991592dc66e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.stereotype.Component; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index 41c792b5356..c353887f386 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import java.sql.ResultSet; import java.sql.SQLException; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 04cf98b7d84..400ca23eccf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -3,12 +3,12 @@ import lombok.extern.slf4j.Slf4j; import org.ksmart.marriage.common.producer.MarriageProducer; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.model.Demand.Demand; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.marriageapplication.validator.MarriageApplicationValidator; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index 126c50ce57d..bb279d4f26f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -1,9 +1,9 @@ package org.ksmart.marriage.marriageapplication.service; import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; -import org.ksmart.marriage.marriageregistry.model.*; +import org.ksmart.marriage.marriageregistry.web.model.*; import org.springframework.stereotype.Service; import java.util.LinkedList; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 58c3ba51fd0..543bb105da9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -2,22 +2,21 @@ import org.apache.commons.collections4.CollectionUtils; import org.egov.tracer.model.CustomException; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import java.util.List; import org.apache.commons.lang3.StringUtils; -import org.checkerframework.checker.units.qual.g; -import org.ksmart.marriage.marriageapplication.model.marriage.BrideAddressDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.BrideDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.GroomAddressDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.GroomDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.WitnessDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.stereotype.Component; -import static org.ksmart.marriage.utils.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_UPDATE; -import static org.ksmart.marriage.utils.enums.ErrorCodes.MARRIAGE_DETAILS_REQUIRED; +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_UPDATE; +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_REQUIRED; -//import static org.ksmart.marriage.utils.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; +//import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; @Component public class MarriageApplicationValidator { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index 1a7ef91fdb7..61e326709f6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Map; import org.egov.tracer.model.CustomException; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java similarity index 78% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index 8e0612ce501..6b0c6f92a49 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -1,15 +1,15 @@ -package org.ksmart.marriage.marriageapplication.controller; +package org.ksmart.marriage.marriageapplication.web.controller; // import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationResponse; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationResponse; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; import org.ksmart.marriage.marriageapplication.service.MarriageRegistryRequestService; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; @@ -20,13 +20,10 @@ import javax.validation.Valid; import java.util.List; - -import static org.ksmart.marriage.utils.MarriageConstants.APPLICATION_NEW; -import static org.ksmart.marriage.utils.MarriageConstants.WORKFLOW_STATUS_APPROVED; -//import org.ksmart.marriage.marriageregistry.model.BirthCertificate; -//import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetail; -//import org.ksmart.marriage.marriageregistry.model.RegisterBirthDetailsRequest; -//import org.ksmart.marriage.marriageregistry.model.RegisterBirthSearchCriteria; +//import org.ksmart.marriage.marriageregistry.web.model.BirthCertificate; +//import org.ksmart.marriage.marriageregistry.web.model.RegisterBirthDetail; +//import org.ksmart.marriage.marriageregistry.web.model.RegisterBirthDetailsRequest; +//import org.ksmart.marriage.marriageregistry.web.model.RegisterBirthSearchCriteria; //import org.ksmart.marriage.marriageregistry.service.RegisterBirthService; //import org.ksmart.marriage.utils.ResponseInfoFactory; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/enums/ErrorCodes.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java similarity index 89% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/enums/ErrorCodes.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java index 77f4c4db2e5..4898d56a7f4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/enums/ErrorCodes.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.utils.enums; +package org.ksmart.marriage.marriageapplication.web.enums; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/Demand.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/Demand.java similarity index 97% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/Demand.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/Demand.java index 142431cc2a5..b7ba97b0be1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/Demand.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/Demand.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageapplication.model.Demand; +package org.ksmart.marriage.marriageapplication.web.model.Demand; import java.math.BigDecimal; import java.util.ArrayList; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandDetail.java similarity index 94% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandDetail.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandDetail.java index 00f14cfb9c8..1f00682977a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandDetail.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandDetail.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageapplication.model.Demand; +package org.ksmart.marriage.marriageapplication.web.model.Demand; import java.math.BigDecimal; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandRequest.java similarity index 91% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandRequest.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandRequest.java index 3d9d55e2229..53f04fb8c59 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandRequest.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageapplication.model.Demand; +package org.ksmart.marriage.marriageapplication.web.model.Demand; import java.util.ArrayList; import java.util.List; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandResponse.java similarity index 89% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandResponse.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandResponse.java index deab98a29ae..5acf674c1d8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/Demand/DemandResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/Demand/DemandResponse.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageapplication.model.Demand; +package org.ksmart.marriage.marriageapplication.web.model.Demand; import java.util.ArrayList; import java.util.List; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java similarity index 96% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 1af711f7efe..cd209044464 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -1,9 +1,9 @@ -package org.ksmart.marriage.marriageapplication.model; +package org.ksmart.marriage.marriageapplication.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.*; +import org.ksmart.marriage.marriageapplication.web.model.marriage.*; //import org.ksmart.marriage.common.model.AuditDetails; //import org.ksmart.marriage.common.model.Document; @@ -13,8 +13,6 @@ import javax.swing.text.Document; import javax.validation.Valid; -import javax.validation.constraints.Size; - @Getter @Setter @AllArgsConstructor diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java similarity index 99% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 1b8d24540a4..b38949f192e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java similarity index 98% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java index f8c0214778b..a7b0ecb0718 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java similarity index 99% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 9a698cf7793..025b9ab02c4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java similarity index 96% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java index d4b3ea69e85..cd259ec6396 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java @@ -1,8 +1,7 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; -import io.micrometer.core.instrument.step.StepLong; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationResponse.java similarity index 85% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationResponse.java index 9dd23bf93e6..1ae24e9a519 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationResponse.java @@ -1,9 +1,9 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.egov.common.contract.response.ResponseInfo; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java similarity index 95% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java index 645a053ddf9..ed603f4a545 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java @@ -1,9 +1,8 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; import javax.validation.Valid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDetailsRequest.java similarity index 83% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDetailsRequest.java index e8c4bfab681..5bd1f5ed03b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDetailsRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDetailsRequest.java @@ -1,10 +1,10 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.egov.common.contract.request.RequestInfo; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java similarity index 86% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java index e1f6b1ea0c3..c83848e6fd8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java @@ -1,16 +1,11 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModel; - -import java.util.Objects; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; import org.springframework.validation.annotation.Validated; -import javax.validation.Valid; -import javax.validation.constraints.*; @Validated @javax.annotation.Generated(value = "org.egov.codegen.SpringBootCodegen", date = "2018-09-18T17:06:11.263+05:30") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java similarity index 97% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java index 92653670403..5351332ba53 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageapplication.model.marriage; +package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 531690ffaf0..d0d0dee0c62 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -6,21 +6,20 @@ import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; -// import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetail; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +// import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetail; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; -import org.ksmart.marriage.utils.enums.ErrorCodes; +import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import org.springframework.util.IdGenerator; + import java.util.List; import java.util.ListIterator; import java.util.UUID; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializationFeature; + import lombok.extern.slf4j.Slf4j; /** * Created by Jasmine diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 3d8efbcf7d1..301c0f8c14f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -1,11 +1,11 @@ package org.ksmart.marriage.marriageregistry.repository; import org.ksmart.marriage.common.producer.MarriageProducer; - import org.ksmart.marriage.config.MarriageApplicationConfiguration; + import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.repository.querybuilder.MarriageRegistryQueryBuilder; import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; import org.springframework.beans.factory.annotation.Autowired; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java index 765d39b3e3f..097d3d56b74 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java @@ -2,8 +2,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.Collections; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseQueryBuilder copy.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseQueryBuilder copy.java index 95c68467e7e..19b8a04e766 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseQueryBuilder copy.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseQueryBuilder copy.java @@ -5,7 +5,7 @@ import java.util.stream.Collectors; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.springframework.beans.factory.annotation.Autowired; /** /** diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index ab7230aa430..338e490272d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -1,8 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository.querybuilder; //import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageApplicationSearchCriteria; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; -import org.springframework.beans.factory.annotation.Autowired; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; import javax.validation.constraints.NotNull; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java index bb2f3eba972..14fa1030902 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java @@ -2,7 +2,7 @@ import java.sql.ResultSet; import java.sql.SQLException; -import org.ksmart.marriage.marriageregistry.model.BrideRegistryAddressDetails; +import org.ksmart.marriage.marriageregistry.web.model.BrideRegistryAddressDetails; public interface BrideRegistryAddressRowMapper { default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLException { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index 48409dbc80c..802725eb6d6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageregistry.model.BrideRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.BrideRegistryDetails; import org.springframework.stereotype.Component; import java.sql.ResultSet; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java index 53ab787aa2c..038fff87fd0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -1,9 +1,9 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -//import org.ksmart.marriage.marriageapplication.model.marriage.PresentAddressDetails; +//import org.ksmart.marriage.marriageapplication.web.model.marriage.PresentAddressDetails; import java.sql.ResultSet; import java.sql.SQLException; -import org.ksmart.marriage.marriageregistry.model.GroomRegistryAddressDetails; +import org.ksmart.marriage.marriageregistry.web.model.GroomRegistryAddressDetails; public interface GroomRegistryAddressRowMapper { default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws SQLException { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index cc716155f51..e67dce17be0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageregistry.model.GroomRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.GroomRegistryDetails; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.stereotype.Component; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 20a19467f43..8268e33ebc0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.stereotype.Component; @@ -9,7 +9,6 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.List; -import org.springframework.stereotype.Component; @Component public class MarriageRegistryRowMapper implements ResultSetExtractor>, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index ad4f6987a4b..c711a8ee38b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -1,6 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; -import org.ksmart.marriage.marriageregistry.model.WitnessRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.WitnessRegistryDetails; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.stereotype.Component; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 11094883b5a..740cfea4c58 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -1,9 +1,9 @@ package org.ksmart.marriage.marriageregistry.service; import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; import org.springframework.stereotype.Service; import java.util.List; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java similarity index 86% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index 66794a41c20..ecd4f169619 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -1,12 +1,12 @@ -package org.ksmart.marriage.marriageregistry.controller; +package org.ksmart.marriage.marriageregistry.web.controller; // import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistryResponse; -import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryResponse; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; @@ -15,7 +15,6 @@ import lombok.extern.slf4j.Slf4j; -import javax.validation.Valid; import java.util.List; @Slf4j diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java similarity index 99% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java index 1323f3645c6..7e377384d22 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java @@ -1,10 +1,8 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; -import org.ksmart.marriage.common.model.AuditDetails; -import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryDetails.java similarity index 98% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryDetails.java index 3236c2cd974..4d3d0fa191d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/BrideRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryDetails.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java similarity index 99% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java index 4688b3b05c0..493c84c45e5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java @@ -1,10 +1,8 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; -import org.ksmart.marriage.common.model.AuditDetails; -import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryDetails.java similarity index 97% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryDetails.java index 31e02438fa5..5ce37b5a337 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/GroomRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryDetails.java @@ -1,10 +1,9 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; -import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java similarity index 97% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java index f6887289f61..82e0c13971f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java @@ -1,9 +1,9 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; -import org.ksmart.marriage.marriageregistry.model.*; + import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; //import org.ksmart.marriage.common.model.AuditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryRequest.java similarity index 94% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryRequest.java index 087dd95627e..54a50a57139 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryRequest.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryResponse.java similarity index 89% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryResponse.java index 01ee041f869..10ad10da3ee 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryResponse.java @@ -1,9 +1,9 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.egov.common.contract.response.ResponseInfo; -//import org.ksmart.marriage.marriageregistry.model.BirthCertificate; +//import org.ksmart.marriage.marriageregistry.web.model.BirthCertificate; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; import java.util.ArrayList; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java similarity index 98% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java index 9ee7682afa6..24b22d59a82 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistrySearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java @@ -1,4 +1,4 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java similarity index 96% rename from municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java rename to municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java index ff2e6d924c1..c35afeff1de 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/WitnessRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java @@ -1,11 +1,9 @@ -package org.ksmart.marriage.marriageregistry.model; +package org.ksmart.marriage.marriageregistry.web.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; -import java.math.BigInteger; - import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java index d7853d9417c..32f8bf6cd2e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/IDGenerator.java @@ -6,7 +6,7 @@ ////import org.ksmart.birth.newbirth.repository.querybuilder.NewBirthQueryBuilder; //import org.ksmart.birth.web.model.newbirth.NewBirthDetailRequest; //import org.ksmart.birth.web.model.stillbirth.StillBirthDetailRequest; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index af014d74912..d6e0ebb8596 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -7,7 +7,7 @@ import org.egov.mdms.model.MdmsCriteriaReq; import org.egov.mdms.model.ModuleDetail; import org.ksmart.marriage.common.repository.ServiceRequestRepository; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @@ -15,7 +15,6 @@ import java.util.ArrayList; import java.util.Arrays; -import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Map; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java index 10bba581b63..1776a5651fb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -6,9 +6,9 @@ import java.util.Collections; import org.apache.commons.collections4.CollectionUtils; import org.egov.tracer.model.CustomException; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageapplication.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; //import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.beans.factory.annotation.Autowired; From 1b5502169b6e1799d47c1db9a21a0d2f74d0ed34 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 5 Apr 2023 12:37:48 +0530 Subject: [PATCH 103/420] mdms validation --- .../marriageapplication/service/MarriageApplicationService.java | 2 +- .../java/org/ksmart/marriage/workflow/WorkflowIntegrator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 04cf98b7d84..82f31358bf9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -58,7 +58,7 @@ public List saveMarriageDetails(MarriageDetailsReque producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); // List marriageApplicationDetails = repository.saveMarriageDetails(request); - // workflowIntegrator.callWorkFlow(request); + workflowIntegrator.callWorkFlow(request); request.getMarriageDetails().forEach(marriage->{ if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java index 10bba581b63..a94cdbd9a9a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -98,7 +98,7 @@ public void callWorkFlow(MarriageDetailsRequest request) { workFlowRequest.put(MarriageConstants.REQUESTINFOKEY, request.getRequestInfo()); workFlowRequest.put(MarriageConstants.WORKFLOWREQUESTARRAYKEY, array); String response = null; - // System.out.println("workflow Check :" + workFlowRequest); + System.out.println("workflow Check :" + workFlowRequest); log.info("workflow integrator request " + workFlowRequest); try { From 3335d1bfbda20400501ca7d6eda48ee05dcea632 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 5 Apr 2023 14:47:55 +0530 Subject: [PATCH 104/420] migration --- .../src/main/resources/marriage.yml | 8 +- .../enrichment/MarriageDetailsEnrichment.java | 4 +- .../rowmapper/BrideDetailsRowMapper.java | 32 +++---- .../rowmapper/GroomDetailsRowMapper.java | 32 +++---- .../MarriageApplicationRowMapper.java | 14 ++-- .../MarriageRegistryRequestService.java | 84 +++++++++---------- .../MarriageApplicationValidator.java | 48 +++++------ .../validator/MarriageMDMSValidator.java | 12 +-- .../web/model/MarriageApplicationDetails.java | 18 ++-- .../web/model/marriage/BrideDetails.java | 41 ++++----- .../web/model/marriage/GroomDetails.java | 41 ++++----- .../web/model/marriage/WitnessDetails.java | 8 +- ...04111526__newFieldAdd_services_new_dll.sql | 23 +++++ 13 files changed, 185 insertions(+), 180 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 4b240ef57d9..933bfbc0194 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -68,7 +68,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.registrationno - - jsonPath: $.MarriageDetails.*.registration_date + - jsonPath: $.MarriageDetails.*.registrationDate - jsonPath: $.MarriageDetails.*.action @@ -281,7 +281,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no1 + - jsonPath: $.MarriageDetails.*.WitnessDetails.serialNo1 - jsonPath: $.MarriageDetails.*.marriageTenantid @@ -321,7 +321,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.WitnessDetails.serial_no2 + - jsonPath: $.MarriageDetails.*.WitnessDetails.serialNo2 - jsonPath: $.MarriageDetails.*.marriageTenantid @@ -747,7 +747,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.registrationno - - jsonPath: $.MarriageDetails.*.registration_date + - jsonPath: $.MarriageDetails.*.registrationDate - jsonPath: $.MarriageDetails.*.action diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index b70cf635dee..1bd822ae36c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -63,8 +63,8 @@ public void enrichCreate(MarriageDetailsRequest request) { if(marriage.getWitnessDetails()!=null){ marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); - marriage.getWitnessDetails().setSerial_no1(1); - marriage.getWitnessDetails().setSerial_no2(2); + marriage.getWitnessDetails().setSerialNo1(1); + marriage.getWitnessDetails().setSerialNo2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } List marriagedocument = marriage.getMarriageDocuments(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 9ee0a9d47a4..6b27f553dd5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -14,27 +14,27 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ .aadharno(rs.getString("BD_aadharno")) .passportno(rs.getString("BD_passportno")) .socialsecurityno(rs.getString("BD_socialsecurityno")) - .firstname_en(rs.getString("BD_firstname_en")) - .firstname_ml(rs.getString("BD_firstname_ml")) - .middlename_en(rs.getString("BD_middlename_en")) - .middlename_ml(rs.getString("BD_middlename_ml")) - .lastname_en(rs.getString("BD_lastname_en")) - .lastname_ml(rs.getString("BD_lastname_ml")) + .firstnameEn(rs.getString("BD_firstname_en")) + .firstnameMl(rs.getString("BD_firstname_ml")) + .middlenameEn(rs.getString("BD_middlename_en")) + .middlenameMl(rs.getString("BD_middlename_ml")) + .lastnameEn(rs.getString("BD_lastname_en")) + .lastnameMl(rs.getString("BD_lastname_ml")) .mobile(rs.getLong("BD_mobile")) .emailid(rs.getString("BD_emailid")) .gender(rs.getString("BD_gender")) .dateofbirth(rs.getLong("BD_dateofbirth")) .age(rs.getInt("BD_age")) - .parent_guardian(rs.getString("BD_parent_guardian")) - .fathername_en(rs.getString("BD_fathername_en")) - .fathername_ml(rs.getString("BD_fathername_ml")) - .mothername_en(rs.getString("BD_mothername_en")) - .mothername_ml(rs.getString("BD_mothername_ml")) - .father_aadharno(rs.getString("BD_father_aadharno")) - .mother_aadharno(rs.getString("BD_mother_aadharno")) - .guardianname_en(rs.getString("BD_guardianname_en")) - .guardianname_ml(rs.getString("BD_guardianname_ml")) - .guardian_aadharno(rs.getString("BD_guardian_aadharno")) + .parentGuardian(rs.getString("BD_parent_guardian")) + .fathernameEn(rs.getString("BD_fathername_en")) + .fathernameMl(rs.getString("BD_fathername_ml")) + .mothernameEn(rs.getString("BD_mothername_en")) + .mothernameMl(rs.getString("BD_mothername_ml")) + .fatherAadharno(rs.getString("BD_father_aadharno")) + .motherAadharno(rs.getString("BD_mother_aadharno")) + .guardiannameEn(rs.getString("BD_guardianname_en")) + .guardiannameMl(rs.getString("BD_guardianname_ml")) + .guardianAadharno(rs.getString("BD_guardian_aadharno")) .maritalstatusid(rs.getString("BD_maritalstatusid")) //.brideIsSpouseLiving(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) .brideNoOfSpouse(Integer.valueOf(rs.getString("BD_livingspouseNo"))) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index e749418343b..560e81919a1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -14,27 +14,27 @@ default GroomDetails getGroomDetails (ResultSet rs) throws SQLException{ .aadharno(rs.getString("GD_aadharno")) .passportno(rs.getString("GD_passportno")) .socialsecurityno(rs.getString("GD_socialsecurityno")) - .fathername_en(rs.getString("GD_firstname_en")) - .fathername_ml(rs.getString("GD_firstname_ml")) - .middlename_en(rs.getString("GD_middlename_en")) - .middlename_ml(rs.getString("GD_middlename_ml")) - .lastname_en(rs.getString("GD_lastname_en")) - .lastname_ml(rs.getString("GD_lastname_ml")) + .fathernameEn(rs.getString("GD_firstname_en")) + .fathernameMl(rs.getString("GD_firstname_ml")) + .middlenameEn(rs.getString("GD_middlename_en")) + .middlenameMl(rs.getString("GD_middlename_ml")) + .lastnameEn(rs.getString("GD_lastname_en")) + .lastnameMl(rs.getString("GD_lastname_ml")) .mobile(rs.getLong("GD_mobile")) .emailid(rs.getString("GD_emailid")) .gender(rs.getString("GD_gender")) .dateofbirth(rs.getLong("GD_dateofbirth")) .age(rs.getInt("GD_age")) - .parent_guardian(rs.getString("GD_parent_guardian")) - .fathername_en(rs.getString("GD_fathername_en")) - .fathername_ml(rs.getString("GD_fathername_ml")) - .mothername_en(rs.getString("GD_mothername_en")) - .mothername_ml(rs.getString("GD_mothername_ml")) - .father_aadharno(rs.getString("GD_father_aadharno")) - .mother_aadharno(rs.getString("GD_mother_aadharno")) - .guardianname_en(rs.getString("GD_guardianname_en")) - .guardianname_ml(rs.getString("GD_guardianname_ml")) - .guardian_aadharno(rs.getString("GD_guardian_aadharno")) + .parentGuardian(rs.getString("GD_parent_guardian")) + .fathernameEn(rs.getString("GD_fathername_en")) + .fathernameMl(rs.getString("GD_fathername_ml")) + .mothernameEn(rs.getString("GD_mothername_en")) + .mothernameMl(rs.getString("GD_mothername_ml")) + .fatherAadharno(rs.getString("GD_father_aadharno")) + .motherAadharno(rs.getString("GD_mother_aadharno")) + .guardiannameEn(rs.getString("GD_guardianname_en")) + .guardiannameMl(rs.getString("GD_guardianname_ml")) + .guardianAadharno(rs.getString("GD_guardian_aadharno")) // .profession_en(rs.getString("GD_profession_en")) //.profession_ml(rs.getString("GD_profession_ml")) .maritalstatusid(rs.getString("GD_maritalstatusid")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 991592dc66e..95eb5f0adb8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -29,15 +29,15 @@ public List extractData(ResultSet rs) throws SQLExce .marriageHouseNoAndNameMl(rs.getString("MD_housenameno_ml")) .placenameEn(rs.getString("MD_placename_en")) .placenameMl(rs.getString("MD_placename_ml")) - .street_name_en(rs.getString("MD_street_name_en")) - .street_name_ml(rs.getString("MD_street_name_ml")) - .ward_code(rs.getString("MD_ward_code")) + .streetNameEn(rs.getString("MD_street_name_en")) + .streetNameMl(rs.getString("MD_street_name_ml")) + .wardCode(rs.getString("MD_ward_code")) .talukid(rs.getString("MD_talukid")) - .village_name(rs.getString("MD_village_name")) - .marriage_type(rs.getString("MD_marriage_type")) + .villageName(rs.getString("MD_village_name")) + .marriageType(rs.getString("MD_marriage_type")) .landmark(rs.getString("MD_landmark")) - .locality_en(rs.getString("MD_locality_en")) - .locality_ml(rs.getString("MD_locality_ml")) + .localityEn(rs.getString("MD_locality_en")) + .localityMl(rs.getString("MD_locality_ml")) .applicationNumber(rs.getString("MD_applicationnumber")) .registrationDate(rs.getLong("MD_registration_date")) .registrationno(rs.getString("MD_registrationno")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index bb279d4f26f..81669f698bc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -32,16 +32,16 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr registerMarriageDetail.setPlacetype(Marriagerequest.getMarriageDetails().get(0).getPlacetype()); registerMarriageDetail.setPlacenameEn(Marriagerequest.getMarriageDetails().get(0).getPlacenameEn()); registerMarriageDetail.setPlacenameMl(Marriagerequest.getMarriageDetails().get(0).getPlacenameMl()); - registerMarriageDetail.setWard_code(Marriagerequest.getMarriageDetails().get(0).getWard_code()); - registerMarriageDetail.setStreet_name_en(Marriagerequest.getMarriageDetails().get(0).getStreet_name_en()); - registerMarriageDetail.setStreet_name_ml(Marriagerequest.getMarriageDetails().get(0).getStreet_name_ml()); + registerMarriageDetail.setWard_code(Marriagerequest.getMarriageDetails().get(0).getWardCode()); + registerMarriageDetail.setStreet_name_en(Marriagerequest.getMarriageDetails().get(0).getStreetNameEn()); + registerMarriageDetail.setStreet_name_ml(Marriagerequest.getMarriageDetails().get(0).getStreetNameMl()); registerMarriageDetail.setTalukid(Marriagerequest.getMarriageDetails().get(0).getTalukid()); - registerMarriageDetail.setVillage_name(Marriagerequest.getMarriageDetails().get(0).getVillage_name()); + registerMarriageDetail.setVillage_name(Marriagerequest.getMarriageDetails().get(0).getVillageName()); registerMarriageDetail.setLandmark(Marriagerequest.getMarriageDetails().get(0).getLandmark()); - registerMarriageDetail.setLocality_en(Marriagerequest.getMarriageDetails().get(0).getLocality_en()); - registerMarriageDetail.setLocality_ml(Marriagerequest.getMarriageDetails().get(0).getLocality_ml()); - registerMarriageDetail.setMarriage_type(Marriagerequest.getMarriageDetails().get(0).getMarriage_type()); - registerMarriageDetail.setOth_marriage_type(Marriagerequest.getMarriageDetails().get(0).getOth_marriage_type()); + registerMarriageDetail.setLocality_en(Marriagerequest.getMarriageDetails().get(0).getLocalityEn()); + registerMarriageDetail.setLocality_ml(Marriagerequest.getMarriageDetails().get(0).getLocalityMl()); + registerMarriageDetail.setMarriage_type(Marriagerequest.getMarriageDetails().get(0).getMarriageType()); + registerMarriageDetail.setOth_marriage_type(Marriagerequest.getMarriageDetails().get(0).getOthMarriageType()); registerMarriageDetail.setRegistrationDate(Marriagerequest.getMarriageDetails().get(0).getRegistrationDate()); registerMarriageDetail.setRegistrationno(Marriagerequest.getMarriageDetails().get(0).getRegistrationno()); registerMarriageDetail.setMarriageHouseNoAndNameEn(Marriagerequest.getMarriageDetails().get(0).getMarriageHouseNoAndNameEn()); @@ -171,8 +171,8 @@ private WitnessRegistryDetails witnessRegistryDetails(MarriageDetailsRequest mar witnessRegistryDetails.setWitness1AddresSEn(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1AddresSEn()); witnessRegistryDetails.setWitness1AddressMl(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1AddressMl()); witnessRegistryDetails.setWitness1Mobile(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1Mobile()); - witnessRegistryDetails.setSerial_no2(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getSerial_no2()); - witnessRegistryDetails.setSerial_no1(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getSerial_no1()); + witnessRegistryDetails.setSerial_no2(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getSerialNo2()); + witnessRegistryDetails.setSerial_no1(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getSerialNo1()); witnessRegistryDetails.setWitness2Age(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2Age()); witnessRegistryDetails.setWitness2NameEn(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2NameEn()); witnessRegistryDetails.setWitness2NameMl(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2NameMl()); @@ -194,27 +194,27 @@ private GroomRegistryDetails groomRegistryDetails(MarriageDetailsRequest marriag groomRegistryDetails.setAadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getAadharno()); groomRegistryDetails.setPassportno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getPassportno()); groomRegistryDetails.setSocialsecurityno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getSocialsecurityno()); - groomRegistryDetails.setFather_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFather_aadharno()); - groomRegistryDetails.setFathername_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFathername_en()); - groomRegistryDetails.setFathername_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFathername_ml()); - groomRegistryDetails.setFirstname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFirstname_en()); - groomRegistryDetails.setFirstname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFirstname_ml()); - groomRegistryDetails.setMiddlename_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMiddlename_en()); - groomRegistryDetails.setMiddlename_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMiddlename_ml()); - groomRegistryDetails.setLastname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastname_en()); - groomRegistryDetails.setLastname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastname_ml()); + groomRegistryDetails.setFather_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFatherAadharno()); + groomRegistryDetails.setFathername_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFathernameEn()); + groomRegistryDetails.setFathername_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFathernameMl()); + groomRegistryDetails.setFirstname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFirstnameEn()); + groomRegistryDetails.setFirstname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getFirstnameMl()); + groomRegistryDetails.setMiddlename_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMiddlenameEn()); + groomRegistryDetails.setMiddlename_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMiddlenameMl()); + groomRegistryDetails.setLastname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastnameEn()); + groomRegistryDetails.setLastname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastnameMl()); groomRegistryDetails.setMobile(Long.valueOf(String.valueOf(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMobile()))); groomRegistryDetails.setEmailid(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getEmailid()); groomRegistryDetails.setGender(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGender()); groomRegistryDetails.setDateofbirth(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getDateofbirth()); groomRegistryDetails.setAge(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getAge()); - groomRegistryDetails.setParent_guardian(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getParent_guardian()); - groomRegistryDetails.setMothername_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMothername_en()); - groomRegistryDetails.setMothername_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMothername_ml()); - groomRegistryDetails.setMother_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMother_aadharno()); - groomRegistryDetails.setGuardian_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardian_aadharno()); - groomRegistryDetails.setGuardianname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardianname_en()); - groomRegistryDetails.setGuardianname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardianname_ml()); + groomRegistryDetails.setParent_guardian(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getParentGuardian()); + groomRegistryDetails.setMothername_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMothernameEn()); + groomRegistryDetails.setMothername_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMothernameMl()); + groomRegistryDetails.setMother_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMotherAadharno()); + groomRegistryDetails.setGuardian_aadharno(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardianAadharno()); + groomRegistryDetails.setGuardianname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardiannameEn()); + groomRegistryDetails.setGuardianname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGuardiannameMl()); groomRegistryDetails.setMaritalstatusid(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid()); groomRegistryDetails.setGroomNoOfSpouse(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGroomNoOfSpouse()); groomRegistryDetails.setGroomIsSpouseLiving(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGroomIsSpouseLiving()); @@ -230,27 +230,27 @@ private BrideRegistryDetails brideRegistryDetails (MarriageDetailsRequest Marria brideRegistryDetails.setAadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getAadharno()); brideRegistryDetails.setPassportno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getPassportno()); brideRegistryDetails.setSocialsecurityno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getSocialsecurityno()); - brideRegistryDetails.setFather_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFather_aadharno()); - brideRegistryDetails.setFathername_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFathername_en()); - brideRegistryDetails.setFathername_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFathername_ml()); - brideRegistryDetails.setFirstname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFirstname_en()); - brideRegistryDetails.setFirstname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFirstname_ml()); - brideRegistryDetails.setMiddlename_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMiddlename_en()); - brideRegistryDetails.setMiddlename_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMiddlename_ml()); - brideRegistryDetails.setLastname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastname_en()); - brideRegistryDetails.setLastname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastname_ml()); + brideRegistryDetails.setFather_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFatherAadharno()); + brideRegistryDetails.setFathername_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFathernameEn()); + brideRegistryDetails.setFathername_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFathernameMl()); + brideRegistryDetails.setFirstname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFirstnameEn()); + brideRegistryDetails.setFirstname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getFirstnameMl()); + brideRegistryDetails.setMiddlename_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMiddlenameEn()); + brideRegistryDetails.setMiddlename_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMiddlenameMl()); + brideRegistryDetails.setLastname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastnameEn()); + brideRegistryDetails.setLastname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastnameMl()); brideRegistryDetails.setMobile(Long.valueOf(String.valueOf(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMobile()))); brideRegistryDetails.setEmailid(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getEmailid()); brideRegistryDetails.setGender(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGender()); brideRegistryDetails.setDateofbirth(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getDateofbirth()); brideRegistryDetails.setAge(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getAge()); - brideRegistryDetails.setParent_guardian(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getParent_guardian()); - brideRegistryDetails.setMothername_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMothername_en()); - brideRegistryDetails.setMothername_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMothername_ml()); - brideRegistryDetails.setMother_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMother_aadharno()); - brideRegistryDetails.setGuardian_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardian_aadharno()); - brideRegistryDetails.setGuardianname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardianname_en()); - brideRegistryDetails.setGuardianname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardianname_ml()); + brideRegistryDetails.setParent_guardian(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getParentGuardian()); + brideRegistryDetails.setMothername_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMothernameEn()); + brideRegistryDetails.setMothername_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMothernameMl()); + brideRegistryDetails.setMother_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMotherAadharno()); + brideRegistryDetails.setGuardian_aadharno(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardianAadharno()); + brideRegistryDetails.setGuardianname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardiannameEn()); + brideRegistryDetails.setGuardianname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGuardiannameMl()); brideRegistryDetails.setMaritalstatusid(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMaritalstatusid()); brideRegistryDetails.setBrideNoOfSpouse(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getBrideNoOfSpouse()); // brideRegistryDetails.setBrideIsSpouseLiving(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getbrideIsSpouseLiving()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 543bb105da9..5f0702936d5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -68,9 +68,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException(" TALUK INVALID", "The Taluk" + marriagedtls.getTalukid() + " is invalid"); } - if (StringUtils.isEmpty(marriagedtls.getVillage_name())) { + if (StringUtils.isEmpty(marriagedtls.getVillageName())) { throw new CustomException(" VILLAGE INVALID", "The Village" + - marriagedtls.getVillage_name() + " is invalid"); + marriagedtls.getVillageName() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getLbtype())) { @@ -78,9 +78,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriagedtls.getLbtype() + " is invalid"); } - if (StringUtils.isEmpty(marriagedtls.getWard_code())) { + if (StringUtils.isEmpty(marriagedtls.getWardCode())) { throw new CustomException(" LB TYPE INVALID", "The LB type " + - marriagedtls.getWard_code() + " is invalid"); + marriagedtls.getWardCode() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getPlacetype())) { @@ -89,15 +89,15 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriagedtls.getPlacetype() + " is invalid"); } else { if (marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_HOUSE)) { - if (StringUtils.isEmpty(marriagedtls.getLocality_en())) { + if (StringUtils.isEmpty(marriagedtls.getLocalityEn())) { throw new CustomException(" MARRIAGE PLACE LOCALITY ENGLISH INVALID", "The Place Locality Name in English " + - marriagedtls.getLocality_en() + " is invalid"); + marriagedtls.getLocalityEn() + " is invalid"); } - if (StringUtils.isEmpty(marriagedtls.getLocality_ml())) { + if (StringUtils.isEmpty(marriagedtls.getLocalityMl())) { throw new CustomException(" MARRIAGE PLACE LOCALITY MALAYALAM INVALID", "The Place Locality Name in Malayalam " + - marriagedtls.getLocality_ml() + " is invalid"); + marriagedtls.getLocalityMl() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameEn())) { throw new CustomException(" HOUSE NAME ENGLISH INVALID", @@ -169,13 +169,13 @@ public void validateCommonFields(MarriageDetailsRequest request) { } - if (StringUtils.isEmpty(groomInfo.getFirstname_en())) { + if (StringUtils.isEmpty(groomInfo.getFirstnameEn())) { throw new CustomException(" NAME INVALID", "The name in english" + - groomInfo.getFirstname_en() + " is invalid"); + groomInfo.getFirstnameEn() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getFirstname_ml())) { + if (StringUtils.isEmpty(groomInfo.getFirstnameMl())) { throw new CustomException(" NAME INVALID", "The name in malayalam" + - groomInfo.getFirstname_ml() + " is invalid"); + groomInfo.getFirstnameMl() + " is invalid"); } if (groomInfo.getMobile() <= 0) { throw new CustomException("CONTACT NUMBER INVALID", "The groom mobile number " + @@ -189,13 +189,13 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException("GROOM BIRTH DATE INVALID", "The date can't be null"); } - if (StringUtils.isEmpty(groomInfo.getFather_aadharno())) { + if (StringUtils.isEmpty(groomInfo.getFatherAadharno())) { throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + - groomInfo.getFather_aadharno() + " is invalid"); + groomInfo.getFatherAadharno() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getMother_aadharno())) { + if (StringUtils.isEmpty(groomInfo.getMotherAadharno())) { throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + - groomInfo.getMother_aadharno() + " is invalid"); + groomInfo.getMotherAadharno() + " is invalid"); } if (StringUtils.isEmpty(groomInfo.getMaritalstatusid())) { throw new CustomException(" MARITAL STATUS INVALID", @@ -283,13 +283,13 @@ public void validateCommonFields(MarriageDetailsRequest request) { } - if (StringUtils.isEmpty(brideInfo.getFirstname_en())) { + if (StringUtils.isEmpty(brideInfo.getFirstnameEn())) { throw new CustomException(" NAME INVALID", "The name in english" + - brideInfo.getFirstname_en() + " is invalid"); + brideInfo.getFirstnameEn() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getFirstname_ml())) { + if (StringUtils.isEmpty(brideInfo.getFirstnameMl())) { throw new CustomException(" NAME INVALID", "The name in malayalam" + - brideInfo.getFirstname_ml() + " is invalid"); + brideInfo.getFirstnameMl() + " is invalid"); } if (brideInfo.getMobile() <= 0) { throw new CustomException("CONTACT NUMBER INVALID", "The groom mobile number " + @@ -303,13 +303,13 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException("BRIDE BIRTH DATE INVALID", "The date can't be null"); } - if (StringUtils.isEmpty(brideInfo.getFather_aadharno())) { + if (StringUtils.isEmpty(brideInfo.getFatherAadharno())) { throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + - brideInfo.getFather_aadharno() + " is invalid"); + brideInfo.getFatherAadharno() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getMother_aadharno())) { + if (StringUtils.isEmpty(brideInfo.getMotherAadharno())) { throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + - brideInfo.getMother_aadharno() + " is invalid"); + brideInfo.getMotherAadharno() + " is invalid"); } if (StringUtils.isEmpty(brideInfo.getMaritalstatusid())) { throw new CustomException(" MARITAL STATUS INVALID", diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index 61e326709f6..b1be925e079 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -50,11 +50,11 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid() + " is invalid"); } - if (request.getMarriageDetails().get(0).getMarriage_type() != null) { + if (request.getMarriageDetails().get(0).getMarriageType() != null) { if (!masterData.get(MarriageConstants.MARRIAGE_TYPE) - .contains(request.getMarriageDetails().get(0).getMarriage_type())) + .contains(request.getMarriageDetails().get(0).getMarriageType())) errorMap.put("GROOM:TYPE OF MARRIAGE INVALID", "The marriage type " + - request.getMarriageDetails().get(0).getMarriage_type() + " is invalid"); + request.getMarriageDetails().get(0).getMarriageType() + " is invalid"); } if (request.getMarriageDetails().get(0).getPlacetype() != null) { @@ -94,11 +94,11 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms request.getMarriageDetails().get(0).getTalukid() + " is invalid"); } // have to change as villageId - if (request.getMarriageDetails().get(0).getVillage_name() != null) { + if (request.getMarriageDetails().get(0).getVillageName() != null) { if (!masterData.get(MarriageConstants.VILLAGE) - .contains(request.getMarriageDetails().get(0).getVillage_name())) + .contains(request.getMarriageDetails().get(0).getVillageName())) errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + - request.getMarriageDetails().get(0).getVillage_name() + " is invalid"); + request.getMarriageDetails().get(0).getVillageName() + " is invalid"); } if (request.getMarriageDetails().get(0).getLbtype() != null) { if (!masterData.get(MarriageConstants.LBTYPE) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index cd209044464..25537be52ef 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -59,16 +59,16 @@ public class MarriageApplicationDetails { @Size(max = 64) @JsonProperty("marriageWardCode") - private String ward_code; + private String wardCode; @Size(max = 1000) @JsonProperty("marriageStreetEn") - private String street_name_en; + private String streetNameEn; @Size(max = 1000) @JsonProperty("marriageStreetMl") - private String street_name_ml; + private String streetNameMl; @Size(max = 64) @JsonProperty("marriageTalukID") @@ -76,7 +76,7 @@ public class MarriageApplicationDetails { @Size(max = 64) @JsonProperty("marriageVillageName") - private String village_name; + private String villageName; @Size(max = 1000) @JsonProperty("marriageLandmark") @@ -84,25 +84,25 @@ public class MarriageApplicationDetails { @Size(max = 1000) @JsonProperty("marriageLocalityEn") - private String locality_en; + private String localityEn; @Size(max = 1000) @JsonProperty("marriageLocalityMl") - private String locality_ml; + private String localityMl; @Size(max = 64) @JsonProperty("marriageType") - private String marriage_type; + private String marriageType; @Size(max = 200) @JsonProperty("othMarriageType") - private String oth_marriage_type; + private String othMarriageType; @Size(max = 64) @JsonProperty("registrationno") private String registrationno; - @JsonProperty("registration_date") + @JsonProperty("registrationDate") private Long registrationDate; @Size(max = 1000) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java index a7b0ecb0718..04231428267 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java @@ -46,27 +46,27 @@ public class BrideDetails { @Size(max = 200) @JsonProperty("brideFirstnameEn") - private String firstname_en; + private String firstnameEn; @Size(max = 200) @JsonProperty("brideFirstnameMl") - private String firstname_ml; + private String firstnameMl; @Size(max = 200) @JsonProperty("brideMiddlenameEn") - private String middlename_en; + private String middlenameEn; @Size(max = 200) @JsonProperty("brideMiddlenameMl") - private String middlename_ml; + private String middlenameMl; @Size(max = 200) @JsonProperty("brideLastnameEn") - private String lastname_en; + private String lastnameEn; @Size(max = 200) @JsonProperty("brideLastnameMl") - private String lastname_ml; + private String lastnameMl; @JsonProperty("brideMobile") @@ -89,52 +89,43 @@ public class BrideDetails { @Size(max = 64) @JsonProperty("brideParentGuardian") - private String parent_guardian; + private String parentGuardian; @Size(max = 200) @JsonProperty("brideFathernameEn") - private String fathername_en; + private String fathernameEn; @Size(max = 200) @JsonProperty("brideFathernameMl") - private String fathername_ml; + private String fathernameMl; @Size(max = 200) @JsonProperty("brideMothernameEn") - private String mothername_en; + private String mothernameEn; @Size(max = 200) @JsonProperty("brideMothernameMl") - private String mothername_ml; + private String mothernameMl; @Size(max = 15) @JsonProperty("brideFatherAadharNo") - private String father_aadharno; + private String fatherAadharno; @Size(max = 15) @JsonProperty("brideMotherAadharNo") - private String mother_aadharno; + private String motherAadharno; @Size(max = 200) @JsonProperty("brideGuardiannameEn") - private String guardianname_en; + private String guardiannameEn; @Size(max = 200) @JsonProperty("brideGuardiannameMl") - private String guardianname_ml; + private String guardiannameMl; @Size(max = 15) @JsonProperty("brideGuardianAadharNo") - private String guardian_aadharno; - - -// @Size(max = 200) -// @JsonProperty("brideProfessionEn") -// private String profession_en; -// -// @Size(max = 200) -// @JsonProperty("brideProfessionMal") -// private String profession_mal; + private String guardianAadharno; @Size(max = 64) @JsonProperty("brideMaritalstatusID") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java index cd259ec6396..38f812f8b22 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java @@ -48,27 +48,27 @@ public class GroomDetails { @Size(max = 200) @JsonProperty("groomFirstnameEn") - private String firstname_en; + private String firstnameEn; @Size(max = 200) @JsonProperty("groomFirstnameMl") - private String firstname_ml; + private String firstnameMl; @Size(max = 200) @JsonProperty("groomMiddlenameEn") - private String middlename_en; + private String middlenameEn; @Size(max = 200) @JsonProperty("groomMiddlenameMl") - private String middlename_ml; + private String middlenameMl; @Size(max = 200) @JsonProperty("groomLastnameEn") - private String lastname_en; + private String lastnameEn; @Size(max = 200) @JsonProperty("groomLastnameMl") - private String lastname_ml; + private String lastnameMl; @JsonProperty("groomMobile") @@ -90,48 +90,39 @@ public class GroomDetails { @Size(max = 64) @JsonProperty("groomParentGuardian") - private String parent_guardian; + private String parentGuardian; @Size(max = 200) @JsonProperty("groomFathernameEn") - private String fathername_en; + private String fathernameEn; @Size(max = 200) @JsonProperty("groomFathernameMl") - private String fathername_ml; + private String fathernameMl; @Size(max = 200) @JsonProperty("groomMothernameEn") - private String mothername_en; + private String mothernameEn; @Size(max = 200) @JsonProperty("groomMothernameMl") - private String mothername_ml; + private String mothernameMl; @Size(max = 15) @JsonProperty("groomFatherAadharNo") - private String father_aadharno; + private String fatherAadharno; @Size(max = 15) @JsonProperty("groomMotherAadharNo") - private String mother_aadharno; + private String motherAadharno; @Size(max = 200) @JsonProperty("groomGuardiannameEn") - private String guardianname_en; + private String guardiannameEn; @Size(max = 200) @JsonProperty("groomGuardiannameMl") - private String guardianname_ml; + private String guardiannameMl; @Size(max = 15) @JsonProperty("groomGuardianAadharNo") - private String guardian_aadharno; - -// @Size(max = 200) -// @JsonProperty("groomProfessionEn") -// private String profession_en; -// -// -// @Size(max = 200) -// @JsonProperty("groomProfessionMal") -// private String profession_mal; + private String guardianAadharno; @Size(max = 64) @JsonProperty("groomMaritalstatusID") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java index 5351332ba53..70771e62a09 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java @@ -60,11 +60,11 @@ public class WitnessDetails { @JsonProperty("witness1Esigned") private Boolean witness1Esigned; - @JsonProperty("serial_no1") - private Integer serial_no1; + @JsonProperty("serialNo1") + private Integer serialNo1; - @JsonProperty("serial_no2") - private Integer serial_no2; + @JsonProperty("serialNo2") + private Integer serialNo2; @Size(max = 15) @JsonProperty("witness2AadharNo") diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql new file mode 100644 index 00000000000..02c154d33c8 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql @@ -0,0 +1,23 @@ +ALTER TABLE public.eg_marriage_details +ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN bride_expired boolean, +ADD COLUMN groom_expired boolean; + +ALTER TABLE public.eg_marriage_details_audit +ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN bride_expired boolean, +ADD COLUMN groom_expired boolean; + +ALTER TABLE public.eg_register_marriage_details +ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN bride_expired boolean, +ADD COLUMN groom_expired boolean; + +ALTER TABLE public.eg_register_marriage_details_audit +ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN bride_expired boolean, +ADD COLUMN groom_expired boolean; \ No newline at end of file From f15f27b347a7268cb689c168edea577b6a8d7335 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 5 Apr 2023 15:18:22 +0530 Subject: [PATCH 105/420] model --- .../web/model/MarriageApplicationDetails.java | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 25537be52ef..7fd0d69c26b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -178,6 +178,31 @@ public class MarriageApplicationDetails { private String workflowcode; private String assignuser; + @Size(max = 200) + @JsonProperty("brideurl") + private String brideurl; + + @Size(max = 200) + @JsonProperty("groomurl") + private String groomurl; + + @Size(max = 64) + @JsonProperty("imageuuid") + private String imageuuid; + + @Size(max = 256) + @JsonProperty("brideFilestoreid") + private String brideFilestoreid; + + @Size(max = 256) + @JsonProperty("groomFilestoreid") + private String groomFilestoreid; + + @JsonProperty("brideExpired") + private String brideExpired; + + @JsonProperty("groomExpired") + private String groomExpired; @Size(max = 128) // @Html @@ -194,8 +219,5 @@ public class MarriageApplicationDetails { // public void setStatus(String s) { // } - - - } From 9a7f87d98798e28a99b57140a8eefc631b3b8dc5 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Wed, 5 Apr 2023 21:26:33 +0530 Subject: [PATCH 106/420] Field validation --- .../MarriageApplicationValidator.java | 2838 +++++++++++------ .../marriage/utils/MarriageConstants.java | 2 + 2 files changed, 1892 insertions(+), 948 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 5f0702936d5..6d2838fef09 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -21,957 +21,1899 @@ @Component public class MarriageApplicationValidator { - public void validateUpdate(MarriageDetailsRequest request, List searchResult) { - List marriageDetails = request.getMarriageDetails(); + public void validateUpdate(MarriageDetailsRequest request, List searchResult) { + List marriageDetails = request.getMarriageDetails(); - if (CollectionUtils.isEmpty(marriageDetails)) { - throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), "Marriage registration is required."); - } + if (CollectionUtils.isEmpty(marriageDetails)) { + throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), + "Marriage registration is required."); + } - if (marriageDetails.size() > 1) { // NOPMD - throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Supports only single Marriage registration update request."); - } + if (marriageDetails.size() > 1) { // NOPMD + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Supports only single Marriage registration update request."); + } - if (marriageDetails.size() != searchResult.size()) { - throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Marriage registration(s) not found in database."); - } - // IMP:Have to enable after URI submission - validateCommonFields( request); - } - - public void validateCommonFields(MarriageDetailsRequest request) { - - List marriageApplication = request.getMarriageDetails(); - if (marriageApplication != null) { - marriageApplication - .forEach(marriagedtls -> { - GroomDetails groomInfo = marriagedtls.getGroomDetails(); - GroomAddressDetails groomaddressInfo = marriagedtls.getGroomAddressDetails(); - BrideDetails brideInfo = marriagedtls.getBrideDetails(); - BrideAddressDetails brideaddressInfo = marriagedtls.getBrideAddressDetails(); - WitnessDetails witnessDtls = marriagedtls.getWitnessDetails(); - - if (marriagedtls.getDateofmarriage() <= 0) { - throw new CustomException(" DATE OF MARRIAGE INVALID", - "The Date of marriage" + - groomInfo.getResidentship() + " is invalid"); - } - - if (StringUtils.isEmpty(marriagedtls.getDistrictid())) { - throw new CustomException(" DISTRICT INVALID", "The District" + - marriagedtls.getDistrictid() + " is invalid"); - } - - if (StringUtils.isEmpty(marriagedtls.getTalukid())) { - throw new CustomException(" TALUK INVALID", "The Taluk" + - marriagedtls.getTalukid() + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls.getVillageName())) { - throw new CustomException(" VILLAGE INVALID", "The Village" + - marriagedtls.getVillageName() + " is invalid"); - } - - if (StringUtils.isEmpty(marriagedtls.getLbtype())) { - throw new CustomException(" LB TYPE INVALID", "The LB type " + - marriagedtls.getLbtype() + " is invalid"); - } - - if (StringUtils.isEmpty(marriagedtls.getWardCode())) { - throw new CustomException(" LB TYPE INVALID", "The LB type " + - marriagedtls.getWardCode() + " is invalid"); - } - - if (StringUtils.isEmpty(marriagedtls.getPlacetype())) { - throw new CustomException(" MARRIAGE PLACE TYPE INVALID", - "The Place type " + - marriagedtls.getPlacetype() + " is invalid"); - } else { - if (marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_HOUSE)) { - if (StringUtils.isEmpty(marriagedtls.getLocalityEn())) { - throw new CustomException(" MARRIAGE PLACE LOCALITY ENGLISH INVALID", - "The Place Locality Name in English " + - marriagedtls.getLocalityEn() + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls.getLocalityMl())) { - throw new CustomException(" MARRIAGE PLACE LOCALITY MALAYALAM INVALID", - "The Place Locality Name in Malayalam " + - marriagedtls.getLocalityMl() + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameEn())) { - throw new CustomException(" HOUSE NAME ENGLISH INVALID", - "The House Name English " + - marriagedtls.getMarriageHouseNoAndNameEn() + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls.getMarriageHouseNoAndNameMl())) { - throw new CustomException(" HOUSE NAME MALAYALAM INVALID", - "The House Name Malayalam " + - marriagedtls.getMarriageHouseNoAndNameMl() + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls.getLandmark())) { - throw new CustomException(" LANDMARK IS INVALID", "The Landmark" + - marriagedtls.getLandmark() + " is invalid"); - } - } - if (marriagedtls.getPlacetype() - .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION)) { - if (StringUtils.isEmpty(marriagedtls.getPlacenameEn())) { - throw new CustomException(" PLACE NAME ENGLISH IS INVALID", - "The Place Name English" + - marriagedtls.getPlacenameEn() + " is invalid"); - } else { - if (marriagedtls.getPlacenameEn().equals(MarriageConstants.PLACE_OTHER)) { - if (StringUtils.isEmpty(marriagedtls.getPlacenameEn())) { - throw new CustomException(" PLACE NAME ENGLISH IS INVALID", - "The Place Name English" + - marriagedtls.getPlacenameEn() + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls.getPlacenameMl())) { - throw new CustomException(" PLACE NAME MALAYALAM IS INVALID", - "The Place Name Malayalam" + - marriagedtls.getPlacenameMl() + " is invalid"); - } - } - - } - - } - } - - if (StringUtils.isEmpty(groomInfo.getResidentship())) { - throw new CustomException(" RESIDENTSHIP INVALID", "The resident" + - groomInfo.getResidentship() + " is invalid"); - - } else { - if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_INDIAN)) { - if (StringUtils.isEmpty(groomInfo.getAadharno())) { - throw new CustomException(" AADHAR INVALID", "The Aadhar number" + - groomInfo.getAadharno() + " is invalid"); - } - - } else if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_NRI)) { - if (StringUtils.isEmpty(groomInfo.getPassportno())) { - throw new CustomException(" PASSPORT NUMBER INVALID", - "The Passport number" + - groomInfo.getPassportno() + " is invalid"); - } - } else if (groomInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_FOREIGN)) { - if (StringUtils.isEmpty(groomInfo.getPassportno()) - && StringUtils.isEmpty(groomInfo.getSocialsecurityno())) { - throw new CustomException( - " PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID", - "The Passport number and Social security number" + - groomInfo.getPassportno() + "and" + groomInfo.getSocialsecurityno() - + " is invalid"); - } - } - - } - - if (StringUtils.isEmpty(groomInfo.getFirstnameEn())) { - throw new CustomException(" NAME INVALID", "The name in english" + - groomInfo.getFirstnameEn() + " is invalid"); - } - if (StringUtils.isEmpty(groomInfo.getFirstnameMl())) { - throw new CustomException(" NAME INVALID", "The name in malayalam" + - groomInfo.getFirstnameMl() + " is invalid"); - } - if (groomInfo.getMobile() <= 0) { - throw new CustomException("CONTACT NUMBER INVALID", "The groom mobile number " + - groomInfo.getMobile() + " is invalid"); - } - if (StringUtils.isEmpty(groomInfo.getGender())) { - throw new CustomException(" GENDER INVALID", "The gender" + - groomInfo.getGender() + " is invalid"); - } - if ((groomInfo.getDateofbirth() <= 0)) { - throw new CustomException("GROOM BIRTH DATE INVALID", "The date can't be null"); - } - - if (StringUtils.isEmpty(groomInfo.getFatherAadharno())) { - throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + - groomInfo.getFatherAadharno() + " is invalid"); - } - if (StringUtils.isEmpty(groomInfo.getMotherAadharno())) { - throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + - groomInfo.getMotherAadharno() + " is invalid"); - } - if (StringUtils.isEmpty(groomInfo.getMaritalstatusid())) { - throw new CustomException(" MARITAL STATUS INVALID", - "The Marital status" + - groomInfo.getMaritalstatusid() + " is invalid"); - } - // else { - // if - // (groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) - // { - // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE - // INVALID", - // "The Is spouse living and no of spouse living" + - // groomInfo.getGroomIsSpouseLiving() + "and" - // + groomInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else - // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) - // { - // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE - // INVALID", - // "The Is spouse living and no of spouse living" + - // groomInfo.getGroomIsSpouseLiving() + "and" - // + groomInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else - // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) - // { - // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE - // INVALID", - // "The Is spouse living and no of spouse living" + - // groomInfo.getGroomIsSpouseLiving() + "and" - // + groomInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else - // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) - // { - // if (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE - // INVALID", - // "The Is spouse living and no of spouse living" + - // groomInfo.getGroomIsSpouseLiving() + "and" - // + groomInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // } - - if (StringUtils.isEmpty(brideInfo.getResidentship())) { - throw new CustomException("DECESED RESIDENTSHIP INVALID", "The resident" + - brideInfo.getResidentship() + " is invalid"); - - } else { - if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_INDIAN)) { - if (StringUtils.isEmpty(brideInfo.getAadharno())) { - throw new CustomException(" AADHAR INVALID", "The Aadhar number" + - brideInfo.getAadharno() + " is invalid"); - } - - } else if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_NRI)) { - if (StringUtils.isEmpty(brideInfo.getPassportno())) { - throw new CustomException(" PASSPORT NUMBER INVALID", - "The Passport number" + - brideInfo.getPassportno() + " is invalid"); - } - } else if (brideInfo.getResidentship().equals(MarriageConstants.RESIDENTSHIP_FOREIGN)) { - if (StringUtils.isEmpty(brideInfo.getPassportno()) - && StringUtils.isEmpty(brideInfo.getSocialsecurityno())) { - throw new CustomException( - " PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID", - "The Passport number and Social security number" + - brideInfo.getPassportno() + "and" + brideInfo.getSocialsecurityno() - + " is invalid"); - } - } - - } - - if (StringUtils.isEmpty(brideInfo.getFirstnameEn())) { - throw new CustomException(" NAME INVALID", "The name in english" + - brideInfo.getFirstnameEn() + " is invalid"); - } - if (StringUtils.isEmpty(brideInfo.getFirstnameMl())) { - throw new CustomException(" NAME INVALID", "The name in malayalam" + - brideInfo.getFirstnameMl() + " is invalid"); - } - if (brideInfo.getMobile() <= 0) { - throw new CustomException("CONTACT NUMBER INVALID", "The groom mobile number " + - brideInfo.getMobile() + " is invalid"); - } - if (StringUtils.isEmpty(brideInfo.getGender())) { - throw new CustomException(" GENDER INVALID", "The gender" + - brideInfo.getGender() + " is invalid"); - } - if ((brideInfo.getDateofbirth() <= 0)) { - throw new CustomException("BRIDE BIRTH DATE INVALID", "The date can't be null"); - } - - if (StringUtils.isEmpty(brideInfo.getFatherAadharno())) { - throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + - brideInfo.getFatherAadharno() + " is invalid"); - } - if (StringUtils.isEmpty(brideInfo.getMotherAadharno())) { - throw new CustomException(" AADHAR INVALID", "The Father Aadhar number" + - brideInfo.getMotherAadharno() + " is invalid"); - } - if (StringUtils.isEmpty(brideInfo.getMaritalstatusid())) { - throw new CustomException(" MARITAL STATUS INVALID", - "The Marital status" + - brideInfo.getMaritalstatusid() + " is invalid"); - } - // else { - // if - // (brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) - // { - // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE - // INVALID", - // "The Is spouse living and no of spouse living" + - // brideInfo.getGroomIsSpouseLiving() + "and" - // + brideInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else - // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) - // { - // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE - // INVALID", - // "The Is spouse living and no of spouse living" + - // brideInfo.getGroomIsSpouseLiving() + "and" - // + brideInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else - // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) - // { - // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE - // INVALID", - // "The Is spouse living and no of spouse living" + - // brideInfo.getGroomIsSpouseLiving() + "and" - // + brideInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // else - // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) - // { - // if (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) - // && brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) { - // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE - // INVALID", - // "The Is spouse living and no of spouse living" + - // brideInfo.getGroomIsSpouseLiving() + "and" - // + brideInfo.getGroomNoOfSpouse() + " is invalid"); - // } - // } - // } - - // groom permanent address start - - if (groomaddressInfo.getPermtaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { - if (StringUtils.isEmpty(groomaddressInfo.getPermtaddressStateName())) { - throw new CustomException(" STATE INVALID", - "The State" + - groomaddressInfo.getPermtaddressStateName() + " is invalid"); - } else { - if (groomaddressInfo.getPermtaddressStateName() - .equals(MarriageConstants.ADDRESS_KERALA)) { - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrDistrict())) { - throw new CustomException(" DISTRICT INVALID", - "The District" + - groomaddressInfo.getPermntInKeralaAdrDistrict() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrTaluk())) { - throw new CustomException(" TALUK INVALID", - "The Taluk" + - groomaddressInfo.getPermntInKeralaAdrTaluk() + " is invalid"); - } - - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrVillage())) { - throw new CustomException(" VILLAGE INVALID", - "The Village" + - groomaddressInfo.getPresentInsideKeralaVillage() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLBName())) { - throw new CustomException(" LOCALBODY NAME INVALID", - "The Localbody Name" + - groomaddressInfo.getPermntInKeralaAdrLBName() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaWardNo())) { - throw new CustomException(" WARD INVALID", - "The Ward" + - groomaddressInfo.getPermntInKeralaWardNo() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrPostOffice())) { - throw new CustomException(" POSTOFFICE INVALID", - "The Postofficef" + - groomaddressInfo.getPermntInKeralaAdrPostOffice() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrPincode())) { - throw new CustomException(" PINCODE INVALID", - "The Pincode" + - groomaddressInfo.getPermntInKeralaAdrPincode() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLocalityNameEn())) { - throw new CustomException(" LOCALITY NAME ENGLISH IS INVALID", - "The Locality English" + - groomaddressInfo.getPermntInKeralaAdrLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrLocalityNameMl())) { - throw new CustomException(" LOCALITY NAME MALAYALAM IS INVALID", - "The Locality Malayalam" + - groomaddressInfo.getPermntInKeralaAdrLocalityNameMl() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrHouseNameEn())) { - throw new CustomException(" HOUSE NAME ENGLISH INVALID", - "The House Name English" + - groomaddressInfo.getPermntInKeralaAdrHouseNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrHouseNameMl())) { - throw new CustomException(" HOUSE NAME MALAYALAM INVALID", - "The House Name Malayalam" + - groomaddressInfo.getPermntInKeralaAdrHouseNameMl() - + " is invalid"); - } - } - } - } else { - if (StringUtils.isEmpty(groomaddressInfo.getPermntOutSideIndiaProvinceEn())) { - throw new CustomException(" PROVINCE ENGLISH INVALID", - "The Province English" + - groomaddressInfo.getPermntOutSideIndiaProvinceEn() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntOutSideIndiaProvinceMl())) { - throw new CustomException(" PROVINCE MALAYALAM INVALID", - "The Province Malayalam" + - groomaddressInfo.getPermntOutSideIndiaProvinceMl() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaVillage())) { - throw new CustomException(" VILLAGE INVALID", - "The Village" + - groomaddressInfo.getPermntOutsideIndiaVillage() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaCityTown())) { - throw new CustomException(" CITY INVALID", - "The City" + - groomaddressInfo.getPermntOutsideIndiaCityTown() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermanentOutsideIndiaPostCode())) { - throw new CustomException(" POST CODE INVALID", - "The Post Code" + - groomaddressInfo.getPermanentOutsideIndiaPostCode() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLineoneEn())) { - throw new CustomException(" ADDRESS LINE ONE ENGLISH INVALID", - "The Adress Line One English" + - groomaddressInfo.getPermntOutsideIndiaLineoneEn() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLinetwoEn())) { - throw new CustomException(" ADDRESS LINE Two ENGLISH INVALID", - "The Adress Line Two English" + - groomaddressInfo.getPermntOutsideIndiaLinetwoEn() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLineoneMl())) { - throw new CustomException(" ADDRESS LINE ONE MALAYALAM INVALID", - "The Adress Line One Malayalam" + - groomaddressInfo.getPermntOutsideIndiaLineoneMl() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPermntOutsideIndiaLinetwoMl())) { - throw new CustomException(" ADDRESS LINE TWO MALAYALAM INVALID", - "The Adress Line Two Malayalam" + - groomaddressInfo.getPermntOutsideIndiaLinetwoMl() + " is invalid"); - } - - } - // groom permanent address end - // groom present address start - if (groomaddressInfo.getPresentaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { - if (StringUtils.isEmpty(groomaddressInfo.getPresentaddressStateName())) { - throw new CustomException(" STATE INVALID", - "The State" + - groomaddressInfo.getPresentaddressStateName() + " is invalid"); - } else { - if (groomaddressInfo.getPresentaddressStateName() - .equals(MarriageConstants.ADDRESS_KERALA)) { - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaDistrict())) { - throw new CustomException(" DISTRICT INVALID", - groomaddressInfo.getPresentInsideKeralaDistrict() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaTaluk())) { - throw new CustomException(" TALUK INVALID", - "The Taluk" + - groomaddressInfo.getPresentInsideKeralaTaluk() + " is invalid"); - } - - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaVillage())) { - throw new CustomException(" VILLAGE INVALID", - "The Village" + - groomaddressInfo.getPresentInsideKeralaVillage() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLBName())) { - throw new CustomException(" LOCALBODY NAME INVALID", - "The Localbody Name" + - groomaddressInfo.getPresentInsideKeralaLBName() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentWardNo())) { - throw new CustomException(" WARD INVALID", - "The Ward" + - groomaddressInfo.getPresentWardNo() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaPostOffice())) { - throw new CustomException(" POSTOFFICE INVALID", - "The Postofficef" + - groomaddressInfo.getPresentInsideKeralaPostOffice() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaPincode())) { - throw new CustomException(" PINCODE INVALID", - "The Pincode" + - groomaddressInfo.getPresentInsideKeralaPincode() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLocalityNameEn())) { - throw new CustomException(" LOCALITY NAME ENGLISH IS INVALID", - "The Locality English" + - groomaddressInfo.getPresentInsideKeralaLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaLocalityNameMl())) { - throw new CustomException(" LOCALITY NAME MALAYALAM IS INVALID", - "The Locality Malayalam" + - groomaddressInfo.getPresentInsideKeralaLocalityNameMl() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaHouseNameEn())) { - throw new CustomException(" HOUSE NAME ENGLISH INVALID", - "The House Name English" + - groomaddressInfo.getPresentInsideKeralaHouseNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentInsideKeralaHouseNameMl())) { - throw new CustomException(" HOUSE NAME MALAYALAM INVALID", - "The House Name Malayalam" + - groomaddressInfo.getPresentInsideKeralaHouseNameMl() - + " is invalid"); - } - } - } - } else { - if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaProvinceEn())) { - throw new CustomException(" PROVINCE ENGLISH INVALID", - "The Province English" + - groomaddressInfo.getPresentOutSideIndiaProvinceEn() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaProvinceMl())) { - throw new CustomException(" PROVINCE MALAYALAM INVALID", - "The Province Malayalam" + - groomaddressInfo.getPresentOutSideIndiaProvinceMl() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaadrsVillage())) { - throw new CustomException(" VILLAGE INVALID", - "The Village" + - groomaddressInfo.getPresentOutSideIndiaadrsVillage() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaadrsCityTown())) { - throw new CustomException(" CITY INVALID", - "The City" + - groomaddressInfo.getPresentOutSideIndiaadrsCityTown() + " is invalid"); - } - // if(StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaPostCode())) - // { - // throw new CustomException(" POST CODE INVALID", - // "The Post Code" + - // groomaddressInfo.getPresentOutSideIndiaPostCode() + " is invalid"); - // } - if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressEn())) { - throw new CustomException(" ADDRESS LINE ONE ENGLISH INVALID", - "The Adress Line One English" + - groomaddressInfo.getPresentOutSideIndiaAdressEn() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressEnB())) { - throw new CustomException(" ADDRESS LINE Two ENGLISH INVALID", - "The Adress Line Two English" + - groomaddressInfo.getPresentOutSideIndiaAdressEnB() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressMl())) { - throw new CustomException(" ADDRESS LINE ONE MALAYALAM INVALID", - "The Adress Line One Malayalam" + - groomaddressInfo.getPresentOutSideIndiaAdressMl() + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaAdressMlB())) { - throw new CustomException(" ADDRESS LINE TWO MALAYALAM INVALID", - "The Adress Line Two Malayalam" + - groomaddressInfo.getPresentOutSideIndiaAdressMlB() + " is invalid"); - } - - } - // groom present address end - // bride permanent address start - - if (brideaddressInfo.getPermtaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { - if (StringUtils.isEmpty(brideaddressInfo.getPermtaddressStateName())) { - throw new CustomException(" STATE INVALID", - "The State" + - brideaddressInfo.getPermtaddressStateName() + " is invalid"); - } else { - if (brideaddressInfo.getPermtaddressStateName() - .equals(MarriageConstants.ADDRESS_KERALA)) { - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrDistrict())) { - throw new CustomException(" DISTRICT INVALID", - "The District" + - brideaddressInfo.getPermntInKeralaAdrDistrict() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrTaluk())) { - throw new CustomException(" TALUK INVALID", - "The Taluk" + - brideaddressInfo.getPermntInKeralaAdrTaluk() + " is invalid"); - } - - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrVillage())) { - throw new CustomException(" VILLAGE INVALID", - "The Village" + - brideaddressInfo.getPresentInsideKeralaVillage() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLBName())) { - throw new CustomException(" LOCALBODY NAME INVALID", - "The Localbody Name" + - brideaddressInfo.getPermntInKeralaAdrLBName() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaWardNo())) { - throw new CustomException("WARD INVALID", - "The Ward" + - brideaddressInfo.getPermntInKeralaWardNo() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrPostOffice())) { - throw new CustomException(" POSTOFFICE INVALID", - "The Postofficef" + - brideaddressInfo.getPermntInKeralaAdrPostOffice() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrPincode())) { - throw new CustomException(" PINCODE INVALID", - "The Pincode" + - brideaddressInfo.getPermntInKeralaAdrPincode() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLocalityNameEn())) { - throw new CustomException(" LOCALITY NAME ENGLISH IS INVALID", - "The Locality English" + - brideaddressInfo.getPermntInKeralaAdrLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrLocalityNameMl())) { - throw new CustomException(" LOCALITY NAME MALAYALAM IS INVALID", - "The Locality Malayalam" + - brideaddressInfo.getPermntInKeralaAdrLocalityNameMl() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrHouseNameEn())) { - throw new CustomException(" HOUSE NAME ENGLISH INVALID", - "The House Name English" + - brideaddressInfo.getPermntInKeralaAdrHouseNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntInKeralaAdrHouseNameMl())) { - throw new CustomException(" HOUSE NAME MALAYALAM INVALID", - "The House Name Malayalam" + - brideaddressInfo.getPermntInKeralaAdrHouseNameMl() - + " is invalid"); - } - } - } - } else { - if (StringUtils.isEmpty(brideaddressInfo.getPermntOutSideIndiaProvinceEn())) { - throw new CustomException(" PROVINCE ENGLISH INVALID", - "The Province English" + - brideaddressInfo.getPermntOutSideIndiaProvinceEn() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntOutSideIndiaProvinceMl())) { - throw new CustomException(" PROVINCE MALAYALAM INVALID", - "The Province Malayalam" + - brideaddressInfo.getPermntOutSideIndiaProvinceMl() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaVillage())) { - throw new CustomException(" VILLAGE INVALID", - "The Village" + - brideaddressInfo.getPermntOutsideIndiaVillage() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaCityTown())) { - throw new CustomException(" CITY INVALID", - "The City" + - brideaddressInfo.getPermntOutsideIndiaCityTown() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermanentOutsideIndiaPostCode())) { - throw new CustomException(" POST CODE INVALID", - "The Post Code" + - brideaddressInfo.getPermanentOutsideIndiaPostCode() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLineoneEn())) { - throw new CustomException(" ADDRESS LINE ONE ENGLISH INVALID", - "The Adress Line One English" + - brideaddressInfo.getPermntOutsideIndiaLineoneEn() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLinetwoEn())) { - throw new CustomException(" ADDRESS LINE Two ENGLISH INVALID", - "The Adress Line Two English" + - brideaddressInfo.getPermntOutsideIndiaLinetwoEn() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLineoneMl())) { - throw new CustomException(" ADDRESS LINE ONE MALAYALAM INVALID", - "The Adress Line One Malayalam" + - brideaddressInfo.getPermntOutsideIndiaLineoneMl() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPermntOutsideIndiaLinetwoMl())) { - throw new CustomException(" ADDRESS LINE TWO MALAYALAM INVALID", - "The Adress Line Two Malayalam" + - brideaddressInfo.getPermntOutsideIndiaLinetwoMl() + " is invalid"); - } - - } - // bride permanent address end - // bride present address start - if (brideaddressInfo.getPresentaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { - if (StringUtils.isEmpty(brideaddressInfo.getPresentaddressStateName())) { - throw new CustomException(" STATE INVALID", - "The State" + - brideaddressInfo.getPresentaddressStateName() + " is invalid"); - } else { - if (brideaddressInfo.getPresentaddressStateName() - .equals(MarriageConstants.ADDRESS_KERALA)) { - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaDistrict())) { - throw new CustomException(" DISTRICT INVALID", - "The District" + - brideaddressInfo.getPresentInsideKeralaDistrict() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaTaluk())) { - throw new CustomException(" TALUK INVALID", - "The Taluk" + - brideaddressInfo.getPresentInsideKeralaTaluk() + " is invalid"); - } - - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaVillage())) { - throw new CustomException(" VILLAGE INVALID", - "The Village" + - brideaddressInfo.getPresentInsideKeralaVillage() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLBName())) { - throw new CustomException(" LOCALBODY NAME INVALID", - "The Localbody Name" + - brideaddressInfo.getPresentInsideKeralaLBName() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentWardNo())) { - throw new CustomException(" WARD INVALID", - "The Ward" + - brideaddressInfo.getPresentWardNo() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaPostOffice())) { - throw new CustomException(" POSTOFFICE INVALID", - "The Postofficef" + - brideaddressInfo.getPresentInsideKeralaPostOffice() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaPincode())) { - throw new CustomException(" PINCODE INVALID", - "The Pincode" + - brideaddressInfo.getPresentInsideKeralaPincode() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLocalityNameEn())) { - throw new CustomException(" LOCALITY NAME ENGLISH IS INVALID", - "The Locality English" + - brideaddressInfo.getPresentInsideKeralaLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaLocalityNameMl())) { - throw new CustomException(" LOCALITY NAME MALAYALAM IS INVALID", - "The Locality Malayalam" + - brideaddressInfo.getPresentInsideKeralaLocalityNameMl() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaHouseNameEn())) { - throw new CustomException(" HOUSE NAME ENGLISH INVALID", - "The House Name English" + - brideaddressInfo.getPresentInsideKeralaHouseNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaHouseNameMl())) { - throw new CustomException(" HOUSE NAME MALAYALAM INVALID", - "The House Name Malayalam" + - brideaddressInfo.getPresentInsideKeralaHouseNameMl() - + " is invalid"); - } - } - } - } else { - if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaProvinceEn())) { - throw new CustomException(" PROVINCE ENGLISH INVALID", - "The Province English" + - brideaddressInfo.getPresentOutSideIndiaProvinceEn() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaProvinceMl())) { - throw new CustomException(" PROVINCE MALAYALAM INVALID", - "The Province Malayalam" + - brideaddressInfo.getPresentOutSideIndiaProvinceMl() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaadrsVillage())) { - throw new CustomException(" VILLAGE INVALID", - "The Village" + - brideaddressInfo.getPresentOutSideIndiaadrsVillage() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaadrsCityTown())) { - throw new CustomException(" CITY INVALID", - "The City" + - brideaddressInfo.getPresentOutSideIndiaadrsCityTown() + " is invalid"); - } - if(StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaPostCode())) - { - throw new CustomException(" POST CODE INVALID", - "The Post Code" + - brideaddressInfo.getPresentOutSideIndiaPostCode() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressEn())) { - throw new CustomException(" ADDRESS LINE ONE ENGLISH INVALID", - "The Adress Line One English" + - brideaddressInfo.getPresentOutSideIndiaAdressEn() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressEnB())) { - throw new CustomException(" ADDRESS LINE Two ENGLISH INVALID", - "The Adress Line Two English" + - brideaddressInfo.getPresentOutSideIndiaAdressEnB() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressMl())) { - throw new CustomException(" ADDRESS LINE ONE MALAYALAM INVALID", - "The Adress Line One Malayalam" + - brideaddressInfo.getPresentOutSideIndiaAdressMl() + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo.getPresentOutSideIndiaAdressMlB())) { - throw new CustomException(" ADDRESS LINE TWO MALAYALAM INVALID", - "The Adress Line Two Malayalam" + - brideaddressInfo.getPresentOutSideIndiaAdressMlB() + " is invalid"); - } - - } - // witness1 - if(StringUtils.isEmpty(witnessDtls.getWitness1AadharNo())){ - - throw new CustomException(" WITNESS1 AADHAR NUMBER INVALID", - "The Witness1 Aadhar Number" + - witnessDtls.getWitness1AadharNo() + " is invalid"); - } - if(StringUtils.isEmpty(witnessDtls.getWitness1NameEn())){ - - throw new CustomException(" WITNESS1 NAME ENGLISH INVALID", - "The Witness1 Name English" + - witnessDtls.getWitness1NameEn() + " is invalid"); - } - if(StringUtils.isEmpty(witnessDtls.getWitness1NameMl())){ - - throw new CustomException(" WITNESS1 NAME MALAYALAM INVALID", - "The Witness1 Name Malayalam" + - witnessDtls.getWitness1NameMl() + " is invalid"); - } - if((witnessDtls.getWitness1Age()<18 && witnessDtls.getWitness1Age()==0)){ - - throw new CustomException(" WITNESS1 AGE INVALID", - "The Witness1 Age" + - witnessDtls.getWitness1Age() + " is invalid"); - } - if((StringUtils.isEmpty(witnessDtls.getWitness1AddresSEn()))){ - - throw new CustomException(" WITNESS1 ADDRESS ENGLISH INVALID", - "The Witness1 Address English" + - witnessDtls.getWitness1AddresSEn() + " is invalid"); - } - if((StringUtils.isEmpty(witnessDtls.getWitness1AddressMl()))){ - - throw new CustomException(" WITNESS1 ADDRESS MALAYALAM INVALID", - "The Witness1 Address Malayalam" + - witnessDtls.getWitness1AddressMl() + " is invalid"); - } - if((witnessDtls.getWitness1Mobile()<=0 )){ - - throw new CustomException(" WITNESS1 MOBILE NUMBER INVALID", - "The Witness1 Mobile Number " + - witnessDtls.getWitness1Mobile() + " is invalid"); - } - if((witnessDtls.getWitness1Esigned().equals(MarriageConstants.VALUE_FALSE))){ - - throw new CustomException(" WITNESS1 E-SIGN INVALID", - "The Witness1 E-sign " + - witnessDtls.getWitness1Esigned()+ " is invalid"); - } - - - - - - - - //witness2 - if(StringUtils.isEmpty(witnessDtls.getWitness2AadharNo())){ - - throw new CustomException(" WITNESS2 AADHAR NUMBER INVALID", - "The Witness2 Aadhar Number" + - witnessDtls.getWitness2AadharNo() + " is invalid"); - } - if(StringUtils.isEmpty(witnessDtls.getWitness2NameEn())){ - - throw new CustomException(" WITNESS2 NAME ENGLISH INVALID", - "The Witness2 Name English" + - witnessDtls.getWitness2NameEn() + " is invalid"); - } - if(StringUtils.isEmpty(witnessDtls.getWitness2NameMl())){ - - throw new CustomException(" WITNESS2 NAME MALAYALAM INVALID", - "The Witness2 Name Malayalam" + - witnessDtls.getWitness2NameMl() + " is invalid"); - } - if((witnessDtls.getWitness2Age()<18 && witnessDtls.getWitness2Age()==0)){ - - throw new CustomException(" WITNESS2 AGE INVALID", - "The Witness2 Age" + - witnessDtls.getWitness2Age() + " is invalid"); - } - if((StringUtils.isEmpty(witnessDtls.getWitness2AddresSEn()))){ - - throw new CustomException(" WITNESS2 ADDRESS ENGLISH INVALID", - "The Witness2 Address English" + - witnessDtls.getWitness2AddresSEn() + " is invalid"); - } - if((StringUtils.isEmpty(witnessDtls.getWitness2AddressMl()))){ - - throw new CustomException(" WITNESS2 ADDRESS MALAYALAM INVALID", - "The Witness2 Address Malayalam" + - witnessDtls.getWitness2AddressMl() + " is invalid"); - } - if((witnessDtls.getWitness2Mobile()<=0 )){ - - throw new CustomException(" WITNESS2 MOBILE NUMBER INVALID", - "The Witness2 Mobile Number " + - witnessDtls.getWitness2Mobile() + " is invalid"); - } - if((witnessDtls.getWitness2Esigned().equals(MarriageConstants.VALUE_FALSE))){ - - throw new CustomException(" WITNESS2 E-SIGN INVALID", - "The Witness2 E-sign " + - witnessDtls.getWitness2Esigned()+ " is invalid"); - } - }); + if (marriageDetails.size() != searchResult.size()) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Marriage registration(s) not found in database."); + } + // IMP:Have to enable after URI submission + validateCommonFields(request); } - } + public void validateCommonFields(MarriageDetailsRequest request) { + + List marriageApplication = request.getMarriageDetails(); + if (marriageApplication != null) { + marriageApplication + .forEach(marriagedtls -> { + GroomDetails groomInfo = marriagedtls.getGroomDetails(); + GroomAddressDetails groomaddressInfo = marriagedtls + .getGroomAddressDetails(); + BrideDetails brideInfo = marriagedtls.getBrideDetails(); + BrideAddressDetails brideaddressInfo = marriagedtls + .getBrideAddressDetails(); + WitnessDetails witnessDtls = marriagedtls.getWitnessDetails(); + + if (marriagedtls.getDateofmarriage() <= 0) { + throw new CustomException(" DATE OF MARRIAGE INVALID ", + "The Date of marriage " + + groomInfo.getResidentship() + + " is invalid"); + } + + if (StringUtils.isEmpty(marriagedtls.getDistrictid())) { + throw new CustomException(" DISTRICT INVALID ", + "The District " + + marriagedtls.getDistrictid() + + " is invalid"); + } + + if (StringUtils.isEmpty(marriagedtls.getTalukid())) { + throw new CustomException(" TALUK INVALID ", "The Taluk " + + marriagedtls.getTalukid() + " is invalid"); + } + if (StringUtils.isEmpty(marriagedtls.getVillage_name())) { + throw new CustomException(" VILLAGE INVALID ", "The Village " + + marriagedtls.getVillage_name() + " is invalid"); + } + + if (StringUtils.isEmpty(marriagedtls.getLbtype())) { + throw new CustomException(" LB TYPE INVALID ", "The LB type " + + marriagedtls.getLbtype() + " is invalid"); + } + + if (StringUtils.isEmpty(marriagedtls.getWard_code())) { + throw new CustomException(" WARD INVALID ", "The Ward " + + marriagedtls.getWard_code() + " is invalid"); + } + + if (StringUtils.isEmpty(marriagedtls.getPlacetype())) { + throw new CustomException(" MARRIAGE PLACE TYPE INVALID ", + "The Place type " + + marriagedtls.getPlacetype() + + " is invalid"); + } else { + if (marriagedtls.getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_HOUSE)) { + if (StringUtils.isEmpty( + marriagedtls.getLocality_en())) { + throw new CustomException( + " MARRIAGE PLACE LOCALITY ENGLISH INVALID ", + "The Place Locality Name in English " + + + marriagedtls.getLocality_en() + + " is invalid"); + } + if (StringUtils.isEmpty( + marriagedtls.getLocality_ml())) { + throw new CustomException( + " MARRIAGE PLACE LOCALITY MALAYALAM INVALID ", + "The Place Locality Name in Malayalam " + + + marriagedtls.getLocality_ml() + + " is invalid"); + } + if (StringUtils.isEmpty(marriagedtls + .getMarriageHouseNoAndNameEn())) { + throw new CustomException( + " HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + marriagedtls.getMarriageHouseNoAndNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(marriagedtls + .getMarriageHouseNoAndNameMl())) { + throw new CustomException( + " HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + marriagedtls.getMarriageHouseNoAndNameMl() + + " is invalid"); + } + + } + if (marriagedtls.getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) + || marriagedtls.getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) { + if (StringUtils.isEmpty( + marriagedtls.getPlacenameEn())) { + throw new CustomException( + " PLACE NAME ENGLISH IS INVALID ", + "The Place Name English " + + marriagedtls.getPlacenameEn() + + " is invalid"); + } else { + if (marriagedtls.getPlacenameEn().equals( + MarriageConstants.PLACE_OTHER)) { + if (StringUtils.isEmpty(marriagedtls + .getPlacenameEn())) { + throw new CustomException( + " PLACE NAME ENGLISH IS INVALID ", + "The Place Name English " + + + marriagedtls.getPlacenameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(marriagedtls + .getPlacenameMl())) { + throw new CustomException( + " PLACE NAME MALAYALAM IS INVALID ", + "The Place Name Malayalam " + + + marriagedtls.getPlacenameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(marriagedtls + .getLocality_en())) { + throw new CustomException( + " LOCALITY NAME ENGLISH IS INVALID ", + "The Locality Name English " + + + marriagedtls.getPlacenameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(marriagedtls + .getLocality_ml())) { + throw new CustomException( + " LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Name Malayalam " + + + marriagedtls.getPlacenameMl() + + " is invalid"); + } + } + + } + + } + if (marriagedtls.getPlacetype().equals( + MarriageConstants.PLACE_TYPE_PRIVATE_PLACE) || + (marriagedtls.getPlacetype().equals( + MarriageConstants.PLACE_TYPE_PUBLIC_PLACE))) { + if (StringUtils.isEmpty( + marriagedtls.getPlacenameEn())) { + throw new CustomException( + " PLACE NAME ENGLISH IS INVALID ", + "The Place Name English " + + marriagedtls.getPlacenameEn() + + " is invalid"); + } + if (StringUtils.isEmpty( + marriagedtls.getPlacenameMl())) { + throw new CustomException( + " PLACE NAME MALAYALAM IS INVALID ", + "The Place Name Malayalam " + + marriagedtls.getPlacenameMl() + + " is invalid"); + } + if (StringUtils.isEmpty( + marriagedtls.getLocality_en())) { + throw new CustomException( + " LOCALITY NAME ENGLISH IS INVALID ", + "The Locality Name English " + + marriagedtls.getPlacenameMl() + + " is invalid"); + } + if (StringUtils.isEmpty( + marriagedtls.getLocality_ml())) { + throw new CustomException( + " LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Name Malayalam" + + marriagedtls.getPlacenameMl() + + " is invalid"); + } + } + } + + if (StringUtils.isEmpty(groomInfo.getResidentship())) { + throw new CustomException("GROOM RESIDENTSHIP INVALID ", + "The groom residentship " + + groomInfo.getResidentship() + + " is invalid"); + + } else { + if (groomInfo.getResidentship().equals( + MarriageConstants.RESIDENTSHIP_INDIAN)) { + if (StringUtils.isEmpty(groomInfo.getAadharno())) { + throw new CustomException( + "GROOM AADHAR INVALID ", + "The groom Aadhar number " + + groomInfo.getAadharno() + + " is invalid"); + } + + } else if (groomInfo.getResidentship() + .equals(MarriageConstants.RESIDENTSHIP_NRI)) { + if (StringUtils.isEmpty(groomInfo.getPassportno())) { + throw new CustomException( + "GROOM PASSPORT NUMBER INVALID ", + "The groom Passport number " + + groomInfo.getPassportno() + + " is invalid"); + } + } else if (groomInfo.getResidentship().equals( + MarriageConstants.RESIDENTSHIP_FOREIGN)) { + if (StringUtils.isEmpty(groomInfo.getPassportno()) + && StringUtils.isEmpty(groomInfo + .getSocialsecurityno())) { + throw new CustomException( + "GROOM PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID ", + "The groom Passport number and Social security number " + + + groomInfo.getPassportno() + + " and " + + groomInfo.getSocialsecurityno() + + " is invalid"); + } + } + + } + + if (StringUtils.isEmpty(groomInfo.getFirstname_en())) { + throw new CustomException(" GROOM NAME ENGLISH INVALID ", + "The groom name in english " + + groomInfo.getFirstname_en() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getFirstname_ml())) { + throw new CustomException("GROOM NAME MALAYALAM INVALID ", + "The groom name in malayalam " + + groomInfo.getFirstname_ml() + + " is invalid"); + } + if (groomInfo.getMobile() <= 0) { + throw new CustomException("GROOM CONTACT NUMBER INVALID ", + "The groom mobile number " + + groomInfo.getMobile() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getGender())) { + throw new CustomException("GROOM GENDER INVALID ", + "The groom gender " + + groomInfo.getGender() + + " is invalid"); + } + if ((groomInfo.getDateofbirth() <= 0)) { + throw new CustomException("GROOM BIRTH DATE INVALID ", + "The groom date of birth can't be null "); + } + if (groomInfo.getParent_guardian().equals(MarriageConstants.PARENT)) { + if (StringUtils.isEmpty(groomInfo.getFather_aadharno())) { + throw new CustomException( + "GROOM FATHER AADHAR INVALID ", + "The groom Father Aadhar number " + + groomInfo.getFather_aadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getMother_aadharno())) { + throw new CustomException( + " GROOM MOTHER AADHAR INVALID ", + "The groom Father Aadhar number " + + groomInfo.getMother_aadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getFathername_en())) { + throw new CustomException(" GROOM FATHER NAME ENGLISH ", + "The groom Father Name in english " + + groomInfo.getFathername_en() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getFathername_ml())) { + throw new CustomException( + " GROOM FATHER NAME MALAYALAM ", + "The groom Father Name in malayalam " + + + groomInfo.getFathername_ml() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getMothername_en())) { + throw new CustomException(" GROOM MOTHER NAME ENGLISH ", + "The groom Mother Name in english " + + groomInfo.getMothername_en() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getMothername_ml())) { + throw new CustomException( + " GROOM MOTHER NAME MALAYALAM ", + "The groom Mother Name in malayalam " + + + groomInfo.getMothername_ml() + + " is invalid"); + } + } else { + if (StringUtils.isEmpty(groomInfo.getGuardian_aadharno())) { + throw new CustomException( + " GROOM GUARDIAN AADHAR INVALID ", + "The groom Guardian Aadhar number " + + groomInfo.getGuardian_aadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getGuardianname_en())) { + throw new CustomException( + " GROOM GUARDIAN NAME ENGLISH ", + "The groom Guardian Name in english " + + + groomInfo.getGuardianname_en() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getGuardianname_ml())) { + throw new CustomException( + " GROOM GUARDIAN NAME MALAYALAM ", + "The groom Guardian Name in malayalam " + + + groomInfo.getGuardianname_ml() + + " is invalid"); + } + } + + if (StringUtils.isEmpty(groomInfo.getMaritalstatusid())) { + throw new CustomException("GROOM MARITAL STATUS INVALID ", + "The groom Marital status " + + groomInfo.getMaritalstatusid() + + " is invalid"); + } + // else { + // if + // (groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) + // { + // if + // (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && + // groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) + // { + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) + // { + // if + // (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && + // groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) + // { + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) + // { + // if + // (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && + // groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) + // { + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(groomInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) + // { + // if + // (groomInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && + // groomInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) + // { + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The Is spouse living and no of spouse living" + + // groomInfo.getGroomIsSpouseLiving() + "and" + // + groomInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // } + + if (StringUtils.isEmpty(brideInfo.getResidentship())) { + throw new CustomException("BRIDE RESIDENTSHIP INVALID ", + "The bride resident" + + brideInfo.getResidentship() + + " is invalid "); + + } else { + if (brideInfo.getResidentship().equals( + MarriageConstants.RESIDENTSHIP_INDIAN)) { + if (StringUtils.isEmpty(brideInfo.getAadharno())) { + throw new CustomException( + "BRIDE AADHAR INVALID ", + "The bride Aadhar number " + + brideInfo.getAadharno() + + " is invalid"); + } + + } else if (brideInfo.getResidentship() + .equals(MarriageConstants.RESIDENTSHIP_NRI)) { + if (StringUtils.isEmpty(brideInfo.getPassportno())) { + throw new CustomException( + "BRIDE PASSPORT NUMBER INVALID ", + "The bride Passport number " + + brideInfo.getPassportno() + + " is invalid"); + } + } else if (brideInfo.getResidentship().equals( + MarriageConstants.RESIDENTSHIP_FOREIGN)) { + if (StringUtils.isEmpty(brideInfo.getPassportno()) + && StringUtils.isEmpty(brideInfo + .getSocialsecurityno())) { + throw new CustomException( + "BRIDE PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID ", + "The bride Passport number and Social security number " + + + brideInfo.getPassportno() + + "and" + + brideInfo.getSocialsecurityno() + + " is invalid"); + } + } + + } + + if (StringUtils.isEmpty(brideInfo.getFirstname_en())) { + throw new CustomException("BRIDE NAME ENGLISH INVALID ", + "The bride name in english " + + brideInfo.getFirstname_en() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getFirstname_ml())) { + throw new CustomException("BRIDE NAME MALAYALAM INVALID ", + "The bride name in malayalam " + + brideInfo.getFirstname_ml() + + " is invalid"); + } + if (brideInfo.getMobile() <= 0) { + throw new CustomException("BRIDE CONTACT NUMBER INVALID ", + "The bride mobile number " + + brideInfo.getMobile() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getGender())) { + throw new CustomException("BRIDE GENDER INVALID", + "The bride gender " + + brideInfo.getGender() + + " is invalid "); + } + if ((brideInfo.getDateofbirth() <= 0)) { + throw new CustomException("BRIDE DATE OF BIRTH INVALID ", + "The bride date of birth can't be null "); + } + if (groomInfo.getParent_guardian().equals(MarriageConstants.PARENT)) { + if (StringUtils.isEmpty(brideInfo.getFather_aadharno())) { + throw new CustomException( + "BRIDE: FATHER AADHAR INVALID ", + "The Father's Aadhar number " + + brideInfo.getFather_aadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getMother_aadharno())) { + throw new CustomException( + "BRIDE:MOTHER AADHAR INVALID ", + "The mother's Aadhar number " + + brideInfo.getMother_aadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getFathername_en())) { + throw new CustomException(" BRIDE FATHER NAME ENGLISH ", + "The bride Father Name in english " + + brideInfo.getFathername_en() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getFathername_ml())) { + throw new CustomException( + " BRIDE FATHER NAME MALAYALAM ", + "The bride Father Name in malayalam " + + + brideInfo.getFathername_ml() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getMothername_en())) { + throw new CustomException(" BRIDE MOTHER NAME ENGLISH ", + "The bride Mother Name in english " + + brideInfo.getMothername_en() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getMothername_ml())) { + throw new CustomException( + " BRIDE MOTHER NAME MALAYALAM ", + "The bride Mother Name in malayalam " + + + brideInfo.getMothername_ml() + + " is invalid"); + } + } else { + if (StringUtils.isEmpty(brideInfo.getGuardian_aadharno())) { + throw new CustomException( + " BRIDE GUARDIAN AADHAR INVALID ", + "The bride Guardian Aadhar number " + + brideInfo.getGuardian_aadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getGuardianname_en())) { + throw new CustomException( + " BRIDE GUARDIAN NAME ENGLISH ", + "The bride Guardian Name in english " + + + brideInfo.getGuardianname_en() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getGuardianname_ml())) { + throw new CustomException( + " BRIDE GUARDIAN NAME MALAYALAM ", + "The bride Guardian Name in malayalam " + + + brideInfo.getGuardianname_ml() + + " is invalid"); + } + } + + if (StringUtils.isEmpty(brideInfo.getMaritalstatusid())) { + throw new CustomException("BRIDE: MARITAL STATUS INVALID ", + "The bride Marital status " + + brideInfo.getMaritalstatusid() + + " is invalid"); + } + // else { + // if + // (brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_DIVORCED)) + // { + // if + // (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && + // brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) + // { + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_ANNULLED)) + // { + // if + // (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && + // brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) + // { + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_MARRIED)) + // { + // if + // (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && + // brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) + // { + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // else + // if(brideInfo.getMaritalstatusid().equals(MarriageConstants.MARITAL_STATUS_WIDOWED)) + // { + // if + // (brideInfo.getGroomIsSpouseLiving().equals(MarriageConstants.VALUE_FALSE) + // && + // brideInfo.getGroomNoOfSpouse().equals(MarriageConstants.VALUE_FALSE)) + // { + // throw new CustomException(" IS SPOUSE LIVING AND NO OF SPOUSE + // INVALID", + // "The Is spouse living and no of spouse living" + + // brideInfo.getGroomIsSpouseLiving() + "and" + // + brideInfo.getGroomNoOfSpouse() + " is invalid"); + // } + // } + // } + + // groom permanent address start + + if (groomaddressInfo.getPermtaddressCountry() + .equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty( + groomaddressInfo.getPermtaddressStateName())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS: STATE INVALID ", + "The State " + + groomaddressInfo.getPermtaddressStateName() + + " is invalid"); + } else { + if (groomaddressInfo.getPermtaddressStateName() + .equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrDistrict())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: DISTRICT INVALID ", + "The District " + + groomaddressInfo.getPermntInKeralaAdrDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrTaluk())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: TALUK INVALID ", + "The Taluk " + + groomaddressInfo.getPermntInKeralaAdrTaluk() + + " is invalid"); + } + + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrVillage())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: VILLAGE INVALID ", + "The Village " + + groomaddressInfo.getPermntInKeralaAdrVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrLBName())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALBODY NAME INVALID ", + "The Localbody Name " + + + groomaddressInfo.getPermntInKeralaAdrLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaWardNo())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: WARD INVALID ", + "The Ward " + + groomaddressInfo.getPermntInKeralaWardNo() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrPostOffice())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", + "The Postofficef " + + groomaddressInfo.getPermntInKeralaAdrPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrPincode())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + groomaddressInfo.getPermntInKeralaAdrPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrLocalityNameEn())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + "The Locality English " + + + groomaddressInfo.getPermntInKeralaAdrLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrLocalityNameMl())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Malayalam " + + + groomaddressInfo.getPermntInKeralaAdrLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrHouseNameEn())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + groomaddressInfo.getPermntInKeralaAdrHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrHouseNameMl())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + groomaddressInfo.getPermntInKeralaAdrHouseNameMl() + + " is invalid"); + } + + } + /// *****************permanent outside kerala address + /// *****************************************/ + else { + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaDistrict())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: DISTRICT INVALID ", + "The District " + + groomaddressInfo.getPermntOutsideKeralaDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaTaluk())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: TALUK INVALID ", + "The Taluk " + + groomaddressInfo.getPermntOutsideKeralaTaluk() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaVillage())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", + "The Village " + + groomaddressInfo.getPermntOutsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrLBName())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: LOCALBODY NAME INVALID ", + "The Localbody Name " + + + groomaddressInfo.getPermntInKeralaAdrLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaCityVilgeEn())) { + throw new CustomException( + " GROOM PERMANENT ADDRESS OUTSIDE KERALA: CITY INVALID ", + "The City/Town " + + groomaddressInfo.getPermntOutsideKeralaCityVilgeEn() + + " is invalid"); + } + + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaVillage())) { + throw new CustomException( + " GROOM PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", + "The Village " + + groomaddressInfo.getPermntOutsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaPincode())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + groomaddressInfo.getPermntOutsideKeralaPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaPostOfficeEn())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", + "The Postofficef " + + groomaddressInfo.getPermntOutsideKeralaPostOfficeEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaLocalityNameMl())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Malayalam " + + + groomaddressInfo.getPermntOutsideKeralaLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaLocalityNameEn())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + "The Locality English " + + + groomaddressInfo.getPermntOutsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaHouseNameEn())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + groomaddressInfo.getPermntOutsideKeralaHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideKeralaHouseNameMl())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUTSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + groomaddressInfo.getPermntOutsideKeralaHouseNameMl() + + " is invalid"); + } + + } + + } + } else { + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutSideIndiaProvinceEn())) { + throw new CustomException( + " GROOM PERMANENT ADDRESS OUSIDE INDIA: PROVINCE ENGLISH INVALID ", + "The Province English " + + groomaddressInfo.getPermntOutSideIndiaProvinceEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutSideIndiaProvinceMl())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUSIDE INDIA: PROVINCE MALAYALAM INVALID ", + "The Province Malayalam " + + groomaddressInfo.getPermntOutSideIndiaProvinceMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideIndiaVillage())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUSIDE INDIA: VILLAGE INVALID ", + "The Village " + + groomaddressInfo.getPermntOutsideIndiaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideIndiaCityTown())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUSIDE INDIA: CITY INVALID ", + "The City " + + groomaddressInfo.getPermntOutsideIndiaCityTown() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermanentOutsideIndiaPostCode())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUSIDE INDIA: POST CODE INVALID ", + "The Post Code " + + groomaddressInfo.getPermanentOutsideIndiaPostCode() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideIndiaLineoneEn())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUSIDE INDIA: ADDRESS LINE ONE ENGLISH INVALID ", + "The Adress Line One English " + + groomaddressInfo.getPermntOutsideIndiaLineoneEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideIndiaLinetwoEn())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUSIDE INDIA: ADDRESS LINE Two ENGLISH INVALID ", + "The Adress Line Two English " + + groomaddressInfo.getPermntOutsideIndiaLinetwoEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideIndiaLineoneMl())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUSIDE INDIA: ADDRESS LINE ONE MALAYALAM INVALID ", + "The Adress Line One Malayalam " + + groomaddressInfo.getPermntOutsideIndiaLineoneMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntOutsideIndiaLinetwoMl())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS OUSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", + "The Adress Line Two Malayalam " + + groomaddressInfo.getPermntOutsideIndiaLinetwoMl() + + " is invalid"); + } + + } + // groom permanent address end + // groom present address start + if (groomaddressInfo.getPresentaddressCountry() + .equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty(groomaddressInfo + .getPresentaddressStateName())) { + throw new CustomException(" STATE INVALID ", + "The State " + + groomaddressInfo.getPresentaddressStateName() + + " is invalid"); + } else { + if (groomaddressInfo.getPresentaddressStateName() + .equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaDistrict())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: DISTRICT INVALID ", + "The district " + + groomaddressInfo.getPresentInsideKeralaDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaTaluk())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: TALUK INVALID ", + "The Taluk " + + groomaddressInfo.getPresentInsideKeralaTaluk() + + " is invalid"); + } + + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaVillage())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: VILLAGE INVALID ", + "The Village " + + groomaddressInfo.getPresentInsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaLBName())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: LOCALBODY NAME INVALID ", + "The Localbody Name " + + + groomaddressInfo.getPresentInsideKeralaLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentWardNo())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: WARD INVALID ", + "The Ward " + + groomaddressInfo.getPresentWardNo() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaPostOffice())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", + "The Postofficef " + + groomaddressInfo.getPresentInsideKeralaPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaPincode())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + groomaddressInfo.getPresentInsideKeralaPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaLocalityNameEn())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + "The Locality English " + + + groomaddressInfo.getPresentInsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaLocalityNameMl())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Malayalam " + + + groomaddressInfo.getPresentInsideKeralaLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaHouseNameEn())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + groomaddressInfo.getPresentInsideKeralaHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaHouseNameMl())) { + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + groomaddressInfo.getPresentInsideKeralaHouseNameMl() + + " is invalid"); + } + } else { + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaDistrict())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: DISTRICT INVALID ", + "The District " + + groomaddressInfo.getPresentOutsideKeralaDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaTalukName())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: TALUK INVALID ", + "The Taluk " + + groomaddressInfo.getPresentOutsideKeralaTalukName() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaVillageName())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", + "The Village " + + groomaddressInfo.getPresentOutsideKeralaVillageName() + + " is invalid"); + } + + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaCityVilgeEn())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE KERALA: CITY INVALID ", + "The City/Town " + + groomaddressInfo.getPresentOutsideKeralaCityVilgeEn() + + " is invalid"); + } + + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntOutsideKeralaVillage())) { + // throw new CustomException( + // " GROOM PERMANENT ADDRESS OUTSIDE KERALA: + // VILLAGE INVALID ", + // "The Village " + + // groomaddressInfo.getPermntOutsideKeralaVillage() + // + " is invalid"); + // } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaPincode())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + groomaddressInfo.getPresentOutsideKeralaPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaLocalityNameEn())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", + "The Postofficef " + + groomaddressInfo.getPresentOutsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaLocalityNameMl())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Malayalam " + + + groomaddressInfo.getPresentOutsideKeralaLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaLocalityNameEn())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + "The Locality English " + + + groomaddressInfo.getPresentOutsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaHouseNameEn())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + groomaddressInfo.getPresentOutsideKeralaHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaHouseNameMl())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + groomaddressInfo.getPresentOutsideKeralaHouseNameMl() + + " is invalid"); + } + + } + } + } else { + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutSideIndiaProvinceEn())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE INDIA: PROVINCE ENGLISH INVALID ", + "The Province English " + + groomaddressInfo.getPresentOutSideIndiaProvinceEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutSideIndiaProvinceMl())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE INDIA: PROVINCE MALAYALAM INVALID ", + "The Province Malayalam " + + groomaddressInfo.getPresentOutSideIndiaProvinceMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutSideIndiaadrsVillage())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE INDIA: VILLAGE INVALID ", + "The Village " + + groomaddressInfo.getPresentOutSideIndiaadrsVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutSideIndiaadrsCityTown())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE INDIA: CITY INVALID ", + "The City/Town " + + groomaddressInfo.getPresentOutSideIndiaadrsCityTown() + + " is invalid"); + } + // if(StringUtils.isEmpty(groomaddressInfo.getPresentOutSideIndiaPostCode())) + // { + // throw new CustomException(" GROOM PRESENT ADDRESS OUTSIDE + // INDIA: POST CODE INVALID", + // "The Post Code" + + // groomaddressInfo.getPresentOutSideIndiaPostCode() + " is + // invalid"); + // } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutSideIndiaAdressEn())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE ONE ENGLISH INVALID ", + "The Adress Line One English " + + groomaddressInfo.getPresentOutSideIndiaAdressEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutSideIndiaAdressEnB())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO ENGLISH INVALID ", + "The Adress Line Two English " + + groomaddressInfo.getPresentOutSideIndiaAdressEnB() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutSideIndiaAdressMl())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE ONE MALAYALAM INVALID ", + "The Adress Line One Malayalam " + + groomaddressInfo.getPresentOutSideIndiaAdressMl() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutSideIndiaAdressMlB())) { + throw new CustomException( + " GROOM PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", + "The Adress Line Two Malayalam " + + groomaddressInfo.getPresentOutSideIndiaAdressMlB() + + " is invalid"); + } + + } + // groom present address end + // bride permanent address start + + if (brideaddressInfo.getPermtaddressCountry() + .equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty( + brideaddressInfo.getPermtaddressStateName())) { + throw new CustomException(" STATE INVALID ", + "The State " + + brideaddressInfo.getPermtaddressStateName() + + " is invalid"); + } else { + if (brideaddressInfo.getPermtaddressStateName() + .equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrDistrict())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: DISTRICT INVALID ", + "The District " + + brideaddressInfo.getPermntInKeralaAdrDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrTaluk())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: TALUK INVALID ", + "The Taluk " + + brideaddressInfo.getPermntInKeralaAdrTaluk() + + " is invalid"); + } + + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrVillage())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: VILLAGE INVALID ", + "The Village " + + brideaddressInfo.getPresentInsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrLBName())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: LOCALBODY NAME INVALID ", + "The Localbody Name " + + + brideaddressInfo.getPermntInKeralaAdrLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaWardNo())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: WARD INVALID ", + "The Ward " + + brideaddressInfo.getPermntInKeralaWardNo() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrPostOffice())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", + "The Postofficef " + + brideaddressInfo.getPermntInKeralaAdrPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrPincode())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + brideaddressInfo.getPermntInKeralaAdrPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrLocalityNameEn())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + "The Locality English " + + + brideaddressInfo.getPermntInKeralaAdrLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrLocalityNameMl())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Malayalam " + + + brideaddressInfo.getPermntInKeralaAdrLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrHouseNameEn())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + brideaddressInfo.getPermntInKeralaAdrHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrHouseNameMl())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS INSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + brideaddressInfo.getPermntInKeralaAdrHouseNameMl() + + " is invalid"); + } + } + /// *****************permanent outside kerala addre + /// *****************************************/ + else { + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaDistrict())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: DISTRICT INVALID ", + "The District " + + brideaddressInfo.getPermntOutsideKeralaDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaTaluk())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: TALUK INVALID ", + "The Taluk " + + brideaddressInfo.getPermntOutsideKeralaTaluk() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaVillage())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", + "The Village " + + brideaddressInfo.getPermntOutsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntInKeralaAdrLBName())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: LOCALBODY NAME INVALID ", + "The Localbody Name " + + + brideaddressInfo.getPermntInKeralaAdrLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaCityVilgeEn())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE KERALA: CITY INVALID ", + "The City/Town " + + brideaddressInfo.getPermntOutsideKeralaCityVilgeEn() + + " is invalid"); + } + + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaVillage())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", + "The Village " + + brideaddressInfo.getPermntOutsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaPincode())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + brideaddressInfo.getPermntOutsideKeralaPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaPostOfficeEn())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", + "The Postofficef " + + brideaddressInfo.getPermntOutsideKeralaPostOfficeEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaLocalityNameMl())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Malayalam " + + + brideaddressInfo.getPermntOutsideKeralaLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaLocalityNameEn())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + "The Locality English " + + + brideaddressInfo.getPermntOutsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaHouseNameEn())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + brideaddressInfo.getPermntOutsideKeralaHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaHouseNameMl())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + brideaddressInfo.getPermntOutsideKeralaHouseNameMl() + + " is invalid"); + } + + } + + } + } else { + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutSideIndiaProvinceEn())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: PROVINCE ENGLISH INVALID ", + "The Province English " + + brideaddressInfo.getPermntOutSideIndiaProvinceEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutSideIndiaProvinceMl())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: PROVINCE MALAYALAM INVALID ", + "The Province Malayalam " + + brideaddressInfo.getPermntOutSideIndiaProvinceMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideIndiaVillage())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: VILLAGE INVALID ", + "The Village " + + brideaddressInfo.getPermntOutsideIndiaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideIndiaCityTown())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: CITY INVALID ", + "The City/Town " + + brideaddressInfo.getPermntOutsideIndiaCityTown() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermanentOutsideIndiaPostCode())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: POST CODE INVALID ", + "The Post Code " + + brideaddressInfo.getPermanentOutsideIndiaPostCode() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideIndiaLineoneEn())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: ADDRESS LINE ONE ENGLISH INVALID ", + "The Adress Line One English " + + brideaddressInfo.getPermntOutsideIndiaLineoneEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideIndiaLinetwoEn())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: ADDRESS LINE Two ENGLISH INVALID ", + "The Adress Line Two English " + + brideaddressInfo.getPermntOutsideIndiaLinetwoEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideIndiaLineoneMl())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: ADDRESS LINE ONE MALAYALAM INVALID ", + "The Adress Line One Malayalam " + + brideaddressInfo.getPermntOutsideIndiaLineoneMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideIndiaLinetwoMl())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", + "The Adress Line Two Malayalam " + + brideaddressInfo.getPermntOutsideIndiaLinetwoMl() + + " is invalid"); + } + + } + // bride permanent address end + // bride present address start + if (brideaddressInfo.getPresentaddressCountry() + .equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty(brideaddressInfo + .getPresentaddressStateName())) { + throw new CustomException( + " BRIDE PRESENT ADDRESS : STATE INVALID ", + "The State " + + brideaddressInfo.getPresentaddressStateName() + + " is invalid"); + } else { + if (brideaddressInfo.getPresentaddressStateName() + .equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaDistrict())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: DISTRICT INVALID ", + "The District " + + brideaddressInfo.getPresentInsideKeralaDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaTaluk())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: TALUK INVALID ", + "The Taluk " + + brideaddressInfo.getPresentInsideKeralaTaluk() + + " is invalid"); + } + + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaVillage())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: VILLAGE INVALID ", + "The Village " + + brideaddressInfo.getPresentInsideKeralaVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaLBName())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: LOCALBODY NAME INVALID ", + "The Localbody Name " + + + brideaddressInfo.getPresentInsideKeralaLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentWardNo())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: WARD INVALID ", + "The Ward " + + brideaddressInfo.getPresentWardNo() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaPostOffice())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", + "The Post office " + + brideaddressInfo.getPresentInsideKeralaPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaPincode())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + brideaddressInfo.getPresentInsideKeralaPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaLocalityNameEn())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + "The Locality English " + + + brideaddressInfo.getPresentInsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaLocalityNameMl())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Malayalam " + + + brideaddressInfo.getPresentInsideKeralaLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaHouseNameEn())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + brideaddressInfo.getPresentInsideKeralaHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaHouseNameMl())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + brideaddressInfo.getPresentInsideKeralaHouseNameMl() + + " is invalid"); + } + } + + else { + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaDistrict())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: DISTRICT INVALID ", + "The District " + + brideaddressInfo.getPresentOutsideKeralaDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaTalukName())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: TALUK INVALID ", + "The Taluk " + + brideaddressInfo.getPresentOutsideKeralaTalukName() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaVillageName())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", + "The Village " + + brideaddressInfo.getPresentOutsideKeralaVillageName() + + " is invalid"); + } + + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaCityVilgeEn())) { + throw new CustomException( + " BRIDE PRESENT ADDRESS OUTSIDE KERALA: CITY INVALID ", + "The City/Town " + + brideaddressInfo.getPresentOutsideKeralaCityVilgeEn() + + " is invalid"); + } + + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaPincode())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + brideaddressInfo.getPresentOutsideKeralaPincode() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaLocalityNameEn())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", + "The Postofficef " + + brideaddressInfo.getPresentOutsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaLocalityNameMl())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Malayalam " + + + brideaddressInfo.getPresentOutsideKeralaLocalityNameMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaLocalityNameEn())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + "The Locality English " + + + brideaddressInfo.getPresentOutsideKeralaLocalityNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaHouseNameEn())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + brideaddressInfo.getPresentOutsideKeralaHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutsideKeralaHouseNameMl())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + brideaddressInfo.getPresentOutsideKeralaHouseNameMl() + + " is invalid"); + } + + } + + } + } else { + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaProvinceEn())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: PROVINCE ENGLISH INVALID ", + "The Province English " + + brideaddressInfo.getPresentOutSideIndiaProvinceEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaProvinceMl())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: PROVINCE MALAYALAM INVALID ", + "The Province Malayalam " + + brideaddressInfo.getPresentOutSideIndiaProvinceMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaadrsVillage())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: VILLAGE INVALID ", + "The Village " + + brideaddressInfo.getPresentOutSideIndiaadrsVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaadrsCityTown())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: CITY INVALID ", + "The City/Town " + + brideaddressInfo.getPresentOutSideIndiaadrsCityTown() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaPostCode())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: POST CODE INVALID ", + "The Post Code " + + brideaddressInfo.getPresentOutSideIndiaPostCode() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaAdressEn())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE ONE ENGLISH INVALID ", + "The Adress Line One English " + + brideaddressInfo.getPresentOutSideIndiaAdressEn() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaAdressEnB())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE Two ENGLISH INVALID ", + "The Adress Line Two English " + + brideaddressInfo.getPresentOutSideIndiaAdressEnB() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaAdressMl())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE ONE MALAYALAM INVALID ", + "The Adress Line One Malayalam " + + brideaddressInfo.getPresentOutSideIndiaAdressMl() + + " is invalid"); + } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentOutSideIndiaAdressMlB())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", + "The Adress Line Two Malayalam " + + brideaddressInfo.getPresentOutSideIndiaAdressMlB() + + " is invalid"); + } + + } + // witness1 + if (StringUtils.isEmpty(witnessDtls.getWitness1AadharNo())) { + + throw new CustomException(" WITNESS1 AADHAR NUMBER INVALID ", + "The Witness1 Aadhar Number " + + witnessDtls.getWitness1AadharNo() + + " is invalid"); + } + if (StringUtils.isEmpty(witnessDtls.getWitness1NameEn())) { + + throw new CustomException(" WITNESS1 NAME ENGLISH INVALID ", + "The Witness1 Name English " + + witnessDtls.getWitness1NameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(witnessDtls.getWitness1NameMl())) { + + throw new CustomException(" WITNESS1 NAME MALAYALAM INVALID ", + "The Witness1 Name Malayalam " + + witnessDtls.getWitness1NameMl() + + " is invalid"); + } + if ((witnessDtls.getWitness1Age() < 18 + && witnessDtls.getWitness1Age() == 0)) { + + throw new CustomException(" WITNESS1 AGE INVALID ", + "The Witness1 Age " + + witnessDtls.getWitness1Age() + + " is invalid"); + } + if ((StringUtils.isEmpty(witnessDtls.getWitness1AddresSEn()))) { + + throw new CustomException(" WITNESS1 ADDRESS ENGLISH INVALID ", + "The Witness1 Address English " + + witnessDtls.getWitness1AddresSEn() + + " is invalid"); + } + if ((StringUtils.isEmpty(witnessDtls.getWitness1AddressMl()))) { + + throw new CustomException( + " WITNESS1 ADDRESS MALAYALAM INVALID ", + "The Witness1 Address Malayalam " + + witnessDtls.getWitness1AddressMl() + + " is invalid"); + } + if ((witnessDtls.getWitness1Mobile() <= 0)) { + + throw new CustomException(" WITNESS1 MOBILE NUMBER INVALID ", + "The Witness1 Mobile Number " + + witnessDtls.getWitness1Mobile() + + " is invalid"); + } + if ((witnessDtls.getWitness1Esigned() + .equals(MarriageConstants.VALUE_FALSE))) { + + throw new CustomException(" WITNESS1 E-SIGN INVALID ", + "The Witness1 E-sign " + + witnessDtls.getWitness1Esigned() + + " is invalid"); + } + + // witness2 + if (StringUtils.isEmpty(witnessDtls.getWitness2AadharNo())) { + + throw new CustomException(" WITNESS2 AADHAR NUMBER INVALID ", + "The Witness2 Aadhar Number " + + witnessDtls.getWitness2AadharNo() + + " is invalid"); + } + if (StringUtils.isEmpty(witnessDtls.getWitness2NameEn())) { + + throw new CustomException(" WITNESS2 NAME ENGLISH INVALID ", + "The Witness2 Name English " + + witnessDtls.getWitness2NameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(witnessDtls.getWitness2NameMl())) { + + throw new CustomException(" WITNESS2 NAME MALAYALAM INVALID ", + "The Witness2 Name Malayalam " + + witnessDtls.getWitness2NameMl() + + " is invalid"); + } + if ((witnessDtls.getWitness2Age() < 18 + && witnessDtls.getWitness2Age() == 0)) { + + throw new CustomException(" WITNESS2 AGE INVALID", + "The Witness2 Age " + + witnessDtls.getWitness2Age() + + " is invalid"); + } + if ((StringUtils.isEmpty(witnessDtls.getWitness2AddresSEn()))) { + + throw new CustomException(" WITNESS2 ADDRESS ENGLISH INVALID ", + "The Witness2 Address English " + + witnessDtls.getWitness2AddresSEn() + + " is invalid"); + } + if ((StringUtils.isEmpty(witnessDtls.getWitness2AddressMl()))) { + + throw new CustomException( + " WITNESS2 ADDRESS MALAYALAM INVALID ", + "The Witness2 Address Malayalam " + + witnessDtls.getWitness2AddressMl() + + " is invalid"); + } + if ((witnessDtls.getWitness2Mobile() <= 0)) { + + throw new CustomException(" WITNESS2 MOBILE NUMBER INVALID ", + "The Witness2 Mobile Number " + + witnessDtls.getWitness2Mobile() + + " is invalid"); + } + if ((witnessDtls.getWitness2Esigned() + .equals(MarriageConstants.VALUE_FALSE))) { + + throw new CustomException(" WITNESS2 E-SIGN INVALID ", + "The Witness2 E-sign " + + witnessDtls.getWitness2Esigned() + + " is invalid"); + } + }); + } + + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 60cb7111439..52c3908814e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -132,6 +132,8 @@ public class MarriageConstants { public static final String WARD="TenantBoundary"; +public static final String PARENT="PARENT"; + public static final String BND_MODULE_NAME = "birth-death-service"; public static final String MARRIAGE_PLACE_TYPE = "MarriagePlaceType"; From 3aba9adc18fbcbdc0d397c37dec12afba5ecc2ce Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Thu, 6 Apr 2023 11:19:23 +0530 Subject: [PATCH 107/420] Field validation --- .../MarriageApplicationValidator.java | 124 +++++++++--------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 6d2838fef09..f2e2111938e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -74,9 +74,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException(" TALUK INVALID ", "The Taluk " + marriagedtls.getTalukid() + " is invalid"); } - if (StringUtils.isEmpty(marriagedtls.getVillage_name())) { + if (StringUtils.isEmpty(marriagedtls.getVillageName())) { throw new CustomException(" VILLAGE INVALID ", "The Village " + - marriagedtls.getVillage_name() + " is invalid"); + marriagedtls.getVillageName() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getLbtype())) { @@ -84,9 +84,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriagedtls.getLbtype() + " is invalid"); } - if (StringUtils.isEmpty(marriagedtls.getWard_code())) { + if (StringUtils.isEmpty(marriagedtls.getWardCode())) { throw new CustomException(" WARD INVALID ", "The Ward " + - marriagedtls.getWard_code() + " is invalid"); + marriagedtls.getWardCode() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls.getPlacetype())) { @@ -98,21 +98,21 @@ public void validateCommonFields(MarriageDetailsRequest request) { if (marriagedtls.getPlacetype() .equals(MarriageConstants.PLACE_TYPE_HOUSE)) { if (StringUtils.isEmpty( - marriagedtls.getLocality_en())) { + marriagedtls.getLocalityEn())) { throw new CustomException( " MARRIAGE PLACE LOCALITY ENGLISH INVALID ", "The Place Locality Name in English " + - marriagedtls.getLocality_en() + marriagedtls.getLocalityEn() + " is invalid"); } if (StringUtils.isEmpty( - marriagedtls.getLocality_ml())) { + marriagedtls.getLocalityMl())) { throw new CustomException( " MARRIAGE PLACE LOCALITY MALAYALAM INVALID ", "The Place Locality Name in Malayalam " + - marriagedtls.getLocality_ml() + marriagedtls.getLocalityMl() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls @@ -166,21 +166,21 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(marriagedtls - .getLocality_en())) { + .getLocalityEn())) { throw new CustomException( " LOCALITY NAME ENGLISH IS INVALID ", "The Locality Name English " + - marriagedtls.getPlacenameMl() + marriagedtls.getLocalityEn() + " is invalid"); } if (StringUtils.isEmpty(marriagedtls - .getLocality_ml())) { + .getLocalityMl())) { throw new CustomException( " LOCALITY NAME MALAYALAM IS INVALID ", "The Locality Name Malayalam " + - marriagedtls.getPlacenameMl() + marriagedtls.getLocalityMl() + " is invalid"); } } @@ -209,19 +209,19 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty( - marriagedtls.getLocality_en())) { + marriagedtls.getLocalityEn())) { throw new CustomException( " LOCALITY NAME ENGLISH IS INVALID ", "The Locality Name English " + - marriagedtls.getPlacenameMl() + marriagedtls.getLocalityEn() + " is invalid"); } if (StringUtils.isEmpty( - marriagedtls.getLocality_ml())) { + marriagedtls.getLocalityMl())) { throw new CustomException( " LOCALITY NAME MALAYALAM IS INVALID ", "The Locality Name Malayalam" + - marriagedtls.getPlacenameMl() + marriagedtls.getLocalityMl() + " is invalid"); } } @@ -271,16 +271,16 @@ public void validateCommonFields(MarriageDetailsRequest request) { } - if (StringUtils.isEmpty(groomInfo.getFirstname_en())) { + if (StringUtils.isEmpty(groomInfo.getFirstnameEn())) { throw new CustomException(" GROOM NAME ENGLISH INVALID ", "The groom name in english " + - groomInfo.getFirstname_en() + groomInfo.getFirstnameEn() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getFirstname_ml())) { + if (StringUtils.isEmpty(groomInfo.getFirstnameMl())) { throw new CustomException("GROOM NAME MALAYALAM INVALID ", "The groom name in malayalam " + - groomInfo.getFirstname_ml() + groomInfo.getFirstnameMl() + " is invalid"); } if (groomInfo.getMobile() <= 0) { @@ -299,71 +299,71 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException("GROOM BIRTH DATE INVALID ", "The groom date of birth can't be null "); } - if (groomInfo.getParent_guardian().equals(MarriageConstants.PARENT)) { - if (StringUtils.isEmpty(groomInfo.getFather_aadharno())) { + if (groomInfo.getParentGuardian().equals(MarriageConstants.PARENT)) { + if (StringUtils.isEmpty(groomInfo.getFatherAadharno())) { throw new CustomException( "GROOM FATHER AADHAR INVALID ", "The groom Father Aadhar number " + - groomInfo.getFather_aadharno() + groomInfo.getFatherAadharno() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getMother_aadharno())) { + if (StringUtils.isEmpty(groomInfo.getMotherAadharno())) { throw new CustomException( " GROOM MOTHER AADHAR INVALID ", "The groom Father Aadhar number " + - groomInfo.getMother_aadharno() + groomInfo.getMotherAadharno() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getFathername_en())) { + if (StringUtils.isEmpty(groomInfo.getFathernameEn())) { throw new CustomException(" GROOM FATHER NAME ENGLISH ", "The groom Father Name in english " + - groomInfo.getFathername_en() + groomInfo.getFathernameEn() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getFathername_ml())) { + if (StringUtils.isEmpty(groomInfo.getFathernameMl())) { throw new CustomException( " GROOM FATHER NAME MALAYALAM ", "The groom Father Name in malayalam " + - groomInfo.getFathername_ml() + groomInfo.getFathernameMl() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getMothername_en())) { + if (StringUtils.isEmpty(groomInfo.getMothernameEn())) { throw new CustomException(" GROOM MOTHER NAME ENGLISH ", "The groom Mother Name in english " + - groomInfo.getMothername_en() + groomInfo.getMothernameEn() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getMothername_ml())) { + if (StringUtils.isEmpty(groomInfo.getMothernameMl())) { throw new CustomException( " GROOM MOTHER NAME MALAYALAM ", "The groom Mother Name in malayalam " + - groomInfo.getMothername_ml() + groomInfo.getMothernameMl() + " is invalid"); } } else { - if (StringUtils.isEmpty(groomInfo.getGuardian_aadharno())) { + if (StringUtils.isEmpty(groomInfo.getGuardianAadharno())) { throw new CustomException( " GROOM GUARDIAN AADHAR INVALID ", "The groom Guardian Aadhar number " + - groomInfo.getGuardian_aadharno() + groomInfo.getGuardianAadharno() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getGuardianname_en())) { + if (StringUtils.isEmpty(groomInfo.getGuardiannameEn())) { throw new CustomException( " GROOM GUARDIAN NAME ENGLISH ", "The groom Guardian Name in english " + - groomInfo.getGuardianname_en() + groomInfo.getGuardiannameEn() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getGuardianname_ml())) { + if (StringUtils.isEmpty(groomInfo.getGuardiannameMl())) { throw new CustomException( " GROOM GUARDIAN NAME MALAYALAM ", "The groom Guardian Name in malayalam " + - groomInfo.getGuardianname_ml() + groomInfo.getGuardiannameMl() + " is invalid"); } } @@ -481,16 +481,16 @@ public void validateCommonFields(MarriageDetailsRequest request) { } - if (StringUtils.isEmpty(brideInfo.getFirstname_en())) { + if (StringUtils.isEmpty(brideInfo.getFirstnameEn())) { throw new CustomException("BRIDE NAME ENGLISH INVALID ", "The bride name in english " + - brideInfo.getFirstname_en() + brideInfo.getFirstnameEn() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getFirstname_ml())) { + if (StringUtils.isEmpty(brideInfo.getFirstnameMl())) { throw new CustomException("BRIDE NAME MALAYALAM INVALID ", "The bride name in malayalam " + - brideInfo.getFirstname_ml() + brideInfo.getFirstnameMl() + " is invalid"); } if (brideInfo.getMobile() <= 0) { @@ -509,71 +509,71 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException("BRIDE DATE OF BIRTH INVALID ", "The bride date of birth can't be null "); } - if (groomInfo.getParent_guardian().equals(MarriageConstants.PARENT)) { - if (StringUtils.isEmpty(brideInfo.getFather_aadharno())) { + if (groomInfo.getParentGuardian().equals(MarriageConstants.PARENT)) { + if (StringUtils.isEmpty(brideInfo.getFatherAadharno())) { throw new CustomException( "BRIDE: FATHER AADHAR INVALID ", "The Father's Aadhar number " + - brideInfo.getFather_aadharno() + brideInfo.getFatherAadharno() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getMother_aadharno())) { + if (StringUtils.isEmpty(brideInfo.getMotherAadharno())) { throw new CustomException( "BRIDE:MOTHER AADHAR INVALID ", "The mother's Aadhar number " + - brideInfo.getMother_aadharno() + brideInfo.getMotherAadharno() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getFathername_en())) { + if (StringUtils.isEmpty(brideInfo.getFathernameEn())) { throw new CustomException(" BRIDE FATHER NAME ENGLISH ", "The bride Father Name in english " + - brideInfo.getFathername_en() + brideInfo.getFathernameEn() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getFathername_ml())) { + if (StringUtils.isEmpty(brideInfo.getFathernameMl())) { throw new CustomException( " BRIDE FATHER NAME MALAYALAM ", "The bride Father Name in malayalam " + - brideInfo.getFathername_ml() + brideInfo.getFathernameMl() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getMothername_en())) { + if (StringUtils.isEmpty(brideInfo.getMothernameEn())) { throw new CustomException(" BRIDE MOTHER NAME ENGLISH ", "The bride Mother Name in english " + - brideInfo.getMothername_en() + brideInfo.getMothernameEn() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getMothername_ml())) { + if (StringUtils.isEmpty(brideInfo.getMothernameMl())) { throw new CustomException( " BRIDE MOTHER NAME MALAYALAM ", "The bride Mother Name in malayalam " + - brideInfo.getMothername_ml() + brideInfo.getMothernameMl() + " is invalid"); } } else { - if (StringUtils.isEmpty(brideInfo.getGuardian_aadharno())) { + if (StringUtils.isEmpty(brideInfo.getGuardianAadharno())) { throw new CustomException( " BRIDE GUARDIAN AADHAR INVALID ", "The bride Guardian Aadhar number " + - brideInfo.getGuardian_aadharno() + brideInfo.getGuardianAadharno() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getGuardianname_en())) { + if (StringUtils.isEmpty(brideInfo.getGuardiannameEn())) { throw new CustomException( " BRIDE GUARDIAN NAME ENGLISH ", "The bride Guardian Name in english " + - brideInfo.getGuardianname_en() + brideInfo.getGuardiannameEn() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getGuardianname_ml())) { + if (StringUtils.isEmpty(brideInfo.getGuardiannameMl())) { throw new CustomException( " BRIDE GUARDIAN NAME MALAYALAM ", "The bride Guardian Name in malayalam " + - brideInfo.getGuardianname_ml() + brideInfo.getGuardiannameMl() + " is invalid"); } } From 51337104bb74c0ff7a51908daa99fa613bf61a66 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 6 Apr 2023 12:55:02 +0530 Subject: [PATCH 108/420] workflow --- .../enrichment/MarriageDetailsEnrichment.java | 50 +++++++++---------- .../service/MarriageApplicationService.java | 50 +++++++++---------- .../MarriageRegistryRequestService.java | 13 +++++ .../validator/MarriageMDMSValidator.java | 6 +-- .../MarriageApplicationController.java | 37 +++++++++----- .../web/model/MarriageApplicationDetails.java | 38 +++++++------- .../web/model/marriage/WitnessDetails.java | 27 ++++++++++ .../MarriageRegistryEnrichment.java | 8 +-- .../MarriageRegistryRepository.java | 27 ++++++---- .../rowmapper/MarriageRegistryRowMapper.java | 2 +- .../service/MarriageRegistryService.java | 36 +++++++++++-- .../marriage/utils/MarriageConstants.java | 2 +- .../marriage/workflow/WorkflowIntegrator.java | 35 +++++++++---- 13 files changed, 216 insertions(+), 115 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 1bd822ae36c..f4caaa3eda3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -94,7 +94,7 @@ public void enrichUpdate(MarriageDetailsRequest request) { request.getMarriageDetails() .forEach(marriage -> marriage.setAuditDetails(auditDetails)); - setRegistrationNumber(request); + // setRegistrationNumber(request); setBridePermanentAddress(request); setBridePresentAddress(request); setGroomPermanentAddress(request); @@ -503,30 +503,30 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { } - private void setRegistrationNumber(MarriageDetailsRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - List marriageDetails = request.getMarriageDetails(); - String tenantId = marriageDetails.get(0) - .getTenantid(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getGetMarriageRegisNumberName(), - request.getMarriageDetails().get(0).getApplicationtype(), - "REG", - marriageDetails.size()); - validateFileCodes(filecodes, marriageDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getMarriageDetails() - .forEach(marriage -> { - // if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { - marriage.setRegistrationno(itr.next()); - marriage.setRegistrationDate(currentTime); - // } - }); - } + // private void setRegistrationNumber(MarriageDetailsRequest request) { + + // RequestInfo requestInfo = request.getRequestInfo(); + // List marriageDetails = request.getMarriageDetails(); + // String tenantId = marriageDetails.get(0) + // .getTenantid(); + + // List filecodes = getIds(requestInfo, + // tenantId, + // config.getGetMarriageRegisNumberName(), + // request.getMarriageDetails().get(0).getApplicationtype(), + // "REG", + // marriageDetails.size()); + // validateFileCodes(filecodes, marriageDetails.size()); + // Long currentTime = Long.valueOf(System.currentTimeMillis()); + // ListIterator itr = filecodes.listIterator(); + // request.getMarriageDetails() + // .forEach(marriage -> { + // // if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { + // marriage.setRegistrationno(itr.next()); + // marriage.setRegistrationDate(currentTime); + // // } + // }); + // } // private void setFileNumbers(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 0a8a9135e5a..982355e2d2a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -51,30 +51,28 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication public List saveMarriageDetails(MarriageDetailsRequest request) { - // validatorService.validateCommonFields( request); + validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); - producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - // List marriageApplicationDetails = repository.saveMarriageDetails(request); workflowIntegrator.callWorkFlow(request); - request.getMarriageDetails().forEach(marriage->{ - if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - List demands = new ArrayList<>(); - Demand demand = new Demand(); - demand.setTenantId(marriage.getTenantid()); - demand.setConsumerCode(marriage.getApplicationNumber()); - demands.add(demand); - marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); - } - }); + // request.getMarriageDetails().forEach(marriage->{ + // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + // List demands = new ArrayList<>(); + // Demand demand = new Demand(); + // demand.setTenantId(marriage.getTenantid()); + // demand.setConsumerCode(marriage.getApplicationNumber()); + // demands.add(demand); + // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + // } + // }); return request.getMarriageDetails(); } public List updateMarriageDetails(MarriageDetailsRequest request) { - // validatorService.validateCommonFields( request); + validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); mdmsValidator.validateMarriageMDMSData(request,mdmsData); String applicationNumber = request.getMarriageDetails().get(0).getApplicationNumber(); @@ -82,22 +80,22 @@ public List updateMarriageDetails(MarriageDetailsReq .applicationNo(applicationNumber) .build()); List searchResult = repository.getMarriageApplication(criteria,request.getRequestInfo()); + // System.out.println("UpdatesearchResult"+searchResult); validatorService.validateUpdate(request, searchResult); - marriageDetailsEnrichment.enrichUpdate(request); - // workflowIntegrator.callWorkFlow(request); + workflowIntegrator.callWorkFlow(request); // List marriageApplicationDetails =repository.updateMarriageDetails(request); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); - request.getMarriageDetails().forEach(marriage->{ - if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - List demands = new ArrayList<>(); - Demand demand = new Demand(); - demand.setTenantId(marriage.getTenantid()); - demand.setConsumerCode(marriage.getApplicationNumber()); - demands.add(demand); - marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); - } - }); + // request.getMarriageDetails().forEach(marriage->{ + // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + // List demands = new ArrayList<>(); + // Demand demand = new Demand(); + // demand.setTenantId(marriage.getTenantid()); + // demand.setConsumerCode(marriage.getApplicationNumber()); + // demands.add(demand); + // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + // } + // }); return request.getMarriageDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index 81669f698bc..82ebee73d4d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -8,6 +8,9 @@ import java.util.LinkedList; import java.util.List; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import lombok.extern.slf4j.Slf4j; @Slf4j @Service public class MarriageRegistryRequestService { @@ -60,6 +63,16 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr request.setRequestInfo(Marriagerequest.getRequestInfo()); request.setMarriageDetails(registerMarriageDetails); + + try { + ObjectMapper mapper = new ObjectMapper(); + Object obj = request; + mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + System.out.println("JasmineRegistryRequest "+ mapper.writeValueAsString(obj)); + }catch(Exception e) { + log.error("Exception while fetching from searcher: ",e); + } + return request; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index b1be925e079..e3fc325ae19 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -219,7 +219,7 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms //************************************************* */ GROOM PRESENT ADDRESS***************************************************// if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressCountry() != null) { - System.out.println("isExists"); + // System.out.println("isExists"); if (!masterData.get(MarriageConstants.COUNTRY) .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentaddressCountry())) errorMap.put("GROOM PRESENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + @@ -415,7 +415,7 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms // BRIDE PRESENT ADDRESS//////////// if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentaddressCountry() != null) { - System.out.println("isExists"); + // System.out.println("isExists"); if (!masterData.get(MarriageConstants.COUNTRY) .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentaddressCountry())) errorMap.put("BRIDE PRESENT ADDRESS: COUNTRY NAME INVALID", "The country name of bride " + @@ -550,7 +550,7 @@ private Map> getAttributeValues(Object mdmsdata) { modulepaths.forEach(modulepath -> { try { mdmsResMap.putAll(JsonPath.read(mdmsdata, modulepath)); - log.error("jsonpath1" + JsonPath.read(mdmsdata, modulepath)); + // log.error("jsonpath1" + JsonPath.read(mdmsdata, modulepath)); } catch (Exception e) { log.error("Error while fetching MDMS data", e); throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index 6b0c6f92a49..9e1a2c6f701 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -11,6 +11,7 @@ import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; +import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -49,37 +50,49 @@ public MarriageApplicationController(MarriageApplicationService MarriageService, @PostMapping(value = {"/_createmarriage"}) + public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { + List marriageDetails = MarriageService.saveMarriageDetails(request); - MarriageApplicationResponse response = MarriageApplicationResponse.builder() - .marriageApplicationDetails(marriageDetails) - .responseInfo( - responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) - .build(); + + MarriageApplicationResponse response = MarriageApplicationResponse + .builder() + .marriageApplicationDetails(marriageDetails) + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) + .build(); return new ResponseEntity<>(response, HttpStatus.OK); } @PostMapping(value = {"/_updatemarriage"}) + public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { + List marriageDetails = MarriageService.updateMarriageDetails(request); - // if ((marriageDetails.get(0).getStatus() == WORKFLOW_STATUS_APPROVED && marriageDetails.get(0).getApplicationtype() == APPLICATION_NEW)) { + String status=marriageDetails.get(0).getStatus(); + String applicationType=marriageDetails.get(0).getApplicationtype(); + if ((status.equals( MarriageConstants.WORKFLOW_STATUS_APPROVED) && applicationType.equals(MarriageConstants.APPLICATION_NEW))) { + System.out.println("RegistryInsertBegin"+marriageDetails.get(0).getStatus() ); MarriageRegistryRequest marriageRegistryRequest = marriageRegistryRequestService.createRegistryRequest(request); + List marriageRegistryDetails = marriageRegistryService.createRegistry(marriageRegistryRequest); - // } + } return new ResponseEntity<>(marriageDetails, HttpStatus.OK); } @PostMapping(value = { "/_searchmarriage"}) + public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { + List marriageDetails = MarriageService.searchMarriageDetails(criteria); - MarriageApplicationResponse response = MarriageApplicationResponse.builder() - .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), - Boolean.TRUE)) - .marriageApplicationDetails(marriageDetails) - .build(); + + MarriageApplicationResponse response = MarriageApplicationResponse + .builder() + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),Boolean.TRUE)) + .marriageApplicationDetails(marriageDetails) + .build(); return ResponseEntity.ok(response); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 7fd0d69c26b..a6a333c254c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -178,31 +178,31 @@ public class MarriageApplicationDetails { private String workflowcode; private String assignuser; - @Size(max = 200) - @JsonProperty("brideurl") - private String brideurl; + // @Size(max = 200) + // @JsonProperty("brideurl") + // private String brideurl; - @Size(max = 200) - @JsonProperty("groomurl") - private String groomurl; + // @Size(max = 200) + // @JsonProperty("groomurl") + // private String groomurl; - @Size(max = 64) - @JsonProperty("imageuuid") - private String imageuuid; + // @Size(max = 64) + // @JsonProperty("imageuuid") + // private String imageuuid; - @Size(max = 256) - @JsonProperty("brideFilestoreid") - private String brideFilestoreid; + // @Size(max = 256) + // @JsonProperty("brideFilestoreid") + // private String brideFilestoreid; - @Size(max = 256) - @JsonProperty("groomFilestoreid") - private String groomFilestoreid; + // @Size(max = 256) + // @JsonProperty("groomFilestoreid") + // private String groomFilestoreid; - @JsonProperty("brideExpired") - private String brideExpired; + // @JsonProperty("brideExpired") + // private String brideExpired; - @JsonProperty("groomExpired") - private String groomExpired; + // @JsonProperty("groomExpired") + // private String groomExpired; @Size(max = 128) // @Html diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java index 70771e62a09..074b26535be 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java @@ -96,6 +96,33 @@ public class WitnessDetails { @JsonProperty("witness2Esigned") private Boolean witness2Esigned; + //Jasmine 06.04.2023 + @Size(max = 200) + @JsonProperty("brideurl") + private String brideurl; + + @Size(max = 200) + @JsonProperty("groomurl") + private String groomurl; + + @Size(max = 64) + @JsonProperty("imageuuid") + private String imageuuid; + + @Size(max = 256) + @JsonProperty("brideFilestoreid") + private String brideFilestoreid; + + @Size(max = 256) + @JsonProperty("groomFilestoreid") + private String groomFilestoreid; + + @JsonProperty("brideExpired") + private boolean brideExpired; + + @JsonProperty("groomExpired") + private boolean groomExpired; + @JsonProperty("auditDetails") private AuditDetails witnessAuditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index d0d0dee0c62..d039a05fdab 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -60,18 +60,18 @@ public void enrichCreate(MarriageRegistryRequest request) { } if(marriage.getBrideDetails()!=null){ marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); - marriage.getBrideDetails().setBrideGroom("B"); + // marriage.getBrideDetails().setBrideGroom("B"); } if(marriage.getGroomDetails()!=null){ marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); - marriage.getGroomDetails().setBrideGroom("G"); + // marriage.getGroomDetails().setBrideGroom("G"); } if(marriage.getWitnessDetails()!=null){ marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); - marriage.getWitnessDetails().setSerial_no1(1); - marriage.getWitnessDetails().setSerial_no2(2); + // marriage.getWitnessDetails().setSerial_no1(1); + // marriage.getWitnessDetails().setSerial_no2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } }); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 301c0f8c14f..19d4741fadf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -43,20 +43,25 @@ public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnr } - public List createMarriageRegistry(MarriageRegistryRequest request) { - - marriageRegistryEnrichment.enrichCreate(request); - producer.push(marriageApplicationConfiguration.getSaveMarriageRegistryTopic(), request); - MarriageRegistryRequest result = MarriageRegistryRequest - .builder() - .requestInfo(request.getRequestInfo()) - .marriageDetails(request.getMarriageDetails()) - .build(); - return result.getMarriageDetails(); - } + // public List createMarriageRegistry(MarriageRegistryRequest request) { + // marriageRegistryEnrichment.enrichCreate(request); + + // producer.push(marriageApplicationConfiguration.getSaveMarriageRegistryTopic(), request); + + // MarriageRegistryRequest result = MarriageRegistryRequest + // .builder() + // .requestInfo(request.getRequestInfo()) + // .marriageDetails(request.getMarriageDetails()) + // .build(); + // return result.getMarriageDetails(); + + // } public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { + List preparedStmtValues = new ArrayList<>(); + String query = queryBuilder.getMarriageRegistrySearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); return result; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 8268e33ebc0..41666497eeb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -18,7 +18,7 @@ public class MarriageRegistryRowMapper implements ResultSetExtractor extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null - System.out.println("QuertOut"+rs); + // System.out.println("QuertOut"+rs); List result = new ArrayList<>(); while (rs.next()) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 740cfea4c58..cc14443093c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -6,6 +6,14 @@ import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; import org.springframework.stereotype.Service; +import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.repository.querybuilder.MarriageRegistryQueryBuilder; +import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; import java.util.List; /** * Created by Jasmine @@ -14,15 +22,36 @@ @Slf4j @Service public class MarriageRegistryService { + private final MarriageProducer producer; + private final MarriageApplicationConfiguration marriageApplicationConfiguration; + private final MarriageRegistryEnrichment marriageRegistryEnrichment; private final MarriageRegistryRepository repository; - public MarriageRegistryService(MarriageRegistryRepository repository) { - this.repository = repository; + public MarriageRegistryService(MarriageRegistryRepository repository,MarriageRegistryEnrichment marriageRegistryEnrichment, + MarriageProducer producer, + MarriageApplicationConfiguration marriageApplicationConfiguration ) { + + this.producer = producer; + this.marriageApplicationConfiguration = marriageApplicationConfiguration; + this.marriageRegistryEnrichment = marriageRegistryEnrichment; + this.repository = repository; } public List createRegistry(MarriageRegistryRequest request) { + System.out.println("HiRegistry"); + +System.out.println("registryApplicationnumber"+request.getMarriageDetails().get(0).getApplicationNumber()); + marriageRegistryEnrichment.enrichCreate(request); + + producer.push(marriageApplicationConfiguration.getSaveMarriageRegistryTopic(), request); + + MarriageRegistryRequest result = MarriageRegistryRequest + .builder() + .requestInfo(request.getRequestInfo()) + .marriageDetails(request.getMarriageDetails()) + .build(); + return result.getMarriageDetails(); - return repository.createMarriageRegistry(request); } @@ -32,6 +61,7 @@ public List createRegistry(MarriageRegistryRequest requ // } public List searchRegistry(MarriageRegistrySearchCriteria criteria) { + return repository.searchMarriageRegistry(criteria); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 60cb7111439..83043c940ec 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -53,7 +53,7 @@ public class MarriageConstants { public static final String UUIDKEY = "uuid"; - public static final String BNDMODULENAMEVALUE = "marriage-services"; + public static final String BNDMODULENAMEVALUE = "CR"; public static final String WORKFLOWREQUESTARRAYKEY = "ProcessInstances"; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java index c86c36b26db..fb44c34bcdc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -21,6 +21,10 @@ import lombok.extern.slf4j.Slf4j; import net.minidev.json.JSONArray; import net.minidev.json.JSONObject; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; /** * Created by Jasmine * on 29.03.2023 @@ -31,12 +35,13 @@ public class WorkflowIntegrator { private final MarriageApplicationConfiguration bndConfig; private final RestTemplate restTemplate; - //private final MarriageApplicationRepository repository; + // private final MarriageApplicationRepository repository; @Autowired public WorkflowIntegrator(RestTemplate restTemplate, MarriageApplicationConfiguration bndConfig + // MarriageApplicationRepository repository ) { - // MarriageApplicationRepository repository - + + this.restTemplate = restTemplate; this.bndConfig = bndConfig; // this.repository = repository; @@ -54,11 +59,23 @@ public WorkflowIntegrator(RestTemplate restTemplate, MarriageApplicationConfigur * @param request the {@link MarriageDetailsRequest} */ public void callWorkFlow(MarriageDetailsRequest request) { - - List currentFile = request.getMarriageDetails(); + + // System.out.println("HiWorkflow"); + List currentFile = request.getMarriageDetails(); + + // try { + // ObjectMapper mapper = new ObjectMapper(); + // Object obj = currentFile; + // mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + // System.out.println("RegistryUpdate "+ mapper.writeValueAsString(obj)); + // }catch(Exception e) { + // log.error("Exception while fetching from searcher: ",e); + // } + JSONArray array = new JSONArray(); for (MarriageApplicationDetails marriageDtl : request.getMarriageDetails()) { String businessServiceFromMDMS=marriageDtl.getBusinessservice(); + // System.out.println("Jasmine-BusinessService"+businessServiceFromMDMS); if (businessServiceFromMDMS == null) { businessServiceFromMDMS = MarriageConstants.BUSINESS_SERVICE_BND; } @@ -66,7 +83,7 @@ public void callWorkFlow(MarriageDetailsRequest request) { .get(0).getAction().equalsIgnoreCase(MarriageConstants.TRIGGER_NOWORKFLOW)) { JSONObject obj = new JSONObject(); - // System.out.println("businessServiceFromMDMS"+businessServiceFromMDMS); + // System.out.println("Jasmine-Hi-Inside"); // Adding assignes to processInstance assignees // List> uuidMaps = buildUUIDList(deathDtl.getAssignees()); // System.out.println(uuidMaps); @@ -98,8 +115,8 @@ public void callWorkFlow(MarriageDetailsRequest request) { workFlowRequest.put(MarriageConstants.REQUESTINFOKEY, request.getRequestInfo()); workFlowRequest.put(MarriageConstants.WORKFLOWREQUESTARRAYKEY, array); String response = null; - System.out.println("workflow Check :" + workFlowRequest); - log.info("workflow integrator request " + workFlowRequest); + //System.out.println("workflow Check :" + workFlowRequest); + // log.info("workflow integrator request " + workFlowRequest); try { response = restTemplate.postForObject(bndConfig.getWfHost().concat(bndConfig.getWfTransitionPath()), @@ -151,8 +168,6 @@ public void callWorkFlow(MarriageDetailsRequest request) { } // //Jasmine 08.03.2023 - - private List> buildUUIDList(List assignees) { List> result = new LinkedList<>(); From bcf26ab309de8dca9d23fda44d121dc0bd9478f0 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 6 Apr 2023 12:57:30 +0530 Subject: [PATCH 109/420] yml updation --- .../egov-persister/src/main/resources/marriage-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 12239774fe1..3f01ef662ff 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -64,7 +64,7 @@ serviceMaps: # - jsonPath: $.MarriageDetails.*.workflowCode - - jsonPath: $.MarriageDetails.*.applicationnumber + - jsonPath: $.MarriageDetails.*.applicationNumber - jsonPath: $.MarriageDetails.*.registrationno From 5b050f7c085b5df6f9515ff3a808e5181d43da91 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 6 Apr 2023 12:59:13 +0530 Subject: [PATCH 110/420] fix --- .../egov-persister/src/main/resources/marriage.yml | 8 ++++---- .../enrichment/MarriageDetailsEnrichment.java | 4 +++- .../rowmapper/MarriageApplicationRowMapper.java | 2 +- .../service/MarriageRegistryRequestService.java | 2 +- .../web/model/MarriageApplicationDetails.java | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 933bfbc0194..67f7c3c4bf2 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -9,7 +9,7 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_details( id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, - locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationno, registration_date, action, status, createdtime, createdby, + locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationNo, registration_date, action, status, createdtime, createdby, lastmodifiedtime, lastmodifiedby) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); basePath: MarriageDetails.* @@ -66,7 +66,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.applicationNumber - - jsonPath: $.MarriageDetails.*.registrationno + - jsonPath: $.MarriageDetails.*.registrationNo - jsonPath: $.MarriageDetails.*.registrationDate @@ -694,7 +694,7 @@ serviceMaps: SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, - registrationno=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? + registrationNo=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? WHERE id=? and applicationnumber=? and tenantid=?; basePath: MarriageDetails.* jsonMaps: @@ -745,7 +745,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.workflowCode - - jsonPath: $.MarriageDetails.*.registrationno + - jsonPath: $.MarriageDetails.*.registrationNo - jsonPath: $.MarriageDetails.*.registrationDate diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index f4caaa3eda3..1ff350b3b5e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -94,7 +94,7 @@ public void enrichUpdate(MarriageDetailsRequest request) { request.getMarriageDetails() .forEach(marriage -> marriage.setAuditDetails(auditDetails)); - // setRegistrationNumber(request); + setBridePermanentAddress(request); setBridePresentAddress(request); setGroomPermanentAddress(request); @@ -503,6 +503,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { } + // private void setRegistrationNumber(MarriageDetailsRequest request) { // RequestInfo requestInfo = request.getRequestInfo(); @@ -528,6 +529,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { // }); // } + // private void setFileNumbers(MarriageDetailsRequest request) { // RequestInfo requestInfo = request.getRequestInfo(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 95eb5f0adb8..b81f60cf7aa 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -40,7 +40,7 @@ public List extractData(ResultSet rs) throws SQLExce .localityMl(rs.getString("MD_locality_ml")) .applicationNumber(rs.getString("MD_applicationnumber")) .registrationDate(rs.getLong("MD_registration_date")) - .registrationno(rs.getString("MD_registrationno")) + .registrationNo(rs.getString("MD_registrationno")) //.status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index 82ebee73d4d..b4ba2c0f725 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -46,7 +46,7 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr registerMarriageDetail.setMarriage_type(Marriagerequest.getMarriageDetails().get(0).getMarriageType()); registerMarriageDetail.setOth_marriage_type(Marriagerequest.getMarriageDetails().get(0).getOthMarriageType()); registerMarriageDetail.setRegistrationDate(Marriagerequest.getMarriageDetails().get(0).getRegistrationDate()); - registerMarriageDetail.setRegistrationno(Marriagerequest.getMarriageDetails().get(0).getRegistrationno()); + registerMarriageDetail.setRegistrationno(Marriagerequest.getMarriageDetails().get(0).getRegistrationNo()); registerMarriageDetail.setMarriageHouseNoAndNameEn(Marriagerequest.getMarriageDetails().get(0).getMarriageHouseNoAndNameEn()); registerMarriageDetail.setMarriageHouseNoAndNameMl(Marriagerequest.getMarriageDetails().get(0).getMarriageHouseNoAndNameMl()); registerMarriageDetail.setApplicationNumber(Marriagerequest.getMarriageDetails().get(0).getApplicationNumber()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index a6a333c254c..69edf76a057 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -99,8 +99,8 @@ public class MarriageApplicationDetails { private String othMarriageType; @Size(max = 64) - @JsonProperty("registrationno") - private String registrationno; + @JsonProperty("registrationNo") + private String registrationNo; @JsonProperty("registrationDate") private Long registrationDate; From 264760b19f4906406a86b9ae693528a3d6fdd2d9 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 6 Apr 2023 15:40:33 +0530 Subject: [PATCH 111/420] Marriage correction first commit --- .../src/main/resources/application.properties | 2 +- .../main/resources/marriage-correction.yml | 1104 +++++++++++++++++ .../MarriageApplicationConfiguration.java | 7 +- .../enrichment/BaseEnrichment.java | 29 + .../MarriageCorrectionEnrichment.java | 161 +++ .../mapper/RegistryToApplicationMapper.java | 175 +++ .../MarriageCorrectionRepository.java | 47 + .../service/MarriageCorrectionService.java | 66 + .../MarriageCorrectionController.java | 51 + .../web/model/CorrectionDocument.java | 53 + .../web/model/CorrectionField.java | 29 + .../web/model/CorrectionFieldValue.java | 23 + .../web/model/MarriageCorrectionDetails.java | 53 + .../web/model/MarriageCorrectionRequest.java | 34 + .../web/model/MarriageCorrectionResponse.java | 34 + .../src/main/resources/application.properties | 6 + 16 files changed, 1872 insertions(+), 2 deletions(-) create mode 100644 core-services/egov-persister/src/main/resources/marriage-correction.yml create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/BaseEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionField.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionFieldValue.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionResponse.java diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index bed2f6aa9d3..88dd3d5f24e 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml new file mode 100644 index 00000000000..ce857e677c3 --- /dev/null +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -0,0 +1,1104 @@ +serviceMaps: + serviceName: marriage-services + mappings: + - version: 1.0 + description: Persists save marriage details in marriage table + fromTopic: save-marriage-correction-topic + isTransaction: true + queryMaps: + - query: INSERT INTO public.eg_marriage_details( + id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, + houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, + locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationno, registration_date, action, status, createdtime, createdby, + lastmodifiedtime, lastmodifiedby) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageDOM + + - jsonPath: $.MarriageDetails.*.marriageDOR + + - jsonPath: $.MarriageDetails.*.marriageDistrictid + + - jsonPath: $.MarriageDetails.*.marriageLBtype + + - jsonPath: $.MarriageDetails.*.marriageTenantid + + - jsonPath: $.MarriageDetails.*.marriagePlacetype + + - jsonPath: $.MarriageDetails.*.placeid + + - jsonPath: $.MarriageDetails.*.marriagePlacenameEn + + - jsonPath: $.MarriageDetails.*.marriagePlacenameMl + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl + + - jsonPath: $.MarriageDetails.*.marriageStreetEn + + - jsonPath: $.MarriageDetails.*.marriageStreetMl + + - jsonPath: $.MarriageDetails.*.marriageWardCode + + - jsonPath: $.MarriageDetails.*.marriageTalukID + + - jsonPath: $.MarriageDetails.*.marriageVillageName + + - jsonPath: $.MarriageDetails.*.marriageType + + - jsonPath: $.MarriageDetails.*.othMarriageType + + - jsonPath: $.MarriageDetails.*.marriageLandmark + + - jsonPath: $.MarriageDetails.*.marriageLocalityEn + + - jsonPath: $.MarriageDetails.*.marriageLocalityMl + + - jsonPath: $.MarriageDetails.*.applicationType + + - jsonPath: $.MarriageDetails.*.businessService + + - jsonPath: $.MarriageDetails.*.workflowCode + + - jsonPath: $.MarriageDetails.*.applicationNumber + + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.registration_date + + - jsonPath: $.MarriageDetails.*.action + + - jsonPath: $.MarriageDetails.*.status + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + + - query: INSERT INTO public.eg_marriage_bride_groom_details( + id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, + mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, is_spouse_living, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living, tenantid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); + basePath: MarriageDetails.*.BrideDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideDetails.brideId + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAadharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAadharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAadharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardianAadharNo + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideIslivingSpouse + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGroom + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse + + - jsonPath: $.MarriageDetails.*.marriageTenantid + + + - query: INSERT INTO public.eg_marriage_bride_groom_details( + id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, + mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, + mother_aadharno, guardianname_en, guardianname_ml, guardian_aadharno, maritalstatusid, is_spouse_living, marriageid, bride_groom, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, no_of_spouse_living, tenantid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); + basePath: MarriageDetails.*.GroomDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomDetails.groomId + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAadharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAadharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAadharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardianAadharNo + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID + + - jsonPath: $.MarriageDetails.*.BrideDetails.groomIsSpouseLiving + + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse + + - jsonPath: $.MarriageDetails.*.marriageTenantid + + + + - query : INSERT INTO public.eg_marriage_permanent_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: MarriageDetails.*.BrideAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodepermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent + + + - query : INSERT INTO public.eg_marriage_permanent_address_details( + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: MarriageDetails.*.GroomAddressDetails + jsonMaps: + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodepermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + + +# - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , +# document_link ,marriageid ,bride_groom ,active ,applicationnumber ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime) +# VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?); +# +# +# basePath: MarriageDetails.*.MarriageDocuments.* +# jsonMaps: +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.id +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageTenantid +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentName +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentType +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.active +# +# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber +# +# - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdBy +# +# - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdTime +# +# - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + + +# - version: 1.0 +# description: Persists save marriage details in marriage table +# fromTopic: update-marriage-application-topic +# isTransaction: true +# queryMaps: +# +# - query: INSERT INTO public.eg_marriage_details_audit SELECT * FROM public.eg_marriage_details WHERE id =? and tenantid=?; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# - query: UPDATE public.eg_marriage_details +# SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, placetype=?, placeid=?, placename_en=?, +# placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, +# marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, +# registrationno=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? +# WHERE id=? and applicationnumber=? and tenantid=?; +# basePath: MarriageDetails.* +# jsonMaps: +# +# - jsonPath: $.MarriageDetails.*.marriageDOM +# +# - jsonPath: $.MarriageDetails.*.marriageDOR +# +# - jsonPath: $.MarriageDetails.*.marriageDistrictid +# +# - jsonPath: $.MarriageDetails.*.marriageLBtype +# +# - jsonPath: $.MarriageDetails.*.marriagePlacetype +# +# - jsonPath: $.MarriageDetails.*.placeid +# +# - jsonPath: $.MarriageDetails.*.marriagePlacenameEn +# +# - jsonPath: $.MarriageDetails.*.marriagePlacenameMl +# +# - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn +# +# - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl +# +# - jsonPath: $.MarriageDetails.*.marriageStreetEn +# +# - jsonPath: $.MarriageDetails.*.marriageStreetMl +# +# - jsonPath: $.MarriageDetails.*.marriageWardCode +# +# - jsonPath: $.MarriageDetails.*.marriageTalukID +# +# - jsonPath: $.MarriageDetails.*.marriageVillageName +# +# - jsonPath: $.MarriageDetails.*.marriageType +# +# - jsonPath: $.MarriageDetails.*.othMarriageType +# +# - jsonPath: $.MarriageDetails.*.marriageLandmark +# +# - jsonPath: $.MarriageDetails.*.marriageLocalityEn +# +# - jsonPath: $.MarriageDetails.*.marriageLocalityMl +# +# - jsonPath: $.MarriageDetails.*.applicationType +# +# - jsonPath: $.MarriageDetails.*.businessService +# +# - jsonPath: $.MarriageDetails.*.workflowCode +# +# - jsonPath: $.MarriageDetails.*.registrationno +# +# - jsonPath: $.MarriageDetails.*.registration_date +# +# - jsonPath: $.MarriageDetails.*.action +# +# - jsonPath: $.MarriageDetails.*.status +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.applicationNumber +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# +# - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'B'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# - query : UPDATE public.eg_marriage_bride_groom_details +# SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, +# middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, +# fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, +# maritalstatusid=?, is_spouse_living=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? +# WHERE marriageid=? and bride_groom= 'B' and tenantid=? ; +# +# basePath: MarriageDetails.*.BrideDetails +# jsonMaps: +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideAadharNo +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMl +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMl +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMl +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMl +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMl +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAadharNo +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAadharNo +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMl +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardianAadharNo +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideIslivingSpouse +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# +# - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'G'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# - query: UPDATE public.eg_marriage_bride_groom_details +# SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, +# middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, +# fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, +# maritalstatusid=?, is_spouse_living=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? +# WHERE marriageid=? and bride_groom= 'G' and tenantid=?; +# +# basePath: MarriageDetails.*.GroomDetails +# jsonMaps: +# +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomAadharNo +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMl +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMl +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMl +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMl +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMl +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAadharNo +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAadharNo +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMl +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardianAadharNo +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomIsSpouseLiving +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '1'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# - query : UPDATE public.eg_marriage_witness_details +# SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, +# lastmodifiedtime=?, lastmodifiedby=? +# WHERE marriageid=? and serial_no= '1' and tenantid=?; +# +# +# basePath: MarriageDetails.*.WitnessDetails +# jsonMaps: +# +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AadharNo +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameEn +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Age +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Esigned +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '2'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# - query: UPDATE public.eg_marriage_witness_details +# SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, +# lastmodifiedtime=?, lastmodifiedby=? +# WHERE marriageid=? and serial_no= '2' and tenantid=?; +# +# +# basePath: MarriageDetails.*.WitnessDetails +# jsonMaps: +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AadharNo +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameEn +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMl +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Age +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddresSEn +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMl +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Mobile +# +# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Esigned +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.marriageTenantid +# +# - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName +# +# +# - query : UPDATE public.eg_marriage_present_address_details +# SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, +# locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, +# lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, +# ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? +# WHERE marriageid=? and bride_groom='B' and tenantid=?; +# +# +# basePath: MarriageDetails.*.BrideAddressDetails +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaVillage +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaTaluk +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaTaluk +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentWardNo +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.isPermanentAddress +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeEn +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEn +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMl +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEnB +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOutSideIndiaProvinceEn +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePresent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePresent +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName +# +# +# +# +# - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName +# +# +# - query : UPDATE public.eg_marriage_present_address_details +# SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, +# locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, +# lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, +# ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? +# WHERE marriageid=? and bride_groom='G' and tenantid=?; +# +# basePath: MarriageDetails.*.GroomAddressDetails +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaVillage +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaTaluk +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaTaluk +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentWardNo +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.isPermanentAddress +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeEn +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEn +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMl +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEnB +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOutSideIndiaProvinceEn +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePresent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent +# +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName +# +# +# +# - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName +# +# - query: UPDATE public.eg_marriage_permanent_address_details +# SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, +# ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, +# pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?,poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, +# ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? +# WHERE marriageid=? and bride_groom='B' and tenantid=?; +# basePath: MarriageDetails.*.BrideAddressDetails +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrVillage +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodepermanent +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName +# +# +# +# - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; +# +# basePath: MarriageDetails.* +# jsonMaps: +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName +# +# - query : UPDATE public.eg_marriage_permanent_address_details +# SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, +# ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, +# pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, +# poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, +# ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? +# WHERE bride_groom='G' AND marriageid=? and tenantid=?; +# +# +# basePath: MarriageDetails.*.GroomAddressDetails +# jsonMaps: +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrVillage +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime +# +# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrVillage +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodepermanent +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent +# +# - jsonPath: $.MarriageDetails.*.id +# +# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName +# diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index 25f5285ae7b..681c4a649d3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -79,6 +79,11 @@ public class MarriageApplicationConfiguration { @Value("${egov.state.level.tenant.id}") private String egovStateLevelTenant; - + //Marriage Correction + @Value("${persister.save.marriage.correction.topic}") + private String SaveMarriageCorrectionTopic; + + @Value("${persister.update.marriage.correction.topic}") + private String UpdateMarriageCorrectionTopic; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/BaseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/BaseEnrichment.java new file mode 100644 index 00000000000..33f857e0255 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/BaseEnrichment.java @@ -0,0 +1,29 @@ +package org.ksmart.marriage.marriagecorrection.enrichment; + +import org.ksmart.marriage.common.model.AuditDetails; + +/** + * Created by Shaiju + * on 31.03.2023 + */ +public interface BaseEnrichment { + default AuditDetails buildAuditDetails(String by, Boolean create) { + AuditDetails auditDetails; + + Long currentTime = Long.valueOf(System.currentTimeMillis()); + if (create) { + auditDetails = AuditDetails.builder() + .createdBy(by) + .createdTime(currentTime) + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } else { + auditDetails = AuditDetails.builder() + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } + return auditDetails; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java new file mode 100644 index 00000000000..78900cf9fc7 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -0,0 +1,161 @@ +package org.ksmart.marriage.marriagecorrection.enrichment; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.apache.commons.collections4.CollectionUtils; +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.request.User; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.common.repository.IdGenRepository; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; +import org.springframework.beans.PropertyAccessor; +import org.springframework.beans.PropertyAccessorFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Field; +import java.util.*; + +@Component +public class MarriageCorrectionEnrichment implements BaseEnrichment { + + @Autowired + MarriageApplicationConfiguration config; + @Autowired + IdGenRepository idGenRepository; + + public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageApplicationDetails marriageApplicationDetails) { + + RequestInfo requestInfo = correctionRequest.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + + correctionRequest.getMarriageCorrectionDetails().forEach(correction -> { + + marriageApplicationDetails.setTenantid(correction.getTenantid()); + marriageApplicationDetails.setApplicationtype(correction.getApplicationtype()); + marriageApplicationDetails.setBusinessservice(correction.getBusinessservice()); + marriageApplicationDetails.setStatus(correction.getStatus()); + marriageApplicationDetails.setAction(correction.getAction()); + marriageApplicationDetails.setWorkflowcode(correction.getWorkflowcode()); + + + Map marriageApplnDetailsFieldMap = getJsonFieldNames(MarriageApplicationDetails.class.getDeclaredFields()); + Map brideDetailsFieldMap = getJsonFieldNames(BrideDetails.class.getDeclaredFields()); + Map groomDetailsFieldMap = getJsonFieldNames(GroomDetails.class.getDeclaredFields()); + Map brideAddressDetailsFieldMap = getJsonFieldNames(BrideAddressDetails.class.getDeclaredFields()); + Map groomAddressDetailsFieldMap = getJsonFieldNames(GroomAddressDetails.class.getDeclaredFields()); + + + PropertyAccessor marriageApplnDetailsAccessor = PropertyAccessorFactory.forDirectFieldAccess(marriageApplicationDetails); + PropertyAccessor brideDetailsAccessor = PropertyAccessorFactory.forDirectFieldAccess(marriageApplicationDetails.getBrideDetails()); + PropertyAccessor groomDetailsAccessor = PropertyAccessorFactory.forDirectFieldAccess(marriageApplicationDetails.getGroomDetails()); + PropertyAccessor brideAddressDetailsAccessor = PropertyAccessorFactory.forDirectFieldAccess(marriageApplicationDetails.getBrideAddressDetails()); + PropertyAccessor groomAddressDetailsAccessor = PropertyAccessorFactory.forDirectFieldAccess(marriageApplicationDetails.getGroomAddressDetails()); + + String changeFieldName = null; + + correction.getCorrectionField().forEach(correctionField -> { + + correctionField.getCorrectionFieldValue().forEach(changeField -> { + + if (!changeField.getField().isEmpty()) { + String[] fieldName = changeField.getField().split("\\."); + if (fieldName.length == 1) { + if (marriageApplnDetailsFieldMap.containsKey(fieldName[0])) { + + marriageApplnDetailsAccessor.setPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0]), changeField.getNewValue()); + + } + } else if (fieldName.length == 2) { + if (fieldName[0].equalsIgnoreCase("BrideDetails")) { + if (brideDetailsFieldMap.containsKey(fieldName[1])) { + + brideDetailsAccessor.setPropertyValue(brideDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + + } + } else if (fieldName[0].equalsIgnoreCase("GroomDetails")) { + if (groomDetailsFieldMap.containsKey(fieldName[1])) { + + groomDetailsAccessor.setPropertyValue(groomDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + + } + } else if (fieldName[0].equalsIgnoreCase("GroomAddressDetails")) { + if (brideAddressDetailsFieldMap.containsKey(fieldName[1])) { + + brideAddressDetailsAccessor.setPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + + } + } else if (fieldName[0].equalsIgnoreCase("BrideAddressDetails")) { + if (groomAddressDetailsFieldMap.containsKey(fieldName[1])) { + + groomAddressDetailsAccessor.setPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + + } + } + + } + } + }); + + }); + }); + + setApplicationNumbers(correctionRequest, marriageApplicationDetails); + + } + + private Map getJsonFieldNames(Field[] fields) { + Map map = new HashMap<>(); + for (Field field : fields) { + if (field.isAnnotationPresent(JsonProperty.class)) { + String annotationValue = field.getAnnotation(JsonProperty.class).value(); + map.put(annotationValue, field.getName()); + } + } + return map; + } + + private Object readObjectVals(Object obj, String propName) { + PropertyAccessor myAccessor = PropertyAccessorFactory.forDirectFieldAccess(obj); + return myAccessor.getPropertyValue(propName); + } + + + private void setApplicationNumbers(MarriageCorrectionRequest correctionRequest, MarriageApplicationDetails marriageApplicationDetails) { + RequestInfo requestInfo = correctionRequest.getRequestInfo(); + List marriageCorrection = correctionRequest.getMarriageCorrectionDetails(); + String tenantId = marriageCorrection.get(0) + .getTenantid(); + List filecodes = getIds(requestInfo, + tenantId, + config.getMarriageApplNumberIdName(), + marriageApplicationDetails.getModulecode(), + "CRN", + marriageCorrection.size()); + validateFileCodes(filecodes, marriageCorrection.size()); + + ListIterator itr = filecodes.listIterator(); + marriageApplicationDetails.setApplicationNumber(itr.next()); + + } + + private List getIds(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { + return idGenRepository.getIdList(requestInfo, tenantId, idName, moduleCode, fnType, count); + } + + private void validateFileCodes(List fileCodes, int count) { + if (CollectionUtils.isEmpty(fileCodes)) { + throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), "No file code(s) returned from idgen service"); + } + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java new file mode 100644 index 00000000000..b9f5f1cdce6 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -0,0 +1,175 @@ +package org.ksmart.marriage.marriagecorrection.mapper; + + +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.List; + +@Component +public class RegistryToApplicationMapper { + + public MarriageApplicationDetails convert(List registry){ + + MarriageApplicationDetails marriageApplicationDetails=new MarriageApplicationDetails(); + marriageApplicationDetails.setBrideDetails(new BrideDetails()); + marriageApplicationDetails.setGroomDetails(new GroomDetails()); + marriageApplicationDetails.setBrideAddressDetails(new BrideAddressDetails()); + marriageApplicationDetails.setGroomAddressDetails(new GroomAddressDetails()); + + + MarriageRegistryDetails marriageRegistryDetails=registry.get(0); + + marriageApplicationDetails.setDateofmarriage(marriageRegistryDetails.getDateofmarriage()); + marriageApplicationDetails.setDateofreporting(marriageRegistryDetails.getDateofreporting()); + marriageApplicationDetails.setDistrictid(marriageRegistryDetails.getDistrictid()); + marriageApplicationDetails.setLbtype(marriageRegistryDetails.getLbtype()); + marriageApplicationDetails.setTenantid(marriageRegistryDetails.getTenantid()); + marriageApplicationDetails.setLandmark(marriageRegistryDetails.getLandmark()); + marriageApplicationDetails.setPlacetype(marriageRegistryDetails.getPlacetype()); + marriageApplicationDetails.setPlaceid(marriageRegistryDetails.getPlaceid()); + marriageApplicationDetails.setPlacenameEn(marriageRegistryDetails.getPlacenameEn()); + marriageApplicationDetails.setPlacenameMl(marriageRegistryDetails.getPlacenameMl()); + marriageApplicationDetails.setStreetNameEn(marriageRegistryDetails.getStreet_name_en()); + marriageApplicationDetails.setStreetNameMl(marriageRegistryDetails.getStreet_name_ml()); + marriageApplicationDetails.setWardCode(marriageRegistryDetails.getWard_code()); + marriageApplicationDetails.setTalukid(marriageRegistryDetails.getTalukid()); + marriageApplicationDetails.setVillageName(marriageRegistryDetails.getVillage_name()); + marriageApplicationDetails.setMarriageType(marriageRegistryDetails.getMarriage_type()); + marriageApplicationDetails.setLandmark(marriageRegistryDetails.getLandmark()); + marriageApplicationDetails.setLocalityEn(marriageRegistryDetails.getLocality_en()); + marriageApplicationDetails.setLocalityMl(marriageRegistryDetails.getLocality_ml()); + marriageApplicationDetails.setRegistrationDate(marriageRegistryDetails.getRegistrationDate()); + marriageApplicationDetails.setRegistrationNo(marriageRegistryDetails.getRegistrationno()); + //marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukid()); + //marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillage_name()); + + + //marriageApplicationDetails.getBrideDetails().setBrideId(marriageRegistryDetails.getBrideDetails().getBrideId()); + marriageApplicationDetails.getBrideDetails().setBrideGroom(marriageRegistryDetails.getBrideDetails().getBrideGroom()); + marriageApplicationDetails.getBrideDetails().setResidentship(marriageRegistryDetails.getBrideDetails().getResidentship()); + marriageApplicationDetails.getBrideDetails().setPassportno(marriageRegistryDetails.getBrideDetails().getPassportno()); + marriageApplicationDetails.getBrideDetails().setAadharno(marriageRegistryDetails.getBrideDetails().getAadharno()); + marriageApplicationDetails.getBrideDetails().setSocialsecurityno(marriageRegistryDetails.getBrideDetails().getSocialsecurityno()); + marriageApplicationDetails.getBrideDetails().setFirstnameEn(marriageRegistryDetails.getBrideDetails().getFirstname_en()); + marriageApplicationDetails.getBrideDetails().setFirstnameMl(marriageRegistryDetails.getBrideDetails().getFirstname_ml()); + marriageApplicationDetails.getBrideDetails().setMiddlenameEn(marriageRegistryDetails.getBrideDetails().getMiddlename_en()); + marriageApplicationDetails.getBrideDetails().setMiddlenameMl(marriageRegistryDetails.getBrideDetails().getMiddlename_ml()); + marriageApplicationDetails.getBrideDetails().setLastnameEn(marriageRegistryDetails.getBrideDetails().getLastname_en()); + marriageApplicationDetails.getBrideDetails().setLastnameMl(marriageRegistryDetails.getBrideDetails().getLastname_ml()); + marriageApplicationDetails.getBrideDetails().setMobile(marriageRegistryDetails.getBrideDetails().getMobile()); + marriageApplicationDetails.getBrideDetails().setEmailid(marriageRegistryDetails.getBrideDetails().getEmailid()); + marriageApplicationDetails.getBrideDetails().setGender(marriageRegistryDetails.getBrideDetails().getGender()); + marriageApplicationDetails.getBrideDetails().setDateofbirth(marriageRegistryDetails.getBrideDetails().getDateofbirth()); + marriageApplicationDetails.getBrideDetails().setAge(marriageRegistryDetails.getBrideDetails().getAge()); + marriageApplicationDetails.getBrideDetails().setParentGuardian(marriageRegistryDetails.getBrideDetails().getParent_guardian()); + //marriageApplicationDetails.getBrideDetails().setBrideIsSpouseLiving(marriageRegistryDetails.getBrideDetails().getBrideIsSpouseLiving()); + marriageApplicationDetails.getBrideDetails().setBrideNoOfSpouse(marriageRegistryDetails.getBrideDetails().getBrideNoOfSpouse()); + marriageApplicationDetails.getBrideDetails().setFatherAadharno(marriageRegistryDetails.getBrideDetails().getFather_aadharno()); + marriageApplicationDetails.getBrideDetails().setFathernameEn(marriageRegistryDetails.getBrideDetails().getFathername_en()); + marriageApplicationDetails.getBrideDetails().setFathernameMl(marriageRegistryDetails.getBrideDetails().getFathername_ml()); + marriageApplicationDetails.getBrideDetails().setGuardiannameEn(marriageRegistryDetails.getBrideDetails().getGuardianname_en()); + marriageApplicationDetails.getBrideDetails().setGuardiannameMl(marriageRegistryDetails.getBrideDetails().getGuardianname_ml()); + marriageApplicationDetails.getBrideDetails().setGuardianAadharno(marriageRegistryDetails.getBrideDetails().getGuardian_aadharno()); + marriageApplicationDetails.getBrideDetails().setMothernameEn(marriageRegistryDetails.getBrideDetails().getMothername_en()); + marriageApplicationDetails.getBrideDetails().setMothernameMl(marriageRegistryDetails.getBrideDetails().getMothername_ml()); + marriageApplicationDetails.getBrideDetails().setMotherAadharno(marriageRegistryDetails.getBrideDetails().getMother_aadharno()); + marriageApplicationDetails.getBrideDetails().setMaritalstatusid(marriageRegistryDetails.getBrideDetails().getMaritalstatusid()); + //marriageApplicationDetails.getBrideDetails().setMarriageid(marriageRegistryDetails.getBrideDetails().getMarriageid()); + + + marriageApplicationDetails.getGroomDetails().setBrideGroom(marriageRegistryDetails.getGroomDetails().getBrideGroom()); + marriageApplicationDetails.getGroomDetails().setDateofbirth(marriageRegistryDetails.getGroomDetails().getDateofbirth()); + marriageApplicationDetails.getGroomDetails().setFirstnameEn(marriageRegistryDetails.getGroomDetails().getFirstname_en()); + marriageApplicationDetails.getGroomDetails().setFirstnameMl(marriageRegistryDetails.getGroomDetails().getFirstname_ml()); + marriageApplicationDetails.getGroomDetails().setMiddlenameEn(marriageRegistryDetails.getGroomDetails().getMiddlename_en()); + marriageApplicationDetails.getGroomDetails().setMiddlenameMl(marriageRegistryDetails.getGroomDetails().getMiddlename_ml()); + marriageApplicationDetails.getGroomDetails().setLastnameEn(marriageRegistryDetails.getGroomDetails().getLastname_en()); + marriageApplicationDetails.getGroomDetails().setLastnameMl(marriageRegistryDetails.getGroomDetails().getLastname_ml()); + marriageApplicationDetails.getGroomDetails().setAge(marriageRegistryDetails.getGroomDetails().getAge()); + marriageApplicationDetails.getGroomDetails().setAadharno(marriageRegistryDetails.getGroomDetails().getAadharno()); + marriageApplicationDetails.getGroomDetails().setSocialsecurityno(marriageRegistryDetails.getGroomDetails().getSocialsecurityno()); + marriageApplicationDetails.getGroomDetails().setMobile(marriageRegistryDetails.getGroomDetails().getMobile()); + marriageApplicationDetails.getGroomDetails().setGroomIsSpouseLiving(marriageRegistryDetails.getGroomDetails().getGroomIsSpouseLiving()); + marriageApplicationDetails.getGroomDetails().setGroomNoOfSpouse(marriageRegistryDetails.getGroomDetails().getGroomNoOfSpouse()); + marriageApplicationDetails.getGroomDetails().setEmailid(marriageRegistryDetails.getGroomDetails().getEmailid()); + marriageApplicationDetails.getGroomDetails().setFatherAadharno(marriageRegistryDetails.getGroomDetails().getFather_aadharno()); + marriageApplicationDetails.getGroomDetails().setFathernameEn(marriageRegistryDetails.getGroomDetails().getFathername_en()); + marriageApplicationDetails.getGroomDetails().setFathernameMl(marriageRegistryDetails.getGroomDetails().getFathername_ml()); + marriageApplicationDetails.getGroomDetails().setGuardiannameEn(marriageRegistryDetails.getGroomDetails().getGuardianname_en()); + marriageApplicationDetails.getGroomDetails().setGuardiannameMl(marriageRegistryDetails.getGroomDetails().getGuardianname_ml()); + marriageApplicationDetails.getGroomDetails().setGuardianAadharno(marriageRegistryDetails.getGroomDetails().getGuardian_aadharno()); + marriageApplicationDetails.getGroomDetails().setMothernameEn(marriageRegistryDetails.getGroomDetails().getMothername_en()); + marriageApplicationDetails.getGroomDetails().setMothernameMl(marriageRegistryDetails.getGroomDetails().getMothername_ml()); + marriageApplicationDetails.getGroomDetails().setMotherAadharno(marriageRegistryDetails.getGroomDetails().getMother_aadharno()); + marriageApplicationDetails.getGroomDetails().setGender(marriageRegistryDetails.getGroomDetails().getGender()); + marriageApplicationDetails.getGroomDetails().setMaritalstatusid(marriageRegistryDetails.getGroomDetails().getMaritalstatusid()); + //marriageApplicationDetails.getGroomDetails().setMarriageid(marriageRegistryDetails.getGroomDetails().getMarriageid()); + marriageApplicationDetails.getGroomDetails().setParentGuardian(marriageRegistryDetails.getGroomDetails().getParent_guardian()); + marriageApplicationDetails.getGroomDetails().setPassportno(marriageRegistryDetails.getGroomDetails().getPassportno()); + marriageApplicationDetails.getGroomDetails().setResidentship(marriageRegistryDetails.getGroomDetails().getResidentship()); + + + marriageApplicationDetails.getBrideAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getCountryIdPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setStateIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getStateIdPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setDistrictIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getDistrictIdPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setPoNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPoNoPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setLocalityEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getLocalityEnPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setLocalityMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getLocalityMlPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setStreetNameEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getStreetNameEnPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setStreetNameMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getStreetNameMlPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setHouseNameNoMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getHouseNameNoMlPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setVillageNamePermanent(marriageRegistryDetails.getBrideAddressDetails().getVillageNamePermanent()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrPostOffice(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + + marriageApplicationDetails.getGroomAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getCountryIdPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setStateIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getStateIdPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setDistrictIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getDistrictIdPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setPoNoPermanent(marriageRegistryDetails.getGroomAddressDetails().getPoNoPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setLocalityEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getLocalityEnPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setLocalityMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getLocalityMlPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setStreetNameEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getStreetNameEnPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setStreetNameMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getStreetNameMlPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setHouseNameNoMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getHouseNameNoMlPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setVillageNamePermanent(marriageRegistryDetails.getGroomAddressDetails().getVillageNamePermanent()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrPostOffice(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaWardNo()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + + return marriageApplicationDetails; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java new file mode 100644 index 00000000000..23ea05df78f --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java @@ -0,0 +1,47 @@ +package org.ksmart.marriage.marriagecorrection.repository; + +import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; +import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.utils.MarriageMdmsUtil; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Slf4j +@Repository +public class MarriageCorrectionRepository { + + private final MarriageProducer producer; + private final MarriageApplicationConfiguration marriageApplicationConfiguration; + + private final MarriageDetailsEnrichment marriageDetailsEnrichment; + private final MarriageMdmsUtil util; + private final MarriageMDMSValidator mdmsValidator; + + public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator) { + this.producer = producer; + this.marriageApplicationConfiguration = marriageApplicationConfiguration; + this.marriageDetailsEnrichment = marriageDetailsEnrichment; + this.util = util; + this.mdmsValidator = mdmsValidator; + } + + + public List saveCorrectionDetails(MarriageDetailsRequest request) { + + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + //mdmsValidator.validateMarriageMDMSData(request,mdmsData); + marriageDetailsEnrichment.enrichCreate(request); + + producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); + + //producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); + return request.getMarriageDetails(); + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java new file mode 100644 index 00000000000..6358b653877 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -0,0 +1,66 @@ +package org.ksmart.marriage.marriagecorrection.service; + +import lombok.extern.slf4j.Slf4j; + +import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecorrection.enrichment.MarriageCorrectionEnrichment; +import org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; +import org.ksmart.marriage.marriagecorrection.repository.MarriageCorrectionRepository; +import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@Service +public class MarriageCorrectionService { + + private final MarriageCorrectionRepository correctionRepository; + + private final MarriageRegistryRepository registryRepository; + + private final MarriageCorrectionEnrichment marriageCorrectionEnrichment; + + private final RegistryToApplicationMapper RegistryToApplicationMapper; + + private final MarriageApplicationService MarriageService; + + public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, MarriageApplicationService marriageService) { + this.correctionRepository = correctionRepository; + this.registryRepository = registryRepository; + this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; + RegistryToApplicationMapper = registryToApplicationMapper; + MarriageService = marriageService; + } + + public List createCorrection(MarriageCorrectionRequest request) { + + MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); + criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); + List marriageRegistryDetails = searchRegistry(criteria); + if (!marriageRegistryDetails.isEmpty()) { + MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); + marriageCorrectionEnrichment.enrichCreate(request, marriageApplicationDetail); + + MarriageDetailsRequest marriageDetailsRequest = new MarriageDetailsRequest(); + marriageDetailsRequest.setRequestInfo(request.getRequestInfo()); + List marriageApplicationDetailsList = new ArrayList<>(); + marriageApplicationDetailsList.add(marriageApplicationDetail); + marriageDetailsRequest.setMarriageDetails(marriageApplicationDetailsList); + correctionRepository.saveCorrectionDetails(marriageDetailsRequest); + } + return request.getMarriageCorrectionDetails(); + } + + + private List searchRegistry(MarriageRegistrySearchCriteria criteria) { + return registryRepository.searchMarriageRegistry(criteria); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java new file mode 100644 index 00000000000..66a5487e489 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -0,0 +1,51 @@ +package org.ksmart.marriage.marriagecorrection.web.controller; + +import com.google.gson.Gson; +import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionResponse; +import org.ksmart.marriage.marriagecorrection.service.MarriageCorrectionService; +import org.ksmart.marriage.utils.ResponseInfoFactory; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; +import java.lang.reflect.InvocationTargetException; +import java.util.List; + +@Slf4j +@RestController +@RequestMapping("/v1/marriagedetails") +public class MarriageCorrectionController { + + + private final MarriageCorrectionService marriageCorrectionService; + + private final ResponseInfoFactory responseInfoFactory; + + public MarriageCorrectionController(MarriageCorrectionService marriageCorrectionService, ResponseInfoFactory responseInfoFactory) { + this.marriageCorrectionService = marriageCorrectionService; + this.responseInfoFactory = responseInfoFactory; + } + + @PostMapping("/_createmarriagecorrection") + public ResponseEntity create(@Valid @RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { + System.out.println(new Gson().toJson(request)); + + String filename = "D:/some folder/001.docx"; + String extensionRemoved = filename.split("\\.")[filename.split("\\.").length-1]; + System.out.println("&&&&&&&&&&&&&&&"+extensionRemoved); + + List marriageCorrectionDetailsList = marriageCorrectionService.createCorrection(request); + MarriageCorrectionResponse response = MarriageCorrectionResponse + .builder() + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) + .marriageCorrectionDetails(marriageCorrectionDetailsList) + .build(); + return ResponseEntity.ok(response); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java new file mode 100644 index 00000000000..269652bcfc7 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java @@ -0,0 +1,53 @@ +package org.ksmart.marriage.marriagecorrection.web.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import lombok.*; +import org.hibernate.validator.constraints.SafeHtml; +import org.ksmart.marriage.common.model.AuditDetails; +import org.springframework.validation.annotation.Validated; + +import javax.validation.constraints.Size; + +/** + * A Object holds the basic data for a Trade License + */ +@ApiModel(description = "A Object holds the basic data for a Trade License") +@Validated +@javax.annotation.Generated(value = "org.egov.codegen.SpringBootCodegen", date = "2018-09-18T17:06:11.263+05:30") + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@EqualsAndHashCode +public class CorrectionDocument { + + @Size(max=64) + @SafeHtml + @JsonProperty("id") + private String id; + @JsonProperty("correctionId") + private String correctionId; + @Size(max=128) + @SafeHtml + @JsonProperty("correctionFieldName") + private String correctionFieldName = null; + @Size(max=128) + @SafeHtml + @JsonProperty("documentType") + private String documentType = null; + @Size(max=1024) + @SafeHtml + @JsonProperty("fileStoreId") + private String fileStoreId = null; + @Size(max=64) + @SafeHtml + @JsonProperty("active") + private Boolean active = true; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + +} + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionField.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionField.java new file mode 100644 index 00000000000..9db1afec861 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionField.java @@ -0,0 +1,29 @@ +package org.ksmart.marriage.marriagecorrection.web.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; + +import java.util.List; +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class CorrectionField { + @JsonProperty("correctionFieldName") + private String correctionFieldName; + + @JsonProperty("conditionCode") + private String conditionCode; + @JsonProperty("specificCondition") + private String specificCondition; + @JsonProperty("correctionFieldValue") + private List correctionFieldValue; + @JsonProperty("CorrectionDocument") + private List correctionDocument; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionFieldValue.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionFieldValue.java new file mode 100644 index 00000000000..f5e22288a9a --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionFieldValue.java @@ -0,0 +1,23 @@ +package org.ksmart.marriage.marriagecorrection.web.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class CorrectionFieldValue { + @JsonProperty("id") + private String id; + @JsonProperty("column") + private String field; + @JsonProperty("newValue") + private String newValue; + @JsonProperty("oldValue") + private String oldValue; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java new file mode 100644 index 00000000000..0db6c3a1833 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -0,0 +1,53 @@ +package org.ksmart.marriage.marriagecorrection.web.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; +import org.springframework.validation.annotation.Validated; + +import javax.validation.constraints.Size; +import java.util.List; + +@Validated +@Getter +@Setter +@ToString +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageCorrectionDetails { + + @Size(max = 64) + @JsonProperty("id") + private String id; + @Size(max = 64) + @JsonProperty("tenantid") + private String tenantid; + @Size(max = 64) + @JsonProperty("applicationType") + private String applicationtype; + @Size(max = 64) + @JsonProperty("businessService") + private String businessservice; + @Size(max = 64) + @JsonProperty("workflowCode") + private String workflowcode; + @Size(max = 64) + @JsonProperty("registrationno") + private String registrationno; + @JsonProperty("registration_date") + private Long registrationDate; + @Size(max = 64) + @JsonProperty("action") + private String action; + @Size(max = 64) + @JsonProperty("applicationStatus") + private String status; + + @JsonProperty("CorrectionField") + private List correctionField; + @JsonProperty("auditDetails") + private AuditDetails auditDetails; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionRequest.java new file mode 100644 index 00000000000..1a08575722d --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionRequest.java @@ -0,0 +1,34 @@ +package org.ksmart.marriage.marriagecorrection.web.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.request.RequestInfo; +import org.springframework.validation.annotation.Validated; + +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; + +@Validated +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageCorrectionRequest { + + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + @JsonProperty("CorrectionDetails") + @Valid + private List marriageCorrectionDetails; + + public MarriageCorrectionRequest addCrMarriageDtl(MarriageCorrectionDetails marriageCorrection) { + if (marriageCorrectionDetails == null) { + marriageCorrectionDetails = new ArrayList<>(); + } + marriageCorrectionDetails.add(marriageCorrection); + return this; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionResponse.java new file mode 100644 index 00000000000..7d5c1335896 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionResponse.java @@ -0,0 +1,34 @@ +package org.ksmart.marriage.marriagecorrection.web.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.response.ResponseInfo; +import org.springframework.validation.annotation.Validated; + +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; + +@Validated +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageCorrectionResponse { + + @JsonProperty("ResponseInfo") + private ResponseInfo responseInfo; + + @JsonProperty("marriageCorrectionDetails") + @Valid + private List marriageCorrectionDetails; + + public MarriageCorrectionResponse addCrMarriageDtl(MarriageCorrectionDetails marriageCorrection) { + if (marriageCorrectionDetails == null) { + marriageCorrectionDetails = new ArrayList<>(); + } + marriageCorrectionDetails.add(marriageCorrection); + return this; + } +} diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index b31a483b262..02efe6bf3eb 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -160,3 +160,9 @@ egov.bnd.max.limit=100 #collection service config egov.collection.service.host=https://ksmart-dev.lsgkerala.gov.in/ egov.payment.search.endpoint=/collection-services/payments/_search + + + +#Marriage correction topics +persister.save.marriage.correction.topic=save-marriage-correction-topic +persister.update.marriage.correction.topic=update-marriage-correction-topic From 871f544cbcd425f69129db9921b0e3479957e974 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 7 Apr 2023 15:34:02 +0530 Subject: [PATCH 112/420] document updation --- .../src/main/resources/marriage.yml | 66 +++++++++++++- .../enrichment/MarriageDetailsEnrichment.java | 85 ++++++++++++++++--- .../MarriageApplicationRepository.java | 13 ++- .../BaseMarriageQueryBuilder.java | 30 +++++++ .../MarriageApplicationQueryBuilder.java | 34 ++++++-- .../repository/rowmapper/BaseRowMapper.java | 9 ++ .../MarriageApplicationRowMapper.java | 1 - .../rowmapper/MarriageDocumentRowMapper.java | 36 ++++++++ .../service/MarriageApplicationService.java | 11 ++- .../validator/MarriageMDMSValidator.java | 9 +- .../MarriageApplicationController.java | 14 ++- .../web/model/MarriageApplicationDetails.java | 4 + .../web/model/marriage/MarriageDocument.java | 22 +++-- .../querybuilder/BaseMarriageQuery.java | 8 ++ .../MarriageRegistryQueryBuilder.java | 10 ++- .../service/MarriageRegistryService.java | 2 - ...406224500__document_table_updation_dll.sql | 12 +++ 17 files changed, 322 insertions(+), 44 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230406224500__document_table_updation_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 933bfbc0194..615f9790262 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -637,11 +637,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent - + - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , - document_link ,marriageid ,bride_groom ,active ,applicationnumber ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?); + document_link ,marriageid ,bride_groom ,active ,applicationnumber , createdby ,createdtime,lastmodifiedby , lastmodifiedtime) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ? ); basePath: MarriageDetails.*.MarriageDocuments.* @@ -1338,3 +1338,63 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + + - query: UPDATE public.eg_marriage_document SET active = ? ,lastmodifiedby = ? , lastmodifiedtime = ? WHERE bride_groom=? AND applicationnumber=? AND document_type=? + AND tenantid = ? + + basePath: MarriageDetails.*.MarriageDocuments.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.activeFalse + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentType + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageTenantid + + + - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , + document_link ,marriageid ,bride_groom ,active ,applicationnumber , createdby ,createdtime,lastmodifiedby , lastmodifiedtime) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ? ); + + + basePath: MarriageDetails.*.MarriageDocuments.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.id + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageTenantid + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentName + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentType + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.active + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdBy + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdTime + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index f4caaa3eda3..b691dcb256c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -9,10 +9,12 @@ import org.ksmart.marriage.common.repository.IdGenRepository; import org.ksmart.marriage.common.repository.ServiceRequestRepository; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; import org.ksmart.marriage.marriageapplication.web.model.Demand.DemandRequest; import org.ksmart.marriage.marriageapplication.web.model.Demand.DemandResponse; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; import org.ksmart.marriage.utils.IDGenerator; @@ -25,6 +27,8 @@ import java.util.List; import java.util.ListIterator; import java.util.UUID; + +import javax.swing.text.Document; @Component public class MarriageDetailsEnrichment implements BaseEnrichment { @@ -40,6 +44,9 @@ public class MarriageDetailsEnrichment implements BaseEnrichment { @Autowired ServiceRequestRepository serviceRequestRepository; + @Autowired + MarriageApplicationRepository repository; + @Autowired @Qualifier("objectMapperBnd") private ObjectMapper mapper; @@ -67,39 +74,97 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getWitnessDetails().setSerialNo2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } + setApplicationNumbers(request); + setBridePermanentAddress(request); + setBridePresentAddress(request); + setGroomPermanentAddress(request); + setGroomPresentAddress(request); + // GroomDetails groomDetails =marriage.getGroomDetails(); + // GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); + // groomDetails.setAadharno(groomDetailsEnc.getAadharno()); + // DeathFamilyInfo deathFamilyDtls =deathdtls.getDeathFamilyInfo() ; + // DeathFamilyInfo deathFamilyEnc = encryptionDecryptionUtil.encryptObject(deathFamilyDtls, "BndDetail", DeathFamilyInfo.class); + // deathFamilyDtls.setFatherAadharNo(deathFamilyEnc.getFatherAadharNo()); + // deathFamilyDtls.setMotherAadharNo(deathFamilyEnc.getMotherAadharNo()); + // deathFamilyDtls.setSpouseAadhaar(deathFamilyEnc.getSpouseAadhaar()); +//Jasmine 06.04.2023 List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ marriagedocument.forEach(document -> { + String documentType = document.getDocumentType(); + String documentOwner = document.getDocumentOwner(); + String applicationNumber = marriage.getApplicationNumber(); + // List searchResult = repository.getDocumentDetails(documentType,documentOwner,applicationNumber); + // document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); + // if(searchResult!=null){ + // searchResult.forEach(existingDocument -> { + // if(document.getFileStoreId().equals(existingDocument.getFileStoreId())){ + // document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); + // } + // else{ + // document.setUpdatedFlag( MarriageConstants.VALUE_TRUE); + // document.setActiveFalse(false); + // } + // }); + // } document.setId(UUID.randomUUID().toString()); - document.setActive(true); document.setMarriageTenantid(marriage.getTenantid()); document.setMarriageId(marriage.getId()); + document.setApplicationNumber(applicationNumber); document.setMarriageDocAuditDetails(auditDetails); }); } }); - setApplicationNumbers(request); - setBridePermanentAddress(request); - setBridePresentAddress(request); - setGroomPermanentAddress(request); - setGroomPresentAddress(request); + } public void enrichUpdate(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); - - request.getMarriageDetails() - .forEach(marriage -> marriage.setAuditDetails(auditDetails)); + request.getMarriageDetails(). + forEach(marriage -> { + marriage.setAuditDetails(auditDetails); + String applicationNumber = marriage.getApplicationNumber(); + //Jasmine 07.04.2023 + List marriagedocument = marriage.getMarriageDocuments(); + if (marriagedocument!=null){ + marriagedocument.forEach(document -> { + String documentType = document.getDocumentType(); + String documentOwner = document.getDocumentOwner(); + document.setActiveFalse(true); + List searchResult = repository.getDocumentDetails(documentType,documentOwner,applicationNumber); + document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); + if(searchResult!=null){ + searchResult.forEach(existingDocument -> { + if(document.getFileStoreId().equals(existingDocument.getFileStoreId())){ + document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); + } + else{ + document.setUpdatedFlag( MarriageConstants.VALUE_TRUE); + document.setActiveFalse(false); + } + }); + } + document.setId(UUID.randomUUID().toString()); + document.setMarriageTenantid(marriage.getTenantid()); + document.setMarriageId(marriage.getId()); + document.setApplicationNumber(applicationNumber); + document.setMarriageDocAuditDetails(auditDetails); + }); + + } + // setRegistrationNumber(request); setBridePermanentAddress(request); setBridePresentAddress(request); setGroomPermanentAddress(request); setGroomPresentAddress(request); - } + }); + +} private void setGroomPresentAddress(MarriageDetailsRequest request) { request.getMarriageDetails() diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 7542ddb491e..ee3e24e6cb2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -11,10 +11,12 @@ //import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; +import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageDocumentRowMapper; import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; @@ -40,6 +42,8 @@ public class MarriageApplicationRepository { private final WorkflowIntegrator workflowIntegrator; private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; + private final MarriageDocumentRowMapper documentRowMapper; + @Autowired public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, @@ -47,7 +51,7 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat MarriageApplicationRowMapper marriageApplicationRowMapper, MarriageRegistryRowMapper marriageRegistryRowMapper, WorkflowIntegrator workflowIntegrator, MarriageMdmsUtil util, - MarriageMDMSValidator mdmsValidator) { + MarriageMDMSValidator mdmsValidator,MarriageDocumentRowMapper documentRowMapper) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageDetailsEnrichment = marriageDetailsEnrichment; @@ -58,6 +62,7 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat this.workflowIntegrator = workflowIntegrator; this.util = util; this.mdmsValidator = mdmsValidator; + this.documentRowMapper = documentRowMapper; } // public List saveMarriageDetails(MarriageDetailsRequest request) { @@ -101,6 +106,12 @@ public List searchMarriageDetails(MarriageApplicatio return result; } + public List getDocumentDetails(String documentType, String documentOwner ,String applicationNumber) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageDocumentSearchQuery(documentType,documentOwner,applicationNumber, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), documentRowMapper); + return result; + } public List getMarriageApplication(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java index 8e1fd17080f..a20fe16b16b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java @@ -62,6 +62,36 @@ void addFilter(String column, String value, StringBuilder query, List pa paramValues.add(value); } } + + + void addFilterString(String column, String value, StringBuilder query, List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append(" ILIKE ? "); + paramValues.add(value); + } + } + + // private String createQuery(List ids) { + // StringBuilder builder = new StringBuilder(); + // int length = ids.size(); + // for (int i = 0; i < length; i++) { + // builder.append(" LOWER(?)"); + // if (i != length - 1) + // builder.append(","); + // } + // return builder.toString(); + // } + + // void addFilterStringLower(String column, String value, StringBuilder query, List paramValues) { + // if (StringUtils.isNotBlank(value)) { + // addWhereClause(paramValues, query); + // query.append(column) + // .append(" = ? "); + // paramValues.add(value); + // } + // } // void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, // List paramValues) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 2a73e473833..e19127ea27a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -119,13 +119,19 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); - addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); - addFilter("BD.middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); - addFilter("BD.lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); + if (criteria.getBrideFirstnameEn() != null){ + addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + } + // addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + // addFilter("BD.middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); + //addFilter("BD.lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); - addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); - addFilter("GD.middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); - addFilter("GD.lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); + if (criteria.getGroomFirstnameEn() != null){ + addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + } + //addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + // addFilter("GD.middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); + // addFilter("GD.lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); addDateRangeFilter("MD.dateofmarriage", criteria.getFromDate(), @@ -150,6 +156,22 @@ else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenant return query.toString(); } + private static final String QUERYDOCUMENT = new StringBuilder() + .append("Select id ,tenantid ,document_name ,document_type ,filestoreid ,marriageid,bride_groom ,") + .append("active,applicationnumber , createdby,createdtime,lastmodifiedby, lastmodifiedtime from eg_marriage_document") + .toString(); + + public String getMarriageDocumentSearchQuery(String documentType,String documentOwner,String applicationNumber,@NotNull List preparedStmtValues, Boolean isCount) { + + StringBuilder query = new StringBuilder(QUERYDOCUMENT); + StringBuilder orderBy = new StringBuilder(); + addFilter("document_type", documentType, query, preparedStmtValues); + addFilter("bride_groom", documentOwner, query, preparedStmtValues); + addFilter("applicationnumber", applicationNumber, query, preparedStmtValues); + + return query.toString(); + } + public String getNextIDQuery() { StringBuilder query = new StringBuilder("select fn_next_id(?,?,?)"); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java index b16e047e9bf..2cc853192f0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java @@ -16,4 +16,13 @@ default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { .build(); } + default AuditDetails getDocumentAuditDetails(ResultSet rs) throws SQLException { + return AuditDetails.builder() + .createdBy(rs.getString("createdby")) + .createdTime(Long.valueOf(rs.getLong("createdtime"))) + .lastModifiedBy(rs.getString("lastmodifiedby")) + .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) + .build(); + } + } \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 95eb5f0adb8..d2a6417f76b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -48,7 +48,6 @@ public List extractData(ResultSet rs) throws SQLExce .brideAddressDetails(getBrideAddressDetails(rs)) .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) .auditDetails(getAuditDetails(rs)) - .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java new file mode 100644 index 00000000000..17c7f2044af --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java @@ -0,0 +1,36 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; +import java.sql.ResultSet; +import java.sql.SQLException; +import org.springframework.stereotype.Component; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ResultSetExtractor; +import org.springframework.stereotype.Component; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +@Component +public class MarriageDocumentRowMapper implements ResultSetExtractor>, BaseRowMapper{ + + @Override + public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null + List result = new ArrayList<>(); + while (rs.next()) { + result.add(MarriageDocument.builder() + .id(rs.getString("id")) + .documentName(rs.getString("document_name")) + .documentOwner(rs.getString("bride_groom")) + .fileStoreId(rs.getString("filestoreid")) + .active(rs.getBoolean("active")) + .applicationNumber(rs.getString("applicationnumber")) + .marriageDocAuditDetails(getDocumentAuditDetails(rs)) + .build()); + } + + + return result; + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 982355e2d2a..fc6a803c518 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -49,14 +49,15 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication this.validatorService = validatorService; } - public List saveMarriageDetails(MarriageDetailsRequest request) { validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - workflowIntegrator.callWorkFlow(request); + if (request.getMarriageDetails().get(0).isWorkflow()){ + workflowIntegrator.callWorkFlow(request); + } // request.getMarriageDetails().forEach(marriage->{ // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ // List demands = new ArrayList<>(); @@ -72,6 +73,7 @@ public List saveMarriageDetails(MarriageDetailsReque } public List updateMarriageDetails(MarriageDetailsRequest request) { + validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); mdmsValidator.validateMarriageMDMSData(request,mdmsData); @@ -83,7 +85,10 @@ public List updateMarriageDetails(MarriageDetailsReq // System.out.println("UpdatesearchResult"+searchResult); validatorService.validateUpdate(request, searchResult); marriageDetailsEnrichment.enrichUpdate(request); - workflowIntegrator.callWorkFlow(request); + if (request.getMarriageDetails().get(0).isWorkflow()){ + workflowIntegrator.callWorkFlow(request); + } + // List marriageApplicationDetails =repository.updateMarriageDetails(request); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); // request.getMarriageDetails().forEach(marriage->{ diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index e3fc325ae19..cf9640211f2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -379,16 +379,15 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms if (!masterData.get(MarriageConstants.VILLAGE) .contains( request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage())) - errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "Tbride village inside kerala " + + errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "bride village inside kerala " + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage() + " is invalid"); } - + System.out.println("LBName"+request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName()); if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName() != null) { if (!masterData.get(MarriageConstants.TENANTS) - .contains( - request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName())) - errorMap.put("BRIDE PERMANENT ADDRESS: LB NAME INVALID", "bride lbname inside kerala" + + .contains(request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName())) + errorMap.put("BRIDE PERMANENT ADDRESS: LB NAME INVALID", "bride lbname inside kerala " + request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName() + " is invalid"); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index 9e1a2c6f701..251dc6a7379 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -68,17 +68,25 @@ public ResponseEntity saveMarriageDetails(@RequestB public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { List marriageDetails = MarriageService.updateMarriageDetails(request); + String status=marriageDetails.get(0).getStatus(); + String applicationType=marriageDetails.get(0).getApplicationtype(); + if ((status.equals( MarriageConstants.WORKFLOW_STATUS_APPROVED) && applicationType.equals(MarriageConstants.APPLICATION_NEW))) { - System.out.println("RegistryInsertBegin"+marriageDetails.get(0).getStatus() ); + MarriageRegistryRequest marriageRegistryRequest = marriageRegistryRequestService.createRegistryRequest(request); List marriageRegistryDetails = marriageRegistryService.createRegistry(marriageRegistryRequest); } - - return new ResponseEntity<>(marriageDetails, HttpStatus.OK); + MarriageApplicationResponse response = MarriageApplicationResponse + .builder() + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),Boolean.TRUE)) + .marriageApplicationDetails(marriageDetails) + .build(); + return ResponseEntity.ok(response); + // return new ResponseEntity<>(marriageDetails, HttpStatus.OK); } @PostMapping(value = { "/_searchmarriage"}) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index a6a333c254c..02fde949ef3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -177,7 +177,11 @@ public class MarriageApplicationDetails { @JsonProperty("workflowCode") private String workflowcode; + @JsonProperty("isWorkflow") + private boolean isWorkflow; + private String assignuser; + // @Size(max = 200) // @JsonProperty("brideurl") // private String brideurl; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java index c83848e6fd8..684a0d33f1f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java @@ -28,27 +28,33 @@ public class MarriageDocument { private String marriageTenantid ; @JsonProperty("documentType") - private String documentType = null; + private String documentType ; @JsonProperty("documentName") - private String documentName = null; + private String documentName ; @JsonProperty("fileStoreId") - private String fileStoreId = null; + private String fileStoreId ; @JsonProperty("marriageId") - private String marriageId = null; + private String marriageId ; //bride or groom @JsonProperty("documentOwner") - private String documentOwner = null; + private String documentOwner ; @JsonProperty("documentlink") private String documentlink; @JsonProperty("applicationNumber") - private String applicationNumber = null; + private String applicationNumber ; - @JsonProperty("AuditDetails") - private AuditDetails marriageDocAuditDetails = null; + @JsonProperty("updatedFlag") + private Integer updatedFlag ; + + @JsonProperty("activeFalse") + private boolean activeFalse ; + + @JsonProperty("auditDetails") + private AuditDetails marriageDocAuditDetails ; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java index 097d3d56b74..b77f6012c5c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java @@ -64,6 +64,14 @@ void addFilter(String column, String value, StringBuilder query, List pa paramValues.add(value); } } + void addFilterString(String column, String value, StringBuilder query, List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append(" ILIKE ? "); + paramValues.add(value); + } + } // void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, // List paramValues) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 338e490272d..616f315fcbe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -120,11 +120,17 @@ public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCrit addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); - addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + if (criteria.getBrideFirstnameEn() != null){ + addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + } + // addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); //addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); // addFilter("BD_lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); - addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + if (criteria.getGroomFirstnameEn() != null){ + addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + } + // addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); //addFilter("GD_middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); //addFilter("GD_lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index cc14443093c..54a39629588 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -38,9 +38,7 @@ public MarriageRegistryService(MarriageRegistryRepository repository,MarriageReg } public List createRegistry(MarriageRegistryRequest request) { - System.out.println("HiRegistry"); -System.out.println("registryApplicationnumber"+request.getMarriageDetails().get(0).getApplicationNumber()); marriageRegistryEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageRegistryTopic(), request); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230406224500__document_table_updation_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230406224500__document_table_updation_dll.sql new file mode 100644 index 00000000000..7fc8a93fc64 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230406224500__document_table_updation_dll.sql @@ -0,0 +1,12 @@ + ALTER TABLE public.eg_marriage_document + ADD COLUMN IF NOT EXISTS updated_flag Integer; + + ALTER TABLE public.eg_marriage_document_audit + ADD COLUMN IF NOT EXISTS updated_flag Integer; + + ALTER TABLE public.eg_marriage_document + ADD COLUMN IF NOT EXISTS registrationno character varying(64); + + ALTER TABLE public.eg_marriage_document_audit + ADD COLUMN IF NOT EXISTS registrationno character varying(64); + From 53faed6f69dd838d1e6cbd2a9fc5ace6e053bc3e Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Fri, 7 Apr 2023 15:39:37 +0530 Subject: [PATCH 113/420] Field validation --- .../MarriageApplicationValidator.java | 231 ++++++++++-------- 1 file changed, 132 insertions(+), 99 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index f2e2111938e..fb0b683d09d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -56,10 +56,12 @@ public void validateCommonFields(MarriageDetailsRequest request) { .getBrideAddressDetails(); WitnessDetails witnessDtls = marriagedtls.getWitnessDetails(); + System.out.println("marriagedate" + marriagedtls.getDateofmarriage()); + if (marriagedtls.getDateofmarriage() <= 0) { throw new CustomException(" DATE OF MARRIAGE INVALID ", "The Date of marriage " + - groomInfo.getResidentship() + marriagedtls.getDateofmarriage() + " is invalid"); } @@ -84,6 +86,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriagedtls.getLbtype() + " is invalid"); } + System.out.println("marriageward" + marriagedtls.getWardCode()); if (StringUtils.isEmpty(marriagedtls.getWardCode())) { throw new CustomException(" WARD INVALID ", "The Ward " + marriagedtls.getWardCode() + " is invalid"); @@ -133,61 +136,68 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } + if (marriagedtls.getPlacetype() .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) - || marriagedtls.getPlacetype() - .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) { + || marriagedtls.getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) + { if (StringUtils.isEmpty( - marriagedtls.getPlacenameEn())) { + + marriagedtls.getPlaceid())) { + System.out.println("marriageward" + marriagedtls + .getPlaceid()); throw new CustomException( - " PLACE NAME ENGLISH IS INVALID ", - "The Place Name English " + - marriagedtls.getPlacenameEn() + " PLACE ID IS INVALID ", + "The Place Id English " + + marriagedtls.getPlaceid() + " is invalid"); - } else { - if (marriagedtls.getPlacenameEn().equals( - MarriageConstants.PLACE_OTHER)) { - if (StringUtils.isEmpty(marriagedtls - .getPlacenameEn())) { - throw new CustomException( - " PLACE NAME ENGLISH IS INVALID ", - "The Place Name English " - + - marriagedtls.getPlacenameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls - .getPlacenameMl())) { - throw new CustomException( - " PLACE NAME MALAYALAM IS INVALID ", - "The Place Name Malayalam " - + - marriagedtls.getPlacenameMl() - + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls - .getLocalityEn())) { - throw new CustomException( - " LOCALITY NAME ENGLISH IS INVALID ", - "The Locality Name English " - + - marriagedtls.getLocalityEn() - + " is invalid"); - } - if (StringUtils.isEmpty(marriagedtls - .getLocalityMl())) { - throw new CustomException( - " LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Name Malayalam " - + - marriagedtls.getLocalityMl() - + " is invalid"); - } - } - - } + } + // else { + // if (marriagedtls.getPlacenameEn().equals( + // MarriageConstants.PLACE_OTHER)) { + // if (StringUtils.isEmpty(marriagedtls + // .getPlacenameEn())) { + // throw new CustomException( + // " PLACE NAME ENGLISH IS INVALID ", + // "The Place Name English " + // + + // marriagedtls.getPlacenameEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(marriagedtls + // .getPlacenameMl())) { + // throw new CustomException( + // " PLACE NAME MALAYALAM IS INVALID ", + // "The Place Name Malayalam " + // + + // marriagedtls.getPlacenameMl() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(marriagedtls + // .getLocalityEn())) { + // throw new CustomException( + // " LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality Name English " + // + + // marriagedtls.getLocalityEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(marriagedtls + // .getLocalityMl())) { + // throw new CustomException( + // " LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Name Malayalam " + // + + // marriagedtls.getLocalityMl() + // + " is invalid"); + // } + // } + + // } } + if (marriagedtls.getPlacetype().equals( MarriageConstants.PLACE_TYPE_PRIVATE_PLACE) || (marriagedtls.getPlacetype().equals( @@ -237,6 +247,8 @@ public void validateCommonFields(MarriageDetailsRequest request) { if (groomInfo.getResidentship().equals( MarriageConstants.RESIDENTSHIP_INDIAN)) { if (StringUtils.isEmpty(groomInfo.getAadharno())) { + System.out.println(groomInfo.getAadharno()); + throw new CustomException( "GROOM AADHAR INVALID ", "The groom Aadhar number " + @@ -257,6 +269,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { MarriageConstants.RESIDENTSHIP_FOREIGN)) { if (StringUtils.isEmpty(groomInfo.getPassportno()) && StringUtils.isEmpty(groomInfo + .getSocialsecurityno()) + || StringUtils.isEmpty(groomInfo + .getPassportno()) + || + StringUtils.isEmpty(groomInfo .getSocialsecurityno())) { throw new CustomException( "GROOM PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID ", @@ -270,7 +287,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } - + System.out.println("groomname" + groomInfo.getFirstnameEn()); if (StringUtils.isEmpty(groomInfo.getFirstnameEn())) { throw new CustomException(" GROOM NAME ENGLISH INVALID ", "The groom name in english " + @@ -300,20 +317,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { "The groom date of birth can't be null "); } if (groomInfo.getParentGuardian().equals(MarriageConstants.PARENT)) { - if (StringUtils.isEmpty(groomInfo.getFatherAadharno())) { - throw new CustomException( - "GROOM FATHER AADHAR INVALID ", - "The groom Father Aadhar number " + - groomInfo.getFatherAadharno() - + " is invalid"); - } - if (StringUtils.isEmpty(groomInfo.getMotherAadharno())) { - throw new CustomException( - " GROOM MOTHER AADHAR INVALID ", - "The groom Father Aadhar number " + - groomInfo.getMotherAadharno() - + " is invalid"); - } + if (StringUtils.isEmpty(groomInfo.getFathernameEn())) { throw new CustomException(" GROOM FATHER NAME ENGLISH ", "The groom Father Name in english " + @@ -321,6 +325,8 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(groomInfo.getFathernameMl())) { + System.out.println("groomfather" + + groomInfo.getFathernameMl()); throw new CustomException( " GROOM FATHER NAME MALAYALAM ", "The groom Father Name in malayalam " @@ -328,6 +334,21 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomInfo.getFathernameMl() + " is invalid"); } + if (StringUtils.isEmpty(groomInfo.getFatherAadharno())) { + throw new CustomException( + "GROOM FATHER AADHAR INVALID ", + "The groom Father Aadhar number " + + groomInfo.getFatherAadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getMotherAadharno())) { + throw new CustomException( + " GROOM MOTHER AADHAR INVALID ", + "The groom Father Aadhar number " + + groomInfo.getMotherAadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(groomInfo.getMothernameEn())) { throw new CustomException(" GROOM MOTHER NAME ENGLISH ", "The groom Mother Name in english " + @@ -465,8 +486,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } else if (brideInfo.getResidentship().equals( MarriageConstants.RESIDENTSHIP_FOREIGN)) { + if (StringUtils.isEmpty(brideInfo.getPassportno()) && StringUtils.isEmpty(brideInfo + .getSocialsecurityno()) + || StringUtils.isEmpty(brideInfo + .getPassportno()) + || + StringUtils.isEmpty(brideInfo .getSocialsecurityno())) { throw new CustomException( "BRIDE PASSPORT NUMBER AND SOCIAL SECURITY NUMBER INVALID ", @@ -509,21 +536,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { throw new CustomException("BRIDE DATE OF BIRTH INVALID ", "The bride date of birth can't be null "); } - if (groomInfo.getParentGuardian().equals(MarriageConstants.PARENT)) { - if (StringUtils.isEmpty(brideInfo.getFatherAadharno())) { - throw new CustomException( - "BRIDE: FATHER AADHAR INVALID ", - "The Father's Aadhar number " + - brideInfo.getFatherAadharno() - + " is invalid"); - } - if (StringUtils.isEmpty(brideInfo.getMotherAadharno())) { - throw new CustomException( - "BRIDE:MOTHER AADHAR INVALID ", - "The mother's Aadhar number " + - brideInfo.getMotherAadharno() - + " is invalid"); - } + if (brideInfo.getParentGuardian().equals(MarriageConstants.PARENT)) { if (StringUtils.isEmpty(brideInfo.getFathernameEn())) { throw new CustomException(" BRIDE FATHER NAME ENGLISH ", "The bride Father Name in english " + @@ -538,6 +551,21 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideInfo.getFathernameMl() + " is invalid"); } + if (StringUtils.isEmpty(brideInfo.getFatherAadharno())) { + throw new CustomException( + "BRIDE: FATHER AADHAR INVALID ", + "The Father's Aadhar number " + + brideInfo.getFatherAadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getMotherAadharno())) { + throw new CustomException( + "BRIDE:MOTHER AADHAR INVALID ", + "The mother's Aadhar number " + + brideInfo.getMotherAadharno() + + " is invalid"); + } + if (StringUtils.isEmpty(brideInfo.getMothernameEn())) { throw new CustomException(" BRIDE MOTHER NAME ENGLISH ", "The bride Mother Name in english " + @@ -713,6 +741,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(groomaddressInfo .getPermntInKeralaAdrPincode())) { + throw new CustomException( "GROOM PERMANENT ADDRESS INSIDE KERALA: PINCODE INVALID ", "The Pincode " + @@ -1004,14 +1033,19 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPresentInsideKeralaPostOffice() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentInsideKeralaPincode())) { - throw new CustomException( - "GROOM PRESENT ADDRESS INSIDE KERALA: PINCODE INVALID ", - "The Pincode " + - groomaddressInfo.getPresentInsideKeralaPincode() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentInsideKeralaPincode())) { + // System.out.println("pincode is + // "+groomaddressInfo + // .getPresentInsideKeralaPincode()); + // throw new CustomException( + // "GROOM PRESENT ADDRESS INSIDE KERALA: PINCODE + // INVALID ", + // "The Pincode " + + // groomaddressInfo.getPresentInsideKeralaPincode() + // + " is invalid"); + // } + if (StringUtils.isEmpty(groomaddressInfo .getPresentInsideKeralaLocalityNameEn())) { throw new CustomException( @@ -1579,14 +1613,15 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPresentInsideKeralaPostOffice() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentInsideKeralaPincode())) { - throw new CustomException( - "BRIDE PRESENT ADDRESS INSIDE KERALA: PINCODE INVALID ", - "The Pincode " + - brideaddressInfo.getPresentInsideKeralaPincode() - + " is invalid"); - } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPresentInsideKeralaPincode())) { + // throw new CustomException( + // "BRIDE PRESENT ADDRESS INSIDE KERALA: PINCODE + // INVALID ", + // "The Pincode " + + // brideaddressInfo.getPresentInsideKeralaPincode() + // + " is invalid"); + // } if (StringUtils.isEmpty(brideaddressInfo .getPresentInsideKeralaLocalityNameEn())) { throw new CustomException( @@ -1843,8 +1878,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { witnessDtls.getWitness1Mobile() + " is invalid"); } - if ((witnessDtls.getWitness1Esigned() - .equals(MarriageConstants.VALUE_FALSE))) { + if (!witnessDtls.getWitness1Esigned()) { throw new CustomException(" WITNESS1 E-SIGN INVALID ", "The Witness1 E-sign " + @@ -1904,8 +1938,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { witnessDtls.getWitness2Mobile() + " is invalid"); } - if ((witnessDtls.getWitness2Esigned() - .equals(MarriageConstants.VALUE_FALSE))) { + if (!witnessDtls.getWitness2Esigned()) { throw new CustomException(" WITNESS2 E-SIGN INVALID ", "The Witness2 E-sign " + From 9b88925dfe6bacf0c3242fd3c5beb910c1f93712 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 7 Apr 2023 17:21:47 +0530 Subject: [PATCH 114/420] encryption --- .../contract/EncryptionDecryptionUtil.java | 135 ++++++++++++++++++ .../enrichment/MarriageDetailsEnrichment.java | 58 ++++---- .../MarriageApplicationRepository.java | 61 +++++--- .../MarriageApplicationQueryBuilder.java | 14 +- .../service/MarriageApplicationService.java | 5 +- .../MarriageApplicationController.java | 2 +- 6 files changed, 217 insertions(+), 58 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java new file mode 100644 index 00000000000..81ae6d02388 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java @@ -0,0 +1,135 @@ +package org.ksmart.marriage.common.contract; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.request.Role; +import org.egov.common.contract.request.User; +import org.egov.encryption.EncryptionService; +import org.egov.encryption.audit.AuditService; +import org.egov.tracer.model.CustomException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; +import org.springframework.web.client.HttpClientErrorException; +import org.springframework.web.client.HttpServerErrorException; +import org.springframework.web.client.ResourceAccessException; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.fasterxml.jackson.databind.node.TextNode; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j +@Component +public class EncryptionDecryptionUtil { + private EncryptionService encryptionService; + @Autowired + private AuditService auditService; + + @Autowired + @Qualifier("objectMapperBnd") + private ObjectMapper objectMapper; + + @Value(("${egov.state.level.tenant.id}")) + private String stateLevelTenantId; + + @Value(("${decryption.abac.enabled}")) + private boolean abacEnabled; + + public EncryptionDecryptionUtil(EncryptionService encryptionService) { + this.encryptionService = encryptionService; + } + + public T encryptObject(Object objectToEncrypt, String key, Class classType) { + try { + if (objectToEncrypt == null) { + return null; + } + T encryptedObject = encryptionService.encryptJson(objectToEncrypt, key, stateLevelTenantId, classType); + if (encryptedObject == null) { + throw new CustomException("ENCRYPTION_NULL_ERROR", "Null object found on performing encryption"); + } + return encryptedObject; + } catch (IOException | HttpClientErrorException | HttpServerErrorException | ResourceAccessException e) { + log.error("Error occurred while encrypting", e); + throw new CustomException("ENCRYPTION_ERROR", "Error occurred in encryption process"); + } catch (Exception e) { + log.error("Unknown Error occurred while encrypting", e); + throw new CustomException("UNKNOWN_ERROR", "Unknown error occurred in encryption process"); + } + } + + public P decryptObject(Object objectToDecrypt, String key, Class classType, RequestInfo requestInfo) { + + try { + boolean objectToDecryptNotList = false; + if (objectToDecrypt == null) { + return null; + } else if (requestInfo == null || requestInfo.getUserInfo() == null) { + User userInfo = User.builder().uuid("no uuid").type("EMPLOYEE").build(); + requestInfo = RequestInfo.builder().userInfo(userInfo).build(); + } + if (!(objectToDecrypt instanceof List)) { + objectToDecryptNotList = true; + objectToDecrypt = Collections.singletonList(objectToDecrypt); + } + final User encrichedUserInfo = getEncrichedandCopiedUserInfo(requestInfo.getUserInfo()); + P decryptedObject = (P) encryptionService.decryptJson(objectToDecrypt, key, encrichedUserInfo, classType); + if (decryptedObject == null) { + throw new CustomException("DECRYPTION_NULL_ERROR", "Null object found on performing decryption"); + } + auditTheDecryptRequest(key, encrichedUserInfo); + if (objectToDecryptNotList) { + decryptedObject = (P) ((List) decryptedObject).get(0); + } + return decryptedObject; + } catch (IOException | HttpClientErrorException | HttpServerErrorException | ResourceAccessException e) { + log.error("Error occurred while decrypting", e); + throw new CustomException("DECRYPTION_SERVICE_ERROR", "Error occurred in decryption process"); + } catch (Exception e) { + log.error("Unknown Error occurred while decrypting", e); + throw new CustomException("UNKNOWN_ERROR", "Unknown error occurred in decryption process"); + } + } + + + public void auditTheDecryptRequest(String key, User userInfo) { + String purpose= "BndDetail"; + + ObjectNode abacParams = objectMapper.createObjectNode(); + abacParams.set("key", TextNode.valueOf(key)); + + List decryptedUserUuid = Arrays.asList(userInfo.getUuid()); + + ObjectNode auditData = objectMapper.createObjectNode(); + auditData.set("entityType", TextNode.valueOf(User.class.getName())); + auditData.set("decryptedEntityIds", objectMapper.valueToTree(decryptedUserUuid)); + auditService.audit(userInfo.getUuid(), System.currentTimeMillis(), purpose, abacParams, auditData); + } + + private User getEncrichedandCopiedUserInfo(User userInfo) { + List newRoleList = new ArrayList<>(); + if (userInfo.getRoles() != null) { + for (Role role : userInfo.getRoles()) { + Role newRole = Role.builder().code(role.getCode()).name(role.getName()).id(role.getId()).build(); + newRoleList.add(newRole); + } + } + + if (newRoleList.stream().filter(role -> (role.getCode() != null) && (userInfo.getType() != null) && role.getCode().equalsIgnoreCase(userInfo.getType())).count() == 0) { + Role roleFromtype = Role.builder().code(userInfo.getType()).name(userInfo.getType()).build(); + newRoleList.add(roleFromtype); + } + return User.builder().id(userInfo.getId()).userName(userInfo.getUserName()).name(userInfo.getName()) + .type(userInfo.getType()).mobileNumber(userInfo.getMobileNumber()).emailId(userInfo.getEmailId()) + .roles(newRoleList).tenantId(userInfo.getTenantId()).uuid(userInfo.getUuid()).build(); + } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index dc96b012872..c09432a8e5c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -5,6 +5,7 @@ import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.contract.EncryptionDecryptionUtil; import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; import org.ksmart.marriage.common.repository.ServiceRequestRepository; @@ -14,9 +15,11 @@ import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; import org.ksmart.marriage.marriageapplication.web.model.Demand.DemandRequest; import org.ksmart.marriage.marriageapplication.web.model.Demand.DemandResponse; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; @@ -47,6 +50,9 @@ public class MarriageDetailsEnrichment implements BaseEnrichment { @Autowired MarriageApplicationRepository repository; + @Autowired + EncryptionDecryptionUtil encryptionDecryptionUtil; + @Autowired @Qualifier("objectMapperBnd") private ObjectMapper mapper; @@ -79,14 +85,27 @@ public void enrichCreate(MarriageDetailsRequest request) { setBridePresentAddress(request); setGroomPermanentAddress(request); setGroomPresentAddress(request); - // GroomDetails groomDetails =marriage.getGroomDetails(); - // GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); - // groomDetails.setAadharno(groomDetailsEnc.getAadharno()); - // DeathFamilyInfo deathFamilyDtls =deathdtls.getDeathFamilyInfo() ; - // DeathFamilyInfo deathFamilyEnc = encryptionDecryptionUtil.encryptObject(deathFamilyDtls, "BndDetail", DeathFamilyInfo.class); - // deathFamilyDtls.setFatherAadharNo(deathFamilyEnc.getFatherAadharNo()); - // deathFamilyDtls.setMotherAadharNo(deathFamilyEnc.getMotherAadharNo()); - // deathFamilyDtls.setSpouseAadhaar(deathFamilyEnc.getSpouseAadhaar()); + +//Jasmine 07.04.2023 + GroomDetails groomDetails =marriage.getGroomDetails(); + GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); + groomDetails.setAadharno(groomDetailsEnc.getAadharno()); + groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); + groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); + + BrideDetails brideDetails =marriage.getBrideDetails(); + BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); + brideDetails.setAadharno(brideDetailsEnc.getAadharno()); + brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); + brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + + WitnessDetails witnessDetails =marriage.getWitnessDetails(); + WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); + witnessDetails.setWitness1AadharNo(witnessDetailsEnc.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsEnc.getWitness2AadharNo()); + //Jasmine 06.04.2023 List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ @@ -94,19 +113,6 @@ public void enrichCreate(MarriageDetailsRequest request) { String documentType = document.getDocumentType(); String documentOwner = document.getDocumentOwner(); String applicationNumber = marriage.getApplicationNumber(); - // List searchResult = repository.getDocumentDetails(documentType,documentOwner,applicationNumber); - // document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); - // if(searchResult!=null){ - // searchResult.forEach(existingDocument -> { - // if(document.getFileStoreId().equals(existingDocument.getFileStoreId())){ - // document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); - // } - // else{ - // document.setUpdatedFlag( MarriageConstants.VALUE_TRUE); - // document.setActiveFalse(false); - // } - // }); - // } document.setId(UUID.randomUUID().toString()); document.setMarriageTenantid(marriage.getTenantid()); document.setMarriageId(marriage.getId()); @@ -155,8 +161,6 @@ public void enrichUpdate(MarriageDetailsRequest request) { }); } - - setBridePermanentAddress(request); setBridePresentAddress(request); @@ -256,18 +260,10 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { } } - - - } - - }); - - - } private void setGroomPermanentAddress(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index ee3e24e6cb2..c69190960a1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -4,14 +4,18 @@ //import org.ksmart.marriage.common.producer.BndProducer; import org.egov.common.contract.request.RequestInfo; +import org.ksmart.marriage.common.contract.EncryptionDecryptionUtil; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; //import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; @@ -44,7 +48,9 @@ public class MarriageApplicationRepository { private final MarriageMDMSValidator mdmsValidator; private final MarriageDocumentRowMapper documentRowMapper; - + @Autowired + EncryptionDecryptionUtil encryptionDecryptionUtil; + @Autowired public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, @@ -85,24 +91,47 @@ public List saveMarriageDetails(MarriageDetailsReque return request.getMarriageDetails(); } //Jasmine 31.03.2023 - // public List saveMarriageDetails(MarriageDetailsRequest request) { - - // marriageDetailsEnrichment.enrichCreate(request); - // producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - // return request; - // } - // public List updateMarriageDetails(MarriageDetailsRequest request) { - // marriageDetailsEnrichment.enrichUpdate(request); - // //workflowIntegrator.callWorkFlow(request); - // producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); - // return request.getMarriageDetails(); - // } - - public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { + public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + if(result != null) { + result.forEach(marriage -> { + + GroomDetails groomDetails =marriage.getGroomDetails(); + GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); + groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + + BrideDetails brideDetails =marriage.getBrideDetails(); + BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); + brideDetails.setAadharno(brideDetailsDec.getAadharno()); + brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + + WitnessDetails witnessDetails =marriage.getWitnessDetails(); + WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); + witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); + // DeathInformantDtls deathInformant =deathDtl.getDeathInformantDtls() ; + // if (deathInformant!=null){ + // DeathInformantDtls deathInformantEnc = encryptionDecryptionUtil.decryptObject(deathInformant, "BndDetail", DeathInformantDtls.class,requestInfo); + // deathInformant.setInformantAadharNo(deathInformantEnc.getInformantAadharNo()); + // } + // DeathInitiatorDtls deathInitiator =deathDtl.getDeathInitiatorDtls() ; + // if (deathInitiator!= null){ + + // DeathInitiatorDtls deathInitiatorEnc = encryptionDecryptionUtil.decryptObject(deathInitiator, "BndDetail", DeathInitiatorDtls.class,requestInfo); + // deathInitiator.setInitiatorAadhaar(deathInitiatorEnc.getInitiatorAadhaar()); + // } + }); + } + + return result; } @@ -116,9 +145,7 @@ public List getDocumentDetails(String documentType, String doc public List getMarriageApplication(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - // System.out.println("Query:"+query); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); - return result; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index e19127ea27a..7cd9aebf584 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -117,22 +117,22 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD.applicationNumber", criteria.getApplicationNo(), query, preparedStmtValues); addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); - // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); if (criteria.getBrideFirstnameEn() != null){ addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); } - // addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); - // addFilter("BD.middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); - //addFilter("BD.lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); if (criteria.getGroomFirstnameEn() != null){ addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); } - //addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); - // addFilter("GD.middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); + //addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + // addFilter("GD.middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); // addFilter("GD.lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); - // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); + // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); + // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); + // addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + // addFilter("BD.middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); + //addFilter("BD.lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); addDateRangeFilter("MD.dateofmarriage", criteria.getFromDate(), criteria.getToDate(), diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index fc6a803c518..b1224f1e82d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -2,6 +2,7 @@ import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; @@ -105,7 +106,7 @@ public List updateMarriageDetails(MarriageDetailsReq } - public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria) { - return repository.searchMarriageDetails(criteria); + public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { + return repository.searchMarriageDetails(criteria,requestInfo); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index 251dc6a7379..60f6ce1a1ff 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -94,7 +94,7 @@ public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsReque public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { - List marriageDetails = MarriageService.searchMarriageDetails(criteria); + List marriageDetails = MarriageService.searchMarriageDetails(criteria, request.getRequestInfo()); MarriageApplicationResponse response = MarriageApplicationResponse .builder() From 5ed8834def0247981c6f3ac5790ff84fd415378c Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 7 Apr 2023 17:23:03 +0530 Subject: [PATCH 115/420] encryption --- .../src/main/resources/marriage-registry.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 3f01ef662ff..d55d6d38270 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -82,6 +82,19 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - query: UPDATE eg_marriage_details SET registrationno = ? ,registration_date = ? + WHERE applicationnumber = ? AND tenantid = ? + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.registration_date + + - jsonPath: $.MarriageDetails.*.applicationNumber + + - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: INSERT INTO public.eg_register_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, From 35b9e61fcf0d8393a0d122e787a887b6b221f521 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 8 Apr 2023 11:02:06 +0530 Subject: [PATCH 116/420] migration --- .../src/main/resources/marriage.yml | 9 ++++-- core-services/egov-workflow-v2/pom.xml | 1 - .../src/main/resources/application.properties | 18 +++++------ .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../MarriageRegistryRequestService.java | 2 +- .../web/model/MarriageApplicationDetails.java | 4 +-- ...04131927__newFieldAdd_services_new_dll.sql | 31 +++++++++++++++++++ 7 files changed, 50 insertions(+), 17 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 5b8dd195e93..653bdc3c962 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationNo, registration_date, action, status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); + lastmodifiedtime, lastmodifiedby,module_code) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -82,6 +82,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.moduleCode - query: INSERT INTO public.eg_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, @@ -694,7 +695,7 @@ serviceMaps: SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, - registrationNo=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? + registrationNo=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? , module_code=? WHERE id=? and applicationnumber=? and tenantid=?; basePath: MarriageDetails.* jsonMaps: @@ -757,6 +758,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.moduleCode + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.applicationNumber diff --git a/core-services/egov-workflow-v2/pom.xml b/core-services/egov-workflow-v2/pom.xml index 112efff4713..2d6dcd9beb4 100644 --- a/core-services/egov-workflow-v2/pom.xml +++ b/core-services/egov-workflow-v2/pom.xml @@ -122,7 +122,6 @@ org.postgresql postgresql - 42.2.2.jre7 diff --git a/core-services/egov-workflow-v2/src/main/resources/application.properties b/core-services/egov-workflow-v2/src/main/resources/application.properties index 8240fa1deb1..07084294fc9 100644 --- a/core-services/egov-workflow-v2/src/main/resources/application.properties +++ b/core-services/egov-workflow-v2/src/main/resources/application.properties @@ -6,20 +6,20 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/devdump +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=postgres +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/devdump +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=postgres +spring.flyway.password=123 #spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true spring.flyway.locations=classpath:/db/migration/main -spring.flyway.enabled=false +spring.flyway.enabled=true # KAFKA SERVER CONFIGURATIONS @@ -52,11 +52,11 @@ persister.update.businessservice.wf.topic=update-wf-businessservice #mdms urls #egov.mdms.host=https://dev.digit.org #egov.mdms.search.endpoint=/egov-mdms-service/v1/_search -egov.mdms.host=https://dev.digit.org/ +egov.mdms.host = https://ksmart-dev.lsgkerala.gov.in/ egov.mdms.search.endpoint=egov-mdms-service/v1/_search #user urls -egov.user.host=https://dev.digit.org/ +egov.user.host=https://ksmart-dev.lsgkerala.gov.in/ egov.user.search.endpoint=user/_search #fuzzy search @@ -73,5 +73,5 @@ management.endpoints.web.base-path=/ cache.expiry.workflow.minutes=15 -egov.statelevel.tenantid=pb -egov.wf.escalation.batch.size=50 \ No newline at end of file +egov.statelevel.tenantid=kl +egov.wf.escalation.batch.size=50 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index c09432a8e5c..9ae96965a4d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -623,7 +623,7 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { List filecodes = getIds(requestInfo, tenantId, config.getMarriageApplNumberIdName(), - request.getMarriageDetails().get(0).getModulecode(), + request.getMarriageDetails().get(0).getModuleCode(), "APPL", marriageDetails.size()); validateFileCodes(filecodes, marriageDetails.size()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index b4ba2c0f725..44b97757a78 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -53,7 +53,7 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr registerMarriageDetail.setAction(Marriagerequest.getMarriageDetails().get(0).getAction()); registerMarriageDetail.setStatus(Marriagerequest.getMarriageDetails().get(0).getStatus()); registerMarriageDetail.setApplicationtype(Marriagerequest.getMarriageDetails().get(0).getApplicationtype()); - registerMarriageDetail.setModulecode(Marriagerequest.getMarriageDetails().get(0).getModulecode()); + registerMarriageDetail.setModulecode(Marriagerequest.getMarriageDetails().get(0).getModuleCode()); registerMarriageDetail.setBrideDetails(brideRegistryDetails(Marriagerequest)); registerMarriageDetail.setGroomDetails(groomRegistryDetails(Marriagerequest)); registerMarriageDetail.setWitnessDetails(witnessRegistryDetails(Marriagerequest)); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index c0f7c7bdf69..a7c750e1fad 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -164,8 +164,8 @@ public class MarriageApplicationDetails { @JsonProperty("applicationType") private String applicationtype; - @JsonProperty("modulecode") - private String modulecode; + @JsonProperty("moduleCode") + private String moduleCode; @NotNull @Size(max = 64) diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql new file mode 100644 index 00000000000..9fd3e3529ef --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql @@ -0,0 +1,31 @@ +ALTER TABLE public.eg_marriage_details + ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_details_audit + ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_bride_groom_details + ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", + ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", + ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_bride_groom_details_audit + ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", + ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", + ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_bride_groom_details + ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", + ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", + ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_bride_groom_details_audit + ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", + ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", + ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; \ No newline at end of file From ea07650823c8c2c063fd97947dab2f6ab5d439d9 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 11:59:30 +0530 Subject: [PATCH 117/420] encryption --- .../resources/egov-workflow-v2-persister.yml | 276 ++++++++++++++++++ core-services/egov-workflow-v2/pom.xml | 11 +- 2 files changed, 285 insertions(+), 2 deletions(-) create mode 100644 core-services/egov-workflow-v2-1/old version/src/main/resources/egov-workflow-v2-persister.yml diff --git a/core-services/egov-workflow-v2-1/old version/src/main/resources/egov-workflow-v2-persister.yml b/core-services/egov-workflow-v2-1/old version/src/main/resources/egov-workflow-v2-persister.yml new file mode 100644 index 00000000000..acba6cd82af --- /dev/null +++ b/core-services/egov-workflow-v2-1/old version/src/main/resources/egov-workflow-v2-persister.yml @@ -0,0 +1,276 @@ +serviceMaps: + serviceName: egov-workflow-v2 + mappings: + - version: 1.0 + description: Persists workflow processInstanceFromRequest details in eg_workflow_v2 table + fromTopic: save-wf-transitions + isTransaction: true + queryMaps: + + - query: INSERT INTO eg_wf_processinstance_v2( id,tenantid,businessService,businessId,moduleName,action,status,comment, assigner, stateSla,businessServiceSla, previousStatus, createdby, lastmodifiedby, createdtime, lastmodifiedtime, rating) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: ProcessInstances.* + jsonMaps: + - jsonPath: $.ProcessInstances.*.id + + - jsonPath: $.ProcessInstances.*.tenantId + + - jsonPath: $.ProcessInstances.*.businessService + + - jsonPath: $.ProcessInstances.*.businessId + + - jsonPath: $.ProcessInstances.*.moduleName + + - jsonPath: $.ProcessInstances.*.action + + - jsonPath: $.ProcessInstances.*.state.uuid + + - jsonPath: $.ProcessInstances.*.comment + + - jsonPath: $.ProcessInstances.*.assigner.uuid + + - jsonPath: $.ProcessInstances.*.stateSla + + - jsonPath: $.ProcessInstances.*.businesssServiceSla + + - jsonPath: $.ProcessInstances.*.previousStatus + + - jsonPath: $.ProcessInstances.*.auditDetails.createdBy + + - jsonPath: $.ProcessInstances.*.auditDetails.lastModifiedBy + + - jsonPath: $.ProcessInstances.*.auditDetails.createdTime + + - jsonPath: $.ProcessInstances.*.auditDetails.lastModifiedTime + + - jsonPath: $.ProcessInstances.*.rating + + + - query: INSERT INTO eg_wf_document_v2( id, tenantid, active, documenttype,documentUid, processinstanceid, filestoreid, createdby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: ProcessInstances.*.documents.* + jsonMaps: + - jsonPath: $.ProcessInstances.documents.*.id + + - jsonPath: $.ProcessInstances.documents.*.tenantId + + - jsonPath: $.ProcessInstances.documents.*.active + + - jsonPath: $.ProcessInstances.documents.*.documentType + + - jsonPath: $.ProcessInstances.documents.*.documentUid + + - jsonPath: $.ProcessInstances[*][?({id} in @.documents[*].id)].id + + - jsonPath: $.ProcessInstances.documents.*.fileStoreId + + - jsonPath: $.ProcessInstances.documents.*.auditDetails.createdBy + + - jsonPath: $.ProcessInstances.documents.*.auditDetails.lastModifiedBy + + - jsonPath: $.ProcessInstances.documents.*.auditDetails.createdTime + + - jsonPath: $.ProcessInstances.documents.*.auditDetails.lastModifiedTime + + + - query: INSERT INTO eg_wf_assignee_v2(processinstanceid, tenantid, assignee, createdby, lastmodifiedby, createdtime, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?); + basePath: ProcessInstances.*.assignes.* + jsonMaps: + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].id + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].tenantId + + - jsonPath: $.ProcessInstances.*.assignes.*.uuid + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].auditDetails.createdBy + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].auditDetails.lastModifiedBy + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].auditDetails.createdTime + + - jsonPath: $.ProcessInstances[*][?({uuid} in @.assignes[*].uuid)].auditDetails.lastModifiedTime + + + + + - version: 1.0 + description: Persists BusinessService in the table + fromTopic: save-wf-businessservice + isTransaction: true + queryMaps: + + - query: INSERT INTO eg_wf_businessservice_v2(businessServiceSla, businessservice, business, tenantid, uuid, geturi, posturi, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: BusinessServices.* + jsonMaps: + - jsonPath: $.BusinessServices.*.businessServiceSla + + - jsonPath: $.BusinessServices.*.businessService + + - jsonPath: $.BusinessServices.*.business + + - jsonPath: $.BusinessServices.*.tenantId + + - jsonPath: $.BusinessServices.*.uuid + + - jsonPath: $.BusinessServices.*.geturi + + - jsonPath: $.BusinessServices.*.posturi + + - jsonPath: $.BusinessServices.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.auditDetails.lastModifiedTime + + + + + - query: INSERT INTO eg_wf_state_v2(seq, uuid, tenantid, businessserviceid, state,applicationStatus,sla,docuploadrequired, isstartstate, isterminatestate,isStateUpdatable, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (nextval('seq_eg_wf_state_v2'),? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: BusinessServices.*.states.* + jsonMaps: + - jsonPath: $.BusinessServices.*.states.*.uuid + + - jsonPath: $.BusinessServices.*.states.*.tenantId + + - jsonPath: $.BusinessServices[*][?({uuid} in @.states[*].uuid)].uuid + + - jsonPath: $.BusinessServices.*.states.*.state + + - jsonPath: $.BusinessServices.*.states.*.applicationStatus + + - jsonPath: $.BusinessServices.*.states.*.sla + + - jsonPath: $.BusinessServices.*.states.*.docUploadRequired + + - jsonPath: $.BusinessServices.*.states.*.isStartState + + - jsonPath: $.BusinessServices.*.states.*.isTerminateState + + - jsonPath: $.BusinessServices.*.states.*.isStateUpdatable + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.lastModifiedTime + + + + - query: INSERT INTO eg_wf_action_v2( uuid,tenantId,active, currentState, action, nextstate, roles, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + basePath: BusinessServices.*.states.*.actions.* + jsonMaps: + - jsonPath: $.BusinessServices.*.states.*.actions.*.uuid + + - jsonPath: $.BusinessServices.*.states.*.actions.*.tenantId + + - jsonPath: $.BusinessServices.*.states.*.actions.*.active + + - jsonPath: $.BusinessServices.*.states[*][?({uuid} in @.actions[*].uuid)].uuid + + - jsonPath: $.BusinessServices.*.states.*.actions.*.action + + - jsonPath: $.BusinessServices.*.states.*.actions.*.nextState + + - jsonPath: $.BusinessServices.*.states.*.actions.*.roles + type: ARRAY + dbType: STRING + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.lastModifiedTime + + + + - version: 1.0 + description: Persists BusinessService in the table + fromTopic: update-wf-businessservice + isTransaction: true + queryMaps: + + - query: UPDATE eg_wf_businessservice_v2 SET businessservicesla=?,businessservice=?, business=?, geturi=?, posturi=?, lastmodifiedby=?, lastmodifiedtime=? WHERE uuid=?; + basePath: BusinessServices.* + jsonMaps: + - jsonPath: $.BusinessServices.*.businessServiceSla + + - jsonPath: $.BusinessServices.*.businessService + + - jsonPath: $.BusinessServices.*.business + + - jsonPath: $.BusinessServices.*.geturi + + - jsonPath: $.BusinessServices.*.posturi + + - jsonPath: $.BusinessServices.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.auditDetails.lastModifiedTime + + - jsonPath: $.BusinessServices.*.uuid + + + + + - query: INSERT INTO eg_wf_state_v2(seq, uuid, tenantid, businessserviceid, state,applicationStatus,sla,docuploadrequired, isstartstate, isterminatestate,isStateUpdatable, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (nextval('seq_eg_wf_state_v2'), ?,?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (uuid) DO UPDATE SET state=EXCLUDED.state,sla=EXCLUDED.sla,docuploadrequired=EXCLUDED.docuploadrequired,isstartstate=EXCLUDED.isstartstate, isterminatestate=EXCLUDED.isterminatestate,isStateUpdatable=EXCLUDED.isStateUpdatable, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime; + basePath: BusinessServices.*.states.* + jsonMaps: + + - jsonPath: $.BusinessServices.*.states.*.uuid + + - jsonPath: $.BusinessServices.*.states.*.tenantId + + - jsonPath: $.BusinessServices[*][?({uuid} in @.states[*].uuid)].uuid + + - jsonPath: $.BusinessServices.*.states.*.state + + - jsonPath: $.BusinessServices.*.states.*.applicationStatus + + - jsonPath: $.BusinessServices.*.states.*.sla + + - jsonPath: $.BusinessServices.*.states.*.docUploadRequired + + - jsonPath: $.BusinessServices.*.states.*.isStartState + + - jsonPath: $.BusinessServices.*.states.*.isTerminateState + + - jsonPath: $.BusinessServices.*.states.*.isStateUpdatable + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.states.*.auditDetails.lastModifiedTime + + - query: INSERT INTO eg_wf_action_v2( uuid,tenantId,active, currentState, action, nextstate, roles, createdby, createdtime, lastmodifiedby, lastmodifiedtime) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON CONFLICT (uuid) DO UPDATE SET action=EXCLUDED.action, nextstate=EXCLUDED.nextstate, roles=EXCLUDED.roles, lastmodifiedby=EXCLUDED.lastmodifiedby, lastmodifiedtime=EXCLUDED.lastmodifiedtime; + basePath: BusinessServices.*.states.*.actions.* + jsonMaps: + + - jsonPath: $.BusinessServices.*.states.*.actions.*.uuid + + - jsonPath: $.BusinessServices.*.states.*.actions.*.tenantId + + - jsonPath: $.BusinessServices.*.states.*.actions.*.active + + - jsonPath: $.BusinessServices.*.states[*][?({uuid} in @.actions[*].uuid)].uuid + + - jsonPath: $.BusinessServices.*.states.*.actions.*.action + + - jsonPath: $.BusinessServices.*.states.*.actions.*.nextState + + - jsonPath: $.BusinessServices.*.states.*.actions.*.roles + type: ARRAY + dbType: STRING + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.createdBy + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.createdTime + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.lastModifiedBy + + - jsonPath: $.BusinessServices.*.states.*.actions.*.auditDetails.lastModifiedTime \ No newline at end of file diff --git a/core-services/egov-workflow-v2/pom.xml b/core-services/egov-workflow-v2/pom.xml index 112efff4713..b0854c893ce 100644 --- a/core-services/egov-workflow-v2/pom.xml +++ b/core-services/egov-workflow-v2/pom.xml @@ -6,10 +6,17 @@ egov-workflow-v2 1.2.1-SNAPSHOT - 2.17.1 + 1.8 ${java.version} ${java.version} + 42.5.0 + 1.18.22 + 3.9.1 + 1.15.3 org.springframework.boot @@ -122,7 +129,7 @@ org.postgresql postgresql - 42.2.2.jre7 + From 867af73b7af54dfad56a82e9bb8850a333bbf635 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 12:00:48 +0530 Subject: [PATCH 118/420] encryption --- .../src/main/resources/application.properties | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core-services/egov-workflow-v2/src/main/resources/application.properties b/core-services/egov-workflow-v2/src/main/resources/application.properties index 8240fa1deb1..10f05b8a00a 100644 --- a/core-services/egov-workflow-v2/src/main/resources/application.properties +++ b/core-services/egov-workflow-v2/src/main/resources/application.properties @@ -6,20 +6,20 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/devdump +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=postgres +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/devdump +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=postgres +spring.flyway.password=ikm #spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true spring.flyway.locations=classpath:/db/migration/main -spring.flyway.enabled=false +spring.flyway.enabled=true # KAFKA SERVER CONFIGURATIONS @@ -52,11 +52,11 @@ persister.update.businessservice.wf.topic=update-wf-businessservice #mdms urls #egov.mdms.host=https://dev.digit.org #egov.mdms.search.endpoint=/egov-mdms-service/v1/_search -egov.mdms.host=https://dev.digit.org/ +egov.mdms.host = https://ksmart-dev.lsgkerala.gov.in/ egov.mdms.search.endpoint=egov-mdms-service/v1/_search #user urls -egov.user.host=https://dev.digit.org/ +egov.user.host=https://ksmart-dev.lsgkerala.gov.in/ egov.user.search.endpoint=user/_search #fuzzy search @@ -73,5 +73,5 @@ management.endpoints.web.base-path=/ cache.expiry.workflow.minutes=15 -egov.statelevel.tenantid=pb +egov.statelevel.tenantid=kl egov.wf.escalation.batch.size=50 \ No newline at end of file From 3e7015ab04cab3c853fdefb4919bb1a16d1ba68f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 8 Apr 2023 12:56:14 +0530 Subject: [PATCH 119/420] migration --- .../enrichment/MarriageCorrectionEnrichment.java | 2 +- .../repository/MarriageCorrectionRepository.java | 8 ++++---- ...20230804124328__newFieldAdd_services_new_dll.sql | 13 +++++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index 78900cf9fc7..fd48f39ea60 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -138,7 +138,7 @@ private void setApplicationNumbers(MarriageCorrectionRequest correctionRequest, List filecodes = getIds(requestInfo, tenantId, config.getMarriageApplNumberIdName(), - marriageApplicationDetails.getModulecode(), + marriageApplicationDetails.getModuleCode(), "CRN", marriageCorrection.size()); validateFileCodes(filecodes, marriageCorrection.size()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java index 23ea05df78f..27a7911e5d2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java @@ -4,7 +4,7 @@ import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; -import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; +//import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.utils.MarriageMdmsUtil; @@ -21,14 +21,14 @@ public class MarriageCorrectionRepository { private final MarriageDetailsEnrichment marriageDetailsEnrichment; private final MarriageMdmsUtil util; - private final MarriageMDMSValidator mdmsValidator; +// private final MarriageMDMSValidator mdmsValidator; - public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator) { + public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageMdmsUtil util) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageDetailsEnrichment = marriageDetailsEnrichment; this.util = util; - this.mdmsValidator = mdmsValidator; +// this.mdmsValidator = mdmsValidator; } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql new file mode 100644 index 00000000000..25d3bf1924c --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql @@ -0,0 +1,13 @@ +ALTER TABLE public.eg_marriage_details + ADD COLUMN is_backward boolean; + +ALTER TABLE public.eg_marriage_details_audit + ADD COLUMN is_backward boolean; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN is_backward boolean, + ADD COLUMN certificatenumber character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN is_backward boolean, + ADD COLUMN certificatenumber character varying(64) COLLATE pg_catalog."default"; From 6235cba9554952dbbf0cb468ac9166cc875111d3 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 13:06:27 +0530 Subject: [PATCH 120/420] comment validation for testing --- .../enrichment/MarriageDetailsEnrichment.java | 34 ++++++++-------- .../MarriageApplicationRepository.java | 40 +++++++++---------- .../service/MarriageApplicationService.java | 12 +++--- .../MarriageCorrectionEnrichment.java | 2 +- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 9ae96965a4d..065979f2897 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -87,24 +87,24 @@ public void enrichCreate(MarriageDetailsRequest request) { setGroomPresentAddress(request); //Jasmine 07.04.2023 - GroomDetails groomDetails =marriage.getGroomDetails(); - GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); - groomDetails.setAadharno(groomDetailsEnc.getAadharno()); - groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); - groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); + // GroomDetails groomDetails =marriage.getGroomDetails(); + // GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); + // groomDetails.setAadharno(groomDetailsEnc.getAadharno()); + // groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); + // groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); + // groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); - BrideDetails brideDetails =marriage.getBrideDetails(); - BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); - brideDetails.setAadharno(brideDetailsEnc.getAadharno()); - brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); - brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); - - WitnessDetails witnessDetails =marriage.getWitnessDetails(); - WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); - witnessDetails.setWitness1AadharNo(witnessDetailsEnc.getWitness1AadharNo()); - witnessDetails.setWitness2AadharNo(witnessDetailsEnc.getWitness2AadharNo()); + // BrideDetails brideDetails =marriage.getBrideDetails(); + // BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); + // brideDetails.setAadharno(brideDetailsEnc.getAadharno()); + // brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); + // brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); + // brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + + // WitnessDetails witnessDetails =marriage.getWitnessDetails(); + // WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); + // witnessDetails.setWitness1AadharNo(witnessDetailsEnc.getWitness1AadharNo()); + // witnessDetails.setWitness2AadharNo(witnessDetailsEnc.getWitness2AadharNo()); //Jasmine 06.04.2023 List marriagedocument = marriage.getMarriageDocuments(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index c69190960a1..68f451f0f18 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -96,27 +96,27 @@ public List searchMarriageDetails(MarriageApplicatio List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); - if(result != null) { - result.forEach(marriage -> { + // if(result != null) { + // result.forEach(marriage -> { - GroomDetails groomDetails =marriage.getGroomDetails(); - GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); - groomDetails.setAadharno(groomDetailsDec.getAadharno()); - groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + // GroomDetails groomDetails =marriage.getGroomDetails(); + // GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + // groomDetails.setAadharno(groomDetailsDec.getAadharno()); + // groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + // groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + // groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); - BrideDetails brideDetails =marriage.getBrideDetails(); - BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); - brideDetails.setAadharno(brideDetailsDec.getAadharno()); - brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + // BrideDetails brideDetails =marriage.getBrideDetails(); + // BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); + // brideDetails.setAadharno(brideDetailsDec.getAadharno()); + // brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + // brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + // brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); - WitnessDetails witnessDetails =marriage.getWitnessDetails(); - WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); - witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); - witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); + // WitnessDetails witnessDetails =marriage.getWitnessDetails(); + // WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); + // witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); + // witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); // DeathInformantDtls deathInformant =deathDtl.getDeathInformantDtls() ; // if (deathInformant!=null){ // DeathInformantDtls deathInformantEnc = encryptionDecryptionUtil.decryptObject(deathInformant, "BndDetail", DeathInformantDtls.class,requestInfo); @@ -128,8 +128,8 @@ public List searchMarriageDetails(MarriageApplicatio // DeathInitiatorDtls deathInitiatorEnc = encryptionDecryptionUtil.decryptObject(deathInitiator, "BndDetail", DeathInitiatorDtls.class,requestInfo); // deathInitiator.setInitiatorAadhaar(deathInitiatorEnc.getInitiatorAadhaar()); // } - }); - } + // }); + // } return result; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index b1224f1e82d..459bf0084ce 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -51,9 +51,9 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication } public List saveMarriageDetails(MarriageDetailsRequest request) { - validatorService.validateCommonFields( request); - Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); - mdmsValidator.validateMarriageMDMSData(request,mdmsData); + // validatorService.validateCommonFields( request); + // Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + // mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); if (request.getMarriageDetails().get(0).isWorkflow()){ @@ -75,9 +75,9 @@ public List saveMarriageDetails(MarriageDetailsReque public List updateMarriageDetails(MarriageDetailsRequest request) { - validatorService.validateCommonFields( request); - Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); - mdmsValidator.validateMarriageMDMSData(request,mdmsData); + // validatorService.validateCommonFields( request); + // Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + // mdmsValidator.validateMarriageMDMSData(request,mdmsData); String applicationNumber = request.getMarriageDetails().get(0).getApplicationNumber(); MarriageApplicationSearchCriteria criteria =(MarriageApplicationSearchCriteria.builder() .applicationNo(applicationNumber) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index 78900cf9fc7..fd48f39ea60 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -138,7 +138,7 @@ private void setApplicationNumbers(MarriageCorrectionRequest correctionRequest, List filecodes = getIds(requestInfo, tenantId, config.getMarriageApplNumberIdName(), - marriageApplicationDetails.getModulecode(), + marriageApplicationDetails.getModuleCode(), "CRN", marriageCorrection.size()); validateFileCodes(filecodes, marriageCorrection.size()); From c3feb00ce540d77e2e6f77f35cc45f4c72062f48 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 13:44:16 +0530 Subject: [PATCH 121/420] comment validation for testing --- .../enrichment/MarriageDetailsEnrichment.java | 21 ++++++++++++------- .../MarriageApplicationRepository.java | 7 ++++--- .../marriage/utils/MarriageConstants.java | 4 +++- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 065979f2897..60e1c9e0ad6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -90,16 +90,23 @@ public void enrichCreate(MarriageDetailsRequest request) { // GroomDetails groomDetails =marriage.getGroomDetails(); // GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); // groomDetails.setAadharno(groomDetailsEnc.getAadharno()); - // groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); - // groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); - // groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); - + // if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + // groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); + // groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); + // } + // else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + // groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); + // } // BrideDetails brideDetails =marriage.getBrideDetails(); // BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); // brideDetails.setAadharno(brideDetailsEnc.getAadharno()); - // brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); - // brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); - // brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + // if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + // brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); + // brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); + // } + // else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + // brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + // } // WitnessDetails witnessDetails =marriage.getWitnessDetails(); // WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 68f451f0f18..bdbe8d2670b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -43,7 +43,7 @@ public class MarriageApplicationRepository { private final MarriageRegistryRowMapper marriageRegistryRowMapper; private final JdbcTemplate jdbcTemplate; - private final WorkflowIntegrator workflowIntegrator; + // private final WorkflowIntegrator workflowIntegrator; private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; private final MarriageDocumentRowMapper documentRowMapper; @@ -55,7 +55,8 @@ public class MarriageApplicationRepository { public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, - MarriageRegistryRowMapper marriageRegistryRowMapper, WorkflowIntegrator workflowIntegrator, + MarriageRegistryRowMapper marriageRegistryRowMapper, + // WorkflowIntegrator workflowIntegrator, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator,MarriageDocumentRowMapper documentRowMapper) { this.producer = producer; @@ -65,7 +66,7 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; this.marriageRegistryRowMapper = marriageRegistryRowMapper; - this.workflowIntegrator = workflowIntegrator; + // this.workflowIntegrator = workflowIntegrator; this.util = util; this.mdmsValidator = mdmsValidator; this.documentRowMapper = documentRowMapper; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index bb05fb1b6dd..beb5ded3f42 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -132,7 +132,9 @@ public class MarriageConstants { public static final String WARD="TenantBoundary"; -public static final String PARENT="PARENT"; + public static final String PARENT="PARENT"; + + public static final String GUARDIAN="GUARDIAN"; public static final String BND_MODULE_NAME = "birth-death-service"; From e52ace8e2d1034afd76e633d6f950ffe847b8a28 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 14:28:50 +0530 Subject: [PATCH 122/420] comment validation for testing --- .../repository/MarriageApplicationRepository.java | 2 +- .../repository/MarriageCorrectionRepository.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index bdbe8d2670b..c5f5d1959ca 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -22,7 +22,7 @@ import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageDocumentRowMapper; import org.ksmart.marriage.utils.MarriageMdmsUtil; - import org.ksmart.marriage.workflow.WorkflowIntegrator; +// import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java index 27a7911e5d2..a0cf7976f65 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java @@ -34,7 +34,7 @@ public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicati public List saveCorrectionDetails(MarriageDetailsRequest request) { - Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + // Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); //mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); From 6c4bf3c01d11912161976067060174b2d84b0f2f Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 14:45:07 +0530 Subject: [PATCH 123/420] comment validation for testing --- .../repository/MarriageApplicationRepository.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index c5f5d1959ca..52c8893bf21 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -85,12 +85,12 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat // return request.getMarriageDetails(); // } - public List saveMarriageDetails(MarriageDetailsRequest request) { + // public List saveMarriageDetails(MarriageDetailsRequest request) { - // marriageDetailsEnrichment.enrichCreate(request); - producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - return request.getMarriageDetails(); - } + // // marriageDetailsEnrichment.enrichCreate(request); + // producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + // return request.getMarriageDetails(); + // } //Jasmine 31.03.2023 public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { From 671d929b95d165fbcdcbd8103012ea0ef92a179a Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 14:55:12 +0530 Subject: [PATCH 124/420] comment validation for testing --- .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../MarriageApplicationRepository.java | 59 +++++++------------ 2 files changed, 22 insertions(+), 39 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 60e1c9e0ad6..2577b9cc594 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -9,7 +9,7 @@ import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; import org.ksmart.marriage.common.repository.ServiceRequestRepository; -import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 52c8893bf21..a2a320c864b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -7,7 +7,7 @@ import org.ksmart.marriage.common.contract.EncryptionDecryptionUtil; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; +//import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; @@ -18,10 +18,10 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; -import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; -import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; +//import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; +//import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageDocumentRowMapper; -import org.ksmart.marriage.utils.MarriageMdmsUtil; +//import org.ksmart.marriage.utils.MarriageMdmsUtil; // import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; @@ -36,16 +36,16 @@ @Repository public class MarriageApplicationRepository { private final MarriageProducer producer; - private final MarriageApplicationConfiguration marriageApplicationConfiguration; - private final MarriageDetailsEnrichment marriageDetailsEnrichment; + // private final MarriageApplicationConfiguration marriageApplicationConfiguration; + // private final MarriageDetailsEnrichment marriageDetailsEnrichment; private final MarriageApplicationQueryBuilder marriageQueryBuilder; private final MarriageApplicationRowMapper marriageApplicationRowMapper; - private final MarriageRegistryRowMapper marriageRegistryRowMapper; + // private final MarriageRegistryRowMapper marriageRegistryRowMapper; private final JdbcTemplate jdbcTemplate; // private final WorkflowIntegrator workflowIntegrator; - private final MarriageMdmsUtil util; - private final MarriageMDMSValidator mdmsValidator; + // private final MarriageMdmsUtil util; + // private final MarriageMDMSValidator mdmsValidator; private final MarriageDocumentRowMapper documentRowMapper; @Autowired @@ -53,44 +53,27 @@ public class MarriageApplicationRepository { @Autowired public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, - JdbcTemplate jdbcTemplate, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, + JdbcTemplate jdbcTemplate, + // MarriageDetailsEnrichment marriageDetailsEnrichment, + MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, - MarriageRegistryRowMapper marriageRegistryRowMapper, + // MarriageRegistryRowMapper marriageRegistryRowMapper, // WorkflowIntegrator workflowIntegrator, - MarriageMdmsUtil util, - MarriageMDMSValidator mdmsValidator,MarriageDocumentRowMapper documentRowMapper) { + // MarriageMdmsUtil util, + // MarriageMDMSValidator mdmsValidator, + MarriageDocumentRowMapper documentRowMapper) { this.producer = producer; - this.marriageApplicationConfiguration = marriageApplicationConfiguration; - this.marriageDetailsEnrichment = marriageDetailsEnrichment; + // this.marriageApplicationConfiguration = marriageApplicationConfiguration; + // this.marriageDetailsEnrichment = marriageDetailsEnrichment; this.jdbcTemplate = jdbcTemplate; this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; - this.marriageRegistryRowMapper = marriageRegistryRowMapper; + // this.marriageRegistryRowMapper = marriageRegistryRowMapper; // this.workflowIntegrator = workflowIntegrator; - this.util = util; - this.mdmsValidator = mdmsValidator; + // this.util = util; + // this.mdmsValidator = mdmsValidator; this.documentRowMapper = documentRowMapper; } - // public List saveMarriageDetails(MarriageDetailsRequest request) { - - // // marriageDetailsEnrichment.enrichCreate(request); - // producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - // return request.getMarriageDetails(); - // } - - // public List updateMarriageDetails(MarriageDetailsRequest request) { - - // // workflowIntegrator.callWorkFlow(request); - // producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); - // return request.getMarriageDetails(); - // } - - // public List saveMarriageDetails(MarriageDetailsRequest request) { - - // // marriageDetailsEnrichment.enrichCreate(request); - // producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - // return request.getMarriageDetails(); - // } //Jasmine 31.03.2023 public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { From 24f4cccea2a93423f07ac74419f403d4edfb1a5e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 15:31:06 +0530 Subject: [PATCH 125/420] validations enabled --- .../enrichment/MarriageDetailsEnrichment.java | 50 +++++++++---------- .../MarriageApplicationRepository.java | 42 ++++++++-------- .../service/MarriageApplicationService.java | 15 +++--- .../validator/MarriageMDMSValidator.java | 3 +- 4 files changed, 52 insertions(+), 58 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 2577b9cc594..6bd1b0b4d98 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -87,31 +87,31 @@ public void enrichCreate(MarriageDetailsRequest request) { setGroomPresentAddress(request); //Jasmine 07.04.2023 - // GroomDetails groomDetails =marriage.getGroomDetails(); - // GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); - // groomDetails.setAadharno(groomDetailsEnc.getAadharno()); - // if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ - // groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); - // groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); - // } - // else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ - // groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); - // } - // BrideDetails brideDetails =marriage.getBrideDetails(); - // BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); - // brideDetails.setAadharno(brideDetailsEnc.getAadharno()); - // if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ - // brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); - // brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); - // } - // else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ - // brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); - // } - - // WitnessDetails witnessDetails =marriage.getWitnessDetails(); - // WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); - // witnessDetails.setWitness1AadharNo(witnessDetailsEnc.getWitness1AadharNo()); - // witnessDetails.setWitness2AadharNo(witnessDetailsEnc.getWitness2AadharNo()); + GroomDetails groomDetails =marriage.getGroomDetails(); + GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); + groomDetails.setAadharno(groomDetailsEnc.getAadharno()); + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); + } + else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); + } + BrideDetails brideDetails =marriage.getBrideDetails(); + BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); + brideDetails.setAadharno(brideDetailsEnc.getAadharno()); + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); + } + else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + } + + WitnessDetails witnessDetails =marriage.getWitnessDetails(); + WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); + witnessDetails.setWitness1AadharNo(witnessDetailsEnc.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsEnc.getWitness2AadharNo()); //Jasmine 06.04.2023 List marriagedocument = marriage.getMarriageDocuments(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index a2a320c864b..4b461655d8c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -80,27 +80,27 @@ public List searchMarriageDetails(MarriageApplicatio List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); - // if(result != null) { - // result.forEach(marriage -> { + if(result != null) { + result.forEach(marriage -> { - // GroomDetails groomDetails =marriage.getGroomDetails(); - // GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); - // groomDetails.setAadharno(groomDetailsDec.getAadharno()); - // groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); - // groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - // groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + GroomDetails groomDetails =marriage.getGroomDetails(); + GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); + groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); - // BrideDetails brideDetails =marriage.getBrideDetails(); - // BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); - // brideDetails.setAadharno(brideDetailsDec.getAadharno()); - // brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); - // brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - // brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + BrideDetails brideDetails =marriage.getBrideDetails(); + BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); + brideDetails.setAadharno(brideDetailsDec.getAadharno()); + brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); - // WitnessDetails witnessDetails =marriage.getWitnessDetails(); - // WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); - // witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); - // witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); + WitnessDetails witnessDetails =marriage.getWitnessDetails(); + WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); + witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); // DeathInformantDtls deathInformant =deathDtl.getDeathInformantDtls() ; // if (deathInformant!=null){ // DeathInformantDtls deathInformantEnc = encryptionDecryptionUtil.decryptObject(deathInformant, "BndDetail", DeathInformantDtls.class,requestInfo); @@ -112,10 +112,8 @@ public List searchMarriageDetails(MarriageApplicatio // DeathInitiatorDtls deathInitiatorEnc = encryptionDecryptionUtil.decryptObject(deathInitiator, "BndDetail", DeathInitiatorDtls.class,requestInfo); // deathInitiator.setInitiatorAadhaar(deathInitiatorEnc.getInitiatorAadhaar()); // } - // }); - // } - - + }); + } return result; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 459bf0084ce..40eb349f650 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -51,9 +51,9 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication } public List saveMarriageDetails(MarriageDetailsRequest request) { - // validatorService.validateCommonFields( request); - // Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); - // mdmsValidator.validateMarriageMDMSData(request,mdmsData); + validatorService.validateCommonFields( request); + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); if (request.getMarriageDetails().get(0).isWorkflow()){ @@ -75,22 +75,19 @@ public List saveMarriageDetails(MarriageDetailsReque public List updateMarriageDetails(MarriageDetailsRequest request) { - // validatorService.validateCommonFields( request); - // Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); - // mdmsValidator.validateMarriageMDMSData(request,mdmsData); + validatorService.validateCommonFields( request); + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + mdmsValidator.validateMarriageMDMSData(request,mdmsData); String applicationNumber = request.getMarriageDetails().get(0).getApplicationNumber(); MarriageApplicationSearchCriteria criteria =(MarriageApplicationSearchCriteria.builder() .applicationNo(applicationNumber) .build()); List searchResult = repository.getMarriageApplication(criteria,request.getRequestInfo()); - // System.out.println("UpdatesearchResult"+searchResult); validatorService.validateUpdate(request, searchResult); marriageDetailsEnrichment.enrichUpdate(request); if (request.getMarriageDetails().get(0).isWorkflow()){ workflowIntegrator.callWorkFlow(request); } - - // List marriageApplicationDetails =repository.updateMarriageDetails(request); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); // request.getMarriageDetails().forEach(marriage->{ // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index cf9640211f2..3bd8fecbc91 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -289,8 +289,7 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { if (!masterData.get(MarriageConstants.TENANTS) - .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() - .getPresentInsideKeralaLBName())) + .contains(request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaLBName())) errorMap.put("GROOM PRESENT ADDRESS: LB NAME INVALID", "groom lbname inside kerala " + request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaLBName() + " is invalid"); From 376482c132dcf077bbf74f24b0c4900d1834d215 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 16:11:33 +0530 Subject: [PATCH 126/420] validation updated --- .../MarriageApplicationRepository.java | 22 +- .../MarriageApplicationValidator.java | 336 +++++++++--------- 2 files changed, 183 insertions(+), 175 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 4b461655d8c..98c2d67939a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -16,6 +16,7 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; +import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; //import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; @@ -86,16 +87,23 @@ public List searchMarriageDetails(MarriageApplicatio GroomDetails groomDetails =marriage.getGroomDetails(); GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); groomDetails.setAadharno(groomDetailsDec.getAadharno()); - groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); - + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + } + else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + } BrideDetails brideDetails =marriage.getBrideDetails(); BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); brideDetails.setAadharno(brideDetailsDec.getAadharno()); - brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + } + else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + } WitnessDetails witnessDetails =marriage.getWitnessDetails(); WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index fb0b683d09d..2d97c7ff976 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -218,22 +218,22 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriagedtls.getPlacenameMl() + " is invalid"); } - if (StringUtils.isEmpty( - marriagedtls.getLocalityEn())) { - throw new CustomException( - " LOCALITY NAME ENGLISH IS INVALID ", - "The Locality Name English " + - marriagedtls.getLocalityEn() - + " is invalid"); - } - if (StringUtils.isEmpty( - marriagedtls.getLocalityMl())) { - throw new CustomException( - " LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Name Malayalam" + - marriagedtls.getLocalityMl() - + " is invalid"); - } + // if (StringUtils.isEmpty( + // marriagedtls.getLocalityEn())) { + // throw new CustomException( + // " LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality Name English " + + // marriagedtls.getLocalityEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty( + // marriagedtls.getLocalityMl())) { + // throw new CustomException( + // " LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Name Malayalam" + + // marriagedtls.getLocalityMl() + // + " is invalid"); + // } } } @@ -748,24 +748,24 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPermntInKeralaAdrPincode() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrLocalityNameEn())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - "The Locality English " - + - groomaddressInfo.getPermntInKeralaAdrLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrLocalityNameMl())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Malayalam " - + - groomaddressInfo.getPermntInKeralaAdrLocalityNameMl() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntInKeralaAdrLocalityNameEn())) { + // throw new CustomException( + // "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // groomaddressInfo.getPermntInKeralaAdrLocalityNameEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntInKeralaAdrLocalityNameMl())) { + // throw new CustomException( + // "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // groomaddressInfo.getPermntInKeralaAdrLocalityNameMl() + // + " is invalid"); + // } if (StringUtils.isEmpty(groomaddressInfo .getPermntInKeralaAdrHouseNameEn())) { throw new CustomException( @@ -855,24 +855,24 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPermntOutsideKeralaPostOfficeEn() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntOutsideKeralaLocalityNameMl())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Malayalam " - + - groomaddressInfo.getPermntOutsideKeralaLocalityNameMl() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntOutsideKeralaLocalityNameEn())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - "The Locality English " - + - groomaddressInfo.getPermntOutsideKeralaLocalityNameEn() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntOutsideKeralaLocalityNameMl())) { + // throw new CustomException( + // "GROOM PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // groomaddressInfo.getPermntOutsideKeralaLocalityNameMl() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntOutsideKeralaLocalityNameEn())) { + // throw new CustomException( + // "GROOM PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // groomaddressInfo.getPermntOutsideKeralaLocalityNameEn() + // + " is invalid"); + // } if (StringUtils.isEmpty(groomaddressInfo .getPermntOutsideKeralaHouseNameEn())) { throw new CustomException( @@ -1046,24 +1046,24 @@ public void validateCommonFields(MarriageDetailsRequest request) { // + " is invalid"); // } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentInsideKeralaLocalityNameEn())) { - throw new CustomException( - "GROOM PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - "The Locality English " - + - groomaddressInfo.getPresentInsideKeralaLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentInsideKeralaLocalityNameMl())) { - throw new CustomException( - "GROOM PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Malayalam " - + - groomaddressInfo.getPresentInsideKeralaLocalityNameMl() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentInsideKeralaLocalityNameEn())) { + // throw new CustomException( + // "GROOM PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // groomaddressInfo.getPresentInsideKeralaLocalityNameEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentInsideKeralaLocalityNameMl())) { + // throw new CustomException( + // "GROOM PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // groomaddressInfo.getPresentInsideKeralaLocalityNameMl() + // + " is invalid"); + // } if (StringUtils.isEmpty(groomaddressInfo .getPresentInsideKeralaHouseNameEn())) { throw new CustomException( @@ -1151,24 +1151,24 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPresentOutsideKeralaLocalityNameMl() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentOutsideKeralaLocalityNameEn())) { - throw new CustomException( - "GROOM PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - "The Locality English " - + - groomaddressInfo.getPresentOutsideKeralaLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentOutsideKeralaHouseNameEn())) { - throw new CustomException( - "GROOM PRESENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", - "The House Name English " - + - groomaddressInfo.getPresentOutsideKeralaHouseNameEn() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentOutsideKeralaLocalityNameEn())) { + // throw new CustomException( + // "GROOM PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // groomaddressInfo.getPresentOutsideKeralaLocalityNameEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentOutsideKeralaHouseNameEn())) { + // throw new CustomException( + // "GROOM PRESENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + // "The House Name English " + // + + // groomaddressInfo.getPresentOutsideKeralaHouseNameEn() + // + " is invalid"); + // } if (StringUtils.isEmpty(groomaddressInfo .getPresentOutsideKeralaHouseNameMl())) { throw new CustomException( @@ -1328,24 +1328,24 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPermntInKeralaAdrPincode() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPermntInKeralaAdrLocalityNameEn())) { - throw new CustomException( - " BRIDE PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - "The Locality English " - + - brideaddressInfo.getPermntInKeralaAdrLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo - .getPermntInKeralaAdrLocalityNameMl())) { - throw new CustomException( - " BRIDE PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Malayalam " - + - brideaddressInfo.getPermntInKeralaAdrLocalityNameMl() - + " is invalid"); - } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPermntInKeralaAdrLocalityNameEn())) { + // throw new CustomException( + // " BRIDE PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // brideaddressInfo.getPermntInKeralaAdrLocalityNameEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPermntInKeralaAdrLocalityNameMl())) { + // throw new CustomException( + // " BRIDE PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // brideaddressInfo.getPermntInKeralaAdrLocalityNameMl() + // + " is invalid"); + // } if (StringUtils.isEmpty(brideaddressInfo .getPermntInKeralaAdrHouseNameEn())) { throw new CustomException( @@ -1434,32 +1434,32 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPermntOutsideKeralaPostOfficeEn() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPermntOutsideKeralaLocalityNameMl())) { - throw new CustomException( - "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Malayalam " - + - brideaddressInfo.getPermntOutsideKeralaLocalityNameMl() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo - .getPermntOutsideKeralaLocalityNameEn())) { - throw new CustomException( - "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - "The Locality English " - + - brideaddressInfo.getPermntOutsideKeralaLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo - .getPermntOutsideKeralaHouseNameEn())) { - throw new CustomException( - "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", - "The House Name English " - + - brideaddressInfo.getPermntOutsideKeralaHouseNameEn() - + " is invalid"); + // if (StringUtils.isEmpty(brideaddressInfo + // .getPermntOutsideKeralaLocalityNameMl())) { + // throw new CustomException( + // "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // brideaddressInfo.getPermntOutsideKeralaLocalityNameMl() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPermntOutsideKeralaLocalityNameEn())) { + // throw new CustomException( + // "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // brideaddressInfo.getPermntOutsideKeralaLocalityNameEn() + // + " is invalid"); + // } + if (StringUtils.isEmpty(brideaddressInfo + .getPermntOutsideKeralaHouseNameEn())) { + throw new CustomException( + "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + brideaddressInfo.getPermntOutsideKeralaHouseNameEn() + + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo .getPermntOutsideKeralaHouseNameMl())) { @@ -1622,24 +1622,24 @@ public void validateCommonFields(MarriageDetailsRequest request) { // brideaddressInfo.getPresentInsideKeralaPincode() // + " is invalid"); // } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentInsideKeralaLocalityNameEn())) { - throw new CustomException( - "BRIDE PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - "The Locality English " - + - brideaddressInfo.getPresentInsideKeralaLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentInsideKeralaLocalityNameMl())) { - throw new CustomException( - "BRIDE PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Malayalam " - + - brideaddressInfo.getPresentInsideKeralaLocalityNameMl() - + " is invalid"); - } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPresentInsideKeralaLocalityNameEn())) { + // throw new CustomException( + // "BRIDE PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // brideaddressInfo.getPresentInsideKeralaLocalityNameEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPresentInsideKeralaLocalityNameMl())) { + // throw new CustomException( + // "BRIDE PRESENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // brideaddressInfo.getPresentInsideKeralaLocalityNameMl() + // + " is invalid"); + // } if (StringUtils.isEmpty(brideaddressInfo .getPresentInsideKeralaHouseNameEn())) { throw new CustomException( @@ -1711,24 +1711,24 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPresentOutsideKeralaLocalityNameEn() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentOutsideKeralaLocalityNameMl())) { - throw new CustomException( - "BRIDE PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Malayalam " - + - brideaddressInfo.getPresentOutsideKeralaLocalityNameMl() - + " is invalid"); - } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentOutsideKeralaLocalityNameEn())) { - throw new CustomException( - "BRIDE PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - "The Locality English " - + - brideaddressInfo.getPresentOutsideKeralaLocalityNameEn() - + " is invalid"); - } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPresentOutsideKeralaLocalityNameMl())) { + // throw new CustomException( + // "BRIDE PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // brideaddressInfo.getPresentOutsideKeralaLocalityNameMl() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPresentOutsideKeralaLocalityNameEn())) { + // throw new CustomException( + // "BRIDE PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // brideaddressInfo.getPresentOutsideKeralaLocalityNameEn() + // + " is invalid"); + // } if (StringUtils.isEmpty(brideaddressInfo .getPresentOutsideKeralaHouseNameEn())) { throw new CustomException( From 52c475c489ab9ebbada18cef2508c71e2850a554 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 8 Apr 2023 17:06:14 +0530 Subject: [PATCH 127/420] mdms validation for address --- .../MarriageApplicationValidator.java | 80 +++++++++---------- .../validator/MarriageMDMSValidator.java | 4 +- .../marriage/utils/MarriageMdmsUtil.java | 18 +++++ 3 files changed, 61 insertions(+), 41 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 2d97c7ff976..ce6aff3097d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1841,15 +1841,15 @@ public void validateCommonFields(MarriageDetailsRequest request) { witnessDtls.getWitness1NameEn() + " is invalid"); } - if (StringUtils.isEmpty(witnessDtls.getWitness1NameMl())) { + // if (StringUtils.isEmpty(witnessDtls.getWitness1NameMl())) { - throw new CustomException(" WITNESS1 NAME MALAYALAM INVALID ", - "The Witness1 Name Malayalam " + - witnessDtls.getWitness1NameMl() - + " is invalid"); - } + // throw new CustomException(" WITNESS1 NAME MALAYALAM INVALID ", + // "The Witness1 Name Malayalam " + + // witnessDtls.getWitness1NameMl() + // + " is invalid"); + // } if ((witnessDtls.getWitness1Age() < 18 - && witnessDtls.getWitness1Age() == 0)) { + || witnessDtls.getWitness1Age() == 0)) { throw new CustomException(" WITNESS1 AGE INVALID ", "The Witness1 Age " + @@ -1863,14 +1863,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { witnessDtls.getWitness1AddresSEn() + " is invalid"); } - if ((StringUtils.isEmpty(witnessDtls.getWitness1AddressMl()))) { + // if ((StringUtils.isEmpty(witnessDtls.getWitness1AddressMl()))) { - throw new CustomException( - " WITNESS1 ADDRESS MALAYALAM INVALID ", - "The Witness1 Address Malayalam " + - witnessDtls.getWitness1AddressMl() - + " is invalid"); - } + // throw new CustomException( + // " WITNESS1 ADDRESS MALAYALAM INVALID ", + // "The Witness1 Address Malayalam " + + // witnessDtls.getWitness1AddressMl() + // + " is invalid"); + // } if ((witnessDtls.getWitness1Mobile() <= 0)) { throw new CustomException(" WITNESS1 MOBILE NUMBER INVALID ", @@ -1878,13 +1878,13 @@ public void validateCommonFields(MarriageDetailsRequest request) { witnessDtls.getWitness1Mobile() + " is invalid"); } - if (!witnessDtls.getWitness1Esigned()) { + // if (!witnessDtls.getWitness1Esigned()) { - throw new CustomException(" WITNESS1 E-SIGN INVALID ", - "The Witness1 E-sign " + - witnessDtls.getWitness1Esigned() - + " is invalid"); - } + // throw new CustomException(" WITNESS1 E-SIGN INVALID ", + // "The Witness1 E-sign " + + // witnessDtls.getWitness1Esigned() + // + " is invalid"); + // } // witness2 if (StringUtils.isEmpty(witnessDtls.getWitness2AadharNo())) { @@ -1901,15 +1901,15 @@ public void validateCommonFields(MarriageDetailsRequest request) { witnessDtls.getWitness2NameEn() + " is invalid"); } - if (StringUtils.isEmpty(witnessDtls.getWitness2NameMl())) { + // if (StringUtils.isEmpty(witnessDtls.getWitness2NameMl())) { - throw new CustomException(" WITNESS2 NAME MALAYALAM INVALID ", - "The Witness2 Name Malayalam " + - witnessDtls.getWitness2NameMl() - + " is invalid"); - } + // throw new CustomException(" WITNESS2 NAME MALAYALAM INVALID ", + // "The Witness2 Name Malayalam " + + // witnessDtls.getWitness2NameMl() + // + " is invalid"); + // } if ((witnessDtls.getWitness2Age() < 18 - && witnessDtls.getWitness2Age() == 0)) { + || witnessDtls.getWitness2Age() == 0)) { throw new CustomException(" WITNESS2 AGE INVALID", "The Witness2 Age " + @@ -1923,14 +1923,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { witnessDtls.getWitness2AddresSEn() + " is invalid"); } - if ((StringUtils.isEmpty(witnessDtls.getWitness2AddressMl()))) { + // if ((StringUtils.isEmpty(witnessDtls.getWitness2AddressMl()))) { - throw new CustomException( - " WITNESS2 ADDRESS MALAYALAM INVALID ", - "The Witness2 Address Malayalam " + - witnessDtls.getWitness2AddressMl() - + " is invalid"); - } + // throw new CustomException( + // " WITNESS2 ADDRESS MALAYALAM INVALID ", + // "The Witness2 Address Malayalam " + + // witnessDtls.getWitness2AddressMl() + // + " is invalid"); + // } if ((witnessDtls.getWitness2Mobile() <= 0)) { throw new CustomException(" WITNESS2 MOBILE NUMBER INVALID ", @@ -1938,13 +1938,13 @@ public void validateCommonFields(MarriageDetailsRequest request) { witnessDtls.getWitness2Mobile() + " is invalid"); } - if (!witnessDtls.getWitness2Esigned()) { + // if (!witnessDtls.getWitness2Esigned()) { - throw new CustomException(" WITNESS2 E-SIGN INVALID ", - "The Witness2 E-sign " + - witnessDtls.getWitness2Esigned() - + " is invalid"); - } + // throw new CustomException(" WITNESS2 E-SIGN INVALID ", + // "The Witness2 E-sign " + + // witnessDtls.getWitness2Esigned() + // + " is invalid"); + // } }); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index 3bd8fecbc91..10915f5e097 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -540,7 +540,9 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms // Rakhi S ikm on 14.02.2023 private Map> getAttributeValues(Object mdmsdata) { - List modulepaths = Arrays.asList(MarriageConstants.TENANT_JSONPATH, + List modulepaths = Arrays.asList( + //MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH, + MarriageConstants.TENANT_JSONPATH, MarriageConstants.COMMON_MASTER_JSONPATH, MarriageConstants.BND_LIST_JSONPATH); final Map> mdmsResMap = new HashMap<>(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index d6e0ebb8596..341a533ea70 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -52,11 +52,13 @@ public Object mDMSCall(RequestInfo requestInfo, String tenantId) { private MdmsCriteriaReq getMDMSRequest(RequestInfo requestInfo, String tenantId) { ModuleDetail tenantIdRequest = getTenantIdRequest(tenantId); + ModuleDetail tenantIds = getTenantIds(); ModuleDetail commomMasterRequest = getCommonMastersRequest(); List BNDListRequest = getMarriageListRequest(); List moduleDetails = new LinkedList<>(); moduleDetails.add(tenantIdRequest); + moduleDetails.add(tenantIds); moduleDetails.add(commomMasterRequest); moduleDetails.addAll(BNDListRequest); @@ -76,12 +78,28 @@ private ModuleDetail getTenantIdRequest(String tenantId) { List marriageMasterDetails = new ArrayList<>(); // filter to only get code field from master data final String filterCode = "$.[?(@.code=='"+tenantId+"')].*"; + // final String filterCode = "$.[?(@.active==true)].code"; marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.TENANTS).filter(filterCode).build()); ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) .moduleName(MarriageConstants.TENANT_MODULE_NAME).build(); //System.out.println("JasmineTenantId"+marriageModuleDtls); + + return marriageModuleDtls; + } + private ModuleDetail getTenantIds() { + + // master details for Marriage module + List marriageMasterDetails = new ArrayList<>(); + // filter to only get code field from master data + final String filterCode = "$.[*].code"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.TENANTS).filter(filterCode).build()); + + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) + .moduleName(MarriageConstants.TENANT_MODULE_NAME).build(); + return marriageModuleDtls; } private ModuleDetail getCommonMastersRequest() { From 21e8eeb959001138217e40e8abe40c0a67b708f0 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Sun, 9 Apr 2023 11:03:51 +0530 Subject: [PATCH 128/420] marriage correction create --- .../main/resources/marriage-correction.yml | 134 +++++--- .../web/model/marriage/MarriageDocument.java | 7 +- .../MarriageCorrectionEnrichment.java | 301 +++++++++++++++++- .../MarriageCorrectionRepository.java | 27 +- .../service/MarriageCorrectionService.java | 29 +- .../MarriageCorrectionController.java | 5 - .../web/model/CorrectionDocument.java | 13 +- .../web/model/CorrectionField.java | 4 + .../web/model/CorrectionFieldValue.java | 12 + .../web/model/MarriageCorrectionDetails.java | 3 + .../web/model/MarriageCorrectionRequest.java | 8 + ...804225012__marriage_correction_new_dll.sql | 102 ++++++ 12 files changed, 561 insertions(+), 84 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804225012__marriage_correction_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index ce857e677c3..b49d472c376 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -66,9 +66,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.applicationNumber - - jsonPath: $.MarriageDetails.*.registrationno + - jsonPath: $.MarriageDetails.*.registrationNo - - jsonPath: $.MarriageDetails.*.registration_date + - jsonPath: $.MarriageDetails.*.registrationDate - jsonPath: $.MarriageDetails.*.action @@ -403,41 +403,101 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent -# - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , -# document_link ,marriageid ,bride_groom ,active ,applicationnumber ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime) -# VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?); -# -# -# basePath: MarriageDetails.*.MarriageDocuments.* -# jsonMaps: -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.id -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageTenantid -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentName -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentType -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.active -# -# - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber -# -# - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdBy -# -# - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdTime -# -# - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , + document_link ,marriageid ,bride_groom ,active ,applicationnumber ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime, correction_id, correction_field_name) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?, ?, ?); + + + basePath: MarriageDetails.*.MarriageDocuments.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.id + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageTenantid + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentName + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentType + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.active + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdBy + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.createdTime + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.correctionId + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.correctionFieldName + + + - query: INSERT INTO public.eg_marriage_correction( id, marriageid, correction_field_name, condition_code, specific_condition, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?); + + basePath: CorrectionField.* + jsonMaps: + + - jsonPath: $.CorrectionField.*.id + + - jsonPath: $.CorrectionField.*.marriageId + + - jsonPath: $.CorrectionField.*.correctionFieldName + + - jsonPath: $.CorrectionField.*.conditionCode + + - jsonPath: $.CorrectionField.*.specificCondition + + - jsonPath: $.CorrectionField.*.auditDetails.createdTime + + - jsonPath: $.CorrectionField.*.auditDetails.createdBy + + - jsonPath: $.CorrectionField.*.auditDetails.lastModifiedTime + + - jsonPath: $.CorrectionField.*.auditDetails.lastModifiedBy + + + - query: INSERT INTO public.eg_marriage_correction_child( id, marriageid, correctionid, correction_field_name, column_name, old_value, new_value, + createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + + + basePath: CorrectionFieldValue.* + jsonMaps: + + - jsonPath: $.CorrectionFieldValue.*.id + + - jsonPath: $.CorrectionFieldValue.*.marriageId + + - jsonPath: $.CorrectionFieldValue.*.correctionId + + - jsonPath: $.CorrectionFieldValue.*.correctionFieldName + + - jsonPath: $.CorrectionFieldValue.*.columnName + + - jsonPath: $.CorrectionFieldValue.*.oldValue + + - jsonPath: $.CorrectionFieldValue.*.newValue + + - jsonPath: $.CorrectionFieldValue.*.auditDetails.createdTime + + - jsonPath: $.CorrectionFieldValue.*.auditDetails.createdBy + + - jsonPath: $.CorrectionFieldValue.*.auditDetails.lastModifiedTime + + - jsonPath: $.CorrectionFieldValue.*.auditDetails.lastModifiedBy # - version: 1.0 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java index 684a0d33f1f..a4d4f838dcf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java @@ -56,5 +56,10 @@ public class MarriageDocument { @JsonProperty("auditDetails") private AuditDetails marriageDocAuditDetails ; - + + @JsonProperty("correctionId") + private String correctionId; + + @JsonProperty("correctionFieldName") + private String correctionFieldName ; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index fd48f39ea60..86f6cda7198 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -10,12 +10,12 @@ import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.*; +import org.ksmart.marriage.marriagecorrection.web.model.CorrectionField; +import org.ksmart.marriage.marriagecorrection.web.model.CorrectionFieldValue; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; +import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.beans.PropertyAccessor; import org.springframework.beans.PropertyAccessorFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -34,19 +34,39 @@ public class MarriageCorrectionEnrichment implements BaseEnrichment { public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageApplicationDetails marriageApplicationDetails) { + List correctionFieldValueList = new ArrayList<>(); + correctionRequest.setCorrectionFieldValue(correctionFieldValueList); + List correctnField = new ArrayList<>(); + correctionRequest.setCorrectionField(correctnField); + RequestInfo requestInfo = correctionRequest.getRequestInfo(); User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + marriageApplicationDetails.setAuditDetails(auditDetails); + if (marriageApplicationDetails.getBrideDetails() != null) { + marriageApplicationDetails.getBrideDetails().setBrideId((UUID.randomUUID().toString())); + marriageApplicationDetails.getBrideDetails().setBrideGroom("B"); + } + if (marriageApplicationDetails.getGroomDetails() != null) { + marriageApplicationDetails.getGroomDetails().setGroomId((UUID.randomUUID().toString())); + marriageApplicationDetails.getGroomDetails().setBrideGroom("G"); + } + setApplicationNumbers(correctionRequest, marriageApplicationDetails); + + correctionRequest.getMarriageCorrectionDetails().forEach(correction -> { + List documentList = new ArrayList<>(); + marriageApplicationDetails.setMarriageDocuments(documentList); marriageApplicationDetails.setTenantid(correction.getTenantid()); marriageApplicationDetails.setApplicationtype(correction.getApplicationtype()); marriageApplicationDetails.setBusinessservice(correction.getBusinessservice()); marriageApplicationDetails.setStatus(correction.getStatus()); marriageApplicationDetails.setAction(correction.getAction()); marriageApplicationDetails.setWorkflowcode(correction.getWorkflowcode()); - + marriageApplicationDetails.setId(UUID.randomUUID().toString()); + correction.setMarriageId(marriageApplicationDetails.getId()); Map marriageApplnDetailsFieldMap = getJsonFieldNames(MarriageApplicationDetails.class.getDeclaredFields()); Map brideDetailsFieldMap = getJsonFieldNames(BrideDetails.class.getDeclaredFields()); @@ -65,6 +85,16 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp correction.getCorrectionField().forEach(correctionField -> { + String correctionId = UUID.randomUUID().toString(); + CorrectionField correctionFields = new CorrectionField(); + correctionFields.setId(correctionId); + correctionFields.setMarriageId(marriageApplicationDetails.getId()); + correctionFields.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFields.setConditionCode(correctionField.getConditionCode()); + correctionFields.setSpecificCondition(correctionField.getSpecificCondition()); + correctionFields.setAuditDetails(auditDetails); + correctionRequest.getCorrectionField().add(correctionFields); + correctionField.getCorrectionFieldValue().forEach(changeField -> { if (!changeField.getField().isEmpty()) { @@ -72,6 +102,17 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp if (fieldName.length == 1) { if (marriageApplnDetailsFieldMap.containsKey(fieldName[0])) { + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + correctionFieldValue.setOldValue(marriageApplnDetailsAccessor.getPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0])).toString()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + marriageApplnDetailsAccessor.setPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0]), changeField.getNewValue()); } @@ -79,24 +120,66 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp if (fieldName[0].equalsIgnoreCase("BrideDetails")) { if (brideDetailsFieldMap.containsKey(fieldName[1])) { - brideDetailsAccessor.setPropertyValue(brideDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + correctionFieldValue.setOldValue(brideDetailsAccessor.getPropertyValue(brideDetailsFieldMap.get(fieldName[1])).toString()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + brideDetailsAccessor.setPropertyValue(brideDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); } } else if (fieldName[0].equalsIgnoreCase("GroomDetails")) { if (groomDetailsFieldMap.containsKey(fieldName[1])) { - groomDetailsAccessor.setPropertyValue(groomDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + correctionFieldValue.setOldValue(groomDetailsAccessor.getPropertyValue(groomDetailsFieldMap.get(fieldName[1])).toString()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + groomDetailsAccessor.setPropertyValue(groomDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); } - } else if (fieldName[0].equalsIgnoreCase("GroomAddressDetails")) { + } else if (fieldName[0].equalsIgnoreCase("BrideAddressDetails")) { if (brideAddressDetailsFieldMap.containsKey(fieldName[1])) { + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + correctionFieldValue.setOldValue(brideAddressDetailsAccessor.getPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1])).toString()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + brideAddressDetailsAccessor.setPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); } - } else if (fieldName[0].equalsIgnoreCase("BrideAddressDetails")) { + } else if (fieldName[0].equalsIgnoreCase("GroomAddressDetails")) { if (groomAddressDetailsFieldMap.containsKey(fieldName[1])) { + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + correctionFieldValue.setOldValue(groomAddressDetailsAccessor.getPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1])).toString()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + groomAddressDetailsAccessor.setPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); } @@ -105,12 +188,29 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp } } }); + correctionField.getCorrectionDocument().forEach(document -> { + MarriageDocument marriageDocument = new MarriageDocument(); + marriageDocument.setId(UUID.randomUUID().toString()); + marriageDocument.setMarriageId(marriageApplicationDetails.getId()); + marriageDocument.setApplicationNumber(marriageApplicationDetails.getApplicationNumber()); + marriageDocument.setMarriageTenantid(marriageApplicationDetails.getTenantid()); + marriageDocument.setDocumentType(document.getDocumentType()); + marriageDocument.setDocumentName(document.getDocumentName()); + marriageDocument.setFileStoreId(document.getFileStoreId()); + marriageDocument.setMarriageDocAuditDetails(auditDetails); + marriageDocument.setDocumentOwner(correctionField.getCorrectionFieldName().contains("bride") ? "B" : "G"); + marriageDocument.setActive(true); + marriageDocument.setCorrectionId(correctionId); + marriageDocument.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + marriageApplicationDetails.getMarriageDocuments().add(marriageDocument); + }); }); }); - setApplicationNumbers(correctionRequest, marriageApplicationDetails); + setBridePermanentAddress(marriageApplicationDetails); + setGroomPermanentAddress(marriageApplicationDetails); } private Map getJsonFieldNames(Field[] fields) { @@ -158,4 +258,185 @@ private void validateFileCodes(List fileCodes, int count) { } } + + private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { + if (marriage != null) { + + if (marriage.getGroomAddressDetails() != null) { + if (marriage.getGroomAddressDetails() != null) { + + marriage.getGroomAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPermanent("G"); + } + + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { + if (marriage.getGroomAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + + marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrTalukId(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermanentAddrVillageId(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + + marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); + + marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); + marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + marriage.getGroomAddressDetails().setPoNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + } else { + marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + + marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); + + marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); + + marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + + marriage.getGroomAddressDetails().setPermntOthrTalukName(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + + marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + + } + + + } else { + if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + + marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + + + } + } + + } + + } + + } + + } + + + private void setBridePermanentAddress(MarriageApplicationDetails marriage) { + if (marriage != null) { + + if (marriage.getBrideAddressDetails() != null) { + if (marriage.getBrideAddressDetails() != null) { + + marriage.getBrideAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + marriage.getBrideAddressDetails().setBrideGroomPermanent("B"); + } + + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { + if (marriage.getBrideAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + + marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + + marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermanentAddrTalukId(marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermanentAddrVillageId(marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + + marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); + marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + } else { + marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + + marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + + marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + + marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + + marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); + + marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); + + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + + marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + + marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + + } + + + } else { + if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + + marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + + + marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + + + } + } + + } + + } + + } + + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java index a0cf7976f65..dfb52255022 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java @@ -1,12 +1,12 @@ package org.ksmart.marriage.marriagecorrection.repository; +import com.google.gson.Gson; import lombok.extern.slf4j.Slf4j; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; -//import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; +import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.springframework.stereotype.Repository; @@ -18,29 +18,24 @@ public class MarriageCorrectionRepository { private final MarriageProducer producer; private final MarriageApplicationConfiguration marriageApplicationConfiguration; - - private final MarriageDetailsEnrichment marriageDetailsEnrichment; private final MarriageMdmsUtil util; -// private final MarriageMDMSValidator mdmsValidator; + private final MarriageMDMSValidator mdmsValidator; - public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageMdmsUtil util) { + public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; - this.marriageDetailsEnrichment = marriageDetailsEnrichment; this.util = util; -// this.mdmsValidator = mdmsValidator; + this.mdmsValidator = mdmsValidator; } - public List saveCorrectionDetails(MarriageDetailsRequest request) { - - // Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); - //mdmsValidator.validateMarriageMDMSData(request,mdmsData); - marriageDetailsEnrichment.enrichCreate(request); + public List saveCorrectionDetails(MarriageCorrectionRequest request) { - producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); +// Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); +// //mdmsValidator.validateMarriageMDMSData(request,mdmsData); +// +// producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); - //producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); return request.getMarriageDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 6358b653877..3c494aeb1c8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -2,9 +2,11 @@ import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; +import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriagecorrection.enrichment.MarriageCorrectionEnrichment; import org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; @@ -13,6 +15,7 @@ import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -32,12 +35,21 @@ public class MarriageCorrectionService { private final MarriageApplicationService MarriageService; - public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, MarriageApplicationService marriageService) { + private final MarriageProducer producer; + private final MarriageApplicationConfiguration marriageApplicationConfiguration; + private final MarriageMdmsUtil util; + private final MarriageMDMSValidator mdmsValidator; + + public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, MarriageApplicationService marriageService, MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator) { this.correctionRepository = correctionRepository; this.registryRepository = registryRepository; this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; RegistryToApplicationMapper = registryToApplicationMapper; MarriageService = marriageService; + this.producer = producer; + this.marriageApplicationConfiguration = marriageApplicationConfiguration; + this.util = util; + this.mdmsValidator = mdmsValidator; } public List createCorrection(MarriageCorrectionRequest request) { @@ -49,12 +61,17 @@ public List createCorrection(MarriageCorrectionReques MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); marriageCorrectionEnrichment.enrichCreate(request, marriageApplicationDetail); - MarriageDetailsRequest marriageDetailsRequest = new MarriageDetailsRequest(); - marriageDetailsRequest.setRequestInfo(request.getRequestInfo()); List marriageApplicationDetailsList = new ArrayList<>(); marriageApplicationDetailsList.add(marriageApplicationDetail); - marriageDetailsRequest.setMarriageDetails(marriageApplicationDetailsList); - correctionRepository.saveCorrectionDetails(marriageDetailsRequest); + + request.setMarriageDetails(marriageApplicationDetailsList); + + //correctionRepository.saveCorrectionDetails(request); + + //Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + //mdmsValidator.validateMarriageMDMSData(request,mdmsData); + + producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); } return request.getMarriageCorrectionDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index 66a5487e489..1b40f818530 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -34,11 +34,6 @@ public MarriageCorrectionController(MarriageCorrectionService marriageCorrection @PostMapping("/_createmarriagecorrection") public ResponseEntity create(@Valid @RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { - System.out.println(new Gson().toJson(request)); - - String filename = "D:/some folder/001.docx"; - String extensionRemoved = filename.split("\\.")[filename.split("\\.").length-1]; - System.out.println("&&&&&&&&&&&&&&&"+extensionRemoved); List marriageCorrectionDetailsList = marriageCorrectionService.createCorrection(request); MarriageCorrectionResponse response = MarriageCorrectionResponse diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java index 269652bcfc7..80333a58e41 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java @@ -30,20 +30,15 @@ public class CorrectionDocument { private String id; @JsonProperty("correctionId") private String correctionId; - @Size(max=128) - @SafeHtml - @JsonProperty("correctionFieldName") + @JsonProperty("correctionFieldName") private String correctionFieldName = null; - @Size(max=128) - @SafeHtml @JsonProperty("documentType") private String documentType = null; - @Size(max=1024) - @SafeHtml + @JsonProperty("documentName") + private String documentName = null; @JsonProperty("fileStoreId") private String fileStoreId = null; - @Size(max=64) - @SafeHtml + @JsonProperty("active") private Boolean active = true; @JsonProperty("auditDetails") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionField.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionField.java index 9db1afec861..aa2a0a89803 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionField.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionField.java @@ -11,6 +11,10 @@ @NoArgsConstructor @Builder public class CorrectionField { + @JsonProperty("id") + private String id; + @JsonProperty("marriageId") + private String marriageId; @JsonProperty("correctionFieldName") private String correctionFieldName; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionFieldValue.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionFieldValue.java index f5e22288a9a..d20d79880fd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionFieldValue.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionFieldValue.java @@ -4,6 +4,8 @@ import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; +import java.util.List; + @Getter @Setter @AllArgsConstructor @@ -12,6 +14,16 @@ public class CorrectionFieldValue { @JsonProperty("id") private String id; + @JsonProperty("correctionId") + private String correctionId; + @JsonProperty("marriageId") + private String marriageId; + @JsonProperty("correctionFieldName") + private String correctionFieldName; + @JsonProperty("tableName") + private String tableName; + @JsonProperty("columnName") + private String columnName; @JsonProperty("column") private String field; @JsonProperty("newValue") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java index 0db6c3a1833..11cbdd47a09 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -21,6 +21,9 @@ public class MarriageCorrectionDetails { @JsonProperty("id") private String id; @Size(max = 64) + @JsonProperty("marriageId") + private String marriageId; + @Size(max = 64) @JsonProperty("tenantid") private String tenantid; @Size(max = 64) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionRequest.java index 1a08575722d..4e9d3631e65 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionRequest.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.egov.common.contract.request.RequestInfo; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; @@ -31,4 +32,11 @@ public MarriageCorrectionRequest addCrMarriageDtl(MarriageCorrectionDetails marr marriageCorrectionDetails.add(marriageCorrection); return this; } + + @JsonProperty("MarriageDetails") + private List marriageDetails; + @JsonProperty("CorrectionField") + private List correctionField; + @JsonProperty("CorrectionFieldValue") + private List correctionFieldValue; } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804225012__marriage_correction_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804225012__marriage_correction_new_dll.sql new file mode 100644 index 00000000000..73821e3aab2 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804225012__marriage_correction_new_dll.sql @@ -0,0 +1,102 @@ + +ALTER TABLE IF EXISTS public.eg_marriage_document + ADD COLUMN correction_id character varying(64); + +ALTER TABLE IF EXISTS public.eg_marriage_document + ADD COLUMN correction_field_name character varying(1024); + + + +ALTER TABLE IF EXISTS public.eg_marriage_document_audit + ADD COLUMN correction_id character varying(64); + +ALTER TABLE IF EXISTS public.eg_marriage_document_audit + ADD COLUMN correction_field_name character varying(1024); + + + + + + + CREATE TABLE public.eg_marriage_correction +( + id character varying(64) NOT NULL, + marriageid character varying(64) NOT NULL, + correction_field_name character varying(1024) NOT NULL, + condition_code character varying(1024), + specific_condition character varying(1024), + createdby character varying(64), + createdtime bigint, + lastmodifiedby character varying(64), + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_pkey PRIMARY KEY (id) +); + +ALTER TABLE IF EXISTS public.eg_marriage_correction + OWNER to postgres; + + + + CREATE TABLE public.eg_marriage_correction_audit +( + id character varying(64) NOT NULL, + marriageid character varying(64) NOT NULL, + correction_field_name character varying(1024) NOT NULL, + condition_code character varying(1024), + specific_condition character varying(1024), + createdby character varying(64), + createdtime bigint, + lastmodifiedby character varying(64), + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_audit_pkey PRIMARY KEY (id) +); + +ALTER TABLE IF EXISTS public.eg_marriage_correction_audit + OWNER to postgres; + + + + + CREATE TABLE public.eg_marriage_correction_child +( + id character varying(64) NOT NULL, + marriageid character varying(64) NOT NULL, + correctionid character varying(64) NOT NULL, + correction_field_name character varying(1024) NOT NULL, + table_name character varying(1024), + column_name character varying(1024) NOT NULL, + old_value character varying(2500) NOT NULL, + new_value character varying(2500) NOT NULL, + column_ character varying(1024), + createdby character varying(64), + createdtime bigint, + lastmodifiedby character varying(64), + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_child_pkey PRIMARY KEY (id) +); + +ALTER TABLE IF EXISTS public.eg_marriage_correction_child + OWNER to postgres; + + + + CREATE TABLE public.eg_marriage_correction_child_audit +( + id character varying(64) NOT NULL, + marriageid character varying(64) NOT NULL, + correctionid character varying(64) NOT NULL, + correction_field_name character varying(1024) NOT NULL, + table_name character varying(1024), + column_name character varying(1024) NOT NULL, + old_value character varying(2500) NOT NULL, + new_value character varying(2500) NOT NULL, + column_ character varying(1024), + createdby character varying(64), + createdtime bigint, + lastmodifiedby character varying(64), + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_child_audit_pkey PRIMARY KEY (id) +); + +ALTER TABLE IF EXISTS public.eg_marriage_correction_child_audit + OWNER to postgres; From e023d598d6c4f7df7b43dc26513a41b837103f55 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 9 Apr 2023 14:53:26 +0530 Subject: [PATCH 129/420] mdms validation for address --- .../main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 341a533ea70..5328a53420b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -60,7 +60,7 @@ private MdmsCriteriaReq getMDMSRequest(RequestInfo requestInfo, String tenantId) moduleDetails.add(tenantIdRequest); moduleDetails.add(tenantIds); moduleDetails.add(commomMasterRequest); - moduleDetails.addAll(BNDListRequest); + moduleDetails.addAll(BNDListRequest); MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) .build(); From d1428668dfaf6d5b1e835b2986e9c3187f8521c5 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Sun, 9 Apr 2023 15:15:34 +0530 Subject: [PATCH 130/420] Field validation --- .../MarriageApplicationValidator.java | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index ce6aff3097d..236ff54e36a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1033,18 +1033,18 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPresentInsideKeralaPostOffice() + " is invalid"); } - // if (StringUtils.isEmpty(groomaddressInfo - // .getPresentInsideKeralaPincode())) { - // System.out.println("pincode is - // "+groomaddressInfo - // .getPresentInsideKeralaPincode()); - // throw new CustomException( - // "GROOM PRESENT ADDRESS INSIDE KERALA: PINCODE - // INVALID ", - // "The Pincode " + - // groomaddressInfo.getPresentInsideKeralaPincode() - // + " is invalid"); - // } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentInsideKeralaPincode())) { + + + + throw new CustomException( + "GROOM PRESENT ADDRESS INSIDE KERALA: PINCODE INVALID ", + + "The Pincode " + + groomaddressInfo.getPresentInsideKeralaPincode() + + " is invalid"); + } // if (StringUtils.isEmpty(groomaddressInfo // .getPresentInsideKeralaLocalityNameEn())) { @@ -1613,15 +1613,15 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPresentInsideKeralaPostOffice() + " is invalid"); } - // if (StringUtils.isEmpty(brideaddressInfo - // .getPresentInsideKeralaPincode())) { - // throw new CustomException( - // "BRIDE PRESENT ADDRESS INSIDE KERALA: PINCODE - // INVALID ", - // "The Pincode " + - // brideaddressInfo.getPresentInsideKeralaPincode() - // + " is invalid"); - // } + if (StringUtils.isEmpty(brideaddressInfo + .getPresentInsideKeralaPincode())) { + throw new CustomException( + "BRIDE PRESENT ADDRESS INSIDE KERALA: PINCODE INVALID ", + + "The Pincode " + + brideaddressInfo.getPresentInsideKeralaPincode() + + " is invalid"); + } // if (StringUtils.isEmpty(brideaddressInfo // .getPresentInsideKeralaLocalityNameEn())) { // throw new CustomException( From c0ef6c7fe58c90c18a2a30921d5eda007d1eb282 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 9 Apr 2023 16:20:59 +0530 Subject: [PATCH 131/420] correction-migration updated --- .../MarriageApplicationRepository.java | 33 +++----------- ...0409161000__correction_tables_new_dll.sql} | 44 ++++++++++--------- 2 files changed, 29 insertions(+), 48 deletions(-) rename municipal-services/marriage-services/src/main/resources/db/migration/main/{V20230804225012__marriage_correction_new_dll.sql => V20230409161000__correction_tables_new_dll.sql} (66%) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 98c2d67939a..cce552ecf98 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -37,17 +37,18 @@ @Repository public class MarriageApplicationRepository { private final MarriageProducer producer; - // private final MarriageApplicationConfiguration marriageApplicationConfiguration; - // private final MarriageDetailsEnrichment marriageDetailsEnrichment; private final MarriageApplicationQueryBuilder marriageQueryBuilder; private final MarriageApplicationRowMapper marriageApplicationRowMapper; - // private final MarriageRegistryRowMapper marriageRegistryRowMapper; - private final JdbcTemplate jdbcTemplate; + private final MarriageDocumentRowMapper documentRowMapper; + + // private final MarriageRegistryRowMapper marriageRegistryRowMapper; + // private final MarriageApplicationConfiguration marriageApplicationConfiguration; + // private final MarriageDetailsEnrichment marriageDetailsEnrichment; // private final WorkflowIntegrator workflowIntegrator; // private final MarriageMdmsUtil util; // private final MarriageMDMSValidator mdmsValidator; - private final MarriageDocumentRowMapper documentRowMapper; + @Autowired EncryptionDecryptionUtil encryptionDecryptionUtil; @@ -55,24 +56,13 @@ public class MarriageApplicationRepository { @Autowired public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, JdbcTemplate jdbcTemplate, - // MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, - // MarriageRegistryRowMapper marriageRegistryRowMapper, - // WorkflowIntegrator workflowIntegrator, - // MarriageMdmsUtil util, - // MarriageMDMSValidator mdmsValidator, MarriageDocumentRowMapper documentRowMapper) { this.producer = producer; - // this.marriageApplicationConfiguration = marriageApplicationConfiguration; - // this.marriageDetailsEnrichment = marriageDetailsEnrichment; this.jdbcTemplate = jdbcTemplate; this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; - // this.marriageRegistryRowMapper = marriageRegistryRowMapper; - // this.workflowIntegrator = workflowIntegrator; - // this.util = util; - // this.mdmsValidator = mdmsValidator; this.documentRowMapper = documentRowMapper; } //Jasmine 31.03.2023 @@ -109,17 +99,6 @@ else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); - // DeathInformantDtls deathInformant =deathDtl.getDeathInformantDtls() ; - // if (deathInformant!=null){ - // DeathInformantDtls deathInformantEnc = encryptionDecryptionUtil.decryptObject(deathInformant, "BndDetail", DeathInformantDtls.class,requestInfo); - // deathInformant.setInformantAadharNo(deathInformantEnc.getInformantAadharNo()); - // } - // DeathInitiatorDtls deathInitiator =deathDtl.getDeathInitiatorDtls() ; - // if (deathInitiator!= null){ - - // DeathInitiatorDtls deathInitiatorEnc = encryptionDecryptionUtil.decryptObject(deathInitiator, "BndDetail", DeathInitiatorDtls.class,requestInfo); - // deathInitiator.setInitiatorAadhaar(deathInitiatorEnc.getInitiatorAadhaar()); - // } }); } return result; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804225012__marriage_correction_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230409161000__correction_tables_new_dll.sql similarity index 66% rename from municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804225012__marriage_correction_new_dll.sql rename to municipal-services/marriage-services/src/main/resources/db/migration/main/V20230409161000__correction_tables_new_dll.sql index 73821e3aab2..53b9b7cb9c0 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804225012__marriage_correction_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230409161000__correction_tables_new_dll.sql @@ -1,25 +1,27 @@ -ALTER TABLE IF EXISTS public.eg_marriage_document - ADD COLUMN correction_id character varying(64); ALTER TABLE IF EXISTS public.eg_marriage_document - ADD COLUMN correction_field_name character varying(1024); + ADD COLUMN IF NOT EXISTS correction_id character varying(64); +ALTER TABLE IF EXISTS public.eg_marriage_document + ADD COLUMN IF NOT EXISTS correction_field_name character varying(1024); ALTER TABLE IF EXISTS public.eg_marriage_document_audit - ADD COLUMN correction_id character varying(64); + ADD COLUMN IF NOT EXISTS correction_id character varying(64); ALTER TABLE IF EXISTS public.eg_marriage_document_audit - ADD COLUMN correction_field_name character varying(1024); - - + ADD COLUMN IF NOT EXISTS correction_field_name character varying(1024); +ALTER TABLE IF EXISTS public.eg_marriage_document + ADD COLUMN IF NOT EXISTS applicationtype character varying(64); +ALTER TABLE IF EXISTS public.eg_marriage_document_audit + ADD COLUMN IF NOT EXISTS applicationtype character varying(64); - CREATE TABLE public.eg_marriage_correction -( +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction + ( id character varying(64) NOT NULL, marriageid character varying(64) NOT NULL, correction_field_name character varying(1024) NOT NULL, @@ -30,14 +32,14 @@ ALTER TABLE IF EXISTS public.eg_marriage_document_audit lastmodifiedby character varying(64), lastmodifiedtime bigint, CONSTRAINT eg_marriage_correction_pkey PRIMARY KEY (id) -); + ); -ALTER TABLE IF EXISTS public.eg_marriage_correction - OWNER to postgres; + -- ALTER TABLE IF EXISTS public.eg_marriage_correction + -- OWNER to postgres; - CREATE TABLE public.eg_marriage_correction_audit +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_audit ( id character varying(64) NOT NULL, marriageid character varying(64) NOT NULL, @@ -51,13 +53,13 @@ ALTER TABLE IF EXISTS public.eg_marriage_correction CONSTRAINT eg_marriage_correction_audit_pkey PRIMARY KEY (id) ); -ALTER TABLE IF EXISTS public.eg_marriage_correction_audit - OWNER to postgres; + -- ALTER TABLE IF EXISTS public.eg_marriage_correction_audit + -- OWNER to postgres; - CREATE TABLE public.eg_marriage_correction_child +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_child ( id character varying(64) NOT NULL, marriageid character varying(64) NOT NULL, @@ -75,12 +77,12 @@ ALTER TABLE IF EXISTS public.eg_marriage_correction_audit CONSTRAINT eg_marriage_correction_child_pkey PRIMARY KEY (id) ); -ALTER TABLE IF EXISTS public.eg_marriage_correction_child - OWNER to postgres; + -- ALTER TABLE IF EXISTS public.eg_marriage_correction_child + -- OWNER to postgres; - CREATE TABLE public.eg_marriage_correction_child_audit +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_child_audit ( id character varying(64) NOT NULL, marriageid character varying(64) NOT NULL, @@ -98,5 +100,5 @@ ALTER TABLE IF EXISTS public.eg_marriage_correction_child CONSTRAINT eg_marriage_correction_child_audit_pkey PRIMARY KEY (id) ); -ALTER TABLE IF EXISTS public.eg_marriage_correction_child_audit - OWNER to postgres; +-- ALTER TABLE IF EXISTS public.eg_marriage_correction_child_audit +-- OWNER to postgres; From 7781450298afe051951cb1a9bb203cd926d0be02 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 10 Apr 2023 11:21:18 +0530 Subject: [PATCH 132/420] enrichment change --- .../src/main/resources/application.properties | 10 +++++--- .../src/main/resources/application.properties | 4 +-- .../enrichment/MarriageDetailsEnrichment.java | 25 +++++++++++-------- .../MarriageRegistryEnrichment.java | 11 +++++--- 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/core-services/egov-enc-service/src/main/resources/application.properties b/core-services/egov-enc-service/src/main/resources/application.properties index 77541f22377..fe257acf6ef 100644 --- a/core-services/egov-enc-service/src/main/resources/application.properties +++ b/core-services/egov-enc-service/src/main/resources/application.properties @@ -5,11 +5,11 @@ app.timezone=UTC ##----------------------------- SPRING DS CONFIGURATIONS ------------------------------# spring.datasource.driver-class-name=org.postgresql.Driver -spring.datasource.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# -spring.flyway.url=jdbc:postgresql://localhost:5432/cr_marriage +spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres spring.flyway.password=123 spring.flyway.table=flyway @@ -47,10 +47,12 @@ master.initialvector=qweasdzxqwea type.to.method.map = {"Normal":"SYM","Imp":"ASY"} #----------------eGov MDMS----------------------# -egov.mdms.host=https://dev.digit.org +#egov.mdms.host=https://dev.digit.org +#egov.mdms.search.endpoint=/egov-mdms-service/v1/_search +egov.mdms.host=https://ksmart-dev.lsgkerala.gov.in/ egov.mdms.search.endpoint=/egov-mdms-service/v1/_search #----------State Level Tenant Id (for MDMS request)-----------# -egov.state.level.tenant.id=pb +egov.state.level.tenant.id=kl #---------Master Password provider ; Currently supported - software, awskms--------# master.password.provider=software diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 88dd3d5f24e..14a19680288 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 #Set context root server.port = 9082 @@ -12,7 +12,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 6bd1b0b4d98..a4327e3ef85 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -32,6 +32,9 @@ import java.util.UUID; import javax.swing.text.Document; + +import static org.ksmart.marriage.utils.MarriageConstants.COUNTRY_CODE; + @Component public class MarriageDetailsEnrichment implements BaseEnrichment { @@ -191,7 +194,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { if (marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); - if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(COUNTRY_CODE)) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); if (marriage.getGroomAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); @@ -200,7 +203,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { } if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getGroomAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPresentaddressCountry().contains(COUNTRY_CODE)) { if (marriage.getGroomAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); @@ -287,7 +290,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { } if(marriage.getGroomAddressDetails().getPermtaddressCountry()!=null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ - if (marriage.getGroomAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPermtaddressCountry().contains(COUNTRY_CODE)) { if (marriage.getGroomAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); @@ -339,8 +342,8 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { } else { - if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); @@ -384,7 +387,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); - if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(COUNTRY_CODE)) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); if (marriage.getBrideAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); @@ -394,7 +397,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getBrideAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPresentaddressCountry().contains(COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); @@ -443,7 +446,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } } else { - if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentOutSideCountry()); marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); @@ -490,7 +493,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { } if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ - if (marriage.getBrideAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPermtaddressCountry().contains(COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); @@ -541,8 +544,8 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { } else { - if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index d039a05fdab..5583322fdd9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -21,6 +21,9 @@ import java.util.UUID; import lombok.extern.slf4j.Slf4j; + +import static org.ksmart.marriage.utils.MarriageConstants.COUNTRY_CODE; + /** * Created by Jasmine * on 24.03.2023 @@ -272,8 +275,8 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { } else { - if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); @@ -470,8 +473,8 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { } } else { - if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); From 5d38807b5ab8ac6f34c31a57c5d7f5a2a6bb2497 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Mon, 10 Apr 2023 11:34:51 +0530 Subject: [PATCH 133/420] Field validation --- .../MarriageApplicationValidator.java | 88 ++++++++----------- 1 file changed, 36 insertions(+), 52 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 236ff54e36a..5d868eaf6a0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -813,15 +813,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPermntOutsideKeralaVillage() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrLBName())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS OUTSIDE KERALA: LOCALBODY NAME INVALID ", - "The Localbody Name " - + - groomaddressInfo.getPermntInKeralaAdrLBName() - + " is invalid"); - } + if (StringUtils.isEmpty(groomaddressInfo .getPermntOutsideKeralaCityVilgeEn())) { throw new CustomException( @@ -944,14 +936,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPermntOutsideIndiaLineoneEn() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntOutsideIndiaLinetwoEn())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS OUSIDE INDIA: ADDRESS LINE Two ENGLISH INVALID ", - "The Adress Line Two English " + - groomaddressInfo.getPermntOutsideIndiaLinetwoEn() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntOutsideIndiaLinetwoEn())) { + // throw new CustomException( + // "GROOM PERMANENT ADDRESS OUSIDE INDIA: ADDRESS LINE Two ENGLISH INVALID ", + // "The Adress Line Two English " + + // groomaddressInfo.getPermntOutsideIndiaLinetwoEn() + // + " is invalid"); + // } if (StringUtils.isEmpty(groomaddressInfo .getPermntOutsideIndiaLineoneMl())) { throw new CustomException( @@ -960,14 +952,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPermntOutsideIndiaLineoneMl() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntOutsideIndiaLinetwoMl())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS OUSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", - "The Adress Line Two Malayalam " + - groomaddressInfo.getPermntOutsideIndiaLinetwoMl() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntOutsideIndiaLinetwoMl())) { + // throw new CustomException( + // "GROOM PERMANENT ADDRESS OUSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", + // "The Adress Line Two Malayalam " + + // groomaddressInfo.getPermntOutsideIndiaLinetwoMl() + // + " is invalid"); + // } } // groom permanent address end @@ -976,7 +968,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { .equals(MarriageConstants.ADDRESS_INDIA)) { if (StringUtils.isEmpty(groomaddressInfo .getPresentaddressStateName())) { - throw new CustomException(" STATE INVALID ", + throw new CustomException("GROOM PRESENT ADDRESS INSIDE INDIA: STATE INVALID ", "The State " + groomaddressInfo.getPresentaddressStateName() + " is invalid"); @@ -1134,23 +1126,23 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPresentOutsideKeralaPincode() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentOutsideKeralaLocalityNameEn())) { - throw new CustomException( - "GROOM PRESENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", - "The Postofficef " + - groomaddressInfo.getPresentOutsideKeralaLocalityNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentOutsideKeralaLocalityNameMl())) { - throw new CustomException( - "GROOM PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - "The Locality Malayalam " - + - groomaddressInfo.getPresentOutsideKeralaLocalityNameMl() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentOutsideKeralaLocalityNameEn())) { + // throw new CustomException( + // "GROOM PRESENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", + // "The Postofficef " + + // groomaddressInfo.getPresentOutsideKeralaLocalityNameEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentOutsideKeralaLocalityNameMl())) { + // throw new CustomException( + // "GROOM PRESENT ADDRESS OUTSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // groomaddressInfo.getPresentOutsideKeralaLocalityNameMl() + // + " is invalid"); + // } // if (StringUtils.isEmpty(groomaddressInfo // .getPresentOutsideKeralaLocalityNameEn())) { // throw new CustomException( @@ -1392,15 +1384,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPermntOutsideKeralaVillage() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPermntInKeralaAdrLBName())) { - throw new CustomException( - "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: LOCALBODY NAME INVALID ", - "The Localbody Name " - + - brideaddressInfo.getPermntInKeralaAdrLBName() - + " is invalid"); - } + if (StringUtils.isEmpty(brideaddressInfo .getPermntOutsideKeralaCityVilgeEn())) { throw new CustomException( From 4190f8ce879bb2800fbd3a208e83028dd54ff941 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 10 Apr 2023 14:13:41 +0530 Subject: [PATCH 134/420] model change --- .../enrichment/MarriageDetailsEnrichment.java | 28 +++++++++---------- .../web/model/MarriageApplicationDetails.java | 25 ----------------- .../web/model/marriage/WitnessDetails.java | 23 ++++++++------- .../MarriageRegistryEnrichment.java | 28 +++++++++---------- 4 files changed, 41 insertions(+), 63 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index a4327e3ef85..128fe17a858 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -194,17 +194,17 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { if (marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); - if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(COUNTRY_CODE)) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - if (marriage.getGroomAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); } } } if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getGroomAddressDetails().getPresentaddressCountry().contains(COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getGroomAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); @@ -290,8 +290,8 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { } if(marriage.getGroomAddressDetails().getPermtaddressCountry()!=null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ - if (marriage.getGroomAddressDetails().getPermtaddressCountry().contains(COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getGroomAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setPermanentAddrTalukId(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); @@ -387,9 +387,9 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); - if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(COUNTRY_CODE)) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - if (marriage.getBrideAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getBrideAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); } @@ -397,8 +397,8 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getBrideAddressDetails().getPresentaddressCountry().contains(COUNTRY_CODE)) { - if (marriage.getBrideAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getBrideAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); @@ -493,8 +493,8 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { } if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ - if (marriage.getBrideAddressDetails().getPermtaddressCountry().contains(COUNTRY_CODE)) { - if (marriage.getBrideAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getBrideAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); @@ -544,7 +544,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { } else { - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { +// if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); @@ -562,7 +562,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - } +// } } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index a7c750e1fad..3f0b7388ea9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -182,31 +182,6 @@ public class MarriageApplicationDetails { private String assignuser; - // @Size(max = 200) - // @JsonProperty("brideurl") - // private String brideurl; - - // @Size(max = 200) - // @JsonProperty("groomurl") - // private String groomurl; - - // @Size(max = 64) - // @JsonProperty("imageuuid") - // private String imageuuid; - - // @Size(max = 256) - // @JsonProperty("brideFilestoreid") - // private String brideFilestoreid; - - // @Size(max = 256) - // @JsonProperty("groomFilestoreid") - // private String groomFilestoreid; - - // @JsonProperty("brideExpired") - // private String brideExpired; - - // @JsonProperty("groomExpired") - // private String groomExpired; @Size(max = 128) // @Html diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java index 074b26535be..0e008926002 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java @@ -98,24 +98,24 @@ public class WitnessDetails { //Jasmine 06.04.2023 @Size(max = 200) - @JsonProperty("brideurl") - private String brideurl; + @JsonProperty("brideUrl") + private String brideUrl; @Size(max = 200) - @JsonProperty("groomurl") - private String groomurl; + @JsonProperty("groomUrl") + private String groomUrl; @Size(max = 64) - @JsonProperty("imageuuid") - private String imageuuid; + @JsonProperty("imageUuid") + private String imageUuid; @Size(max = 256) - @JsonProperty("brideFilestoreid") - private String brideFilestoreid; + @JsonProperty("brideFilestoreId") + private String brideFilestoreId; @Size(max = 256) - @JsonProperty("groomFilestoreid") - private String groomFilestoreid; + @JsonProperty("groomFilestoreId") + private String groomFilestoreId; @JsonProperty("brideExpired") private boolean brideExpired; @@ -123,6 +123,9 @@ public class WitnessDetails { @JsonProperty("groomExpired") private boolean groomExpired; + @JsonProperty("isBackward") + private boolean isBackward; + @JsonProperty("auditDetails") private AuditDetails witnessAuditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 5583322fdd9..d58de63df0d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -125,17 +125,17 @@ private void setGroomPresentAddress(MarriageRegistryRequest request) { if(marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); - if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - if (marriage.getGroomAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); } } } if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getGroomAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getGroomAddressDetails().getPresentaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { if(!marriage.getGroomAddressDetails().getIsPermanentAddress()){ marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); @@ -226,8 +226,8 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { } if(marriage.getGroomAddressDetails().getPermtaddressCountry()!=null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ - if (marriage.getGroomAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); @@ -317,17 +317,17 @@ private void setBridePresentAddress(MarriageRegistryRequest request) { if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); - if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - if (marriage.getBrideAddressDetails().getStateIdPresent().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getBrideAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); } } } if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getBrideAddressDetails().getPresentaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getBrideAddressDetails().getPresentaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getBrideAddressDetails().getPresentaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { if(!marriage.getBrideAddressDetails().getIsPermanentAddress()){ marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); @@ -426,8 +426,8 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { } if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ - if (marriage.getBrideAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getBrideAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); @@ -473,7 +473,7 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { } } else { - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { +// if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); @@ -486,7 +486,7 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - } +// } } } } From 983c5e4418982f5e2397fa545d6a49a88217f626 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 10 Apr 2023 14:31:18 +0530 Subject: [PATCH 135/420] document upload --- .../enrichment/BaseEnrichment.java | 2 + .../enrichment/MarriageDetailsEnrichment.java | 41 +++++-------------- .../service/MarriageApplicationService.java | 1 + .../web/model/marriage/MarriageDocument.java | 6 +++ .../MarriageRegistryEnrichment.java | 8 ++-- 5 files changed, 23 insertions(+), 35 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/BaseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/BaseEnrichment.java index d35b4a3095c..f2952d1c7ae 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/BaseEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/BaseEnrichment.java @@ -16,6 +16,8 @@ default AuditDetails buildAuditDetails(String by, Boolean create) { .build(); } else { auditDetails = AuditDetails.builder() + .createdBy(by) + .createdTime(currentTime) .lastModifiedBy(by) .lastModifiedTime(currentTime) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 6bd1b0b4d98..dcebc7424ed 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -120,16 +120,17 @@ else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ String documentType = document.getDocumentType(); String documentOwner = document.getDocumentOwner(); String applicationNumber = marriage.getApplicationNumber(); + String applicationType = marriage.getApplicationtype(); document.setId(UUID.randomUUID().toString()); document.setMarriageTenantid(marriage.getTenantid()); document.setMarriageId(marriage.getId()); document.setApplicationNumber(applicationNumber); + document.setApplicationType(applicationType); document.setMarriageDocAuditDetails(auditDetails); }); } }); - } public void enrichUpdate(MarriageDetailsRequest request) { @@ -140,15 +141,17 @@ public void enrichUpdate(MarriageDetailsRequest request) { forEach(marriage -> { marriage.setAuditDetails(auditDetails); String applicationNumber = marriage.getApplicationNumber(); + String applicationType = marriage.getApplicationtype(); + // String registrationNumber = marriage.getRegistrationNo(); //Jasmine 07.04.2023 List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ marriagedocument.forEach(document -> { String documentType = document.getDocumentType(); - String documentOwner = document.getDocumentOwner(); + String documentOwner = document.getDocumentOwner(); document.setActiveFalse(true); List searchResult = repository.getDocumentDetails(documentType,documentOwner,applicationNumber); - document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); + // document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); if(searchResult!=null){ searchResult.forEach(existingDocument -> { if(document.getFileStoreId().equals(existingDocument.getFileStoreId())){ @@ -164,19 +167,17 @@ public void enrichUpdate(MarriageDetailsRequest request) { document.setMarriageTenantid(marriage.getTenantid()); document.setMarriageId(marriage.getId()); document.setApplicationNumber(applicationNumber); + document.setApplicationType(applicationType); document.setMarriageDocAuditDetails(auditDetails); - }); - + // document.setRegistrationNumber(registrationNumber); + }); } - setBridePermanentAddress(request); setBridePresentAddress(request); setGroomPermanentAddress(request); setGroomPresentAddress(request); - }); - + }); } - private void setGroomPresentAddress(MarriageDetailsRequest request) { request.getMarriageDetails() .forEach(marriage ->{ @@ -264,15 +265,11 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); - } } } - }); - } - private void setGroomPermanentAddress(MarriageDetailsRequest request) { request.getMarriageDetails() .forEach(marriage-> { @@ -335,8 +332,6 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); } - - } else { if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { @@ -356,18 +351,11 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - - - } } - } - } - }); - } private void setBridePresentAddress(MarriageDetailsRequest request) { @@ -459,21 +447,12 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); - - } } } - - } - - }); - - - } private void setBridePermanentAddress(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 40eb349f650..66932fb9756 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -56,6 +56,7 @@ public List saveMarriageDetails(MarriageDetailsReque mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + // System.out.println("CheckWorkFlow"+request.getMarriageDetails().get(0).isWorkflow()); if (request.getMarriageDetails().get(0).isWorkflow()){ workflowIntegrator.callWorkFlow(request); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java index a4d4f838dcf..baaef508417 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java @@ -48,6 +48,12 @@ public class MarriageDocument { @JsonProperty("applicationNumber") private String applicationNumber ; + @JsonProperty("registrationNumber") + private String registrationNumber ; + + @JsonProperty("applicationType") + private String applicationType ; + @JsonProperty("updatedFlag") private Integer updatedFlag ; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index d039a05fdab..7e686d2793f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -60,18 +60,18 @@ public void enrichCreate(MarriageRegistryRequest request) { } if(marriage.getBrideDetails()!=null){ marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); - // marriage.getBrideDetails().setBrideGroom("B"); + marriage.getBrideDetails().setBrideGroom("B"); } if(marriage.getGroomDetails()!=null){ marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); - // marriage.getGroomDetails().setBrideGroom("G"); + marriage.getGroomDetails().setBrideGroom("G"); } if(marriage.getWitnessDetails()!=null){ marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); - // marriage.getWitnessDetails().setSerial_no1(1); - // marriage.getWitnessDetails().setSerial_no2(2); + marriage.getWitnessDetails().setSerial_no1(1); + marriage.getWitnessDetails().setSerial_no2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } }); From 157daf4bd29af9eee5c1e7ddc9ebed986b347f32 Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 10 Apr 2023 15:02:53 +0530 Subject: [PATCH 136/420] marriage certificate changes in marriage module and persister service --- .../src/main/resources/marriage-registry.yml | 63 ++++- .../MarriageApplicationConfiguration.java | 30 +++ .../MarriageRegistryController.java | 28 ++ .../MarriageCertificateEnrichment.java | 67 +++++ .../MarriageRegistryEnrichment.java | 2 + .../model/MarriageRegistryDetails.java | 2 + .../certmodel/MarriageCertPDFRequest.java | 22 ++ .../certmodel/MarriageCertPdfResponse.java | 12 + .../model/certmodel/MarriageCertRequest.java | 19 ++ .../model/certmodel/MarriageCertResponse.java | 29 ++ .../model/certmodel/MarriageCertificate.java | 248 ++++++++++++++++++ .../MarriageRegistryRepository.java | 89 ++++++- .../MarriageRegistryQueryBuilder.java | 105 +++++++- .../MarriageCertificateRowMapper.java | 34 +++ .../service/MarriageRegistryService.java | 93 ++++++- .../src/main/resources/application.properties | 17 +- ...81200__marriage_registry_new_field_dll.sql | 2 + 17 files changed, 847 insertions(+), 15 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertPDFRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertPdfResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertificate.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230404181200__marriage_registry_new_field_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 12239774fe1..212c72ec297 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, housenameno_en, housenameno_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationnumber, registrationno, registration_date, registration_status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); + lastmodifiedtime, lastmodifiedby,certificateno) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -82,6 +82,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.certificateNo + - query: INSERT INTO public.eg_register_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, @@ -624,6 +626,63 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + - version: 1.0 + description: Persists save marriage certificate details in marriage certificate table + fromTopic: save-marriagecertificate-topic + isTransaction: true + queryMaps: + - query: INSERT INTO public.eg_marriage_certificate + (id, registrationno, registrydetailsid, filestoreid, status,embeddedurl, dateofissue, tenantid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); + basePath: marriageCertificate + jsonMaps: + - jsonPath: $.marriageCertificate.id + + - jsonPath: $.marriageCertificate.registrationno + + - jsonPath: $.marriageCertificate.marriageRegistryDetails.id + + - jsonPath: $.marriageCertificate.filestoreid + + - jsonPath: $.marriageCertificate.certificateStatus + + - jsonPath: $.marriageCertificate.embeddedUrl + + - jsonPath: $.marriageCertificate.dateOfIssue + + - jsonPath: $.marriageCertificate.marriageRegistryDetails.marriageTenantid + + - jsonPath: $.marriageCertificate.AuditDetails.createdTime + + - jsonPath: $.marriageCertificate.AuditDetails.createdBy + + - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedTime + + - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedBy + + - version: 1.0 + description: Persists update marriage certificate details in marriage certificate table + fromTopic: update-marriagecertificate-topic + isTransaction: true + queryMaps: + - query: UPDATE public.eg_marriage_certificate + set filestoreid=? , embeddedurl=?, dateofissue=?, lastmodifiedtime=?, lastmodifiedby=? where id=? and registrydetailsid=?; + basePath: marriageCertificate + jsonMaps: + - jsonPath: $.marriageCertificate.filestoreid + + - jsonPath: $.marriageCertificate.embeddedUrl + + - jsonPath: $.marriageCertificate.dateOfIssue + + - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedTime + + - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedBy + + - jsonPath: $.marriageCertificate.id + + - jsonPath: $.marriageCertificate.marriageRegistryId + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java index d810dc16242..b132cbee8eb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/config/MarriageApplicationConfiguration.java @@ -80,5 +80,35 @@ public class MarriageApplicationConfiguration { @Value("${egov.state.level.tenant.id}") private String egovStateLevelTenant; + @Value("${egov.ui.app.host}") + private String uiAppHost; + + @Value("${egov.bnd.marriagecert.link}") + private String marriageCertLink; + + @Value("${egov.url.shortner.host}") + private String urlShortnerHost; + + @Value("${egov.url.shortner.endpoint}") + private String urlShortnerEndpoint; + + @Value("${egov.pdf.marriagecert.createEndPoint}") + private String egovPdfMarriageEndPoint; + + @Value("${egov.pdf.marriagecert.postendpoint}") + private String saveMarriageCertEndpoint; + + @Value("${egov.pdfservice.host}") + private String egovPdfHost; + + @Value("${persister.save.marriagecertificate.topic}") + private String saveMarriageCertificateTopic; + + @Value("${persister.update.marriagecertificate.topic}") + private String updateMarriageCertificateTopic; + + @Value("${egov.idgen.marriageapplncertno.name}") + private String marriageCertNumberIdName; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java index 66794a41c20..bf99bac2b27 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/controller/MarriageRegistryController.java @@ -3,10 +3,13 @@ // import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryResponse; import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.model.certmodel.MarriageCertResponse; +import org.ksmart.marriage.marriageregistry.model.certmodel.MarriageCertificate; import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; @@ -58,5 +61,30 @@ public ResponseEntity search(@RequestBody MarriageReg return ResponseEntity.ok(response); } + @PostMapping("_certificate") + public ResponseEntity certificateDownload(@RequestBody MarriageRegistryRequest request, + @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria) { + List marriageCertResponseList = marriageService.searchCertificate(criteria); + MarriageCertResponse response; +// if(null!=marriageCertResponseList&&!marriageCertResponseList.isEmpty()){ +// response = MarriageCertResponse +// .builder() +// .filestoreId(marriageCertResponseList.get(0).getFilestoreid()) +// .tenantId(marriageCertResponseList.get(0).getMarriageRegistryDetails().getTenantid()) +// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) +// .build(); +// return ResponseEntity.ok(response); +// }else{ + MarriageCertificate marriageCertificate = marriageService.download(criteria,request.getRequestInfo()); + + response = MarriageCertResponse + .builder() + .filestoreId(marriageCertificate.getFilestoreid()) + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) + .build(); +// } + return ResponseEntity.ok(response); + } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java new file mode 100644 index 00000000000..874b0fbb406 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java @@ -0,0 +1,67 @@ +package org.ksmart.marriage.marriageregistry.enrichment; + +import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.request.User; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.common.repository.IdGenRepository; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageregistry.model.certmodel.MarriageCertPDFRequest; +import org.ksmart.marriage.marriageregistry.model.certmodel.MarriageCertRequest; +import org.ksmart.marriage.marriageregistry.model.certmodel.MarriageCertificate; +import org.ksmart.marriage.utils.IDGenerator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.List; +import java.util.ListIterator; +import java.util.UUID; + +@Component +@Slf4j +public class MarriageCertificateEnrichment implements BaseEnrichment { + @Autowired + MarriageApplicationConfiguration config; + @Autowired + IdGenRepository idGenRepository; + @Autowired + IDGenerator idGenerator; + + public void enrichCreate(MarriageCertRequest request) { + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + request.getMarriageCertificate().setId(UUID.randomUUID().toString()); + request.getMarriageCertificate().setAuditDetails(auditDetails); + + } + + public void enrichUpdate(MarriageCertRequest request) { + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + request.getMarriageCertificate().setAuditDetails(auditDetails); + + } + + public void createCertificateNo(MarriageCertRequest marriageCertRequest){ + RequestInfo requestInfo = marriageCertRequest.getRequestInfo(); + Long currentTime = Long.valueOf(System.currentTimeMillis()); + String tenantId = marriageCertRequest.getMarriageCertificate().getMarriageRegistryDetails().getTenantid(); + + List ackNoDetails = idGenRepository.getIdList(requestInfo, + tenantId, + config.getMarriageCertNumberIdName(), + marriageCertRequest.getMarriageCertificate().getModulecode(), + "CERT",1); + ListIterator itr = ackNoDetails.listIterator(); + marriageCertRequest.getMarriageCertificate().setMarriagecertificateno(itr.next()); + marriageCertRequest.getMarriageCertificate().setDateofissue(currentTime); + + } + + + + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 531690ffaf0..00bed4610f6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -510,4 +510,6 @@ private void validateFileCodes(List fileCodes, int count) { } } + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java index f6887289f61..f83c6b0922f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/MarriageRegistryDetails.java @@ -200,6 +200,8 @@ public class MarriageRegistryDetails { @JsonProperty("AuditDetails") private AuditDetails auditDetails; + @JsonProperty("certificateNo") + private String certificateNo; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertPDFRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertPDFRequest.java new file mode 100644 index 00000000000..9c91d5a48bd --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertPDFRequest.java @@ -0,0 +1,22 @@ +package org.ksmart.marriage.marriageregistry.model.certmodel; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.request.RequestInfo; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +@Validated +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageCertPDFRequest { + @JsonProperty("RequestInfo") + private RequestInfo requestInfo = null; + + @JsonProperty("MarriageCertificate") + private List marriageCertificate; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertPdfResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertPdfResponse.java new file mode 100644 index 00000000000..69de0051ec1 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertPdfResponse.java @@ -0,0 +1,12 @@ +package org.ksmart.marriage.marriageregistry.model.certmodel; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Getter +@Setter +public class MarriageCertPdfResponse { + List filestoreIds; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertRequest.java new file mode 100644 index 00000000000..e8fc844611a --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertRequest.java @@ -0,0 +1,19 @@ +package org.ksmart.marriage.marriageregistry.model.certmodel; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.request.RequestInfo; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ToString +public class MarriageCertRequest { + @JsonProperty("RequestInfo") + private RequestInfo requestInfo = null; + + @JsonProperty("marriageCertificate") + private MarriageCertificate marriageCertificate = null; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertResponse.java new file mode 100644 index 00000000000..f71acc18b8e --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertResponse.java @@ -0,0 +1,29 @@ +package org.ksmart.marriage.marriageregistry.model.certmodel; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.response.ResponseInfo; + +import java.util.List; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageCertResponse { + @JsonProperty("responseInfo") + private ResponseInfo responseInfo = null; + + @JsonProperty("marriageCertificate") + private List marriageCertificates = null; + + @JsonProperty("filestoreId") + private String filestoreId; + +// @JsonProperty("consumerCode") +// private String consumerCode; + + @JsonProperty("marriageTenantid") + private String tenantId; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertificate.java new file mode 100644 index 00000000000..241bd94cee6 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/model/certmodel/MarriageCertificate.java @@ -0,0 +1,248 @@ +package org.ksmart.marriage.marriageregistry.model.certmodel; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.*; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.marriageregistry.model.*; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class MarriageCertificate { + @NotNull + @Size(max = 64) + @JsonProperty("id") + private String id; + + @JsonProperty("marriageRegistryId") + private String marriageRegId; + + @JsonProperty("marriageRegistryDetails") + private MarriageRegistryDetails marriageRegistryDetails; + + @JsonProperty("marriagecertificateno") + private String marriagecertificateno; + + @Size(max = 2500) + @JsonProperty("embeddedUrl") + private String embeddedUrl; + +// @JsonProperty("marriageDOM") +// private Long dateofmarriage; +// +// @JsonProperty("marriageDOR") +// private Long dateofreporting; +// +// @Size(max = 64) +// @JsonProperty("certId") +// private String certId; +// @Size(max = 64) +// @JsonProperty("marriageDistrictid") +// private String districtid; +// +// @Size(max = 64) +// @JsonProperty("marriageLBtype") +// private String lbtype; +// +// + @Size(max = 64) + @JsonProperty("marriageTenantid") + private String tenantid; +// +// @Size(max = 64) +// @JsonProperty("marriagePlacetype") +// private String placetype; +// +// @Size(max = 1000) +// @JsonProperty("marriagePlacenameEn") +// private String placenameEn; +// @Size(max = 1000) +// @JsonProperty("marriagePlacenameMl") +// private String placenameMl; +// +// @Size(max = 64) +// @JsonProperty("marriageWardCode") +// private String ward_code; +// +// +// @Size(max = 1000) +// @JsonProperty("marriageStreetEn") +// private String street_name_en; +// +// @Size(max = 1000) +// @JsonProperty("marriageStreetMl") +// private String street_name_ml; +// +// @Size(max = 64) +// @JsonProperty("marriageTalukID") +// private String talukid; +// +// @Size(max = 64) +// @JsonProperty("marriageVillageName") +// private String village_name; +// +// @Size(max = 1000) +// @JsonProperty("marriageLandmark") +// private String landmark; +// +// @Size(max = 1000) +// @JsonProperty("marriageLocalityEn") +// private String locality_en; +// +// @Size(max = 1000) +// @JsonProperty("marriageLocalityMl") +// private String locality_ml; +// +// @Size(max = 64) +// @JsonProperty("marriageType") +// private String marriage_type; +// +// @Size(max = 64) +// @JsonProperty("marriagePlaceothers") +// private String placeothers; +// +// @Size(max = 200) +// @JsonProperty("othMarriageType") +// private String oth_marriage_type; +// +// @Size(max = 1000) +// @JsonProperty("marriageOthersSpecify") +// private String othersspecify; +// +// @NotNull +// @Size(max = 64) +// @JsonProperty("applicationType") +// private String applicationtype; +// +// @NotNull +// @Size(max = 64) +// @JsonProperty("businessService") +// private String businessservice; +// +// @NotNull +// @Size(max = 64) +// @JsonProperty("workflowCode") +// private String workflowcode; +// +//// @Size(max = 64) +//// @JsonProperty("fileNo") +//// private String fileno; +// +// + @Size(max = 64) + @JsonProperty("registrationno") + private String registrationno; +// +// @JsonProperty("registration_date") +// private Long registrationDate; +// + + @Size(max = 64) + @JsonProperty("action") + private String action; + + @Size(max = 64) + @JsonProperty("status") + private String status; + + @Size(max = 1000) + @JsonProperty("placeid") + private String placeid; + +// @Size(max = 2500) +// @JsonProperty("marriageHouseNoAndNameEn") +// private String marriageHouseNoAndNameEn; +// +// @Size(max = 2500) +// @JsonProperty("marriageHouseNoAndNameMl") +// private String marriageHouseNoAndNameMl; +// +// @Size(max = 64) +// @JsonProperty("applicationNumber") +// private String applicationNumber; +// +// @JsonProperty("BrideDetails") +// private BrideRegistryDetails brideDetails; +// +// @JsonProperty("GroomDetails") +// private GroomRegistryDetails groomDetails; +// +// @JsonProperty("WitnessDetails") +// private WitnessRegistryDetails witnessDetails; +// +// @JsonProperty("BrideAddressDetails") +// private BrideRegistryAddressDetails brideAddressDetails; +// +// @JsonProperty("GroomAddressDetails") +// private GroomRegistryAddressDetails groomAddressDetails; + + @JsonProperty("AuditDetails") + private AuditDetails auditDetails; + + @JsonProperty("filestoreid") + private String filestoreid = null; + + + @JsonProperty("ackNo") + private String ackNo; + + @JsonProperty("source") + private String source = null; + @JsonProperty("applicationId") + private String applicationId=null; +// @JsonProperty("year") + private String year; + @JsonProperty("dateOfIssue") + private Long dateofissue; + + @JsonProperty("certificateStatus") + private StatusEnum certificateStatus = null; + public enum StatusEnum { + ACTIVE("ACTIVE"), + + CANCELLED("CANCELLED"), + + FREE_DOWNLOAD("FREE_DOWNLOAD"), + + PAID_DOWNLOAD("PAID_DOWNLOAD"), + + PAID_PDF_GENERATED("PAID_PDF_GENERATED"), + + PAID("PAID"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + } + + @JsonProperty("modulecode") + private String modulecode; + + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 3d8efbcf7d1..2b56aa2318e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -1,18 +1,27 @@ package org.ksmart.marriage.marriageregistry.repository; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageregistry.enrichment.MarriageCertificateEnrichment; import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.model.certmodel.*; import org.ksmart.marriage.marriageregistry.repository.querybuilder.MarriageRegistryQueryBuilder; +import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageCertificateRowMapper; import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import lombok.extern.slf4j.Slf4j; +import org.springframework.web.client.RestTemplate; + import java.util.ArrayList; +import java.util.HashMap; import java.util.List; @Slf4j @@ -25,21 +34,27 @@ public class MarriageRegistryRepository { private final MarriageRegistryEnrichment marriageRegistryEnrichment; private final MarriageRegistryQueryBuilder queryBuilder; private final MarriageRegistryRowMapper marriageRegistryRowMapper; + private final MarriageCertificateRowMapper marriageCertificateRowMapper; private final JdbcTemplate jdbcTemplate; + private final RestTemplate restTemplate; + private final MarriageCertificateEnrichment marriageCertificateEnrichment; @Autowired - public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnrichment, MarriageProducer producer, - MarriageApplicationConfiguration marriageApplicationConfiguration, - JdbcTemplate jdbcTemplate, - MarriageRegistryEnrichment marriageDetailsEnrichment, - MarriageRegistryQueryBuilder queryBuilder, - MarriageRegistryRowMapper marriageRegistryRowMapper) { + public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnrichment, MarriageProducer producer, + MarriageApplicationConfiguration marriageApplicationConfiguration, + JdbcTemplate jdbcTemplate, + MarriageRegistryEnrichment marriageDetailsEnrichment, + MarriageRegistryQueryBuilder queryBuilder, + MarriageRegistryRowMapper marriageRegistryRowMapper, MarriageCertificateRowMapper marriageCertificateRowMapper, RestTemplate restTemplate, MarriageCertificateEnrichment marriageCertificateEnrichment) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageRegistryEnrichment = marriageRegistryEnrichment; this.jdbcTemplate = jdbcTemplate; this.queryBuilder = queryBuilder; this.marriageRegistryRowMapper = marriageRegistryRowMapper; + this.marriageCertificateRowMapper = marriageCertificateRowMapper; + this.restTemplate=restTemplate; + this.marriageCertificateEnrichment = marriageCertificateEnrichment; } @@ -62,6 +77,68 @@ public List searchMarriageRegistry(MarriageRegistrySear return result; } + public List searchCertificateByMarriageId(String id) { + List preparedStmtVals = new ArrayList<>(); + String qry = queryBuilder.getMarriageCertificateSearchQuery(id,preparedStmtVals,Boolean.FALSE); + List results = jdbcTemplate.query(qry, preparedStmtVals.toArray(), marriageCertificateRowMapper); + return results; + + } + + public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marriageCertPDFRequest) { + MarriageCertPdfResponse pdfResponse = new MarriageCertPdfResponse(); + try { +// marriagecertpdfrequest.getmarriagecertificate().foreach(cert->{ +// string uihost = marriageapplicationconfiguration.getuiapphost(); +// string marriagecertpath = stringutils.replaceeach(marriageapplicationconfiguration.getmarriagecertlink(),new string[]{"$id","$tenantid","$regno","$marriagecertificateno"}, new string[]{cert.getid(),cert.gettenantid(),cert.getregistrationno(),cert.getmarriagecertificateno()}); +// cert.setembeddedurl(getshortenedurl(uihost+marriagecertpath)); +// +// +// +// }); + MarriageCertPDFRequest req = MarriageCertPDFRequest.builder().marriageCertificate(marriageCertPDFRequest.getMarriageCertificate()).requestInfo(marriageCertPDFRequest.getRequestInfo()).build(); + //TODO pdf data creation + marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { + String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); + String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; + String marriageCertPath = StringUtils.replace(marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(),"$tenantId", tenantId); + String pdfFinalPath = uiHost + marriageCertPath; + MarriageCertPdfResponse response = restTemplate.postForObject(pdfFinalPath, req, MarriageCertPdfResponse.class);//Creating PDF + + if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { + throw new CustomException("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE", + "No file store id found from pdf service"); + } + pdfResponse.setFilestoreIds(response.getFilestoreIds()); + }); + + }catch (Exception e){ + e.printStackTrace(); + throw new CustomException("PDF_ERROR","Error in generating PDF"); + } + return pdfResponse; + } + public String getShortenedUrl(String url) { + HashMap body=new HashMap<>(); + body.put("url", url); + String res=restTemplate.postForObject(marriageApplicationConfiguration.getUrlShortnerHost() + marriageApplicationConfiguration.getUrlShortnerEndpoint(), body, String.class); + if (org.springframework.util.StringUtils.isEmpty(res)) { + log.error("URL_SHORTENING_ERROR", "Unable to shorten url: " + url); + return url; + } else return res; + } + + public void saveMarriageCertificate(MarriageCertRequest marriageCertRequest) { + marriageCertificateEnrichment.enrichCreate(marriageCertRequest); + producer.push(marriageApplicationConfiguration.getSaveMarriageCertificateTopic(), marriageCertRequest); + } + + public void updateMarriageCertificate(MarriageCertRequest marriageCertRequest) { + marriageCertificateEnrichment.enrichUpdate(marriageCertRequest); + producer.push(marriageApplicationConfiguration.getUpdateMarriageCertificateTopic(), marriageCertRequest); + } + + // public List updateMarriageRegistry(MarriageRegistryRequest request) { // marriageRegistryEnrichment.enrichUpdate(request); // producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryTopic(), request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index ab7230aa430..f1ef3d26234 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -15,6 +15,10 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { // @Autowired // CommonQueryBuilder commonQueryBuilder; + private static final String CERTIFICATE_QUERY = new StringBuilder() + .append(" SELECT MC.id as MC_ID, MC.registrationno as MC_registrationno, MC.registrydetailsid as MC_registrydetailsid, MC.filestoreid as MC_filestoreid, MC.status as MC_status, MC.additionaldetail as MC_additionaldetail, MC.embeddedurl as MC_embeddedurl, MC.dateofissue as MC_dateofissue, MC.tenantid as MC_tenantid, " ) + .append(" MC.createdtime as MC_createdtime, MC.lastmodifiedtime as MC_lastmodifiedtime, MC.createdby as MC_createdby, MC.lastmodifiedby as MC_lastmodifiedby FROM public.eg_marriage_certificate MC").toString(); + //Jasmine 26.03.2023 private static final String QUERY = new StringBuilder() .append(" SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") @@ -111,6 +115,100 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .toString(); + private static final String CERTIFICATE_DATA_QUERY_ = new StringBuilder() + .append(" SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") + .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") + .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.housenameno_en as MD_housenameno_en , MD.housenameno_ml as MD_housenameno_ml ,") + .append("MD.locality_en as MD_locality_en , MD.locality_ml as MD_locality_ml , MD.street_name_en as MD_street_name_en , MD.street_name_ml as MD_street_name_ml , ") + .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") + .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") + .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") + .append("MD.applicationnumber as MD_applicationnumber ,") + + .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") + .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") + .append("GD.firstname_ml as GD_firstname_ml , GD.middlename_ml as GD_middlename_ml , GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,") + .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") + .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") + .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") + .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + + .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") + .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") + .append("BD.middlename_ml as BD_middlename_ml , BD.lastname_ml as BD_lastname_ml , BD.mobile as BD_mobile , BD.emailid as BD_emailid , ") + .append("BD.gender as BD_gender , BD.dateofbirth as BD_dateofbirth , BD.age as BD_age , BD.parent_guardian as BD_parent_guardian ,BD.fathername_en as BD_fathername_en ,") + .append("BD.mothername_en as BD_mothername_en, BD.fathername_ml as BD_fathername_ml , BD.mothername_ml as BD_mothername_ml , BD.father_aadharno as BD_father_aadharno ,") + .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") + .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.bride_groom as BD_bride_groom,") + + .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") + .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") + .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") + .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") + .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") + .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") + .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + + .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") + .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") + .append("GPMA.locality_en as GPMA_locality_en,GPMA.locality_ml as GPMA_locality_ml,GPMA.street_name_en as GPMA_street_name_en,GPMA.street_name_ml as GPMA_street_name_ml ,") + .append("GPMA.districtid as GPMA_districtid,GPMA.stateid as GPMA_stateid , GPMA.poid as GPMA_poid , GPMA.poname_en as GPMA_poname_en , GPMA.poname_ml as GPMA_poname_ml ,") + .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") + .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") + .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") + .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode,") + + .append("BPMA.id as BPMA_id ,BPMA.housename_en as BPMA_housename_en ,BPMA.housename_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") + .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") + .append("BPMA.locality_en as BPMA_locality_en , BPMA.locality_ml as BPMA_locality_ml , BPMA.street_name_en as BPMA_street_name_en , BPMA.street_name_ml as BPMA_street_name_ml,") + .append("BPMA.districtid as BPMA_districtid , BPMA.stateid BPMA_stateid , BPMA.poid as BPMA_poid , BPMA.poname_en as BPMA_poname_en , BPMA.poname_ml as BPMA_poname_ml ,") + .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , ") + .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") + .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") + .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml , BPMA.ot_zipcode as BPMA_ot_zipcode,") + + .append("GPSA.id as GPSA_id ,GPSA.housename_en as GPSA_housename_en,GPSA.housename_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") + .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") + .append("GPSA.locality_en as GPSA_locality_en,GPSA.locality_ml as GPSA_locality_ml , GPSA.street_name_en as GPSA_street_name_en , GPSA.street_name_ml as GPSA_street_name_ml , ") + .append("GPSA.districtid as GPSA_districtid , GPSA.stateid GPSA_stateid , GPSA.poid as GPSA_poid , GPSA.poname_en as GPSA_poname_en , GPSA.poname_ml as GPSA_poname_ml , ") + .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom , ") + .append("GPSA.ot_address1_en as GPSA_ot_address1_en,GPSA.ot_address1_ml as GPSA_ot_address1_ml , GPSA.ot_address2_en as GPSA_ot_address2_en , ") + .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") + .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml, GPSA.ot_zipcode as GPSA_ot_zipcode,") + + .append("BPSA.id as BPSA_id ,BPSA.housename_en as BPSA_housename_en,BPSA.housename_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") + .append("BPSA.talukid as BPSA_talukid , BPSA.taluk_name as BPSA_taluk_name , BPSA.tenantid as BPSA_tenantid , BPSA.ward_code as BPSA_ward_code ,") + .append("BPSA.locality_en as BPSA_locality_en , BPSA.locality_ml as BPSA_locality_ml ,") + .append("BPSA.street_name_en as BPSA_street_name_en , BPSA.street_name_ml as BPSA_street_name_ml , BPSA.districtid as BPSA_districtid , BPSA.stateid BPSA_stateid ,") + .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") + .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") + .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") + .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode , ") + + .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") + .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") + .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") + .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") + + .append("FROM public.eg_register_marriage_details as MD ") + .append("INNER JOIN eg_register_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") + .append("BD.bride_groom ='B' ") + .append("INNER JOIN eg_register_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") + .append("GD.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("BPMA.bride_groom ='B' ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("GPMA.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("BPSA.bride_groom ='B' ") + .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("GPSA.bride_groom ='G' ") + .append("INNER JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("WD1.serial_no = 1 ") + .append("INNER JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("WD2.serial_no = 2 ") + .toString(); + public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCriteria criteria, @NotNull List preparedStmtValues, Boolean isCount) { @@ -120,7 +218,7 @@ public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCrit addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD.applicationnumber", criteria.getApplicationNumber(), query, preparedStmtValues); addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); - // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); + // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValue addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); //addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); @@ -159,4 +257,9 @@ public String getNextIDQuery() { return query.toString(); } + public String getMarriageCertificateSearchQuery(String id, List preparedStmtVals, Boolean aFalse) { + StringBuilder query = new StringBuilder(CERTIFICATE_QUERY); + addFilter("MC.registrydetailsid", id, query, preparedStmtVals); + return query.toString(); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java new file mode 100644 index 00000000000..35b711507d5 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java @@ -0,0 +1,34 @@ +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.model.certmodel.MarriageCertificate; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ResultSetExtractor; +import org.springframework.stereotype.Component; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +@Component +public class MarriageCertificateRowMapper implements ResultSetExtractor>,BaseRowMapper { + + + @Override + public List extractData(ResultSet rs) throws SQLException, DataAccessException { + List result =new ArrayList<>(); + while (rs.next()){ + result.add(MarriageCertificate.builder() + .id(rs.getString("MC_id")) + .registrationno(rs.getString("MC_registrationno")) + .marriageRegId(rs.getString("MC_registrydetailsid")) + .filestoreid(rs.getString("MC_filestoreid")) + .marriageRegistryDetails(MarriageRegistryDetails.builder().id(rs.getString("MC_registrydetailsid")).tenantid(rs.getString("MC_tenantid")).build()) +// .ackNo(rs.getString("ack_no")) + .build()); + } + return result; + + + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 11094883b5a..0edb38123c0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -1,12 +1,21 @@ package org.ksmart.marriage.marriageregistry.service; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.marriageregistry.model.certmodel.*; import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; import org.springframework.stereotype.Service; -import java.util.List; + +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.util.*; + /** * Created by Jasmine * on 24.03.2023 @@ -16,10 +25,11 @@ public class MarriageRegistryService { private final MarriageRegistryRepository repository; - public MarriageRegistryService(MarriageRegistryRepository repository) { + public MarriageRegistryService(MarriageRegistryRepository repository, MarriageApplicationConfiguration marriageApplicationConfiguration) { this.repository = repository; + this.marriageApplicationConfiguration = marriageApplicationConfiguration; } - + private final MarriageApplicationConfiguration marriageApplicationConfiguration; public List createRegistry(MarriageRegistryRequest request) { return repository.createMarriageRegistry(request); @@ -36,4 +46,81 @@ public List searchRegistry(MarriageRegistrySearchCriter } + public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { + List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria); + if (marriageRegistryDetailsList != null && !marriageRegistryDetailsList.isEmpty()) { +// List marriageCertificateList = repository.searchCertificateByMarriageId(marriageRegistryDetailsList.get(0).getId()); + try { + + MarriageCertificate marriageCertificate = new MarriageCertificate(); + + MarriageCertRequest marriageCertRequest = MarriageCertRequest.builder().marriageCertificate(marriageCertificate).requestInfo(requestInfo).build(); + marriageCertificate.setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); + marriageCertificate.setRegistrationno(marriageRegistryDetailsList.get(0).getRegistrationno()); + List marriageDtls = searchCertificate(criteria); + if (null!=marriageDtls&&marriageDtls.size() > 1) { + throw new CustomException("Invalid_Input", "Error in processing data"); + } + +// if(marriageDtls.size() > 0) { //TODO check if certificate already available , will the date of issue changes? + marriageCertificate.setMarriageRegId(marriageRegistryDetailsList.get(0).getId()); +// marriageCertificate.setApplicationId(marriageDtls.get(0).getApplicationId()); +// marriageCertificate.setApplicationNumber(marriageDtls.get(0).getAckNo()); +// marriageCertificate.setDateofreporting(marriageRegistryDetailsList.get(0).getDateofreporting()); +// marriageCertificate.setTenantid(marriageRegistryDetailsList.get(0).getTenantid()); + SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy"); + String date = df.format(marriageRegistryDetailsList.get(0).getRegistrationDate()); + String datestr = date.split("-")[2]; + marriageCertificate.setYear(datestr); +//TODO re-check the fields setting +// marriageDtls.get(0).setCertId(marriageCertRequest.getMarriageCertificate().getMarriagecertificateno()); +// if(null!=marriageDtls&&marriageDtls.size()==1){ +// marriageDtls.get(0).setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); +// } +// else if (marriageDtls==null||marriageDtls.size()==0) { +// marriageDtls.add(marriageCertificate); +// } + MarriageCertPDFRequest marriageCertPDFRequest = MarriageCertPDFRequest.builder().requestInfo(requestInfo).marriageCertificate(Arrays.asList(marriageCertificate)).build(); + marriageCertPDFRequest.getMarriageCertificate().forEach(cert->{ + String uiHost = marriageApplicationConfiguration.getUiAppHost(); + String marriageCertPath = StringUtils.replaceEach(marriageApplicationConfiguration.getMarriageCertLink(),new String[]{"$id","$tenantId","$regNo","$marriagecertificateno"}, new String[]{cert.getId(),cert.getMarriageRegistryDetails().getTenantid(),cert.getMarriageRegistryDetails().getRegistrationno(),cert.getMarriagecertificateno()}); + cert.setEmbeddedUrl(repository.getShortenedUrl(uiHost+marriageCertPath)); + }); + Calendar cal = Calendar.getInstance(); + marriageCertificate.setDateofissue(cal.getTimeInMillis()); + marriageCertificate.setEmbeddedUrl(marriageCertPDFRequest.getMarriageCertificate().get(0).getEmbeddedUrl()); + MarriageCertPdfResponse pdfResp = repository.saveMarriageCertPdf(marriageCertPDFRequest); +// marriageCertificate.setDateofissue(marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getRegistrationDate()); + marriageCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); + marriageCertificate.setCertificateStatus(MarriageCertificate.StatusEnum.FREE_DOWNLOAD); + +// } + marriageCertificate.setMarriagecertificateno(marriageRegistryDetailsList.get(0).getCertificateNo()); + List marriageCertSearch = repository.searchCertificateByMarriageId(marriageCertRequest.getMarriageCertificate().getId()); + if (null != marriageCertSearch && !marriageCertSearch.isEmpty()) { + marriageCertRequest.getMarriageCertificate().setId(marriageCertSearch.get(0).getId()); + repository.updateMarriageCertificate(marriageCertRequest); + } else { + //marriageCertificate.setId(UUID.randomUUID().toString()); + repository.saveMarriageCertificate(marriageCertRequest); + } + + + return marriageCertificate; + } catch (Exception e) { + e.printStackTrace(); + throw new CustomException("DOWNLOAD_ERROR", "Error in Downloading Certificate"); + } + }else if (marriageRegistryDetailsList == null && marriageRegistryDetailsList.isEmpty()){ + throw new CustomException("DOWNLOAD_ERROR", "Marriage registry not found"); + }else{ + throw new CustomException("DOWNLOAD_ERROR", "More than one marriage registry found"); + } + + } + + public List searchCertificate(MarriageRegistrySearchCriteria criteria) { + List obj = repository.searchMarriageRegistry(criteria); + return repository.searchCertificateByMarriageId(obj.get(0).getId()); + } } diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index b31a483b262..6e85c7002b8 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -90,6 +90,7 @@ egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition #birth and death idFormat config egov.idgen.marriageapplnum.name=birth_cert.receipt.id egov.idgen.birthapplnum.format=BR-CB-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] +egov.idgen.marriageapplncertno.name=mr.marriagecertno # Ksmart marriage Application No #egov.idgen.marriagehapp.name=mr.applicationno @@ -119,19 +120,29 @@ egov.bill.gen.endpoint=/billing-service/bill/v2/_fetchbill #download path config egov.pdf.host=https://ksmart-dev.lsgkerala.gov.in/ +egov.pdf.marriagecert.postendpoint=/egov-pdf/download/MARRIAGE/marriage-certificate?tenantId=$tenantId egov.pdf.birthcert.postendpoint=/egov-pdf/download/BIRTHDEATH/birth-certificate?tenantId=$tenantId egov.pdf.deathcert.postendpoint=/egov-pdf/download/BIRTHDEATH/death-certificate?tenantId=$tenantId #pdf service path config -egov.pdfservice.host=https://ksmart-dev.lsgkerala.gov.in/ +egov.pdfservice.host=http://localhost:8080/ + #https://ksmart-dev.lsgkerala.gov.in/ +egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certificate&tenantId=$tenantId egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #view certificate path config egov.ui.app.host=https://ksmart-dev.lsgkerala.gov.in/ +egov.bnd.marriagecert.link=/citizen/withoutAuth/bnd/viewcertificate?id=$id&tenantId=$tenantId&module=marriage®No=$regNo&marriagecertificateno=$marriagecertificateno egov.bnd.birthcert.link=/citizen/withoutAuth/bnd/viewcertificate?id=$id&tenantId=$tenantId&module=birth®No=$regNo&dateofbirth=$dateofbirth&gender=$gender&birthcertificateno=$birthcertificateno egov.bnd.deathcert.link=/citizen/withoutAuth/bnd/viewcertificate?id=$id&tenantId=$tenantId&module=death®No=$regNo&dateofdeath=$dateofdeath&gender=$gender&deathcertificateno=$deathcertificateno +#kafka topics for marriage certificate +persister.save.marriagecertificate.topic=save-marriagecertificate-topic + +#kafka topics for marriage certificate update +persister.update.marriagecertificate.topic=update-marriagecertificate-topic + #egov-url-shortening service config egov.url.shortner.host=https://ksmart-dev.lsgkerala.gov.in/ egov.url.shortner.endpoint=/egov-url-shortening/shortener diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230404181200__marriage_registry_new_field_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230404181200__marriage_registry_new_field_dll.sql new file mode 100644 index 00000000000..01ded08275e --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230404181200__marriage_registry_new_field_dll.sql @@ -0,0 +1,2 @@ +ALTER TABLE public.eg_register_marriage_details ADD certificateno varchar(64) NULL; +ALTER TABLE public.eg_register_marriage_details_audit ADD certificateno varchar(64) NULL; \ No newline at end of file From b796468ff359a2fba88ed3ff60877e1ada1fbaf7 Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 10 Apr 2023 15:04:59 +0530 Subject: [PATCH 137/420] adding changes in persister properties --- .../egov-persister/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index bed2f6aa9d3..90177416dcb 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-registry.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter From 33627dfdc7b6e6fde59cc6806f3022774cea7326 Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 10 Apr 2023 15:50:14 +0530 Subject: [PATCH 138/420] changes in certificate files --- core-services/egov-persister/.attach_pid40801 | 0 .../marriage-services/.attach_pid38972 | 0 .../marriage-services/.attach_pid40307 | 0 .../MarriageCertificateEnrichment.java | 2 +- .../repository/MarriageRegistryRepository.java | 5 ++++- .../MarriageCertificateRowMapper.java | 2 ++ .../service/MarriageRegistryService.java | 18 ++++++++++++------ .../controller/MarriageRegistryController.java | 6 ++++-- 8 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 core-services/egov-persister/.attach_pid40801 create mode 100644 municipal-services/marriage-services/.attach_pid38972 create mode 100644 municipal-services/marriage-services/.attach_pid40307 diff --git a/core-services/egov-persister/.attach_pid40801 b/core-services/egov-persister/.attach_pid40801 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/municipal-services/marriage-services/.attach_pid38972 b/municipal-services/marriage-services/.attach_pid38972 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/municipal-services/marriage-services/.attach_pid40307 b/municipal-services/marriage-services/.attach_pid40307 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java index c0d9dd11476..3aa9433cd2e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java @@ -5,7 +5,7 @@ import org.egov.common.contract.request.User; import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; -import org.ksmart.marriage.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertRequest; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 77c024b6a6b..3ebaf44cfbd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -9,11 +9,14 @@ import org.ksmart.marriage.marriageregistry.enrichment.MarriageCertificateEnrichment; import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; -import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.repository.querybuilder.MarriageRegistryQueryBuilder; import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageCertificateRowMapper; import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPdfResponse; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertRequest; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java index 447351341a0..76a053a046a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java @@ -1,6 +1,8 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.stereotype.Component; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index e9bbaf38e60..12f82d1a5d5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -2,19 +2,25 @@ import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPdfResponse; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertRequest; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; import org.springframework.stereotype.Service; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; -import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; -import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; -import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; -import org.ksmart.marriage.marriageregistry.repository.querybuilder.MarriageRegistryQueryBuilder; -import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; + +import java.text.SimpleDateFormat; +import java.util.Arrays; +import java.util.Calendar; import java.util.List; /** * Created by Jasmine @@ -37,7 +43,7 @@ public MarriageRegistryService(MarriageRegistryRepository repository,MarriageReg this.marriageRegistryEnrichment = marriageRegistryEnrichment; this.repository = repository; } - private final MarriageApplicationConfiguration marriageApplicationConfiguration; +// private final MarriageApplicationConfiguration marriageApplicationConfiguration; public List createRegistry(MarriageRegistryRequest request) { marriageRegistryEnrichment.enrichCreate(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index 45eac603930..edaf561f189 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -9,14 +9,16 @@ import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryResponse; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertResponse; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; -import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertResponse.java; import lombok.extern.slf4j.Slf4j; +import javax.validation.Valid; import java.util.List; @Slf4j @@ -60,7 +62,7 @@ public ResponseEntity search(@RequestBody MarriageReg } @PostMapping("_certificate") - public ResponseEntity certificateDownload(@RequestBody MarriageRegistryRequest request, + public ResponseEntity certificateDownload(@RequestBody MarriageRegistryRequest request, @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria) { List marriageCertResponseList = marriageService.searchCertificate(criteria); MarriageCertResponse response; From cee30856eee82b033ec876f9381caabdb57698e7 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 10 Apr 2023 15:56:08 +0530 Subject: [PATCH 139/420] model change --- .../src/main/resources/marriage-registry.yml | 22 ++++++++++++-- .../web/model/WitnessRegistryDetails.java | 29 ++++++++++++++++++- 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index d55d6d38270..e051a585615 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, housenameno_en, housenameno_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationnumber, registrationno, registration_date, registration_status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); + lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -82,6 +82,24 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.moduleCode + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideUrl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomUrl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.imageUuid + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideFilestoreId + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomFilestoreId + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideExpired + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomExpired + + - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + - query: UPDATE eg_marriage_details SET registrationno = ? ,registration_date = ? WHERE applicationnumber = ? AND tenantid = ? diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java index c35afeff1de..17c36bf90bc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java @@ -100,7 +100,34 @@ public class WitnessRegistryDetails { @JsonProperty("witness2Esigned") private Boolean witness2Esigned; - + @Size(max = 200) + @JsonProperty("brideUrl") + private String brideUrl; + + @Size(max = 200) + @JsonProperty("groomUrl") + private String groomUrl; + + @Size(max = 64) + @JsonProperty("imageUuid") + private String imageUuid; + + @Size(max = 256) + @JsonProperty("brideFilestoreId") + private String brideFilestoreId; + + @Size(max = 256) + @JsonProperty("groomFilestoreId") + private String groomFilestoreId; + + @JsonProperty("brideExpired") + private boolean brideExpired; + + @JsonProperty("groomExpired") + private boolean groomExpired; + + @JsonProperty("isBackward") + private boolean isBackward; @JsonProperty("AuditDetails") private AuditDetails WitnessAuditDetails; From 7aeb7b9fc7e42a3612fe69e6f8249002b1ca0090 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 10 Apr 2023 15:58:51 +0530 Subject: [PATCH 140/420] new feild added to yml --- .../src/main/resources/marriage.yml | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 653bdc3c962..7bb19aec1ab 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationNo, registration_date, action, status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby,module_code) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); + lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,? ,?, ?, ?, ? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -84,6 +84,22 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.moduleCode + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideUrl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomUrl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.imageUuid + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideFilestoreId + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomFilestoreId + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideExpired + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomExpired + + - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + - query: INSERT INTO public.eg_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, @@ -229,7 +245,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.groomIsSpouseLiving - - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom @@ -695,7 +710,8 @@ serviceMaps: SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, - registrationNo=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? , module_code=? + registrationNo=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? , module_code=?,brideurl=?, groomurl=?, + imageuuid=?, bride_filestoreid=?, groom_filestoreid=?, bride_expired=?, groom_expired=?, is_backward=? WHERE id=? and applicationnumber=? and tenantid=?; basePath: MarriageDetails.* jsonMaps: @@ -760,6 +776,22 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.moduleCode + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideUrl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomUrl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.imageUuid + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideFilestoreId + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomFilestoreId + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideExpired + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomExpired + + - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.applicationNumber From 6f938f9914344a6a51eb7d173c116e208191a410 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 10 Apr 2023 16:21:29 +0530 Subject: [PATCH 141/420] new feild added to yml --- .../enrichment/MarriageDetailsEnrichment.java | 14 +++++++------- .../enrichment/MarriageRegistryEnrichment.java | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 3a01b4542e8..feed381f937 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -253,7 +253,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { } } } else { - if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { +// if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); @@ -268,7 +268,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); - } +// } } } }); @@ -337,7 +337,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { } } else { - if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { +// if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); @@ -354,7 +354,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - } +// } } } } @@ -434,8 +434,8 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } } else { - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentOutSideCountry()); +// if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); @@ -450,7 +450,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); - } +// } } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index a037279dc27..cf9ebb58758 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -187,8 +187,8 @@ private void setGroomPresentAddress(MarriageRegistryRequest request) { } else { - if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); +// if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); @@ -205,7 +205,7 @@ private void setGroomPresentAddress(MarriageRegistryRequest request) { - } +// } } } } @@ -275,7 +275,7 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { } else { - if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { +// if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); @@ -292,7 +292,7 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { - } +// } } } @@ -379,8 +379,8 @@ private void setBridePresentAddress(MarriageRegistryRequest request) { } else { - if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentOutSideCountry()); +// if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); @@ -397,7 +397,7 @@ private void setBridePresentAddress(MarriageRegistryRequest request) { - } +// } } } From eea41474cae5c1181bbe5d15abd5e0015cd47854 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Mon, 10 Apr 2023 16:23:43 +0530 Subject: [PATCH 142/420] Field validation --- .../MarriageApplicationValidator.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 5d868eaf6a0..367a2fc8554 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1222,14 +1222,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPresentOutSideIndiaAdressEn() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentOutSideIndiaAdressEnB())) { - throw new CustomException( - " GROOM PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO ENGLISH INVALID ", - "The Adress Line Two English " + - groomaddressInfo.getPresentOutSideIndiaAdressEnB() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentOutSideIndiaAdressEnB())) { + // throw new CustomException( + // " GROOM PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO ENGLISH INVALID ", + // "The Adress Line Two English " + + // groomaddressInfo.getPresentOutSideIndiaAdressEnB() + // + " is invalid"); + // } if (StringUtils.isEmpty(groomaddressInfo .getPresentOutSideIndiaAdressMl())) { throw new CustomException( @@ -1238,14 +1238,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPresentOutSideIndiaAdressMl() + " is invalid"); } - if (StringUtils.isEmpty(groomaddressInfo - .getPresentOutSideIndiaAdressMlB())) { - throw new CustomException( - " GROOM PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", - "The Adress Line Two Malayalam " + - groomaddressInfo.getPresentOutSideIndiaAdressMlB() - + " is invalid"); - } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPresentOutSideIndiaAdressMlB())) { + // throw new CustomException( + // " GROOM PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", + // "The Adress Line Two Malayalam " + + // groomaddressInfo.getPresentOutSideIndiaAdressMlB() + // + " is invalid"); + // } } // groom present address end From 10825953f8b2d16e970796dadcbf025d51412584 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 10 Apr 2023 16:26:52 +0530 Subject: [PATCH 143/420] document yml --- .../src/main/resources/marriage-registry.yml | 9 +++++++++ .../src/main/resources/marriage.yml | 18 +++++++++++++----- ...0410141700__Foreignkey_deletion_new_dll.sql | 3 +++ 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230410141700__Foreignkey_deletion_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index d55d6d38270..1943a2de5cb 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -95,6 +95,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid + - query: UPDATE eg_marriage_document SET registrationno = ? WHERE applicationnumber = ? AND tenantid = ? + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.applicationNumber + + - jsonPath: $.MarriageDetails.*.marriageTenantid - query: INSERT INTO public.eg_register_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 653bdc3c962..e9acfd1f4d1 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -641,8 +641,8 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , - document_link ,marriageid ,bride_groom ,active ,applicationnumber , createdby ,createdtime,lastmodifiedby , lastmodifiedtime) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ? ); + document_link ,marriageid ,bride_groom ,active ,applicationnumber , createdby ,createdtime,lastmodifiedby , lastmodifiedtime ,applicationtype) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ? , ? ); basePath: MarriageDetails.*.MarriageDocuments.* @@ -676,6 +676,8 @@ serviceMaps: - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationType + - version: 1.0 description: Persists save marriage details in marriage table @@ -1342,7 +1344,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName - - query: UPDATE public.eg_marriage_document SET active = ? ,lastmodifiedby = ? , lastmodifiedtime = ? WHERE bride_groom=? AND applicationnumber=? AND document_type=? + - query: UPDATE public.eg_marriage_document SET active = ? ,lastmodifiedby = ? , lastmodifiedtime = ? ,applicationtype = ? WHERE bride_groom=? AND applicationnumber=? AND document_type=? AND tenantid = ? basePath: MarriageDetails.*.MarriageDocuments.* @@ -1354,6 +1356,8 @@ serviceMaps: - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationType + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentOwner - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationNumber @@ -1364,8 +1368,8 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , - document_link ,marriageid ,bride_groom ,active ,applicationnumber , createdby ,createdtime,lastmodifiedby , lastmodifiedtime) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ? ); + document_link ,marriageid ,bride_groom ,active ,applicationnumber , createdby ,createdtime , lastmodifiedby , lastmodifiedtime ,applicationtype) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ? ,? ); basePath: MarriageDetails.*.MarriageDocuments.* @@ -1399,5 +1403,9 @@ serviceMaps: - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationType + + + diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230410141700__Foreignkey_deletion_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230410141700__Foreignkey_deletion_new_dll.sql new file mode 100644 index 00000000000..3cc5f7f0d57 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230410141700__Foreignkey_deletion_new_dll.sql @@ -0,0 +1,3 @@ + +ALTER table eg_marriage_document + DROP CONSTRAINT eg_marriage_document_document_fkey; \ No newline at end of file From 44dbdecce1082b82a179414060a6604663152db4 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 10 Apr 2023 17:08:15 +0530 Subject: [PATCH 144/420] new feild added to yml --- .../src/main/resources/application.properties | 2 +- .../src/main/resources/marriage-registry.yml | 11 +---------- .../src/main/resources/application.properties | 4 ++-- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 14a19680288..a36bf1b98ca 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml,file:////home/neenu/Documents/marriage/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 79fce0089fe..e6961c20a5f 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -11,7 +11,7 @@ serviceMaps: housenameno_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationnumber, registrationno, registration_date, registration_status, createdtime, createdby, lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,? ); + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -113,15 +113,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid - - query: UPDATE eg_marriage_document SET registrationno = ? WHERE applicationnumber = ? AND tenantid = ? - - basePath: MarriageDetails.* - jsonMaps: - - jsonPath: $.MarriageDetails.*.registrationno - - - jsonPath: $.MarriageDetails.*.applicationNumber - - - jsonPath: $.MarriageDetails.*.marriageTenantid - query: INSERT INTO public.eg_register_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 02efe6bf3eb..edfd7fab551 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -83,9 +83,9 @@ egov.idgen.host=https://ksmart-dev.lsgkerala.gov.in/ egov.idgen.path=egov-idgen/id/_generate #workflow configurations -egov.workflow.host=https://ksmart-dev.lsgkerala.gov.in/ +#egov.workflow.host=https://ksmart-dev.lsgkerala.gov.in/ egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition - +egov.workflow.host=http://localhost:8280 #birth and death idFormat config egov.idgen.marriageapplnum.name=birth_cert.receipt.id From 63f41fda404bf6f0205b239639b89a970edf4897 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 10 Apr 2023 18:06:09 +0530 Subject: [PATCH 145/420] row mapper updation --- .../BrideAddressDetailsRowMapper.java | 1 + .../GroomAddressDetailsRowMapper.java | 1 + .../rowmapper/GroomDetailsRowMapper.java | 4 +- .../MarriageApplicationValidator.java | 5 +-- .../BrideRegistryAddressRowMapper.java | 1 + .../GroomRegistryAddressRowMapper.java | 1 + .../rowmapper/GroomRegistryRowMapper.java | 4 +- .../MarriageAddressRegistryRowMapper.java | 37 ------------------- .../rowmapper/MarriageRegistryRowMapper.java | 2 + 9 files changed, 11 insertions(+), 45 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index a819c6a0624..2eb1132dbea 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -25,6 +25,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) .presentInsideKeralaTaluk(rs.getString("BPSA_talukid")) .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) + .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) .presentWardNo(rs.getString("BPSA_ward_code")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 36199d08236..9f49fa1a72d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -26,6 +26,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) + .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) .presentWardNo(rs.getString("GPSA_ward_code")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 560e81919a1..0f2f5d311be 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -14,8 +14,8 @@ default GroomDetails getGroomDetails (ResultSet rs) throws SQLException{ .aadharno(rs.getString("GD_aadharno")) .passportno(rs.getString("GD_passportno")) .socialsecurityno(rs.getString("GD_socialsecurityno")) - .fathernameEn(rs.getString("GD_firstname_en")) - .fathernameMl(rs.getString("GD_firstname_ml")) + .firstnameEn(rs.getString("GD_firstname_en")) + .firstnameMl(rs.getString("GD_firstname_ml")) .middlenameEn(rs.getString("GD_middlename_en")) .middlenameMl(rs.getString("GD_middlename_ml")) .lastnameEn(rs.getString("GD_lastname_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 367a2fc8554..f3eec90a6b8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -86,7 +86,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriagedtls.getLbtype() + " is invalid"); } - System.out.println("marriageward" + marriagedtls.getWardCode()); + // System.out.println("marriageward" + marriagedtls.getWardCode()); if (StringUtils.isEmpty(marriagedtls.getWardCode())) { throw new CustomException(" WARD INVALID ", "The Ward " + marriagedtls.getWardCode() + " is invalid"); @@ -883,9 +883,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPermntOutsideKeralaHouseNameMl() + " is invalid"); } - } - } } else { if (StringUtils.isEmpty(groomaddressInfo @@ -1170,7 +1168,6 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPresentOutsideKeralaHouseNameMl() + " is invalid"); } - } } } else { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java index 14fa1030902..5250fe22699 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java @@ -23,6 +23,7 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) .presentInsideKeralaTaluk(rs.getString("BPSA_talukid")) .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) + .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) .presentWardNo(rs.getString("BPSA_ward_code")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java index 038fff87fd0..1dda25e1947 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -24,6 +24,7 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) + .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) .presentWardNo(rs.getString("GPSA_ward_code")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index e67dce17be0..e626fb72eb4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -15,8 +15,8 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ .aadharno(rs.getString("GD_aadharno")) .passportno(rs.getString("GD_passportno")) .socialsecurityno(rs.getString("GD_socialsecurityno")) - .fathername_en(rs.getString("GD_firstname_en")) - .fathername_ml(rs.getString("GD_firstname_ml")) + .firstname_en(rs.getString("GD_firstname_en")) + .firstname_ml(rs.getString("GD_firstname_ml")) .middlename_en(rs.getString("GD_middlename_en")) .middlename_ml(rs.getString("GD_middlename_ml")) .lastname_en(rs.getString("GD_lastname_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java deleted file mode 100644 index 96b0acb3374..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageAddressRegistryRowMapper.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.ksmart.marriage.marriageregistry.repository.rowmapper; - - -import java.sql.ResultSet; -import java.sql.SQLException; -import org.springframework.stereotype.Component; -@Component -public interface MarriageAddressRegistryRowMapper { -// default PermanentAdressDetails getPermanentAddress (ResultSet rs) throws SQLException{ -// -// return PermanentAdressDetails.builder() -// .id(rs.getString("per_id")) -// .houseno(rs.getString("per_houseno")) -// .housename_no_en(rs.getString("per_housename_no_en")) -// .housename_no_ml(rs.getString("per_housename_no_ml")) -// .villageid(rs.getString("per_villageid")) -// .village_name(rs.getString("per_village_name")) -// .talukid(rs.getString("per_talukid")) -// .taluk_name(rs.getString("per_taluk_name")) -// .ward_code(rs.getString("per_ward_code")) -// .doorno(rs.getInt("per_doorno")) -// .locality_en(rs.getString("per_locality_en")) -// .locality_ml(rs.getString("per_locality_ml")) -// .street_name_en(rs.getString("per_street_name_en")) -// .street_name_ml(rs.getString("per_street_name_ml")) -// .districtid(rs.getString("per_districtid")) -// .stateid(rs.getString("per_stateid")) -// .poid(rs.getString("per_poid")) -// .pinno(rs.getString("per_pinno")) -// .countryid(rs.getString("per_countryid")) -// .marriageid(rs.getString("per_marriageid")) - - //.build(); - - - } -//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 41666497eeb..bc0fd53060e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -31,6 +31,8 @@ public List extractData(ResultSet rs) throws SQLExcepti .tenantid(rs.getString("MD_tenantid")) .placetype(rs.getString("MD_placetype")) .placeid(rs.getString("MD_placeid")) + .marriageHouseNoAndNameEn(rs.getString("MD_housenameno_en")) + .marriageHouseNoAndNameMl(rs.getString("MD_housenameno_ml")) .placenameEn(rs.getString("MD_placename_en")) .placenameMl(rs.getString("MD_placename_ml")) .street_name_en(rs.getString("MD_street_name_en")) From b026b75133b1fdea21d880ad1d91f66bac5dc71d Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 10 Apr 2023 18:09:04 +0530 Subject: [PATCH 146/420] row mapper updation --- .../src/main/resources/application.properties | 6 +++--- .../src/main/resources/application.properties | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 14a19680288..c66f1873b66 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm #Set context root server.port = 9082 @@ -12,7 +12,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml,file:///D:/UPYOG/MARRIAGE 23.03.2023/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 02efe6bf3eb..93b69435a34 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -83,7 +83,8 @@ egov.idgen.host=https://ksmart-dev.lsgkerala.gov.in/ egov.idgen.path=egov-idgen/id/_generate #workflow configurations -egov.workflow.host=https://ksmart-dev.lsgkerala.gov.in/ +egov.workflow.host=http://localhost:8280 +#https://ksmart-dev.lsgkerala.gov.in/ egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition From 30efa8b1431c0d289febabb45caa97af8da953f5 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 11 Apr 2023 10:09:52 +0530 Subject: [PATCH 147/420] row mapper updation --- .../enrichment/MarriageDetailsEnrichment.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index feed381f937..cb9d6be5412 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -96,9 +96,12 @@ public void enrichCreate(MarriageDetailsRequest request) { if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); + groomDetails.setGuardianAadharno(null); } else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); + groomDetails.setMotherAadharno(null); + groomDetails.setFatherAadharno(null); } BrideDetails brideDetails =marriage.getBrideDetails(); BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); @@ -106,9 +109,12 @@ else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); + brideDetails.setGuardianAadharno(null); } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + brideDetails.setMotherAadharno(null); + brideDetails.setFatherAadharno(null); } WitnessDetails witnessDetails =marriage.getWitnessDetails(); From 7928c0618dc7fef16cb468ce7d6dcebe3f0772b9 Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 11 Apr 2023 10:21:35 +0530 Subject: [PATCH 148/420] change in password --- .../egov-persister/src/main/resources/application.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 14a19680288..88dd3d5f24e 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm #Set context root server.port = 9082 @@ -12,7 +12,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true From 28d9fd04ed117c54c5518f01751433bda333bd8b Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Tue, 11 Apr 2023 11:10:13 +0530 Subject: [PATCH 149/420] Marriage correction create api changes --- .../main/resources/marriage-correction.yml | 12 +- .../MarriageCorrectionEnrichment.java | 281 +++++++++++------- .../mapper/RegistryToApplicationMapper.java | 5 + 3 files changed, 189 insertions(+), 109 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index b49d472c376..5dacf1087b8 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -318,7 +318,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodepermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentOutsideIndiaPostCode - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl @@ -396,7 +396,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodepermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentOutsideIndiaPostCode - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl @@ -404,8 +404,8 @@ serviceMaps: - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , - document_link ,marriageid ,bride_groom ,active ,applicationnumber ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime, correction_id, correction_field_name) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?, ?, ?); + document_link ,marriageid ,bride_groom ,active ,applicationnumber ,createdby ,createdtime,lastmodifiedby , lastmodifiedtime, correction_id, correction_field_name, registrationno, applicationtype) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.MarriageDocuments.* @@ -443,6 +443,10 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.correctionFieldName + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.registrationNo + + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationType + - query: INSERT INTO public.eg_marriage_correction( id, marriageid, correction_field_name, condition_code, specific_condition, createdtime, createdby, lastmodifiedtime, lastmodifiedby) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index 86f6cda7198..eb0b9dc87b6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -1,6 +1,7 @@ package org.ksmart.marriage.marriagecorrection.enrichment; import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Setter; import org.apache.commons.collections4.CollectionUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; @@ -23,6 +24,7 @@ import java.lang.reflect.Field; import java.util.*; +import java.util.function.Consumer; @Component public class MarriageCorrectionEnrichment implements BaseEnrichment { @@ -101,87 +103,94 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp String[] fieldName = changeField.getField().split("\\."); if (fieldName.length == 1) { if (marriageApplnDetailsFieldMap.containsKey(fieldName[0])) { - - CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); - correctionFieldValue.setId(UUID.randomUUID().toString()); - correctionFieldValue.setCorrectionId(correctionId); - correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); - correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); - correctionFieldValue.setColumnName(changeField.getField()); - correctionFieldValue.setOldValue(marriageApplnDetailsAccessor.getPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0])).toString()); - correctionFieldValue.setNewValue(changeField.getNewValue()); - correctionFieldValue.setAuditDetails(auditDetails); - correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); - - marriageApplnDetailsAccessor.setPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0]), changeField.getNewValue()); - - } - } else if (fieldName.length == 2) { - if (fieldName[0].equalsIgnoreCase("BrideDetails")) { - if (brideDetailsFieldMap.containsKey(fieldName[1])) { - + if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); correctionFieldValue.setId(UUID.randomUUID().toString()); correctionFieldValue.setCorrectionId(correctionId); correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); correctionFieldValue.setColumnName(changeField.getField()); - correctionFieldValue.setOldValue(brideDetailsAccessor.getPropertyValue(brideDetailsFieldMap.get(fieldName[1])).toString()); + //correctionFieldValue.setOldValue(marriageApplnDetailsAccessor.getPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0])).toString()); + correctionFieldValue.setOldValue(changeField.getOldValue()); correctionFieldValue.setNewValue(changeField.getNewValue()); correctionFieldValue.setAuditDetails(auditDetails); correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); - brideDetailsAccessor.setPropertyValue(brideDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + marriageApplnDetailsAccessor.setPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0]), changeField.getNewValue()); + } + } + } else if (fieldName.length == 2) { + if (fieldName[0].equalsIgnoreCase("BrideDetails")) { + if (brideDetailsFieldMap.containsKey(fieldName[1])) { + if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + //correctionFieldValue.setOldValue(brideDetailsAccessor.getPropertyValue(brideDetailsFieldMap.get(fieldName[1])).toString()); + correctionFieldValue.setOldValue(changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + + brideDetailsAccessor.setPropertyValue(brideDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + } } } else if (fieldName[0].equalsIgnoreCase("GroomDetails")) { if (groomDetailsFieldMap.containsKey(fieldName[1])) { - - CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); - correctionFieldValue.setId(UUID.randomUUID().toString()); - correctionFieldValue.setCorrectionId(correctionId); - correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); - correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); - correctionFieldValue.setColumnName(changeField.getField()); - correctionFieldValue.setOldValue(groomDetailsAccessor.getPropertyValue(groomDetailsFieldMap.get(fieldName[1])).toString()); - correctionFieldValue.setNewValue(changeField.getNewValue()); - correctionFieldValue.setAuditDetails(auditDetails); - correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); - - groomDetailsAccessor.setPropertyValue(groomDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + //correctionFieldValue.setOldValue(groomDetailsAccessor.getPropertyValue(groomDetailsFieldMap.get(fieldName[1])).toString()); + correctionFieldValue.setOldValue(changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + + groomDetailsAccessor.setPropertyValue(groomDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + } } } else if (fieldName[0].equalsIgnoreCase("BrideAddressDetails")) { if (brideAddressDetailsFieldMap.containsKey(fieldName[1])) { - - CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); - correctionFieldValue.setId(UUID.randomUUID().toString()); - correctionFieldValue.setCorrectionId(correctionId); - correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); - correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); - correctionFieldValue.setColumnName(changeField.getField()); - correctionFieldValue.setOldValue(brideAddressDetailsAccessor.getPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1])).toString()); - correctionFieldValue.setNewValue(changeField.getNewValue()); - correctionFieldValue.setAuditDetails(auditDetails); - correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); - - brideAddressDetailsAccessor.setPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); - + if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + //correctionFieldValue.setOldValue(brideAddressDetailsAccessor.getPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1])).toString()); + correctionFieldValue.setOldValue(changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + + brideAddressDetailsAccessor.setPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + } } } else if (fieldName[0].equalsIgnoreCase("GroomAddressDetails")) { if (groomAddressDetailsFieldMap.containsKey(fieldName[1])) { - - CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); - correctionFieldValue.setId(UUID.randomUUID().toString()); - correctionFieldValue.setCorrectionId(correctionId); - correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); - correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); - correctionFieldValue.setColumnName(changeField.getField()); - correctionFieldValue.setOldValue(groomAddressDetailsAccessor.getPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1])).toString()); - correctionFieldValue.setNewValue(changeField.getNewValue()); - correctionFieldValue.setAuditDetails(auditDetails); - correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); - - groomAddressDetailsAccessor.setPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); - + if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); + correctionFieldValue.setId(UUID.randomUUID().toString()); + correctionFieldValue.setCorrectionId(correctionId); + correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); + correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + correctionFieldValue.setColumnName(changeField.getField()); + //correctionFieldValue.setOldValue(String.valueOf(groomAddressDetailsAccessor.getPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1])))); + correctionFieldValue.setOldValue(changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setAuditDetails(auditDetails); + correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); + + groomAddressDetailsAccessor.setPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); + } } } @@ -202,6 +211,8 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp marriageDocument.setActive(true); marriageDocument.setCorrectionId(correctionId); marriageDocument.setCorrectionFieldName(correctionField.getCorrectionFieldName()); + marriageDocument.setRegistrationNumber(correctionRequest.getMarriageCorrectionDetails().get(0).getRegistrationno()); + marriageDocument.setApplicationType(correctionRequest.getMarriageCorrectionDetails().get(0).getApplicationtype()); marriageApplicationDetails.getMarriageDocuments().add(marriageDocument); }); @@ -276,68 +287,92 @@ private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setPermanentAddrTalukId(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getGroomAddressDetails().setPermanentAddrVillageId(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); - marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); - marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); marriage.getGroomAddressDetails().setPoNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); } else { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); - marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); - marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); - marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOthrTalukName(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - - marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - } - - } else { if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + } + } + }else if (marriage.getGroomAddressDetails().getCountryIdPermanent() != null && marriage.getGroomAddressDetails().getStateIdPermanent() != null) { + if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getStateIdPermanent().contains(MarriageConstants.STATE_CODE_SMALL)) { + + setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent, marriage.getGroomAddressDetails().getPermtaddressCountry()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrTalukId,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrVillageId,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent,marriage.getGroomAddressDetails().getPermtaddressStateName()); + setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + setIfNotNull(marriage.getGroomAddressDetails()::setLocalityEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setLocalityMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + setIfNotNull(marriage.getGroomAddressDetails()::setPoNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + } else { + setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent , marriage.getGroomAddressDetails().getPermtaddressCountry()); + setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent , marriage.getGroomAddressDetails().getPermtaddressStateName()); + setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setLocalityEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setLocalityMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrTalukName , marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthPostOfficeEn , marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + } + } else { + if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { + setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPresent , marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLineoneEn , marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLineoneMl , marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoEn , marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoMl , marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceEn , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceMl , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setOutSideIndiaPostCodepermanent , marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); } } @@ -366,68 +401,95 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { if (marriage.getBrideAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); marriage.getBrideAddressDetails().setPermanentAddrTalukId(marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getBrideAddressDetails().setPermanentAddrVillageId(marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); - marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); - marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); } else { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); - marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); - marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - - marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); } - - } else { if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + } + } + }else if (marriage.getBrideAddressDetails().getCountryIdPermanent() != null && marriage.getBrideAddressDetails().getStateIdPermanent() != null) { + if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getStateIdPermanent().contains(MarriageConstants.STATE_CODE_SMALL)) { + + setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); + setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrTalukId, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrVillageId, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + setIfNotNull(marriage.getBrideAddressDetails()::setLocalityEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setLocalityMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + setIfNotNull(marriage.getBrideAddressDetails()::setPoNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + } else { + setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); + setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); + setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + setIfNotNull(marriage.getBrideAddressDetails()::setLocalityEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setLocalityMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrTalukName, marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthPostOfficeEn, marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + } + } else { + if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPresent, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + setIfNotNull(marriage.getBrideAddressDetails()::setTownOrVillagePermanent, marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLineoneEn, marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLineoneMl, marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLinetwoEn, marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLinetwoMl, marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceEn, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceMl, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setOutSideIndiaPostCodepermanent, marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); } } @@ -439,4 +501,13 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { } } + + + + + public static void setIfNotNull( Consumer setter,V value) { + if (Objects.nonNull(value)) { + setter.accept(value); + } + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index b9f5f1cdce6..563825c58f8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -36,6 +36,8 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.setPlaceid(marriageRegistryDetails.getPlaceid()); marriageApplicationDetails.setPlacenameEn(marriageRegistryDetails.getPlacenameEn()); marriageApplicationDetails.setPlacenameMl(marriageRegistryDetails.getPlacenameMl()); + marriageApplicationDetails.setMarriageHouseNoAndNameEn(marriageRegistryDetails.getMarriageHouseNoAndNameEn()); + marriageApplicationDetails.setMarriageHouseNoAndNameMl(marriageRegistryDetails.getMarriageHouseNoAndNameMl()); marriageApplicationDetails.setStreetNameEn(marriageRegistryDetails.getStreet_name_en()); marriageApplicationDetails.setStreetNameMl(marriageRegistryDetails.getStreet_name_ml()); marriageApplicationDetails.setWardCode(marriageRegistryDetails.getWard_code()); @@ -142,6 +144,8 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriageApplicationDetails.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + marriageApplicationDetails.getBrideAddressDetails().setPinNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPinNoPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getCountryIdPermanent()); marriageApplicationDetails.getGroomAddressDetails().setStateIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getStateIdPermanent()); @@ -169,6 +173,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); marriageApplicationDetails.getGroomAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + marriageApplicationDetails.getGroomAddressDetails().setPinNoPermanent(marriageRegistryDetails.getGroomAddressDetails().getPinNoPermanent()); return marriageApplicationDetails; } From 0302854ffd37179448b2856122238534afb53c54 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 11 Apr 2023 11:18:38 +0530 Subject: [PATCH 150/420] row mapper updation --- .../enrichment/MarriageDetailsEnrichment.java | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index cb9d6be5412..5a0a33b7d32 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -103,6 +103,11 @@ else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ groomDetails.setMotherAadharno(null); groomDetails.setFatherAadharno(null); } + else{ + groomDetails.setMotherAadharno(null); + groomDetails.setFatherAadharno(null); + groomDetails.setGuardianAadharno(null); + } BrideDetails brideDetails =marriage.getBrideDetails(); BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); brideDetails.setAadharno(brideDetailsEnc.getAadharno()); @@ -116,6 +121,11 @@ else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ brideDetails.setMotherAadharno(null); brideDetails.setFatherAadharno(null); } + else{ + brideDetails.setMotherAadharno(null); + brideDetails.setFatherAadharno(null); + brideDetails.setGuardianAadharno(null); + } WitnessDetails witnessDetails =marriage.getWitnessDetails(); WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); @@ -185,6 +195,47 @@ public void enrichUpdate(MarriageDetailsRequest request) { setBridePresentAddress(request); setGroomPermanentAddress(request); setGroomPresentAddress(request); + GroomDetails groomDetails =marriage.getGroomDetails(); + GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); + groomDetails.setAadharno(groomDetailsEnc.getAadharno()); + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); + groomDetails.setGuardianAadharno(null); + } + else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); + groomDetails.setMotherAadharno(null); + groomDetails.setFatherAadharno(null); + } + else{ + groomDetails.setMotherAadharno(null); + groomDetails.setFatherAadharno(null); + groomDetails.setGuardianAadharno(null); + } + BrideDetails brideDetails =marriage.getBrideDetails(); + BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); + brideDetails.setAadharno(brideDetailsEnc.getAadharno()); + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); + brideDetails.setGuardianAadharno(null); + } + else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + brideDetails.setMotherAadharno(null); + brideDetails.setFatherAadharno(null); + } + else{ + brideDetails.setMotherAadharno(null); + brideDetails.setFatherAadharno(null); + brideDetails.setGuardianAadharno(null); + } + + WitnessDetails witnessDetails =marriage.getWitnessDetails(); + WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); + witnessDetails.setWitness1AadharNo(witnessDetailsEnc.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsEnc.getWitness2AadharNo()); }); } private void setGroomPresentAddress(MarriageDetailsRequest request) { From 6e058080a1ec52fd52378296995a75403dad8024 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 11 Apr 2023 12:33:18 +0530 Subject: [PATCH 151/420] search --- .../MarriageApplicationQueryBuilder.java | 12 ++++++------ .../rowmapper/WitnessDetailsRowMapper.java | 8 ++++++-- .../querybuilder/MarriageRegistryQueryBuilder.java | 8 ++++---- .../rowmapper/WitnessRegistryRowMapper.java | 8 ++++++-- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 7cd9aebf584..c5512863c42 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -93,17 +93,17 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("BD.bride_groom ='B' ") .append("INNER JOIN eg_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") .append("GD.bride_groom ='G' ") - .append("LEFT JOIN eg_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") .append("BPMA.bride_groom ='B' ") - .append("LEFT JOIN eg_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") .append("GPMA.bride_groom ='G' ") - .append("LEFT JOIN eg_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") .append("BPSA.bride_groom ='B' ") - .append("LEFT JOIN eg_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") .append("GPSA.bride_groom ='G' ") - .append("INNER JOIN eg_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") .append("WD1.serial_no = 1 ") - .append("INNER JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("INNER JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") .toString(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index c353887f386..d6edaa5ecec 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -18,7 +18,9 @@ default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { .witness1AddresSEn(rs.getString("WD1_address_en")) .witness1AddressMl(rs.getString("WD1_address_ml")) .witness1Mobile(rs.getLong("WD1_mobile")) - .witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) + .witness1Esigned(rs.getBoolean("WD1_is_esigned")) + //.witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) + .serialNo1(rs.getInt("WD1_serial_no")) .witnessId2(rs.getString("WD2_id")) .witness2AadharNo(rs.getString("WD2_aadharno")) .witness2NameEn(rs.getString("WD2_name_en")) @@ -27,7 +29,9 @@ default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { .witness2AddresSEn(rs.getString("WD2_address_en")) .witness2AddressMl(rs.getString("WD2_address_ml")) .witness2Mobile(rs.getLong("WD2_mobile")) - .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) + .witness2Esigned(rs.getBoolean("WD2_is_esigned")) + // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) + .serialNo2(rs.getInt("WD2_serial_no")) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index ec6d4b573ae..3aacaf96673 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -98,13 +98,13 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BD.bride_groom ='B' ") .append("INNER JOIN eg_register_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") .append("GD.bride_groom ='G' ") - .append("LEFT JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("INNER JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") .append("BPMA.bride_groom ='B' ") - .append("LEFT JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("INNER JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") .append("GPMA.bride_groom ='G' ") - .append("LEFT JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("INNER JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") .append("BPSA.bride_groom ='B' ") - .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("INNER JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") .append("GPSA.bride_groom ='G' ") .append("INNER JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") .append("WD1.serial_no = 1 ") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index c711a8ee38b..777d21c2bb6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -20,7 +20,9 @@ default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLExcepti .witness1AddresSEn(rs.getString("WD1_address_en")) .witness1AddressMl(rs.getString("WD1_address_ml")) .witness1Mobile(rs.getLong("WD1_mobile")) - .witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) + .witness1Esigned(rs.getBoolean("WD1_is_esigned")) + //.witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) + .serial_no1(rs.getInt("WD1_serial_no")) .witnessId2(rs.getString("WD2_id")) .witness2AadharNo(rs.getString("WD2_aadharno")) .witness2NameEn(rs.getString("WD2_name_en")) @@ -29,7 +31,9 @@ default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLExcepti .witness2AddresSEn(rs.getString("WD2_address_en")) .witness2AddressMl(rs.getString("WD2_address_ml")) .witness2Mobile(rs.getLong("WD2_mobile")) - .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) + .serial_no2(rs.getInt("WD1_serial_no")) + .witness2Esigned(rs.getBoolean("WD2_is_esigned")) + // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) .build(); } From 1d1d7380d9e89b419d482a3768e3c09da18b8b95 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Tue, 11 Apr 2023 12:49:04 +0530 Subject: [PATCH 152/420] Field validations and MDMS validation correction --- .../MarriageApplicationValidator.java | 40 +++--- .../validator/MarriageMDMSValidator.java | 136 +++++++++--------- 2 files changed, 88 insertions(+), 88 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index f3eec90a6b8..6ac3d5bd7d5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1302,11 +1302,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo - .getPermntInKeralaAdrPostOffice())) { + .getPresentOutsideKeralaPostOfficeEn())) { throw new CustomException( " BRIDE PERMANENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", "The Postofficef " + - brideaddressInfo.getPermntInKeralaAdrPostOffice() + brideaddressInfo.getPresentOutsideKeralaPostOfficeEn() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo @@ -1662,7 +1662,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { .getPresentOutsideKeralaVillageName())) { throw new CustomException( "BRIDE PRESENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", - "The Village " + + "The Village " + brideaddressInfo.getPresentOutsideKeralaVillageName() + " is invalid"); } @@ -1685,7 +1685,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo - .getPresentOutsideKeralaLocalityNameEn())) { + .getPresentOutsideKeralaPostOfficeEn())) { throw new CustomException( "BRIDE PRESENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", "The Postofficef " + @@ -1781,14 +1781,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPresentOutSideIndiaAdressEn() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentOutSideIndiaAdressEnB())) { - throw new CustomException( - "BRIDE PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE Two ENGLISH INVALID ", - "The Adress Line Two English " + - brideaddressInfo.getPresentOutSideIndiaAdressEnB() - + " is invalid"); - } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPresentOutSideIndiaAdressEnB())) { + // throw new CustomException( + // "BRIDE PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE Two ENGLISH INVALID ", + // "The Adress Line Two English " + + // brideaddressInfo.getPresentOutSideIndiaAdressEnB() + // + " is invalid"); + // } if (StringUtils.isEmpty(brideaddressInfo .getPresentOutSideIndiaAdressMl())) { throw new CustomException( @@ -1797,14 +1797,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPresentOutSideIndiaAdressMl() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentOutSideIndiaAdressMlB())) { - throw new CustomException( - "BRIDE PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", - "The Adress Line Two Malayalam " + - brideaddressInfo.getPresentOutSideIndiaAdressMlB() - + " is invalid"); - } + // if (StringUtils.isEmpty(brideaddressInfo + // .getPresentOutSideIndiaAdressMlB())) { + // throw new CustomException( + // "BRIDE PRESENT ADDRESS OUTSIDE INDIA: ADDRESS LINE TWO MALAYALAM INVALID ", + // "The Adress Line Two Malayalam " + + // brideaddressInfo.getPresentOutSideIndiaAdressMlB() + // + " is invalid"); + // } } // witness1 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index 10915f5e097..915792e3f85 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -158,24 +158,24 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms + " is invalid"); } - if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null) { - if (!masterData.get(MarriageConstants.TALUK) - .contains( - request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk())) - errorMap.put("GROOM PERMANENT ADDRESS: TALUK NAME INVALID", "groom taluk outside kerala " + - request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk() - + " is invalid"); - } - if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaVillage() != null) { - if (!masterData.get(MarriageConstants.VILLAGE) - .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() - .getPermntOutsideKeralaVillage())) - errorMap.put("GROOM PERMANENT ADDRESS: VILLAGE NAME INVALID", - "groom village outside kerala " + - request.getMarriageDetails().get(0).getGroomAddressDetails() - .getPermntOutsideKeralaVillage() - + " is invalid"); - } + // if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null) { + // if (!masterData.get(MarriageConstants.TALUK) + // .contains( + // request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk())) + // errorMap.put("GROOM PERMANENT ADDRESS: TALUK NAME INVALID", "groom taluk outside kerala " + + // request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk() + // + " is invalid"); + // } + // if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntOutsideKeralaVillage() != null) { + // if (!masterData.get(MarriageConstants.VILLAGE) + // .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + // .getPermntOutsideKeralaVillage())) + // errorMap.put("GROOM PERMANENT ADDRESS: VILLAGE NAME INVALID", + // "groom village outside kerala " + + // request.getMarriageDetails().get(0).getGroomAddressDetails() + // .getPermntOutsideKeralaVillage() + // + " is invalid"); + // } if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { if (!masterData.get(MarriageConstants.VILLAGE) .contains( @@ -261,23 +261,23 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaTaluk() + " is invalid"); } - if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null) { - if (!masterData.get(MarriageConstants.TALUK) - .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() - .getPresentOutsideKeralaTalukName())) - errorMap.put("GROOM PRESENT ADDRESS: TALUK NAME INVALID", "groom taluk outside kerala " + - request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaTalukName() - + " is invalid"); - } - if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null) { - if (!masterData.get(MarriageConstants.VILLAGE) - .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() - .getPresentOutsideKeralaVillageName())) - errorMap.put("GROOM PRESENT ADDRESS: VILLAGE NAME INVALID", "groom village outdide kerala " + - request.getMarriageDetails().get(0).getGroomAddressDetails() - .getPresentOutsideKeralaVillageName() - + " is invalid"); - } + // if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null) { + // if (!masterData.get(MarriageConstants.TALUK) + // .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + // .getPresentOutsideKeralaTalukName())) + // errorMap.put("GROOM PRESENT ADDRESS: TALUK NAME INVALID", "groom taluk outside kerala " + + // request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaTalukName() + // + " is invalid"); + // } + // if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null) { + // if (!masterData.get(MarriageConstants.VILLAGE) + // .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() + // .getPresentOutsideKeralaVillageName())) + // errorMap.put("GROOM PRESENT ADDRESS: VILLAGE NAME INVALID", "groom village outdide kerala " + + // request.getMarriageDetails().get(0).getGroomAddressDetails() + // .getPresentOutsideKeralaVillageName() + // + " is invalid"); + // } if (request.getMarriageDetails().get(0).getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { if (!masterData.get(MarriageConstants.VILLAGE) .contains(request.getMarriageDetails().get(0).getGroomAddressDetails() @@ -358,22 +358,22 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms + " is invalid"); } - if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk() != null) { - if (!masterData.get(MarriageConstants.TALUK) - .contains( - request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk())) - errorMap.put("BRIDE PERMANENT ADDRESS: TALUK NAME INVALID", "bride taluk ouside kerala " + - request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk() - + " is invalid"); - } - if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaVillage() != null) { - if (!masterData.get(MarriageConstants.VILLAGE) - .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() - .getPermntOutsideKeralaVillage())) - errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "bride village outside kerala " + - request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaVillage() - + " is invalid"); - } + // if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk() != null) { + // if (!masterData.get(MarriageConstants.TALUK) + // .contains( + // request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk())) + // errorMap.put("BRIDE PERMANENT ADDRESS: TALUK NAME INVALID", "bride taluk ouside kerala " + + // request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk() + // + " is invalid"); + // } + // if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaVillage() != null) { + // if (!masterData.get(MarriageConstants.VILLAGE) + // .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + // .getPermntOutsideKeralaVillage())) + // errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "bride village outside kerala " + + // request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntOutsideKeralaVillage() + // + " is invalid"); + // } if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage() != null) { if (!masterData.get(MarriageConstants.VILLAGE) .contains( @@ -455,23 +455,23 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaTaluk() + " is invalid"); } - if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaTalukName() != null) { - if (!masterData.get(MarriageConstants.TALUK) - .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() - .getPresentOutsideKeralaTalukName())) - errorMap.put("BRIDE PRESENT ADDRESS: TALUK NAME INVALID", "bride taluk outside kerala " + - request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaTalukName() - + " is invalid"); - } - if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaVillageName() != null) { - if (!masterData.get(MarriageConstants.VILLAGE) - .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() - .getPresentOutsideKeralaVillageName())) - errorMap.put("BRIDE PRESENT ADDRESS: VILLAGE NAME INVALID", "bride village outside kerala" + - request.getMarriageDetails().get(0).getBrideAddressDetails() - .getPresentOutsideKeralaVillageName() - + " is invalid"); - } + // if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaTalukName() != null) { + // if (!masterData.get(MarriageConstants.TALUK) + // .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + // .getPresentOutsideKeralaTalukName())) + // errorMap.put("BRIDE PRESENT ADDRESS: TALUK NAME INVALID", "bride taluk outside kerala " + + // request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaTalukName() + // + " is invalid"); + // } + // if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentOutsideKeralaVillageName() != null) { + // if (!masterData.get(MarriageConstants.VILLAGE) + // .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() + // .getPresentOutsideKeralaVillageName())) + // errorMap.put("BRIDE PRESENT ADDRESS: VILLAGE NAME INVALID", "bride village outside kerala" + + // request.getMarriageDetails().get(0).getBrideAddressDetails() + // .getPresentOutsideKeralaVillageName() + // + " is invalid"); + // } if (request.getMarriageDetails().get(0).getBrideAddressDetails().getPresentInsideKeralaVillage() != null) { if (!masterData.get(MarriageConstants.VILLAGE) .contains(request.getMarriageDetails().get(0).getBrideAddressDetails() From e34c91fca3ed7e164409619bac58084bcca24155 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 11 Apr 2023 11:24:13 +0530 Subject: [PATCH 153/420] fix --- .../src/main/resources/application.properties | 6 +++--- .../egov-persister/src/main/resources/marriage-registry.yml | 4 ++-- .../src/main/resources/application.properties | 4 ++-- .../src/main/resources/application.properties | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index c66f1873b66..a36bf1b98ca 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 #Set context root server.port = 9082 @@ -12,7 +12,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml,file:///D:/UPYOG/MARRIAGE 23.03.2023/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml,file:////home/neenu/Documents/marriage/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 1a94c6b27ac..3269ea75547 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, housenameno_en, housenameno_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationnumber, registrationno, registration_date, registration_status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward,certificateno) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?,?,?,?,?,?,?,? ,?); + lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?,? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id diff --git a/core-services/egov-workflow-v2/src/main/resources/application.properties b/core-services/egov-workflow-v2/src/main/resources/application.properties index a37be1317b5..07084294fc9 100644 --- a/core-services/egov-workflow-v2/src/main/resources/application.properties +++ b/core-services/egov-workflow-v2/src/main/resources/application.properties @@ -8,13 +8,13 @@ spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 #spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 5863ce25f08..3af40024c2a 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -83,7 +83,7 @@ egov.idgen.host=https://ksmart-dev.lsgkerala.gov.in/ egov.idgen.path=egov-idgen/id/_generate #workflow configurations -egov.workflow.host=http://localhost:8280 +#egov.workflow.host=http://localhost:8280 #https://ksmart-dev.lsgkerala.gov.in/ egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition egov.workflow.host=http://localhost:8280 From afeb38b7b406327139950cb5c3afb30ad4ecb7c1 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 11 Apr 2023 12:53:49 +0530 Subject: [PATCH 154/420] fix --- .../src/main/resources/marriage-registry.yml | 59 ------------------- 1 file changed, 59 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 3269ea75547..6c2afb8cbe3 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -100,8 +100,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward - - jsonPath: $.MarriageDetails.*.certificateNo - - query: UPDATE eg_marriage_details SET registrationno = ? ,registration_date = ? WHERE applicationnumber = ? AND tenantid = ? @@ -657,63 +655,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - - version: 1.0 - description: Persists save marriage certificate details in marriage certificate table - fromTopic: save-marriagecertificate-topic - isTransaction: true - queryMaps: - - query: INSERT INTO public.eg_marriage_certificate - (id, registrationno, registrydetailsid, filestoreid, status,embeddedurl, dateofissue, tenantid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) - VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); - basePath: marriageCertificate - jsonMaps: - - jsonPath: $.marriageCertificate.id - - - jsonPath: $.marriageCertificate.registrationno - - - jsonPath: $.marriageCertificate.marriageRegistryDetails.id - - - jsonPath: $.marriageCertificate.filestoreid - - - jsonPath: $.marriageCertificate.certificateStatus - - - jsonPath: $.marriageCertificate.embeddedUrl - - - jsonPath: $.marriageCertificate.dateOfIssue - - - jsonPath: $.marriageCertificate.marriageRegistryDetails.marriageTenantid - - - jsonPath: $.marriageCertificate.AuditDetails.createdTime - - - jsonPath: $.marriageCertificate.AuditDetails.createdBy - - - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedTime - - - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedBy - - - version: 1.0 - description: Persists update marriage certificate details in marriage certificate table - fromTopic: update-marriagecertificate-topic - isTransaction: true - queryMaps: - - query: UPDATE public.eg_marriage_certificate - set filestoreid=? , embeddedurl=?, dateofissue=?, lastmodifiedtime=?, lastmodifiedby=? where id=? and registrydetailsid=?; - basePath: marriageCertificate - jsonMaps: - - jsonPath: $.marriageCertificate.filestoreid - - - jsonPath: $.marriageCertificate.embeddedUrl - - - jsonPath: $.marriageCertificate.dateOfIssue - - - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedTime - - - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedBy - - - jsonPath: $.marriageCertificate.id - - - jsonPath: $.marriageCertificate.marriageRegistryId - From c6c4978fd0669095ba498e2f1427d20429e2b404 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 11 Apr 2023 13:22:32 +0530 Subject: [PATCH 155/420] enrichmentUpdated --- .../enrichment/MarriageDetailsEnrichment.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 5a0a33b7d32..df053caf01a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -390,12 +390,12 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - + } } } else { -// if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + //if (marriage.getGroomAddressDetails().getPermtaddressCountry() != (MarriageConstants.COUNTRY_CODE)) { + marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); @@ -411,9 +411,9 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); -// } + //} } - } + } }); } @@ -490,6 +490,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); } + } } else { // if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); @@ -510,7 +511,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { // } } - } + } }); } @@ -550,8 +551,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - } - else { + } else { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); @@ -569,19 +569,19 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); } - + } } else { -// if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); +// if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { + marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); @@ -601,7 +601,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { // } } - } + } From a8e93886075dfdc5adc647e65c7ead00e45b226b Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Tue, 11 Apr 2023 13:42:41 +0530 Subject: [PATCH 156/420] marriage correction changes --- .../src/main/resources/marriage-correction.yml | 2 +- .../enrichment/MarriageCorrectionEnrichment.java | 11 ++++++++--- .../mapper/RegistryToApplicationMapper.java | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 5dacf1087b8..5b91298879b 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -443,7 +443,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.correctionFieldName - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.registrationNo + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.registrationNumber - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationType diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index eb0b9dc87b6..096595d82f3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -23,6 +23,8 @@ import org.springframework.stereotype.Component; import java.lang.reflect.Field; +import java.text.DateFormat; +import java.text.SimpleDateFormat; import java.util.*; import java.util.function.Consumer; @@ -54,8 +56,9 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp marriageApplicationDetails.getGroomDetails().setGroomId((UUID.randomUUID().toString())); marriageApplicationDetails.getGroomDetails().setBrideGroom("G"); } - setApplicationNumbers(correctionRequest, marriageApplicationDetails); + DateFormat formatter = new SimpleDateFormat("ddMMyyyy"); + marriageApplicationDetails.setDateofreporting(Long.valueOf(formatter.format(new Date()))); correctionRequest.getMarriageCorrectionDetails().forEach(correction -> { @@ -70,6 +73,8 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp marriageApplicationDetails.setId(UUID.randomUUID().toString()); correction.setMarriageId(marriageApplicationDetails.getId()); + setApplicationNumbers(correctionRequest, marriageApplicationDetails); + Map marriageApplnDetailsFieldMap = getJsonFieldNames(MarriageApplicationDetails.class.getDeclaredFields()); Map brideDetailsFieldMap = getJsonFieldNames(BrideDetails.class.getDeclaredFields()); Map groomDetailsFieldMap = getJsonFieldNames(GroomDetails.class.getDeclaredFields()); @@ -249,8 +254,8 @@ private void setApplicationNumbers(MarriageCorrectionRequest correctionRequest, List filecodes = getIds(requestInfo, tenantId, config.getMarriageApplNumberIdName(), - marriageApplicationDetails.getModuleCode(), - "CRN", + marriageApplicationDetails.getApplicationtype(), + "APPL", marriageCorrection.size()); validateFileCodes(filecodes, marriageCorrection.size()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 563825c58f8..408cfa42340 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -27,7 +27,7 @@ public MarriageApplicationDetails convert(List registry MarriageRegistryDetails marriageRegistryDetails=registry.get(0); marriageApplicationDetails.setDateofmarriage(marriageRegistryDetails.getDateofmarriage()); - marriageApplicationDetails.setDateofreporting(marriageRegistryDetails.getDateofreporting()); + //marriageApplicationDetails.setDateofreporting(marriageRegistryDetails.getDateofreporting()); marriageApplicationDetails.setDistrictid(marriageRegistryDetails.getDistrictid()); marriageApplicationDetails.setLbtype(marriageRegistryDetails.getLbtype()); marriageApplicationDetails.setTenantid(marriageRegistryDetails.getTenantid()); From 621cbf6e960b80356566d98d3ac5f0e0ffcaeb1d Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 11 Apr 2023 13:45:22 +0530 Subject: [PATCH 157/420] enrichmentUpdated --- .../enrichment/MarriageRegistryEnrichment.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index d6641a75152..40796349c83 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -245,8 +245,7 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - } - else { + } else { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); @@ -271,12 +270,12 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); } - + } } else { // if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); @@ -295,7 +294,7 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { // } } - } + } @@ -464,17 +463,17 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - + } } } else { // if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); @@ -488,7 +487,7 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); // } } - } + } }); } From a85c5c028fb95f192a68634355cb695e4f06fdfe Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 11 Apr 2023 14:33:40 +0530 Subject: [PATCH 158/420] search --- .../repository/rowmapper/BrideRegistryRowMapper.java | 3 ++- .../repository/rowmapper/GroomRegistryRowMapper.java | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index 802725eb6d6..ff366ccbc54 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -25,7 +25,8 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ .middlename_ml(rs.getString("BD_middlename_ml")) .lastname_en(rs.getString("BD_lastname_en")) .lastname_ml(rs.getString("BD_lastname_ml")) - .mobile(Long.valueOf(rs.getString("BD_mobile"))) + .mobile(rs.getLong("BD_mobile")) + // .mobile(Long.valueOf(rs.getString("BD_mobile"))) .emailid(rs.getString("BD_emailid")) .gender(rs.getString("BD_gender")) .dateofbirth(rs.getLong("BD_dateofbirth")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index e626fb72eb4..7239366d68a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -21,7 +21,8 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ .middlename_ml(rs.getString("GD_middlename_ml")) .lastname_en(rs.getString("GD_lastname_en")) .lastname_ml(rs.getString("GD_lastname_ml")) - .mobile(Long.valueOf(rs.getString("GD_mobile"))) + // .mobile(Long.valueOf(rs.getString("GD_mobile"))) + .mobile(rs.getLong("BD_mobile")) .emailid(rs.getString("GD_emailid")) .gender(rs.getString("GD_gender")) .dateofbirth(rs.getLong("GD_dateofbirth")) @@ -40,7 +41,8 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ //.profession_ml(rs.getString("GD_profession_ml")) .maritalstatusid(rs.getString("GD_maritalstatusid")) // .groomIsSpouseLiving(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) - .groomNoOfSpouse(Integer.valueOf(rs.getString("GD_livingspouseNo"))) + // .groomNoOfSpouse(Integer.valueOf(rs.getString("GD_livingspouseNo"))) + .groomNoOfSpouse(rs.getInt("GD_livingspouseNo")) // .marriageid(rs.getString("GD_marriageid")) // .photo_url(rs.getString("GD_photo_url")) From 43511f7fdef55619239e3a43b00cd02cac145ac1 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 11 Apr 2023 14:42:32 +0530 Subject: [PATCH 159/420] rowmapper changed --- .../repository/rowmapper/BaseRowMapper.java | 8 ++++---- .../repository/rowmapper/BrideDetailsRowMapper.java | 4 ++-- .../repository/rowmapper/GroomDetailsRowMapper.java | 7 ++----- .../rowmapper/MarriageApplicationRowMapper.java | 2 +- .../repository/rowmapper/WitnessDetailsRowMapper.java | 2 -- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java index 2cc853192f0..72e1056a06a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BaseRowMapper.java @@ -10,18 +10,18 @@ interface BaseRowMapper { default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { return AuditDetails.builder() .createdBy(rs.getString("MD_createdby")) - .createdTime(Long.valueOf(rs.getLong("MD_createdtime"))) + .createdTime(rs.getLong("MD_createdtime")) .lastModifiedBy(rs.getString("MD_lastmodifiedby")) - .lastModifiedTime(Long.valueOf(rs.getLong("MD_lastmodifiedtime"))) + .lastModifiedTime(rs.getLong("MD_lastmodifiedtime")) .build(); } default AuditDetails getDocumentAuditDetails(ResultSet rs) throws SQLException { return AuditDetails.builder() .createdBy(rs.getString("createdby")) - .createdTime(Long.valueOf(rs.getLong("createdtime"))) + .createdTime(rs.getLong("createdtime")) .lastModifiedBy(rs.getString("lastmodifiedby")) - .lastModifiedTime(Long.valueOf(rs.getLong("lastmodifiedtime"))) + .lastModifiedTime(rs.getLong("lastmodifiedtime")) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 6b27f553dd5..45259f1315d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -36,8 +36,8 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ .guardiannameMl(rs.getString("BD_guardianname_ml")) .guardianAadharno(rs.getString("BD_guardian_aadharno")) .maritalstatusid(rs.getString("BD_maritalstatusid")) - //.brideIsSpouseLiving(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) - .brideNoOfSpouse(Integer.valueOf(rs.getString("BD_livingspouseNo"))) + .brideIsSpouseLiving(rs.getBoolean("BD_is_spouse_living")) + .brideNoOfSpouse(rs.getInt("BD_livingspouseNo")) .brideGroom(rs.getString("BD_bride_groom")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 0f2f5d311be..748e8d5c87e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -38,12 +38,9 @@ default GroomDetails getGroomDetails (ResultSet rs) throws SQLException{ // .profession_en(rs.getString("GD_profession_en")) //.profession_ml(rs.getString("GD_profession_ml")) .maritalstatusid(rs.getString("GD_maritalstatusid")) - //.groomIsSpouseLiving(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) - .groomNoOfSpouse(Integer.valueOf(rs.getString("GD_livingspouseNo"))) + .groomIsSpouseLiving(rs.getBoolean("GD_is_spouse_living")) + .groomNoOfSpouse(rs.getInt("GD_livingspouseNo")) .brideGroom(rs.getString("GD_bride_groom")) - // .marriageid(rs.getString("GD_marriageid")) - // .photo_url(rs.getString("GD_photo_url")) - .build(); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 372e2570f19..744af2e3d3c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -41,7 +41,7 @@ public List extractData(ResultSet rs) throws SQLExce .applicationNumber(rs.getString("MD_applicationnumber")) .registrationDate(rs.getLong("MD_registration_date")) .registrationNo(rs.getString("MD_registrationno")) - //.status(rs.getString("MD_registration_status")) + .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) .witnessDetails(getWitnessDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index d6edaa5ecec..3ace0840ddd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -19,7 +19,6 @@ default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { .witness1AddressMl(rs.getString("WD1_address_ml")) .witness1Mobile(rs.getLong("WD1_mobile")) .witness1Esigned(rs.getBoolean("WD1_is_esigned")) - //.witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) .serialNo1(rs.getInt("WD1_serial_no")) .witnessId2(rs.getString("WD2_id")) .witness2AadharNo(rs.getString("WD2_aadharno")) @@ -30,7 +29,6 @@ default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { .witness2AddressMl(rs.getString("WD2_address_ml")) .witness2Mobile(rs.getLong("WD2_mobile")) .witness2Esigned(rs.getBoolean("WD2_is_esigned")) - // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) .serialNo2(rs.getInt("WD2_serial_no")) .build(); } From 4e6c42f630d9cf4b5f76229dedec15525eb3a1f0 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 11 Apr 2023 14:48:12 +0530 Subject: [PATCH 160/420] search --- .../repository/rowmapper/BaseRowMapper.java | 6 ++++-- .../repository/rowmapper/BrideRegistryRowMapper.java | 5 +++-- .../repository/rowmapper/GroomRegistryRowMapper.java | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java index 32460279cf3..7dd9a94922f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BaseRowMapper.java @@ -13,9 +13,11 @@ default AuditDetails getAuditDetails(ResultSet rs) throws SQLException { return AuditDetails.builder() .createdBy(rs.getString("MD_createdby")) - .createdTime(Long.valueOf(rs.getLong("MD_createdtime"))) + .createdTime(rs.getLong("MD_createdtime")) .lastModifiedBy(rs.getString("MD_lastmodifiedby")) - .lastModifiedTime(Long.valueOf(rs.getLong("MD_lastmodifiedtime"))) + .lastModifiedTime(rs.getLong("MD_lastmodifiedtime")) + // .lastModifiedTime(Long.valueOf(rs.getLong("MD_lastmodifiedtime"))) + // .createdTime(Long.valueOf(rs.getLong("MD_createdtime"))) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index ff366ccbc54..0c4d5387d37 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -42,8 +42,9 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ .guardianname_ml(rs.getString("BD_guardianname_ml")) .guardian_aadharno(rs.getString("BD_guardian_aadharno")) .maritalstatusid(rs.getString("BD_maritalstatusid")) - // .brideIsSpouseLiving(Boolean.valueOf(rs.getString("BD_is_spouse_living"))) - .brideNoOfSpouse(Integer.valueOf(rs.getString("BD_livingspouseNo"))) + .brideIsSpouseLiving(rs.getBoolean("BD_is_spouse_living")) + // .brideNoOfSpouse(Integer.valueOf(rs.getString("BD_livingspouseNo"))) + .brideNoOfSpouse(rs.getInt("BD_livingspouseNo")) //.photo_url(rs.getString("BD_photo_url")) // .marriageid(rs.getString("BD_marriageid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index 7239366d68a..70513899454 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -40,7 +40,7 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ // .profession_en(rs.getString("GD_profession_en")) //.profession_ml(rs.getString("GD_profession_ml")) .maritalstatusid(rs.getString("GD_maritalstatusid")) - // .groomIsSpouseLiving(Boolean.valueOf(rs.getString("GD_is_spouse_living"))) + .groomIsSpouseLiving(rs.getBoolean("GD_is_spouse_living")) // .groomNoOfSpouse(Integer.valueOf(rs.getString("GD_livingspouseNo"))) .groomNoOfSpouse(rs.getInt("GD_livingspouseNo")) // .marriageid(rs.getString("GD_marriageid")) From e8cd8ce567dc6a743eb46be278a5e26ddf783dbf Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 11 Apr 2023 15:17:42 +0530 Subject: [PATCH 161/420] search --- .../querybuilder/MarriageApplicationQueryBuilder.java | 4 ++-- .../repository/rowmapper/MarriageApplicationRowMapper.java | 2 +- .../repository/querybuilder/MarriageRegistryQueryBuilder.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index c5512863c42..2b7a355c1c2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -29,7 +29,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") - .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo,GD.is_spouse_living as GD_is_spouse_living , GD.bride_groom GD_bride_groom ,") .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") @@ -37,7 +37,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("BD.gender as BD_gender , BD.dateofbirth as BD_dateofbirth , BD.age as BD_age , BD.parent_guardian as BD_parent_guardian ,BD.fathername_en as BD_fathername_en ,") .append("BD.mothername_en as BD_mothername_en, BD.fathername_ml as BD_fathername_ml , BD.mothername_ml as BD_mothername_ml , BD.father_aadharno as BD_father_aadharno ,") .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") - .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.bride_groom as BD_bride_groom,") + .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.is_spouse_living as BD_is_spouse_living , BD.bride_groom as BD_bride_groom,") .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 744af2e3d3c..2b75722ead1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -41,7 +41,7 @@ public List extractData(ResultSet rs) throws SQLExce .applicationNumber(rs.getString("MD_applicationnumber")) .registrationDate(rs.getLong("MD_registration_date")) .registrationNo(rs.getString("MD_registrationno")) - .status(rs.getString("MD_registration_status")) + // .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) .witnessDetails(getWitnessDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 3aacaf96673..328f9e9967b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -34,7 +34,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") - .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.is_spouse_living as GD_is_spouse_living ,GD.bride_groom GD_bride_groom ,") .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") @@ -42,7 +42,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BD.gender as BD_gender , BD.dateofbirth as BD_dateofbirth , BD.age as BD_age , BD.parent_guardian as BD_parent_guardian ,BD.fathername_en as BD_fathername_en ,") .append("BD.mothername_en as BD_mothername_en, BD.fathername_ml as BD_fathername_ml , BD.mothername_ml as BD_mothername_ml , BD.father_aadharno as BD_father_aadharno ,") .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") - .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.bride_groom as BD_bride_groom,") + .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.is_spouse_living as BD_is_spouse_living ,BD.bride_groom as BD_bride_groom,") .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") From fe05fd230516cfd66c519e1413a7174fcbaff696 Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 11 Apr 2023 17:08:08 +0530 Subject: [PATCH 162/420] changes --- .../src/main/resources/application.properties | 2 +- .../validator/MarriageMDMSValidator.java | 470 ++++++++++++++++++ 2 files changed, 471 insertions(+), 1 deletion(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index c66f1873b66..88dd3d5f24e 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml,file:///D:/UPYOG/MARRIAGE 23.03.2023/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index 10915f5e097..5656e3bced0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -6,6 +6,7 @@ import java.util.Map; import org.egov.tracer.model.CustomException; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -572,4 +573,473 @@ private void validateIfMasterPresent(String[] masterNames, Map errorMap = new HashMap<>(); +// Map> masterData = getAttributeValues(mdmsdata); +// System.out.println(masterData); + + +// if (masterData.get(MarriageConstants.TENANTS) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid())) +// request.getMarriageCertificate().get(0).setTenantNameEn(); +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getGender() != null) { +// if (!masterData.get(MarriageConstants.GENDERTYPE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getGender())) +// errorMap.put("GROOM:INVALID GENDER TYPE", "The gender of the groom " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getGender() + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMaritalstatusid() != null) { +// if (!masterData.get(MarriageConstants.MARITAL_STATUS) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMaritalstatusid())) +// errorMap.put("GROOM:MARITAL STATUS INVALID", "The marital status of groom " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMaritalstatusid() + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriage_type() != null) { +// if (!masterData.get(MarriageConstants.MARRIAGE_TYPE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriage_type())) +// errorMap.put("GROOM:TYPE OF MARRIAGE INVALID", "The marriage type " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriage_type() + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() != null) { +// if (!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype())) +// errorMap.put("GROOM: MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() + " is invalid"); +// } +// +// // Jasmine 03.04.2023 +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getGender() != null) { +// if (!masterData.get(MarriageConstants.GENDERTYPE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getGender())) +// errorMap.put("BRIDE:INVALID GENDER TYPE", "The gender of the groom " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getGender() + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMaritalstatusid() != null) { +// if (!masterData.get(MarriageConstants.MARITAL_STATUS) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMaritalstatusid())) +// errorMap.put("BRIDE:MARITAL STATUS INVALID", "The marital status of groom " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMaritalstatusid() + " is invalid"); +// } +// // MASTER DETAILS VALIDATION +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid())) +// errorMap.put(" DISTRICT NAME INVALID", "The district name of marriage place " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid())) +// errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid() + " is invalid"); +// } +// // have to change as villageId +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name())) +// errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name() + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLbtype() != null) { +// if (!masterData.get(MarriageConstants.LBTYPE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLbtype())) +// errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLbtype() + " is invalid"); +// } +// +// // ***********************************groom PERMANENT address detail*********************************************************// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermtaddressCountry() != null) { +// if (!masterData.get(MarriageConstants.COUNTRY) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermtaddressCountry())) +// errorMap.put("GROOM PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermtaddressCountry() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermtaddressStateName() != null) { +// if (!masterData.get(MarriageConstants.STATE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermtaddressStateName())) +// errorMap.put("GROOM PERMANENT ADDRESS: STATE NAME INVALID", "The state name of groom " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermtaddressStateName() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPermntInKeralaAdrDistrict())) +// errorMap.put("GROOM PERMANENT ADDRESS: DISTRICT NAME INVALID", +// "groom district inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPermntInKeralaAdrDistrict() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPermntOutsideKeralaDistrict())) +// errorMap.put("GROOM PERMANENT ADDRESS: DISTRICT INVALID", "groom district outside kerala is " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntOutsideKeralaDistrict() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk())) +// errorMap.put("GROOM PERMANENT ADDRESS: TALUK NAME INVALID", "groom taluk inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntOutsideKeralaTaluk())) +// errorMap.put("GROOM PERMANENT ADDRESS: TALUK NAME INVALID", "groom taluk outside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntOutsideKeralaTaluk() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntOutsideKeralaVillage() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPermntOutsideKeralaVillage())) +// errorMap.put("GROOM PERMANENT ADDRESS: VILLAGE NAME INVALID", +// "groom village outside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPermntOutsideKeralaVillage() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrVillage())) +// errorMap.put("GROOM PERMANENT ADDRESS: VILLAGE NAME INVALID", +// "groom village inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPermntInKeralaAdrVillage() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { +// if (!masterData.get(MarriageConstants.TENANTS) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName())) +// errorMap.put("GROOM PERMANENT ADDRESS: LB NAME INVALID", "groom lbname inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { +// if (!masterData.get(MarriageConstants.POSTOFFICE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPermntInKeralaAdrPostOffice())) +// errorMap.put("GROOM PERMANENT ADDRESS: POST OFFICE INVALID", +// "groom post office inside kerala is invalid" + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPermntInKeralaAdrPostOffice() +// + " is invalid"); +// } +// +// //************************************************* */ GROOM PRESENT ADDRESS***************************************************// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentaddressCountry() != null) { +// // System.out.println("isExists"); +// if (!masterData.get(MarriageConstants.COUNTRY) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentaddressCountry())) +// errorMap.put("GROOM PRESENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentaddressCountry() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentaddressStateName() != null) { +// if (!masterData.get(MarriageConstants.STATE) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentaddressStateName())) +// errorMap.put("GROOM PRESENT ADDRESS: STATE NAME INVALID", "The state name of groom " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentaddressStateName() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaDistrict() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPresentInsideKeralaDistrict())) +// errorMap.put("GROOM PRESENT ADDRESS: DISTRICT INVALID", "groom district inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaDistrict() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPresentOutsideKeralaDistrict())) +// errorMap.put("GROOM PRESENT ADDRESS: DISTRICT INVALID", "groom district outside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentOutsideKeralaDistrict() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaTaluk() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaTaluk())) +// errorMap.put("GROOM PRESENT ADDRESS: TALUK NAME INVALID", "groom taluk inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaTaluk() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPresentOutsideKeralaTalukName())) +// errorMap.put("GROOM PRESENT ADDRESS: TALUK NAME INVALID", "groom taluk outside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentOutsideKeralaTalukName() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPresentOutsideKeralaVillageName())) +// errorMap.put("GROOM PRESENT ADDRESS: VILLAGE NAME INVALID", "groom village outdide kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPresentOutsideKeralaVillageName() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPresentInsideKeralaVillage())) +// errorMap.put("GROOM PRESENT ADDRESS: VILLAGE NAME INVALID", "groom village inside kerala" + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaVillage() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { +// if (!masterData.get(MarriageConstants.TENANTS) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaLBName())) +// errorMap.put("GROOM PRESENT ADDRESS: LB NAME INVALID", "groom lbname inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaLBName() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null) { +// if (!masterData.get(MarriageConstants.POSTOFFICE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails() +// .getPresentInsideKeralaPostOffice())) +// errorMap.put("GROOM PRESENT ADDRESS: POST OFFICE INVALID", "groom post office inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPresentInsideKeralaPostOffice() +// + " is invalid"); +// } +// //****************************** */ end of groom address details***************************************// +// //****************************** */ bride PERMANENT address details********************************************// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermtaddressCountry() != null) { +// if (!masterData.get(MarriageConstants.COUNTRY) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermtaddressCountry())) +// errorMap.put("BRIDE PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of bride " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermtaddressCountry() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermtaddressStateName() != null) { +// if (!masterData.get(MarriageConstants.STATE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermtaddressStateName())) +// errorMap.put("BRIDE PERMANENT ADDRESS: STATE NAME INVALID", "The state name of bride " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermtaddressStateName() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPermntInKeralaAdrDistrict())) +// errorMap.put("BRIDE PERMANENT ADDRESS: DISTRICT NAME INVALID", "bride district inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrDistrict() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPermntOutsideKeralaDistrict())) +// errorMap.put("BRIDE PERMANENT ADDRESS: DISTRICT INVALID", "bride district ouside kerala" + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntOutsideKeralaDistrict() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk())) +// errorMap.put("BRIDE PERMANENT ADDRESS: TALUK NAME INVALID", "bride taluk inside kerala" + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntOutsideKeralaTaluk() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntOutsideKeralaTaluk())) +// errorMap.put("BRIDE PERMANENT ADDRESS: TALUK NAME INVALID", "bride taluk ouside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntOutsideKeralaTaluk() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntOutsideKeralaVillage() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPermntOutsideKeralaVillage())) +// errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "bride village outside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntOutsideKeralaVillage() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrVillage() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrVillage())) +// errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "bride village inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrVillage() +// + " is invalid"); +// } +// System.out.println("LBName"+request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName()); +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() != null) { +// if (!masterData.get(MarriageConstants.TENANTS) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName())) +// errorMap.put("BRIDE PERMANENT ADDRESS: LB NAME INVALID", "bride lbname inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null) { +// if (!masterData.get(MarriageConstants.POSTOFFICE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPermntInKeralaAdrPostOffice())) +// errorMap.put("BRIDE PERMANENT ADDRESS: POST OFFICE INVALID", "bride post office inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrPostOffice() +// + " is invalid"); +// } +// +// // BRIDE PRESENT ADDRESS//////////// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentaddressCountry() != null) { +// // System.out.println("isExists"); +// if (!masterData.get(MarriageConstants.COUNTRY) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentaddressCountry())) +// errorMap.put("BRIDE PRESENT ADDRESS: COUNTRY NAME INVALID", "The country name of bride " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentaddressCountry() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentaddressStateName() != null) { +// if (!masterData.get(MarriageConstants.STATE) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentaddressStateName())) +// errorMap.put("BRIDE PRESENT ADDRESS: STATE NAME INVALID", "The state name of bride " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentaddressStateName() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaDistrict() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPresentInsideKeralaDistrict())) +// errorMap.put("BRIDE PRESENT ADDRESS: DISTRICT INVALID", "bride district inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaDistrict() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentOutsideKeralaDistrict() != null) { +// if (!masterData.get(MarriageConstants.DISTRICT) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPresentOutsideKeralaDistrict())) +// errorMap.put("BRIDE PRESENT ADDRESS: DISTRICT INVALID", "bride district outside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentOutsideKeralaDistrict() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaTaluk() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains( +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaTaluk())) +// errorMap.put("BRIDE PRESENT ADDRESS: TALUK NAME INVALID", "bride taluk inside kerala" + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaTaluk() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentOutsideKeralaTalukName() != null) { +// if (!masterData.get(MarriageConstants.TALUK) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPresentOutsideKeralaTalukName())) +// errorMap.put("BRIDE PRESENT ADDRESS: TALUK NAME INVALID", "bride taluk outside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentOutsideKeralaTalukName() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentOutsideKeralaVillageName() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPresentOutsideKeralaVillageName())) +// errorMap.put("BRIDE PRESENT ADDRESS: VILLAGE NAME INVALID", "bride village outside kerala" + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPresentOutsideKeralaVillageName() +// + " is invalid"); +// } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaVillage() != null) { +// if (!masterData.get(MarriageConstants.VILLAGE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPresentInsideKeralaVillage())) +// errorMap.put("BRIDE PRESENT ADDRESS: VILLAGE NAME INVALID", "bride village inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaVillage() +// + " is invalid"); +// } +// +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaLBName() != null) { +// if (!masterData.get(MarriageConstants.TENANTS) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPresentInsideKeralaLBName())) +// errorMap.put("BRIDE PRESENT ADDRESS: LB NAME INVALID", "bride lbname inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaLBName() +// + " is invalid"); +// } +// +// // System.out.println("ousidetaluk"+request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaWardNo() +// // ); +// // // if +// // (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaWardNo() +// // != null) { +// // // if (!masterData.get(MarriageConstants.WARD) +// // // +// // .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaWardNo())) +// // // errorMap.put("GROOM PERMANENT ADDRESS: WARD INVALID", "The ward of bride " +// // + +// // // +// // request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaWardNo() +// // // + " is invalid"); +// // } +// if (request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaPostOffice() != null) { +// if (!masterData.get(MarriageConstants.POSTOFFICE) +// .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails() +// .getPresentInsideKeralaPostOffice())) +// errorMap.put("BRIDE PRESENT ADDRESS: POST OFFICE INVALID", "bride post office inside kerala " + +// request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPresentInsideKeralaPostOffice() +// + " is invalid"); +// } +// //********************************* * end of bride address details************************************************// +// +// // if(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid() != null) { +// // if(!masterData.get(MarriageConstants.TALUK) +// // .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid())) +// // errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + +// // request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid()+ " is invalid"); +// // } +// // //have to change as villageId +// // if(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name() != null) { +// // if(!masterData.get(MarriageConstants.VILLAGE) +// // .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name())) +// // errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + +// // request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name()+ " is invalid"); +// // } +// // if(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLbtype() != null) { +// // if(!masterData.get(MarriageConstants.LBTYPE) +// // .contains(request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLbtype())) +// // errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + +// // request.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLbtype()+ " is invalid"); +// +// if (!CollectionUtils.isEmpty(errorMap)) +// throw new CustomException(errorMap); + +// } } From df697dbdee5ef58c01ac0364f2d13a64c5e6c29f Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 11 Apr 2023 17:51:04 +0530 Subject: [PATCH 163/420] added address mdms calls --- .../MarriageRegistryRepository.java | 65 +++++++- .../model/certmodel/MarriageCertificate.java | 21 +++ .../marriage/utils/MarriageMdmsUtil.java | 146 +++++++++++++++++- 3 files changed, 226 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 3ebaf44cfbd..adcef80e3bb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -17,6 +17,8 @@ import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPdfResponse; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertRequest; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; +import org.ksmart.marriage.utils.MarriageConstants; +import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; @@ -26,6 +28,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Map; @Slf4j @Repository @@ -41,6 +44,7 @@ public class MarriageRegistryRepository { private final JdbcTemplate jdbcTemplate; private final RestTemplate restTemplate; private final MarriageCertificateEnrichment marriageCertificateEnrichment; + private final MarriageMdmsUtil util; @Autowired public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnrichment, MarriageProducer producer, @@ -48,7 +52,7 @@ public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnr JdbcTemplate jdbcTemplate, MarriageRegistryEnrichment marriageDetailsEnrichment, MarriageRegistryQueryBuilder queryBuilder, - MarriageRegistryRowMapper marriageRegistryRowMapper, MarriageCertificateRowMapper marriageCertificateRowMapper, RestTemplate restTemplate, MarriageCertificateEnrichment marriageCertificateEnrichment) { + MarriageRegistryRowMapper marriageRegistryRowMapper, MarriageCertificateRowMapper marriageCertificateRowMapper, RestTemplate restTemplate, MarriageCertificateEnrichment marriageCertificateEnrichment, MarriageMdmsUtil util) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageRegistryEnrichment = marriageRegistryEnrichment; @@ -58,6 +62,7 @@ public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnr this.marriageCertificateRowMapper = marriageCertificateRowMapper; this.restTemplate=restTemplate; this.marriageCertificateEnrichment = marriageCertificateEnrichment; + this.util = util; } @@ -106,6 +111,56 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria // }); MarriageCertPDFRequest req = MarriageCertPDFRequest.builder().marriageCertificate(marriageCertPDFRequest.getMarriageCertificate()).requestInfo(marriageCertPDFRequest.getRequestInfo()).build(); //TODO pdf data creation + Object mdmsMarriagePlaceData = util.mDMSCallGetAddress(req.getRequestInfo() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() + , null + , null + , null + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid()); + +// Object mdmsData = util.mDMSCall(req.getRequestInfo(), req.getMarriageCertificate().get(0).getTenantid()); + Map> mdmsMap = util.getMarriageMDMSData(req,mdmsMarriagePlaceData); + req.getMarriageCertificate().get(0).setTenantNameEn(getValueFromMap(MarriageConstants.TENANTS,mdmsMap)); + req.getMarriageCertificate().get(0).setTalukNameEn(getValueFromMap(MarriageConstants.TALUK,mdmsMap)); + req.getMarriageCertificate().get(0).setDistrictNameEn(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); + req.getMarriageCertificate().get(0).setVillageNameEn(getValueFromMap(MarriageConstants.VILLAGE,mdmsMap)); + + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPresent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(req,mdmsGroomAddressData); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS,mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); + Object mdmsBrideAddressData = util.mDMSCallGetAddress(req.getRequestInfo() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getDistrictIdPresent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getStateIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getCountryIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPoNoPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getVillageNamePermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsBrideAddressMap = util.getMarriageMDMSData(req,mdmsBrideAddressData); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS,mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT,mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE,mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsBrideAddressMap)); + + marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; @@ -146,6 +201,14 @@ public void updateMarriageCertificate(MarriageCertRequest marriageCertRequest) { producer.push(marriageApplicationConfiguration.getUpdateMarriageCertificateTopic(), marriageCertRequest); } + public String getValueFromMap(String key,Map> mdmsMap){ + if(StringUtils.isNotBlank(key)&&null!=mdmsMap&&!mdmsMap.isEmpty()){ + return (mdmsMap.get(key)!=null&&!mdmsMap.get(key).isEmpty())?mdmsMap.get(key).get(0):null; + } + return null; + } + + // public List updateMarriageRegistry(MarriageRegistryRequest request) { // marriageRegistryEnrichment.enrichUpdate(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index abab8c8ee8b..1633fb27b67 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -9,6 +9,7 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; +import java.util.List; @Getter @Setter @@ -55,6 +56,21 @@ public class MarriageCertificate { @Size(max = 64) @JsonProperty("marriageTenantid") private String tenantid; + + @Size(max = 64) + @JsonProperty("marriageTenantNameEn") + private String tenantNameEn; + + @JsonProperty("talukNameEn") + private String talukNameEn; + + + @JsonProperty("districtNameEn") + private String districtNameEn; + + + @JsonProperty("villageNameEn") + private String villageNameEn; // // @Size(max = 64) // @JsonProperty("marriagePlacetype") @@ -204,6 +220,11 @@ public class MarriageCertificate { @JsonProperty("certificateStatus") private StatusEnum certificateStatus = null; + + + + + public enum StatusEnum { ACTIVE("ACTIVE"), diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 5328a53420b..fa37bc4d0d8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -1,23 +1,23 @@ package org.ksmart.marriage.utils; +import com.jayway.jsonpath.JsonPath; import lombok.extern.slf4j.Slf4j; import org.egov.common.contract.request.RequestInfo; import org.egov.mdms.model.MasterDetail; import org.egov.mdms.model.MdmsCriteria; import org.egov.mdms.model.MdmsCriteriaReq; import org.egov.mdms.model.ModuleDetail; +import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.repository.ServiceRequestRepository; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; +import java.util.*; + /*Jasmine 31.03.2023 */ @Slf4j @Component @@ -180,6 +180,114 @@ public Object mdmsCall(RequestInfo requestInfo) { } return result; } + private List getAddressRequest(String district + , String state + , String country + , String postOfficeId + , String village + , String taluk) { + // master details for marriage certificate + List marriageMasterDetails = new ArrayList<>(); + if(null!=district) { + final String filterCode = "$.[?(@.code=='" + district + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.DISTRICT).filter(filterCode).build()); + } + if(null!=state) { + final String filterCodeState = "$.[?(@.code=='" + state + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.STATE).filter(filterCodeState).build()); + } + if(null!=country) { + final String filterCodeCountry = "$.[?(@.code=='" + country + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.COUNTRY).filter(filterCodeCountry).build()); + } + if(null!=postOfficeId) { + final String filterCodePostOffice = "$.[?(@.code=='" + postOfficeId + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); + } + if(null!=village) { + final String filterCodeVillage = "$.[?(@.code=='" + village + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.VILLAGE).filter(filterCodeVillage).build()); + } + if(null!=taluk) { + //taluk + final String filterCodeTaluk = "$.[?(@.code=='" + taluk + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.TALUK).filter(filterCodeTaluk).build()); + } + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) + .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); + + return Arrays.asList(marriageModuleDtls); + } + private MdmsCriteriaReq getMDMSRequestForAddress(RequestInfo requestInfo + , String tenantId + , String presentAddressDistrict + , String presentAddressState + , String presentAddressCountry + , String presentPostOfficeId + , String presentAddressVillage + , String presentAddrTaluk) { + ModuleDetail tenantIdRequest = getTenantIdCertificate(tenantId); + List commonMasterRequest = getAddressRequest(presentAddressDistrict + ,presentAddressState + ,presentAddressCountry + ,presentPostOfficeId + ,presentAddressVillage + ,presentAddrTaluk); + + List moduleDetails = new LinkedList<>(); + moduleDetails.add(tenantIdRequest); + moduleDetails.addAll(commonMasterRequest); + + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) + .build(); + + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + + // System.out.println("mdmsreq2"+mdmsCriteriaReq); + return mdmsCriteriaReq; + } + private ModuleDetail getTenantIdCertificate(String tenantId) { + + List masterDetails = new ArrayList<>(); + + // filter to only get code field from master data + final String filterCode = "$.[?(@.code=='"+tenantId+"')].name"; + masterDetails + .add(MasterDetail.builder().name(MarriageConstants.TENANTS).filter(filterCode).build()); + + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(masterDetails) + .moduleName(MarriageConstants.TENANT_MODULE_NAME).build(); + + + return marriageModuleDtls; + } + public Object mDMSCallGetAddress(RequestInfo requestInfo + , String tenantId + , String presentAddressDistrict + , String presentAddressState + , String presentAddressCountry + , String presentPostOfficeId + , String presentAddressVillage + , String presentAddrTaluk) { + MdmsCriteriaReq mdmsCriteriaReq = getMDMSRequestForAddress(requestInfo + , tenantId + , presentAddressDistrict + , presentAddressState + , presentAddressCountry + , presentPostOfficeId + , presentAddressVillage + , presentAddrTaluk); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + return result; + } + // public Object mdmsCallForLocation (RequestInfo requestInfo, String tenantId) { // // Call MDMS microservice with MdmsCriteriaReq as params // @@ -395,4 +503,32 @@ private MdmsCriteriaReq getMdmsRequest(RequestInfo requestInfo) { // return Collections.singletonList(tenantModuleDetail); // // } + + public Map> getMarriageMDMSData(MarriageCertPDFRequest request, Object mdmsdata) { + Map errorMap = new HashMap<>(); + Map> masterData = getAttributeValues(mdmsdata); + System.out.println(masterData); + return masterData; + } + + private Map> getAttributeValues(Object mdmsdata) { + List modulepaths = Arrays.asList( + //MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH, + MarriageConstants.TENANT_JSONPATH, + MarriageConstants.COMMON_MASTER_JSONPATH); + final Map> mdmsResMap = new HashMap<>(); + // System.out.println("Jasminemodulepaths"+modulepaths); + modulepaths.forEach(modulepath -> { + try { + mdmsResMap.putAll(JsonPath.read(mdmsdata, modulepath)); + // log.error("jsonpath1" + JsonPath.read(mdmsdata, modulepath)); + } catch (Exception e) { + log.error("Error while fetching MDMS data", e); + throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, + MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); + } + + }); + return mdmsResMap; + } } \ No newline at end of file From faf407dcda72c3cbd3dfbd767321da1189366ae9 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Tue, 11 Apr 2023 13:25:03 +0530 Subject: [PATCH 164/420] application --- .../src/main/resources/application.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 3af40024c2a..edd49547adc 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -83,7 +83,8 @@ egov.idgen.host=https://ksmart-dev.lsgkerala.gov.in/ egov.idgen.path=egov-idgen/id/_generate #workflow configurations -#egov.workflow.host=http://localhost:8280 + +# egov.workflow.host=http://localhost:8280 #https://ksmart-dev.lsgkerala.gov.in/ egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition egov.workflow.host=http://localhost:8280 From 5c6903a201b36a63d98f1be2a3466ba3de737ea1 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Wed, 12 Apr 2023 10:21:46 +0530 Subject: [PATCH 165/420] Field validations --- .../MarriageApplicationValidator.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 6ac3d5bd7d5..031fe69d6bb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1124,14 +1124,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomaddressInfo.getPresentOutsideKeralaPincode() + " is invalid"); } - // if (StringUtils.isEmpty(groomaddressInfo - // .getPresentOutsideKeralaLocalityNameEn())) { - // throw new CustomException( - // "GROOM PRESENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", - // "The Postofficef " + - // groomaddressInfo.getPresentOutsideKeralaLocalityNameEn() - // + " is invalid"); - // } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaPostOfficeEn())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: POSTOFFICE INVALID ", + "The Postofficef " + + groomaddressInfo.getPresentOutsideKeralaPostOfficeEn() + + " is invalid"); + } // if (StringUtils.isEmpty(groomaddressInfo // .getPresentOutsideKeralaLocalityNameMl())) { // throw new CustomException( @@ -1150,15 +1150,15 @@ public void validateCommonFields(MarriageDetailsRequest request) { // groomaddressInfo.getPresentOutsideKeralaLocalityNameEn() // + " is invalid"); // } - // if (StringUtils.isEmpty(groomaddressInfo - // .getPresentOutsideKeralaHouseNameEn())) { - // throw new CustomException( - // "GROOM PRESENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", - // "The House Name English " - // + - // groomaddressInfo.getPresentOutsideKeralaHouseNameEn() - // + " is invalid"); - // } + if (StringUtils.isEmpty(groomaddressInfo + .getPresentOutsideKeralaHouseNameEn())) { + throw new CustomException( + "GROOM PRESENT ADDRESS OUTSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + groomaddressInfo.getPresentOutsideKeralaHouseNameEn() + + " is invalid"); + } if (StringUtils.isEmpty(groomaddressInfo .getPresentOutsideKeralaHouseNameMl())) { throw new CustomException( From df7f6477b8ceb05994eb6e77a5f25646cd3dbc0f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 12 Apr 2023 11:28:37 +0530 Subject: [PATCH 166/420] Document Search Added --- .../MarriageApplicationQueryBuilder.java | 7 ++++++ .../rowmapper/MarriageDocumentRowMapper.java | 22 ++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 2b7a355c1c2..e347099795b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -88,6 +88,12 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") + .append("DOC.id as DOC_id , DOC.tenantid as DOC_tenantid , DOC.document_name as DOC_document_name , DOC.document_type as DOC_document_type , DOC.document_description as DOC_document_description ,") + .append("DOC.filestoreid as DOC_filestoreid , DOC.document_link as DOC_document_link , DOC.file_type as DOC_file_type , DOC.file_size as DOC_file_size , DOC.marriageid as DOC_marriageid ,") + .append("DOC.bride_groom as DOC_bride_groom , DOC.active as DOC_active , DOC.applicationnumber as DOC_applicationnumber , DOC.updated_flag as DOC_updated_flag ,") + .append("DOC.registrationno as DOC_registrationno , DOC.correction_id as DOC_correction_id , DOC.correction_field_name as DOC_correction_field_name , DOC.applicationtype as DOC_applicationtype") + + .append("FROM public.eg_marriage_details as MD ") .append("INNER JOIN eg_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") .append("BD.bride_groom ='B' ") @@ -105,6 +111,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD1.serial_no = 1 ") .append("INNER JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") + .append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") .toString(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java index 17c7f2044af..46446f2bf31 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java @@ -19,12 +19,21 @@ public List extractData(ResultSet rs) throws SQLException, Dat List result = new ArrayList<>(); while (rs.next()) { result.add(MarriageDocument.builder() - .id(rs.getString("id")) - .documentName(rs.getString("document_name")) - .documentOwner(rs.getString("bride_groom")) - .fileStoreId(rs.getString("filestoreid")) - .active(rs.getBoolean("active")) - .applicationNumber(rs.getString("applicationnumber")) + .id(rs.getString("DOC_id")) + .marriageTenantid(rs.getString("DOC_tenantid")) + .documentName(rs.getString("DOC_document_name")) + .documentType(rs.getString("DOC_document_type")) + .fileStoreId(rs.getString("DOC_filestoreid")) + .documentlink(rs.getString("DOC_document_link")) + .marriageId(rs.getString("DOC_marriageid")) + .documentOwner(rs.getString("DOC_bride_groom")) + .active(rs.getBoolean("DOC_active")) + .applicationNumber(rs.getString("DOC_applicationnumber")) + .registrationNumber(rs.getString("DOC_registrationno")) + .correctionId(rs.getString("DOC_correction_id")) + .correctionFieldName(rs.getString("DOC_correction_field_name")) + .applicationType(rs.getString("DOC_applicationtype")) + .updatedFlag(rs.getInt("DOC_updated_flag")) .marriageDocAuditDetails(getDocumentAuditDetails(rs)) .build()); } @@ -34,3 +43,4 @@ public List extractData(ResultSet rs) throws SQLException, Dat } } + From a4728446924f45fca4915f06dda764c3b88df917 Mon Sep 17 00:00:00 2001 From: Sysadmin Date: Wed, 12 Apr 2023 11:32:34 +0530 Subject: [PATCH 167/420] Field validations --- .../validator/MarriageMDMSValidator.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java index 915792e3f85..6d637c25ab7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageMDMSValidator.java @@ -53,14 +53,14 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms if (request.getMarriageDetails().get(0).getMarriageType() != null) { if (!masterData.get(MarriageConstants.MARRIAGE_TYPE) .contains(request.getMarriageDetails().get(0).getMarriageType())) - errorMap.put("GROOM:TYPE OF MARRIAGE INVALID", "The marriage type " + + errorMap.put("TYPE OF MARRIAGE INVALID", "The marriage type " + request.getMarriageDetails().get(0).getMarriageType() + " is invalid"); } if (request.getMarriageDetails().get(0).getPlacetype() != null) { if (!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE) .contains(request.getMarriageDetails().get(0).getPlacetype())) - errorMap.put("GROOM: MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + + errorMap.put(" MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + request.getMarriageDetails().get(0).getPlacetype() + " is invalid"); } @@ -68,16 +68,16 @@ public void validateMarriageMDMSData(MarriageDetailsRequest request, Object mdms if (request.getMarriageDetails().get(0).getBrideDetails().getGender() != null) { if (!masterData.get(MarriageConstants.GENDERTYPE) - .contains(request.getMarriageDetails().get(0).getGroomDetails().getGender())) + .contains(request.getMarriageDetails().get(0).getBrideDetails().getGender())) errorMap.put("BRIDE:INVALID GENDER TYPE", "The gender of the groom " + - request.getMarriageDetails().get(0).getGroomDetails().getGender() + " is invalid"); + request.getMarriageDetails().get(0).getBrideDetails().getGender() + " is invalid"); } if (request.getMarriageDetails().get(0).getBrideDetails().getMaritalstatusid() != null) { if (!masterData.get(MarriageConstants.MARITAL_STATUS) - .contains(request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid())) + .contains(request.getMarriageDetails().get(0).getBrideDetails().getMaritalstatusid())) errorMap.put("BRIDE:MARITAL STATUS INVALID", "The marital status of groom " + - request.getMarriageDetails().get(0).getGroomDetails().getMaritalstatusid() + " is invalid"); + request.getMarriageDetails().get(0).getBrideDetails().getMaritalstatusid() + " is invalid"); } // MASTER DETAILS VALIDATION From f8740e349c592264f58225c204a60457520eb917 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 12 Apr 2023 12:37:46 +0530 Subject: [PATCH 168/420] fix --- .../querybuilder/MarriageApplicationQueryBuilder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index e347099795b..7aa6fb6eaa1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -88,10 +88,10 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") - .append("DOC.id as DOC_id , DOC.tenantid as DOC_tenantid , DOC.document_name as DOC_document_name , DOC.document_type as DOC_document_type , DOC.document_description as DOC_document_description ,") - .append("DOC.filestoreid as DOC_filestoreid , DOC.document_link as DOC_document_link , DOC.file_type as DOC_file_type , DOC.file_size as DOC_file_size , DOC.marriageid as DOC_marriageid ,") - .append("DOC.bride_groom as DOC_bride_groom , DOC.active as DOC_active , DOC.applicationnumber as DOC_applicationnumber , DOC.updated_flag as DOC_updated_flag ,") - .append("DOC.registrationno as DOC_registrationno , DOC.correction_id as DOC_correction_id , DOC.correction_field_name as DOC_correction_field_name , DOC.applicationtype as DOC_applicationtype") +// .append("DOC.id as DOC_id , DOC.tenantid as DOC_tenantid , DOC.document_name as DOC_document_name , DOC.document_type as DOC_document_type , DOC.document_description as DOC_document_description ,") +// .append("DOC.filestoreid as DOC_filestoreid , DOC.document_link as DOC_document_link , DOC.file_type as DOC_file_type , DOC.file_size as DOC_file_size , DOC.marriageid as DOC_marriageid,") +// .append("DOC.bride_groom as DOC_bride_groom , DOC.active as DOC_active , DOC.applicationnumber as DOC_applicationnumber , DOC.updated_flag as DOC_updated_flag,") +// .append("DOC.registrationno as DOC_registrationno , DOC.correction_id as DOC_correction_id , DOC.correction_field_name as DOC_correction_field_name , DOC.applicationtype as DOC_applicationtype") .append("FROM public.eg_marriage_details as MD ") @@ -111,7 +111,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD1.serial_no = 1 ") .append("INNER JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") - .append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") +// .append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") .toString(); From 1c7cd76fcda5271a0471b63e0750857c1b7df364 Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 12 Apr 2023 12:48:24 +0530 Subject: [PATCH 169/420] added address in certificate --- .../MarriageRegistryEnrichment.java | 84 ++++++++++++++++++- .../MarriageRegistryRepository.java | 66 ++++++++++++++- .../model/certmodel/MarriageCertificate.java | 9 ++ 3 files changed, 157 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 40796349c83..defbec9682a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -10,6 +10,8 @@ import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; // import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetail; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; @@ -513,4 +515,84 @@ private void validateFileCodes(List fileCodes, int count) { } -} + private String setGroomPermanentAddressForCertificate(MarriageRegistryDetails registryDetails) { + + StringBuilder groomAddressBuilder = new StringBuilder(); + if (registryDetails.getGroomAddressDetails() != null) { + + + if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != null && registryDetails.getGroomAddressDetails().getPermtaddressStateName() != null) { + if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { + + registryDetails.getGroomAddressDetails().setCountryIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressCountry()); + + registryDetails.getGroomAddressDetails().setStateIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressStateName()); + + registryDetails.getGroomAddressDetails().setDistrictIdPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + + registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + registryDetails.getGroomAddressDetails().setLocalityMlPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + + registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); + registryDetails.getGroomAddressDetails().setStreetNameMlPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); + + registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); + registryDetails.getGroomAddressDetails().setHouseNameNoMlPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); + registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + registryDetails.getGroomAddressDetails().setVillageNamePermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + } else { + registryDetails.getGroomAddressDetails().setCountryIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressCountry()); + + registryDetails.getGroomAddressDetails().setStateIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressStateName()); + + registryDetails.getGroomAddressDetails().setDistrictIdPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + + registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + registryDetails.getGroomAddressDetails().setLocalityMlPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + + registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); + registryDetails.getGroomAddressDetails().setStreetNameMlPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); + + registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); + registryDetails.getGroomAddressDetails().setHouseNameNoMlPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); + + registryDetails.getGroomAddressDetails().setVillageNamePermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + + registryDetails.getGroomAddressDetails().setPermntOthrTalukName(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + registryDetails.getGroomAddressDetails().setPermntOthPostOfficeEn(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + + registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + + } + } + + } else { +// if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { + registryDetails.getGroomAddressDetails().setCountryIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressCountry()); + registryDetails.getGroomAddressDetails().setVillageNamePermanent(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + registryDetails.getGroomAddressDetails().setTownOrVillagePermanent(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + + registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + + registryDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + registryDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + + registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + + +// } + } + + + } + return groomAddressBuilder.toString(); + + } + + + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index adcef80e3bb..30efc26d536 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -111,6 +111,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria // }); MarriageCertPDFRequest req = MarriageCertPDFRequest.builder().marriageCertificate(marriageCertPDFRequest.getMarriageCertificate()).requestInfo(marriageCertPDFRequest.getRequestInfo()).build(); //TODO pdf data creation + //Setting Marriage Place Data from MDMS Object mdmsMarriagePlaceData = util.mDMSCallGetAddress(req.getRequestInfo() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() @@ -126,7 +127,62 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria req.getMarriageCertificate().get(0).setTalukNameEn(getValueFromMap(MarriageConstants.TALUK,mdmsMap)); req.getMarriageCertificate().get(0).setDistrictNameEn(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); req.getMarriageCertificate().get(0).setVillageNameEn(getValueFromMap(MarriageConstants.VILLAGE,mdmsMap)); + StringBuilder marriageAddr = new StringBuilder(); + + + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype())) { + + + if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_HOUSE)) { + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en()+","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en()+","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn()+","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark()+","); + } + }else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) + || req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) + { + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid()+","); + } + } + + else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( + MarriageConstants.PLACE_TYPE_PRIVATE_PLACE) || + (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( + MarriageConstants.PLACE_TYPE_PUBLIC_PLACE))) { + if (!StringUtils.isEmpty( + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn()+","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en()+","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en()+","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark()+","); + } + + + } + req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(marriageAddr.toString()); + } + + StringBuilder groomAddr = new StringBuilder(); + //Setting Groom Address data from MDMS Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPresent() @@ -143,7 +199,15 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap)); req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); - Object mdmsBrideAddressData = util.mDMSCallGetAddress(req.getRequestInfo() +// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().get).append(", "); +// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); +// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName()).append(", "); +// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKerala).append(", "); +// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); + //Setting groom NRI address + + //Setting bride address data from MDMS + Object mdmsBrideAddressData = util.mDMSCallGetAddress(req.getRequestInfo() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getDistrictIdPresent() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getStateIdPermanent() diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index 1633fb27b67..49db843028a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -71,6 +71,15 @@ public class MarriageCertificate { @JsonProperty("villageNameEn") private String villageNameEn; + + @JsonProperty("groomPermntFullAddr") + private String groomPermntFullAddr; + + @JsonProperty("bridePermntFullAddr") + private String bridePermntFullAddr; + + @JsonProperty("marriagePlaceFullAddr") + private String marriagePlaceFullAddr; // // @Size(max = 64) // @JsonProperty("marriagePlacetype") From da75e7e8244265a7b10923a23ed3eb47e1ee7891 Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 12 Apr 2023 14:40:33 +0530 Subject: [PATCH 170/420] incomplete groom address setting --- .../enrichment/MarriageRegistryEnrichment.java | 2 +- .../repository/MarriageRegistryRepository.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index defbec9682a..7d083dc3971 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -525,7 +525,7 @@ private String setGroomPermanentAddressForCertificate(MarriageRegistryDetails re if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - registryDetails.getGroomAddressDetails().setCountryIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressCountry()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressCountry()).append(","); registryDetails.getGroomAddressDetails().setStateIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressStateName()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 30efc26d536..a05129acb4c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -224,7 +224,8 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsBrideAddressMap)); req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsBrideAddressMap)); - + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; From b6914dabae46be0a8cc168ba5cfa6a3ab794dd46 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 12 Apr 2023 14:41:46 +0530 Subject: [PATCH 171/420] Document Search Added --- .../MarriageApplicationQueryBuilder.java | 14 ++++----- .../rowmapper/DocumentRowMapper.java | 29 +++++++++++++++++++ .../MarriageApplicationRowMapper.java | 4 ++- .../rowmapper/MarriageDocumentRowMapper.java | 19 +++--------- .../web/model/MarriageApplicationDetails.java | 2 ++ 5 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 7aa6fb6eaa1..80cb91dfb99 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -25,7 +25,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") - .append("GD.firstname_ml as GD_firstname_ml , GD.middlename_ml as GD_middlename_ml , GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,") + .append("GD.firstname_ml as GD_firstname_ml , GD.middlename_ml as GD_middlename_ml , GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,") .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") @@ -86,12 +86,12 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") - .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") + .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no, ") -// .append("DOC.id as DOC_id , DOC.tenantid as DOC_tenantid , DOC.document_name as DOC_document_name , DOC.document_type as DOC_document_type , DOC.document_description as DOC_document_description ,") -// .append("DOC.filestoreid as DOC_filestoreid , DOC.document_link as DOC_document_link , DOC.file_type as DOC_file_type , DOC.file_size as DOC_file_size , DOC.marriageid as DOC_marriageid,") -// .append("DOC.bride_groom as DOC_bride_groom , DOC.active as DOC_active , DOC.applicationnumber as DOC_applicationnumber , DOC.updated_flag as DOC_updated_flag,") -// .append("DOC.registrationno as DOC_registrationno , DOC.correction_id as DOC_correction_id , DOC.correction_field_name as DOC_correction_field_name , DOC.applicationtype as DOC_applicationtype") + .append("DOC.id as DOC_id , DOC.tenantid as DOC_tenantid , DOC.document_name as DOC_document_name , DOC.document_type as DOC_document_type , DOC.document_description as DOC_document_description ,") + .append("DOC.filestoreid as DOC_filestoreid , DOC.document_link as DOC_document_link , DOC.file_type as DOC_file_type , DOC.file_size as DOC_file_size , DOC.marriageid as DOC_marriageid ,") + .append("DOC.bride_groom as DOC_bride_groom , DOC.active as DOC_active , DOC.applicationnumber as DOC_applicationnumber , DOC.updated_flag as DOC_updated_flag ,") + .append("DOC.registrationno as DOC_registrationno , DOC.correction_id as DOC_correction_id , DOC.correction_field_name as DOC_correction_field_name , DOC.applicationtype as DOC_applicationtype ") .append("FROM public.eg_marriage_details as MD ") @@ -111,7 +111,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD1.serial_no = 1 ") .append("INNER JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") -// .append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") + .append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") .toString(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java new file mode 100644 index 00000000000..136576cf316 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java @@ -0,0 +1,29 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface DocumentRowMapper { + default MarriageDocument getMarriageDocument(ResultSet rs) throws SQLException { + return MarriageDocument.builder() + .id(rs.getString("DOC_id")) + .marriageTenantid(rs.getString("DOC_tenantid")) + .documentName(rs.getString("DOC_document_name")) + .documentType(rs.getString("DOC_document_type")) + .fileStoreId(rs.getString("DOC_filestoreid")) + .documentlink(rs.getString("DOC_document_link")) + .marriageId(rs.getString("DOC_marriageid")) + .documentOwner(rs.getString("DOC_bride_groom")) + .active(rs.getBoolean("DOC_active")) + .applicationNumber(rs.getString("DOC_applicationnumber")) + .registrationNumber(rs.getString("DOC_registrationno")) + .correctionId(rs.getString("DOC_correction_id")) + .correctionFieldName(rs.getString("DOC_correction_field_name")) + .applicationType(rs.getString("DOC_applicationtype")) + .updatedFlag(rs.getInt("DOC_updated_flag")) + .build(); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 2b75722ead1..717253cb4d3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -5,12 +5,13 @@ import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.stereotype.Component; +import javax.swing.text.Document; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; @Component -public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper{ +public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper,DocumentRowMapper{ @Override public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null @@ -47,6 +48,7 @@ public List extractData(ResultSet rs) throws SQLExce .witnessDetails(getWitnessDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) + .marriageDocument(getMarriageDocument(rs)) .auditDetails(getAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java index 46446f2bf31..c97e124d61c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java @@ -19,21 +19,10 @@ public List extractData(ResultSet rs) throws SQLException, Dat List result = new ArrayList<>(); while (rs.next()) { result.add(MarriageDocument.builder() - .id(rs.getString("DOC_id")) - .marriageTenantid(rs.getString("DOC_tenantid")) - .documentName(rs.getString("DOC_document_name")) - .documentType(rs.getString("DOC_document_type")) - .fileStoreId(rs.getString("DOC_filestoreid")) - .documentlink(rs.getString("DOC_document_link")) - .marriageId(rs.getString("DOC_marriageid")) - .documentOwner(rs.getString("DOC_bride_groom")) - .active(rs.getBoolean("DOC_active")) - .applicationNumber(rs.getString("DOC_applicationnumber")) - .registrationNumber(rs.getString("DOC_registrationno")) - .correctionId(rs.getString("DOC_correction_id")) - .correctionFieldName(rs.getString("DOC_correction_field_name")) - .applicationType(rs.getString("DOC_applicationtype")) - .updatedFlag(rs.getInt("DOC_updated_flag")) + .id(rs.getString("id")) + .documentType(rs.getString("document_type")) + .documentOwner(rs.getString("bride_groom")) + .applicationNumber(rs.getString("applicationnumber")) .marriageDocAuditDetails(getDocumentAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 3f0b7388ea9..067d604b063 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -138,6 +138,8 @@ public class MarriageApplicationDetails { @JsonProperty("WitnessDetails") private WitnessDetails witnessDetails; + @JsonProperty("MarriageDocument") + private MarriageDocument marriageDocument; //Workflow 29/03.2023 Jasmine @Size(max = 64) @JsonProperty("action") From d771d5a136787424eba37e689e5094fffb7ccffd Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 12 Apr 2023 15:05:43 +0530 Subject: [PATCH 172/420] rule engine --- .../service/MarriageApplicationService.java | 46 ++++---- .../MarriageApplicationValidator.java | 109 +++++++++++++++++- .../web/enums/ErrorCodes.java | 1 + .../web/model/MarriageApplicationDetails.java | 5 + .../web/model/marriage/WorkFlowCheck.java | 17 +++ .../MarriageRegistryQueryBuilder.java | 2 +- .../GroomRegistryAddressRowMapper.java | 1 + .../rowmapper/WitnessRegistryRowMapper.java | 5 + .../marriage/utils/MarriageConstants.java | 3 + .../marriage/utils/MarriageMdmsUtil.java | 7 +- 10 files changed, 172 insertions(+), 24 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WorkFlowCheck.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 66932fb9756..8ef3952279c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -10,6 +10,7 @@ import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WorkFlowCheck; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.marriageapplication.validator.MarriageApplicationValidator; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; @@ -51,8 +52,11 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication } public List saveMarriageDetails(MarriageDetailsRequest request) { - validatorService.validateCommonFields( request); + + WorkFlowCheck wfc = new WorkFlowCheck(); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + validatorService.ruleEngineMarriage(request, wfc, mdmsData); + validatorService.validateCommonFields( request); mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); @@ -60,16 +64,16 @@ public List saveMarriageDetails(MarriageDetailsReque if (request.getMarriageDetails().get(0).isWorkflow()){ workflowIntegrator.callWorkFlow(request); } - // request.getMarriageDetails().forEach(marriage->{ - // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - // List demands = new ArrayList<>(); - // Demand demand = new Demand(); - // demand.setTenantId(marriage.getTenantid()); - // demand.setConsumerCode(marriage.getApplicationNumber()); - // demands.add(demand); - // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); - // } - // }); + request.getMarriageDetails().forEach(marriage->{ + if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + List demands = new ArrayList<>(); + Demand demand = new Demand(); + demand.setTenantId(marriage.getTenantid()); + demand.setConsumerCode(marriage.getApplicationNumber()); + demands.add(demand); + marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + } + }); return request.getMarriageDetails(); } @@ -90,16 +94,16 @@ public List updateMarriageDetails(MarriageDetailsReq workflowIntegrator.callWorkFlow(request); } producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); - // request.getMarriageDetails().forEach(marriage->{ - // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - // List demands = new ArrayList<>(); - // Demand demand = new Demand(); - // demand.setTenantId(marriage.getTenantid()); - // demand.setConsumerCode(marriage.getApplicationNumber()); - // demands.add(demand); - // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); - // } - // }); + request.getMarriageDetails().forEach(marriage->{ + if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + List demands = new ArrayList<>(); + Demand demand = new Demand(); + demand.setTenantId(marriage.getTenantid()); + demand.setConsumerCode(marriage.getApplicationNumber()); + demands.add(demand); + marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + } + }); return request.getMarriageDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 6ac3d5bd7d5..4e0d5411858 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -4,6 +4,10 @@ import org.egov.tracer.model.CustomException; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; + +import java.util.Calendar; +import java.util.Date; +import java.util.LinkedHashMap; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; @@ -11,10 +15,17 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WorkFlowCheck; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.stereotype.Component; + +import com.jayway.jsonpath.JsonPath; + import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_UPDATE; import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_REQUIRED; +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_CREATE; + + //import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; @@ -41,7 +52,103 @@ public void validateUpdate(MarriageDetailsRequest request, List marriageApplication = request.getMarriageDetails(); + for (MarriageApplicationDetails marriage : marriageApplication) { + dateOfMarriage = marriage.getDateofmarriage(); + wfCode = marriage.getWorkflowcode(); + applicationType = marriage.getModuleCode(); + } + if (dateOfMarriage == null) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Date of birth is required for create request."); + } else { + validateDoM(dateOfMarriage, wfCode,applicationType,mdmsdata, wfc); + } + if (marriageApplication!=null){ + marriageApplication.forEach(marriagedtls -> { + + Long dom = marriagedtls.getDateofmarriage(); + java.sql.Date domDate=new java.sql.Date(dom); + int diffDays= getDaysDiff(domDate); + + if(diffDays <= 45){ + marriagedtls.setWfnormalRegn(true); + } + else if(diffDays > 45 && diffDays <= 1825){ + marriagedtls.setWfdelayedWithinFiveYear(true); + } + else if(diffDays > 1825){ + marriagedtls.setWfdelayedAfterFiveYear(true); + } + }); + } + } + //Jasmine - Date of Marriage 11.04.2023 + public int getDaysDiff(Date dateToCheck) + { + long diffMilliseconds = new Date().getTime() - dateToCheck.getTime(); + double diffSeconds = diffMilliseconds / 1000; + double diffMinutes = diffSeconds / 60; + double diffHours = diffMinutes / 60; + double diffDays = diffHours / 24; + + return (int) Math.round(diffDays); + } + //Jasmine - Date of Marriage 11.04.2023 + private void validateDoM(Long dateOfMarriage, String wfCode, String applicationType,Object mdmsData, WorkFlowCheck wfc) { + Calendar calendar = Calendar.getInstance(); + Long currentDate = calendar.getTimeInMillis(); + + if (dateOfMarriage > currentDate) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Date of death should be less than or same as current date."); + } else { + wfc = checkValidation(mdmsData, dateOfMarriage, wfc); + + if(!wfc.getWorkflowCode().equals(wfCode)) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Workflow code from the application request is wrong."); + } + if(!wfc.getApplicationType().equals(applicationType)) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Application type from the application request is wrong."); + } + } + } + // Validate Marriage date MDMS data + public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkFlowCheck wfc) { + // WorkFlowCheck wfc = new WorkFlowCheck(); + Calendar calendar = Calendar.getInstance(); + Long currentDate = calendar.getTimeInMillis(); + List> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); + for (int n = 0; n < wfLists.size(); n++) { + String startStr = wfLists.get(n).get("startdateperiod").toString(); + String endStr = wfLists.get(n).get("enddateperiod").toString(); + Long start = Long.parseLong(startStr); + Long end = Long.parseLong(endStr); + Long comp = currentDate - dateOfMarriage; + + System.out.println("StartDate " +start ); + System.out.println("endDate " +end ); + System.out.println("compDate " +comp ); + if (comp > start && comp <= end) + { + wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); + wfc.setWorkflowCode(wfLists.get(n).get("WorkflowCode").toString()); + wfc.setPayment(Boolean.getBoolean(wfLists.get(n).get("payment").toString())); + wfc.setAmount(Integer.parseInt(wfLists.get(n).get("amount").toString())); + wfc.setActive(Boolean.getBoolean(wfLists.get(n).get("active").toString())); + } + } + System.out.println("wfCodetesting"+wfc); + return wfc; + } public void validateCommonFields(MarriageDetailsRequest request) { List marriageApplication = request.getMarriageDetails(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java index 4898d56a7f4..a9fd46dfca1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java @@ -11,6 +11,7 @@ public enum ErrorCodes { MARRIAGE_DETAILS_REQUIRED("REQUIRED"), MARRIAGE_DETAILS_NOT_FOUND("NOT_FOUND"), MARRIAGE_DETAILS_INVALID_SEARCH_CRITERIA("INVALID_CRITERIA"), + MARRIAGE_DETAILS_INVALID_CREATE("INVALID_CREATE"), MARRIAGE_DETAILS_INVALID_UPDATE("INVALID_UPDATE"), MDMS_DATA_ERROR("MDMS_DATA_ERROR"), INVALID_SEARCH("INVALID_SEARCH"), diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 3f0b7388ea9..73dafc289f3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -195,6 +195,11 @@ public class MarriageApplicationDetails { @Valid private List MarriageDocuments = null; + private boolean wfnormalRegn ; + private boolean wfdelayedWithinFiveYear ; + private boolean wfdelayedAfterFiveYear ; + + // public void setStatus(String s) { // } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WorkFlowCheck.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WorkFlowCheck.java new file mode 100644 index 00000000000..0c31e17f843 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WorkFlowCheck.java @@ -0,0 +1,17 @@ +package org.ksmart.marriage.marriageapplication.web.model.marriage; + +import lombok.*; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@EqualsAndHashCode +public class WorkFlowCheck { + private String WorkflowCode = null; + private String ApplicationType = null; + private Boolean payment = null; + private Integer amount = 0; + private Boolean active = null; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 328f9e9967b..e01fe7a510c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -26,7 +26,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") - .append("MD.applicationnumber as MD_applicationnumber ,") + .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java index 1dda25e1947..6c10063beae 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -58,6 +58,7 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) + .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) // .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index 777d21c2bb6..5e6b2eec8ce 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -33,6 +33,11 @@ default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLExcepti .witness2Mobile(rs.getLong("WD2_mobile")) .serial_no2(rs.getInt("WD1_serial_no")) .witness2Esigned(rs.getBoolean("WD2_is_esigned")) + .brideUrl(rs.getString("MD_brideurl")) + .groomUrl(rs.getString("MD_groomurl")) + .imageUuid(rs.getString("MD_imageuuid")) + .brideFilestoreId(rs.getString("MD_bride_filestoreid")) + .groomFilestoreId(rs.getString("MD_groom_filestoreid")) // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index beb5ded3f42..1aa96e2af41 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -150,5 +150,8 @@ public class MarriageConstants { public static final String APPLICATION_NEW = "new"; + public static final String CR_MDMS_MARRIAGE_NEW_WF_JSONPATH = "$.MdmsRes.birth-death-service.WorkFlowMarriage"; + + public static final String CR_MDMS_WORKFLOW_NEW = "WorkFlowMarriage"; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 5328a53420b..388cd1e0822 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -140,7 +140,8 @@ private ModuleDetail getCommonMastersRequest() { //Religion final String filterCodePostOffice = "$.[?(@.active==true)].code"; marriageMasterDetails - .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); + .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); @@ -162,6 +163,10 @@ private List getMarriageListRequest() { marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.MARRIAGE_TYPE).filter(filterCodeMarriageType).build()); + // Add Module workflow + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.CR_MDMS_WORKFLOW_NEW).build()); + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) .moduleName(MarriageConstants.BND_MODULE_NAME).build(); From 21103296dedb7bb701b9c068cadd011101b79841 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 12 Apr 2023 15:06:59 +0530 Subject: [PATCH 173/420] rule engine --- .../src/main/resources/application.properties | 6 +++--- .../src/main/resources/application.properties | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index a36bf1b98ca..7b9ff08a9f1 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm #Set context root server.port = 9082 @@ -12,7 +12,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-correction.yml,classpath:marriage-registry.yml,file:////home/neenu/Documents/marriage/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-registry.yml,file:///D:/UPYOG/MARRIAGE 23.03.2023/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 3af40024c2a..f79786a1948 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true From 1df76a86442821cca1600f9454f1d9e929a2d83a Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 12 Apr 2023 16:19:52 +0530 Subject: [PATCH 174/420] rule engine --- .../MarriageApplicationQueryBuilder.java | 12 +++--- .../rowmapper/DocumentRowMapper.java | 13 +++++-- .../MarriageApplicationRowMapper.java | 2 +- .../MarriageApplicationValidator.java | 17 +++++---- .../web/model/MarriageApplicationDetails.java | 4 +- .../MarriageRegistryEnrichment.java | 38 ++++++++----------- .../marriage/utils/MarriageMdmsUtil.java | 2 +- 7 files changed, 46 insertions(+), 42 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 80cb91dfb99..1a509b19352 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -86,12 +86,12 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") - .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no, ") + .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") - .append("DOC.id as DOC_id , DOC.tenantid as DOC_tenantid , DOC.document_name as DOC_document_name , DOC.document_type as DOC_document_type , DOC.document_description as DOC_document_description ,") - .append("DOC.filestoreid as DOC_filestoreid , DOC.document_link as DOC_document_link , DOC.file_type as DOC_file_type , DOC.file_size as DOC_file_size , DOC.marriageid as DOC_marriageid ,") - .append("DOC.bride_groom as DOC_bride_groom , DOC.active as DOC_active , DOC.applicationnumber as DOC_applicationnumber , DOC.updated_flag as DOC_updated_flag ,") - .append("DOC.registrationno as DOC_registrationno , DOC.correction_id as DOC_correction_id , DOC.correction_field_name as DOC_correction_field_name , DOC.applicationtype as DOC_applicationtype ") + // .append("DOC.id as DOC_id , DOC.tenantid as DOC_tenantid , DOC.document_name as DOC_document_name , DOC.document_type as DOC_document_type , DOC.document_description as DOC_document_description ,") + // .append("DOC.filestoreid as DOC_filestoreid , DOC.document_link as DOC_document_link , DOC.file_type as DOC_file_type , DOC.file_size as DOC_file_size , DOC.marriageid as DOC_marriageid ,") + // .append("DOC.bride_groom as DOC_bride_groom , DOC.active as DOC_active , DOC.applicationnumber as DOC_applicationnumber , DOC.updated_flag as DOC_updated_flag ,") + // .append("DOC.registrationno as DOC_registrationno , DOC.correction_id as DOC_correction_id , DOC.correction_field_name as DOC_correction_field_name , DOC.applicationtype as DOC_applicationtype ") .append("FROM public.eg_marriage_details as MD ") @@ -111,7 +111,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("WD1.serial_no = 1 ") .append("INNER JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") - .append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") + // .append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") .toString(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java index 136576cf316..46bb7b8e3ea 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java @@ -5,10 +5,15 @@ import java.sql.ResultSet; import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; public interface DocumentRowMapper { - default MarriageDocument getMarriageDocument(ResultSet rs) throws SQLException { - return MarriageDocument.builder() + default List getMarriageDocument(ResultSet rs) throws SQLException { + List result = new ArrayList<>(); + while (rs.next()) { + result.add(MarriageDocument.builder() + // return MarriageDocument.builder() .id(rs.getString("DOC_id")) .marriageTenantid(rs.getString("DOC_tenantid")) .documentName(rs.getString("DOC_document_name")) @@ -24,6 +29,8 @@ default MarriageDocument getMarriageDocument(ResultSet rs) throws SQLException { .correctionFieldName(rs.getString("DOC_correction_field_name")) .applicationType(rs.getString("DOC_applicationtype")) .updatedFlag(rs.getInt("DOC_updated_flag")) - .build(); + .build()); + } + return result; } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 717253cb4d3..99d11299d0e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -48,7 +48,7 @@ public List extractData(ResultSet rs) throws SQLExce .witnessDetails(getWitnessDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) - .marriageDocument(getMarriageDocument(rs)) + // .MarriageDocuments(.extractData(rs)) .auditDetails(getAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 0aad5d71433..499d1c98443 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -126,17 +126,18 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF // WorkFlowCheck wfc = new WorkFlowCheck(); Calendar calendar = Calendar.getInstance(); Long currentDate = calendar.getTimeInMillis(); + List> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); for (int n = 0; n < wfLists.size(); n++) { String startStr = wfLists.get(n).get("startdateperiod").toString(); String endStr = wfLists.get(n).get("enddateperiod").toString(); - Long start = Long.parseLong(startStr); - Long end = Long.parseLong(endStr); - Long comp = currentDate - dateOfMarriage; + Long start = Long.parseLong(startStr); + Long end = Long.parseLong(endStr); + Long comp = currentDate - dateOfMarriage; - System.out.println("StartDate " +start ); - System.out.println("endDate " +end ); - System.out.println("compDate " +comp ); + // System.out.println("StartDate " +start ); + // System.out.println("endDate " +end ); + // System.out.println("compDate " +comp ); if (comp > start && comp <= end) { wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); @@ -144,9 +145,11 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF wfc.setPayment(Boolean.getBoolean(wfLists.get(n).get("payment").toString())); wfc.setAmount(Integer.parseInt(wfLists.get(n).get("amount").toString())); wfc.setActive(Boolean.getBoolean(wfLists.get(n).get("active").toString())); + System.out.println("wfCodetesting"+wfLists.get(n).get("WorkflowCode").toString()); } } - System.out.println("wfCodetesting"+wfc); + + /// System.out.println("wfCodetesting"+wfLists.get(n).get("WorkflowCode").toString()); return wfc; } public void validateCommonFields(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index a802658815e..5fcf329277f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -138,8 +138,8 @@ public class MarriageApplicationDetails { @JsonProperty("WitnessDetails") private WitnessDetails witnessDetails; - @JsonProperty("MarriageDocument") - private MarriageDocument marriageDocument; + // @JsonProperty("MarriageDocument") + // private MarriageDocument marriageDocument; //Workflow 29/03.2023 Jasmine @Size(max = 64) @JsonProperty("action") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 7d083dc3971..c3d30b17fba 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -109,12 +109,12 @@ private void setRegistrationNumber(MarriageRegistryRequest request) { marriage.setRegistrationDate(currentTime); // } }); - } + } -//Jasmine 28.03.2023 -private void setGroomPresentAddress(MarriageRegistryRequest request) { + //Jasmine 28.03.2023 + private void setGroomPresentAddress(MarriageRegistryRequest request) { - request.getMarriageDetails() + request.getMarriageDetails() .forEach(marriage ->{ if (marriage.getGroomAddressDetails()!=null) { @@ -189,7 +189,7 @@ private void setGroomPresentAddress(MarriageRegistryRequest request) { } else { -// if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { + // if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); @@ -204,18 +204,15 @@ private void setGroomPresentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); - - - // } } } } }); -} + } -private void setGroomPermanentAddress(MarriageRegistryRequest request) { - request.getMarriageDetails() + private void setGroomPermanentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() .forEach(marriage-> { if (marriage.getGroomAddressDetails()!=null){ @@ -302,10 +299,10 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { }); -} + } -private void setBridePresentAddress(MarriageRegistryRequest request) { - request.getMarriageDetails() + private void setBridePresentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() .forEach(marriage ->{ if (marriage.getBrideAddressDetails()!=null) { @@ -407,14 +404,14 @@ private void setBridePresentAddress(MarriageRegistryRequest request) { } - }); + }); -} + } -private void setBridePermanentAddress(MarriageRegistryRequest request) { - request.getMarriageDetails() + private void setBridePermanentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() .forEach(marriage-> { if (marriage.getBrideAddressDetails()!=null){ @@ -583,11 +580,8 @@ private String setGroomPermanentAddressForCertificate(MarriageRegistryDetails re registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - -// } } - } return groomAddressBuilder.toString(); @@ -595,4 +589,4 @@ private String setGroomPermanentAddressForCertificate(MarriageRegistryDetails re - } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 5c095458d48..b8536108f98 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -512,7 +512,7 @@ private MdmsCriteriaReq getMdmsRequest(RequestInfo requestInfo) { public Map> getMarriageMDMSData(MarriageCertPDFRequest request, Object mdmsdata) { Map errorMap = new HashMap<>(); Map> masterData = getAttributeValues(mdmsdata); - System.out.println(masterData); + // System.out.println(masterData); return masterData; } From 9ddec2b63ad830761e4b0e9a16728c9fd50a8b91 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 12 Apr 2023 16:32:21 +0530 Subject: [PATCH 175/420] AddressForCertificate --- .../model/marriage/GroomAddressDetails.java | 1 + .../MarriageRegistryEnrichment.java | 135 +++++++++++++----- .../model/BrideRegistryAddressDetails.java | 4 + .../model/GroomRegistryAddressDetails.java | 3 + 4 files changed, 109 insertions(+), 34 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 025b9ab02c4..24e924fda47 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -521,6 +521,7 @@ public class GroomAddressDetails { @Size(max = 64) @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; + @Size(max = 10) @JsonProperty("outSideIndiaPostCodePermanent") private String outSideIndiaPostCodepermanent; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index c3d30b17fba..84bcf15776a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -287,6 +287,7 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); @@ -484,6 +485,9 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + + marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + // } } @@ -522,63 +526,58 @@ private String setGroomPermanentAddressForCertificate(MarriageRegistryDetails re if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressCountry()).append(","); - registryDetails.getGroomAddressDetails().setStateIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressStateName()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict()).append(","); - registryDetails.getGroomAddressDetails().setDistrictIdPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressStateName()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressCountry()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - registryDetails.getGroomAddressDetails().setLocalityMlPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); - registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); - registryDetails.getGroomAddressDetails().setStreetNameMlPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); - registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); - registryDetails.getGroomAddressDetails().setHouseNameNoMlPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); - registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - registryDetails.getGroomAddressDetails().setVillageNamePermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); } else { - registryDetails.getGroomAddressDetails().setCountryIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressCountry()); - registryDetails.getGroomAddressDetails().setStateIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressStateName()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()).append(","); - registryDetails.getGroomAddressDetails().setDistrictIdPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()).append(","); - registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - registryDetails.getGroomAddressDetails().setLocalityMlPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()).append(","); - registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); - registryDetails.getGroomAddressDetails().setStreetNameMlPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()).append(","); - registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); - registryDetails.getGroomAddressDetails().setHouseNameNoMlPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict()).append(","); - registryDetails.getGroomAddressDetails().setVillageNamePermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressStateName()).append(","); - registryDetails.getGroomAddressDetails().setPermntOthrTalukName(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); - registryDetails.getGroomAddressDetails().setPermntOthPostOfficeEn(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressCountry()).append(","); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode()); } } } else { -// if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { - registryDetails.getGroomAddressDetails().setCountryIdPermanent(registryDetails.getGroomAddressDetails().getPermtaddressCountry()); - registryDetails.getGroomAddressDetails().setVillageNamePermanent(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaVillage()); - registryDetails.getGroomAddressDetails().setTownOrVillagePermanent(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()).append(","); + + groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressCountry()); - registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - registryDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - registryDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); } @@ -586,6 +585,74 @@ private String setGroomPermanentAddressForCertificate(MarriageRegistryDetails re return groomAddressBuilder.toString(); } + private String setBridePermanentAddressForCertificate(MarriageRegistryDetails registryDetails) { + + StringBuilder brideAddressBuilder = new StringBuilder(); + if (registryDetails.getBrideAddressDetails() != null) { + + + if (registryDetails.getBrideAddressDetails().getPermtaddressCountry() != null && registryDetails.getBrideAddressDetails().getPermtaddressStateName() != null) { + if (registryDetails.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (registryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { + + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressStateName()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressCountry()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + + + + } else { + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressStateName()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressCountry()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + + + } + } + + } else { + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()).append(","); + + brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressCountry()); + + + } + + + } + return brideAddressBuilder.toString(); + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java index 7e377384d22..bd88cbcd988 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java @@ -516,6 +516,10 @@ public class BrideRegistryAddressDetails { @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; + + @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePermanent") + private String outSideIndiaPostCodepermanent; // @Size(max = 64) // @JsonProperty("presentaddressCountry") // private String presentaddressCountry; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java index 493c84c45e5..773c437f413 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java @@ -516,6 +516,9 @@ public class GroomRegistryAddressDetails { @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; + @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePermanent") + private String outSideIndiaPostCodepermanent; // @Size(max = 64) // @JsonProperty("presentaddressCountry") From 68de8eb75c8c8e7568d74b7d9428e1373f580748 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 13 Apr 2023 09:04:59 +0530 Subject: [PATCH 176/420] changes in certificate fields --- .../MarriageRegistryRepository.java | 26 +++++++++++++++++++ .../model/certmodel/MarriageCertificate.java | 4 +++ .../src/main/resources/application.properties | 4 +-- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index a05129acb4c..e2b2f08fd11 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -111,6 +111,28 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria // }); MarriageCertPDFRequest req = MarriageCertPDFRequest.builder().marriageCertificate(marriageCertPDFRequest.getMarriageCertificate()).requestInfo(marriageCertPDFRequest.getRequestInfo()).build(); //TODO pdf data creation + StringBuilder groomFullName = new StringBuilder(); + groomFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en()); + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en())){ + groomFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en()); + } + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en())){ + groomFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en()); + } + req.getMarriageCertificate().get(0).setGroomFullName(groomFullName.toString()); + + StringBuilder brideFullName = new StringBuilder(); + brideFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getFirstname_en()); + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en())){ + brideFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en()); + } + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en())){ + brideFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en()); + } + req.getMarriageCertificate().get(0).setBrideFullName(brideFullName.toString()); + + + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en(); //Setting Marriage Place Data from MDMS Object mdmsMarriagePlaceData = util.mDMSCallGetAddress(req.getRequestInfo() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() @@ -224,6 +246,10 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsBrideAddressMap)); req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsBrideAddressMap)); + + + + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index 49db843028a..0a867777a39 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -72,6 +72,10 @@ public class MarriageCertificate { @JsonProperty("villageNameEn") private String villageNameEn; + @JsonProperty("groomFullName") + private String groomFullName; + @JsonProperty("brideFullName") + private String brideFullName; @JsonProperty("groomPermntFullAddr") private String groomPermntFullAddr; diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index edd49547adc..7a72787392b 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true From bf2b26f7efc980272fd815a66f033cf82d568221 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 13 Apr 2023 09:14:25 +0530 Subject: [PATCH 177/420] changes in address setting of groom and bride --- .../enrichment/MarriageRegistryEnrichment.java | 4 ++-- .../repository/MarriageRegistryRepository.java | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 84bcf15776a..54833aa1e36 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -516,7 +516,7 @@ private void validateFileCodes(List fileCodes, int count) { } - private String setGroomPermanentAddressForCertificate(MarriageRegistryDetails registryDetails) { + public String setGroomPermanentAddressForCertificate(MarriageRegistryDetails registryDetails) { StringBuilder groomAddressBuilder = new StringBuilder(); if (registryDetails.getGroomAddressDetails() != null) { @@ -585,7 +585,7 @@ private String setGroomPermanentAddressForCertificate(MarriageRegistryDetails re return groomAddressBuilder.toString(); } - private String setBridePermanentAddressForCertificate(MarriageRegistryDetails registryDetails) { + public String setBridePermanentAddressForCertificate(MarriageRegistryDetails registryDetails) { StringBuilder brideAddressBuilder = new StringBuilder(); if (registryDetails.getBrideAddressDetails() != null) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index e2b2f08fd11..f73afe144df 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -226,6 +226,8 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName()).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKerala).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); + req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); //Setting groom NRI address //Setting bride address data from MDMS From 391c575e357c9cb4fee54e78cf8feb3d0929d9ad Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 13 Apr 2023 09:34:31 +0530 Subject: [PATCH 178/420] document search --- .../enrichment/MarriageDetailsEnrichment.java | 14 +++++-- .../MarriageApplicationRepository.java | 22 ++++++++-- .../MarriageApplicationQueryBuilder.java | 42 ++++++++++++------- .../rowmapper/DocumentRowMapper.java | 31 +++++++------- .../GroomAddressDetailsRowMapper.java | 2 +- .../MarriageApplicationRowMapper.java | 2 +- .../rowmapper/MarriageDocumentRowMapper.java | 22 +++++++--- .../MarriageApplicationSearchCriteria.java | 18 ++++++++ .../service/MarriageRegistryService.java | 2 +- 9 files changed, 109 insertions(+), 46 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index df053caf01a..76ddab9d5a1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -19,6 +19,7 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; @@ -154,6 +155,7 @@ else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ public void enrichUpdate(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); + MarriageApplicationSearchCriteria criteria = new MarriageApplicationSearchCriteria(); User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); request.getMarriageDetails(). @@ -161,15 +163,21 @@ public void enrichUpdate(MarriageDetailsRequest request) { marriage.setAuditDetails(auditDetails); String applicationNumber = marriage.getApplicationNumber(); String applicationType = marriage.getApplicationtype(); + criteria.setApplicationNo(applicationNumber); + criteria.setApplicationType(applicationType); // String registrationNumber = marriage.getRegistrationNo(); //Jasmine 07.04.2023 List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ marriagedocument.forEach(document -> { String documentType = document.getDocumentType(); - String documentOwner = document.getDocumentOwner(); - document.setActiveFalse(true); - List searchResult = repository.getDocumentDetails(documentType,documentOwner,applicationNumber); + String documentOwner = document.getDocumentOwner(); + criteria.setDocumentType(documentType); + criteria.setDocumentOwner(documentOwner); + criteria.setTenantId(marriage.getTenantid()); + document.setActiveFalse(true); + + List searchResult = repository.getDocumentDetails(criteria,requestInfo); // document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); if(searchResult!=null){ searchResult.forEach(existingDocument -> { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index cce552ecf98..cebadc171be 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -71,6 +71,7 @@ public List searchMarriageDetails(MarriageApplicatio List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + if(result != null) { result.forEach(marriage -> { @@ -99,18 +100,33 @@ else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); - }); + criteria.setApplicationType(marriage.getApplicationtype()); + criteria.setApplicationType(marriage.getApplicationNumber()); + criteria.setTenantId(marriage.getTenantid()); + System.out.println("criteria"+criteria); + // getDocumentSearchDetails( criteria, requestInfo); + }); + + } return result; } - public List getDocumentDetails(String documentType, String documentOwner ,String applicationNumber) { + public List getDocumentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageDocumentSearchQuery(documentType,documentOwner,applicationNumber, preparedStmtValues, Boolean.FALSE); + String query = marriageQueryBuilder.getMarriageDocumentQuery( criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), documentRowMapper); + return result; } + public List getDocumentSearchDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageDocumentSearchQuery( criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), documentRowMapper); + return result; + } + public List getMarriageApplication(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 1a509b19352..04353964d4e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -94,7 +94,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { // .append("DOC.registrationno as DOC_registrationno , DOC.correction_id as DOC_correction_id , DOC.correction_field_name as DOC_correction_field_name , DOC.applicationtype as DOC_applicationtype ") - .append("FROM public.eg_marriage_details as MD ") + .append("FROM eg_marriage_details as MD ") .append("INNER JOIN eg_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") .append("BD.bride_groom ='B' ") .append("INNER JOIN eg_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") @@ -103,18 +103,17 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("BPMA.bride_groom ='B' ") .append("INNER JOIN eg_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") .append("GPMA.bride_groom ='G' ") - .append("INNER JOIN eg_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") .append("BPSA.bride_groom ='B' ") - .append("INNER JOIN eg_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") .append("GPSA.bride_groom ='G' ") - .append("INNER JOIN eg_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("LEFT JOIN eg_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") .append("WD1.serial_no = 1 ") - .append("INNER JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("LEFT JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") - // .append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") + //.append("LEFT JOIN eg_marriage_document as DOC ON DOC.marriageid = MD.id AND DOC.applicationnumber = MD.applicationnumber ") .toString(); - public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteria criteria, @NotNull List preparedStmtValues, Boolean isCount) { @@ -123,7 +122,7 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri addFilter("MD.id", criteria.getId(), query, preparedStmtValues); addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD.applicationNumber", criteria.getApplicationNo(), query, preparedStmtValues); - addFilter("MD_registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); if (criteria.getBrideFirstnameEn() != null){ addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); @@ -164,21 +163,34 @@ else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenant } private static final String QUERYDOCUMENT = new StringBuilder() - .append("Select id ,tenantid ,document_name ,document_type ,filestoreid ,marriageid,bride_groom ,") - .append("active,applicationnumber , createdby,createdtime,lastmodifiedby, lastmodifiedtime from eg_marriage_document") + .append("Select id ,tenantid ,document_name ,document_type ,filestoreid ,marriageid,bride_groom ,applicationtype , ") + .append("active , applicationnumber , createdby,createdtime,lastmodifiedby, lastmodifiedtime from eg_marriage_document") .toString(); - public String getMarriageDocumentSearchQuery(String documentType,String documentOwner,String applicationNumber,@NotNull List preparedStmtValues, Boolean isCount) { + public String getMarriageDocumentQuery(MarriageApplicationSearchCriteria criteria ,@NotNull List preparedStmtValues, Boolean isCount) { StringBuilder query = new StringBuilder(QUERYDOCUMENT); StringBuilder orderBy = new StringBuilder(); - addFilter("document_type", documentType, query, preparedStmtValues); - addFilter("bride_groom", documentOwner, query, preparedStmtValues); - addFilter("applicationnumber", applicationNumber, query, preparedStmtValues); - + addFilter("document_type", criteria.getDocumentType(), query, preparedStmtValues); + addFilter("bride_groom", criteria.getDocumentOwner(), query, preparedStmtValues); + addFilter("applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("applicationtype", criteria.getApplicationType(), query, preparedStmtValues); + addFilter("tenantid", criteria.getTenantId(), query, preparedStmtValues); return query.toString(); } + public String getMarriageDocumentSearchQuery(MarriageApplicationSearchCriteria criteria ,@NotNull List preparedStmtValues, Boolean isCount) { + + StringBuilder query = new StringBuilder(QUERYDOCUMENT); + StringBuilder orderBy = new StringBuilder(); + // addFilter("document_type", criteria.getDocumentType(), query, preparedStmtValues); + // addFilter("bride_groom", criteria.getDocumentOwner(), query, preparedStmtValues); + addFilter("applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("applicationtype", criteria.getApplicationType(), query, preparedStmtValues); + addFilter("tenantid", criteria.getTenantId(), query, preparedStmtValues); + return query.toString(); + } + public String getNextIDQuery() { StringBuilder query = new StringBuilder("select fn_next_id(?,?,?)"); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java index 46bb7b8e3ea..1fcdc67e8e5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java @@ -13,22 +13,21 @@ default List getMarriageDocument(ResultSet rs) throws SQLExcep List result = new ArrayList<>(); while (rs.next()) { result.add(MarriageDocument.builder() - // return MarriageDocument.builder() - .id(rs.getString("DOC_id")) - .marriageTenantid(rs.getString("DOC_tenantid")) - .documentName(rs.getString("DOC_document_name")) - .documentType(rs.getString("DOC_document_type")) - .fileStoreId(rs.getString("DOC_filestoreid")) - .documentlink(rs.getString("DOC_document_link")) - .marriageId(rs.getString("DOC_marriageid")) - .documentOwner(rs.getString("DOC_bride_groom")) - .active(rs.getBoolean("DOC_active")) - .applicationNumber(rs.getString("DOC_applicationnumber")) - .registrationNumber(rs.getString("DOC_registrationno")) - .correctionId(rs.getString("DOC_correction_id")) - .correctionFieldName(rs.getString("DOC_correction_field_name")) - .applicationType(rs.getString("DOC_applicationtype")) - .updatedFlag(rs.getInt("DOC_updated_flag")) + .id(rs.getString("id")) + .marriageTenantid(rs.getString("tenantid")) + .documentName(rs.getString("document_name")) + .documentType(rs.getString("document_type")) + .fileStoreId(rs.getString("filestoreid")) + .documentlink(rs.getString("document_link")) + .marriageId(rs.getString("marriageid")) + .documentOwner(rs.getString("bride_groom")) + .active(rs.getBoolean("active")) + .applicationNumber(rs.getString("applicationnumber")) + .registrationNumber(rs.getString("registrationno")) + .correctionId(rs.getString("correction_id")) + .correctionFieldName(rs.getString("correction_field_name")) + .applicationType(rs.getString("applicationtype")) + .updatedFlag(rs.getInt("updated_flag")) .build()); } return result; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 9f49fa1a72d..c6104e4ba4e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -32,7 +32,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) -// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) +// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) .presentOutSideIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 99d11299d0e..95a678a9ee1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -48,7 +48,7 @@ public List extractData(ResultSet rs) throws SQLExce .witnessDetails(getWitnessDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) - // .MarriageDocuments(.extractData(rs)) + // .MarriageDocuments(getMarriageDocument(rs)) .auditDetails(getAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java index c97e124d61c..0841ae8f45c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java @@ -19,12 +19,22 @@ public List extractData(ResultSet rs) throws SQLException, Dat List result = new ArrayList<>(); while (rs.next()) { result.add(MarriageDocument.builder() - .id(rs.getString("id")) - .documentType(rs.getString("document_type")) - .documentOwner(rs.getString("bride_groom")) - .applicationNumber(rs.getString("applicationnumber")) - .marriageDocAuditDetails(getDocumentAuditDetails(rs)) - .build()); + .id(rs.getString("id")) + .marriageTenantid(rs.getString("tenantid")) + .documentName(rs.getString("document_name")) + .documentType(rs.getString("document_type")) + .fileStoreId(rs.getString("filestoreid")) + .documentlink(rs.getString("document_link")) + .marriageId(rs.getString("marriageid")) + .documentOwner(rs.getString("bride_groom")) + .active(rs.getBoolean("active")) + .applicationNumber(rs.getString("applicationnumber")) + .registrationNumber(rs.getString("registrationno")) + .correctionId(rs.getString("correction_id")) + .correctionFieldName(rs.getString("correction_field_name")) + .applicationType(rs.getString("applicationtype")) + .updatedFlag(rs.getInt("updated_flag")) + .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java index ed603f4a545..49ef2f57a8d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java @@ -77,6 +77,24 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("brideLastnameMl") private String brideLastnameMl; + //for document + + @JsonProperty("documentOwner") + private String documentOwner ; + + @JsonProperty("documentlink") + private String documentlink; + + @JsonProperty("applicationType") + private String applicationType; + + @JsonProperty("documentType") + private String documentType ; + + @JsonProperty("documentName") + private String documentName ; + + @JsonProperty("sortBy") private SortBy sortBy; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 12f82d1a5d5..d70d247c2da 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -83,7 +83,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req marriageCertificate.setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); marriageCertificate.setRegistrationno(marriageRegistryDetailsList.get(0).getRegistrationno()); List marriageDtls = searchCertificate(criteria); - if (null!=marriageDtls&&marriageDtls.size() > 1) { + if (null!=marriageDtls && marriageDtls.size() > 1) { throw new CustomException("Invalid_Input", "Error in processing data"); } From d60a70ba4b0838a24f58b6271396d071b8896c9e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 13 Apr 2023 09:40:41 +0530 Subject: [PATCH 179/420] document search --- .../repository/querybuilder/MarriageRegistryQueryBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index e01fe7a510c..64837ade076 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -26,7 +26,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") - .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid") + .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") From 54ae65f9a1a7f277b271eeaf5f63e238013a1351 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 13 Apr 2023 09:50:23 +0530 Subject: [PATCH 180/420] changes service --- .../marriageregistry/service/MarriageRegistryService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 12f82d1a5d5..6a7384be4e7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -49,7 +49,8 @@ public List createRegistry(MarriageRegistryRequest requ marriageRegistryEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageRegistryTopic(), request); - + MarriageRegistrySearchCriteria criteria = MarriageRegistrySearchCriteria.builder().id(request.getMarriageDetails().get(0).getId()).tenantId(request.getMarriageDetails().get(0).getTenantid()).build(); + download(criteria,request.getRequestInfo()); MarriageRegistryRequest result = MarriageRegistryRequest .builder() .requestInfo(request.getRequestInfo()) From afab68a2bc1d86be196d1da5c6806356a652e30f Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 13 Apr 2023 10:23:03 +0530 Subject: [PATCH 181/420] Marriage correction registry --- .../src/main/resources/application.properties | 2 +- .../main/resources/marriage-correction.yml | 320 +++++++++++++++++- .../MarriageApplicationConfiguration.java | 3 + .../MarriageCorrectionEnrichment.java | 14 +- ...CorrectionApplicationToRegistryMapper.java | 146 ++++++++ .../MarriageCorrectionRepository.java | 25 +- .../service/MarriageCorrectionService.java | 35 +- .../MarriageCorrectionController.java | 26 +- .../web/model/MarriageCorrectionDetails.java | 3 + .../src/main/resources/application.properties | 1 + ...22__operationAndStamp_deletion_new_dll.sql | 39 +++ 11 files changed, 606 insertions(+), 8 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 7b9ff08a9f1..21c552cf1d5 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-registry.yml,file:///D:/UPYOG/MARRIAGE 23.03.2023/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-registry.yml,classpath:marriage-correction.yml,file:///D:/UPYOG/MARRIAGE 23.03.2023/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 5b91298879b..de2998c9cc3 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -2,7 +2,7 @@ serviceMaps: serviceName: marriage-services mappings: - version: 1.0 - description: Persists save marriage details in marriage table + description: Persists save marriage correction details in marriage tables fromTopic: save-marriage-correction-topic isTransaction: true queryMaps: @@ -1166,3 +1166,321 @@ serviceMaps: # # - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName # + + + + + + - version: 1.0 + description: Persists update marriage correction details in marriage registry tables + fromTopic: correction-update-marriage-registry-topic + isTransaction: true + queryMaps: + - query: INSERT INTO public.eg_register_marriage_details_audit SELECT * FROM public.eg_register_marriage_details WHERE id =? and registrationno = ?; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.registrationno + + - query: UPDATE public.eg_register_marriage_details SET + dateofmarriage=?, districtid=?, talukid=?, village_name=?, lbtype=?, ward_code=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, + locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housenameno_en=?, housenameno_ml=?, landmark=?, lastmodifiedtime=?, + lastmodifiedby=? WHERE registrationno =? and id=? ; + + basePath: MarriageDetails.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.marriageDOM + + - jsonPath: $.MarriageDetails.*.marriageDistrictid + + - jsonPath: $.MarriageDetails.*.marriageTalukID + + - jsonPath: $.MarriageDetails.*.marriageVillageName + + - jsonPath: $.MarriageDetails.*.marriageLBtype + + - jsonPath: $.MarriageDetails.*.marriageWardCode + + - jsonPath: $.MarriageDetails.*.marriagePlacetype + + - jsonPath: $.MarriageDetails.*.placeid + + - jsonPath: $.MarriageDetails.*.marriagePlacenameEn + + - jsonPath: $.MarriageDetails.*.marriagePlacenameMl + + - jsonPath: $.MarriageDetails.*.marriageLocalityEn + + - jsonPath: $.MarriageDetails.*.marriageLocalityMl + + - jsonPath: $.MarriageDetails.*.marriageStreetEn + + - jsonPath: $.MarriageDetails.*.marriageStreetMl + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + + - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl + + - jsonPath: $.MarriageDetails.*.marriageLandmark + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.registrationno + + - jsonPath: $.MarriageDetails.*.id + + + + - query: INSERT INTO public.eg_register_marriage_bride_groom_details_audit SELECT * FROM public.eg_register_marriage_bride_groom_details WHERE marriageid = ? and bride_groom= 'B'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - query: UPDATE public.eg_register_marriage_bride_groom_details SET + residentship=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, + dateofbirth=?, age=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, guardianname_en=?, guardianname_ml=?, + parent_guardian=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid=? and bride_groom= 'B' ; + basePath: MarriageDetails.*.BrideDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMl + + - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + + - query: INSERT INTO public.eg_register_marriage_bride_groom_details_audit SELECT * FROM public.eg_register_marriage_bride_groom_details WHERE marriageid = ? and bride_groom= 'G'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - query: UPDATE public.eg_register_marriage_bride_groom_details SET + residentship=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, + dateofbirth=?, age=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, guardianname_en=?, guardianname_ml=?, + parent_guardian=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid=? and bride_groom= 'G' ; + basePath: MarriageDetails.*.GroomDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMl + + - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + + - query: INSERT INTO public.eg_register_marriage_permanent_address_details_audit SELECT * FROM public.eg_register_marriage_permanent_address_details WHERE marriageid = ? and bride_groom= 'B'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - query : UPDATE public.eg_register_marriage_permanent_address_details SET + countryid=?, stateid=?, districtid=?, poid=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housename_en=?, housename_ml=?, + village_name=?, pinno=?, tenantid=?, talukid=?, villageid=?, ward_code=?, taluk_name=?, poname_en=?, poname_ml=?, ot_address1_en=?, ot_address1_ml=?, + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid = ? and bride_groom='B'; + + basePath: MarriageDetails.*.BrideAddressDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentOutsideIndiaPostCode + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + + - query: INSERT INTO public.eg_register_marriage_permanent_address_details_audit SELECT * FROM public.eg_register_marriage_permanent_address_details WHERE marriageid = ? and bride_groom= 'G'; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - query : UPDATE public.eg_register_marriage_permanent_address_details SET + countryid=?, stateid=?, districtid=?, poid=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housename_en=?, housename_ml=?, + village_name=?, pinno=?, tenantid=?, talukid=?, villageid=?, ward_code=?, taluk_name=?, poname_en=?, poname_ml=?, ot_address1_en=?, ot_address1_ml=?, + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid = ? and bride_groom='G'; + + basePath: MarriageDetails.*.GroomAddressDetails + jsonMaps: + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceEn + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentOutsideIndiaPostCode + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index b52573fd7c2..c49649ad549 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -117,4 +117,7 @@ public class MarriageApplicationConfiguration { @Value("${persister.update.marriage.correction.topic}") private String UpdateMarriageCorrectionTopic; + + @Value("${persister.update.marriage.registry.correction.topic}") + private String UpdateMarriageRegistryCorrectionTopic; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index 096595d82f3..bc3d8ef28b2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -16,6 +16,7 @@ import org.ksmart.marriage.marriagecorrection.web.model.CorrectionFieldValue; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.beans.PropertyAccessor; import org.springframework.beans.PropertyAccessorFactory; @@ -508,11 +509,20 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { } - - public static void setIfNotNull( Consumer setter,V value) { if (Objects.nonNull(value)) { setter.accept(value); } } + + + public void enrichRegistryUpdate(MarriageRegistryRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); + request.getMarriageDetails() + .forEach(personal -> personal.setAuditDetails(auditDetails)); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java new file mode 100644 index 00000000000..92b8127f65f --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java @@ -0,0 +1,146 @@ +package org.ksmart.marriage.marriagecorrection.mapper; + +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; +import org.springframework.stereotype.Component; + +import java.util.List; + +@Component +public class CorrectionApplicationToRegistryMapper { + + public MarriageRegistryRequest convert(List registryDetails, List aplnDetails) { + + + MarriageRegistryRequest marriageRegistryRequest = new MarriageRegistryRequest(); + + if (registryDetails.get(0) != null && aplnDetails.get(0) != null) { + //Marriage Details + registryDetails.get(0).setDateofmarriage(aplnDetails.get(0).getDateofmarriage()); + registryDetails.get(0).setDistrictid(aplnDetails.get(0).getDistrictid()); + registryDetails.get(0).setTalukid(aplnDetails.get(0).getTalukid()); + registryDetails.get(0).setVillage_name(aplnDetails.get(0).getVillageName()); + registryDetails.get(0).setLbtype(aplnDetails.get(0).getLbtype()); + registryDetails.get(0).setWard_code(aplnDetails.get(0).getWardCode()); + registryDetails.get(0).setPlacetype(aplnDetails.get(0).getPlacetype()); + registryDetails.get(0).setPlaceid(aplnDetails.get(0).getPlaceid()); + registryDetails.get(0).setPlacenameEn(aplnDetails.get(0).getPlacenameEn()); + registryDetails.get(0).setPlacenameMl(aplnDetails.get(0).getPlacenameMl()); + registryDetails.get(0).setLocality_en(aplnDetails.get(0).getLocalityEn()); + registryDetails.get(0).setLocality_ml(aplnDetails.get(0).getLocalityMl()); + registryDetails.get(0).setStreet_name_en(aplnDetails.get(0).getStreetNameEn()); + registryDetails.get(0).setStreet_name_ml(aplnDetails.get(0).getStreetNameMl()); + registryDetails.get(0).setMarriageHouseNoAndNameEn(aplnDetails.get(0).getMarriageHouseNoAndNameEn()); + registryDetails.get(0).setMarriageHouseNoAndNameMl(aplnDetails.get(0).getMarriageHouseNoAndNameMl()); + registryDetails.get(0).setLandmark(aplnDetails.get(0).getLandmark()); + + + //Marriage Bride Details + registryDetails.get(0).getBrideDetails().setResidentship(aplnDetails.get(0).getBrideDetails().getResidentship()); + registryDetails.get(0).getBrideDetails().setFirstname_en(aplnDetails.get(0).getBrideDetails().getFirstnameEn()); + registryDetails.get(0).getBrideDetails().setFirstname_ml(aplnDetails.get(0).getBrideDetails().getFirstnameMl()); + registryDetails.get(0).getBrideDetails().setMiddlename_en(aplnDetails.get(0).getBrideDetails().getMiddlenameEn()); + registryDetails.get(0).getBrideDetails().setMiddlename_ml(aplnDetails.get(0).getBrideDetails().getMiddlenameMl()); + registryDetails.get(0).getBrideDetails().setLastname_en(aplnDetails.get(0).getBrideDetails().getLastnameEn()); + registryDetails.get(0).getBrideDetails().setLastname_ml(aplnDetails.get(0).getBrideDetails().getLastnameMl()); + registryDetails.get(0).getBrideDetails().setDateofbirth(aplnDetails.get(0).getBrideDetails().getDateofbirth()); + registryDetails.get(0).getBrideDetails().setAge(aplnDetails.get(0).getBrideDetails().getAge()); + registryDetails.get(0).getBrideDetails().setFathername_en(aplnDetails.get(0).getBrideDetails().getFathernameEn()); + registryDetails.get(0).getBrideDetails().setFathername_ml(aplnDetails.get(0).getBrideDetails().getFathernameMl()); + registryDetails.get(0).getBrideDetails().setMothername_en(aplnDetails.get(0).getBrideDetails().getMothernameEn()); + registryDetails.get(0).getBrideDetails().setMothername_ml(aplnDetails.get(0).getBrideDetails().getMothernameMl()); + registryDetails.get(0).getBrideDetails().setGuardianname_en(aplnDetails.get(0).getBrideDetails().getGuardiannameEn()); + registryDetails.get(0).getBrideDetails().setGuardianname_ml(aplnDetails.get(0).getBrideDetails().getGuardiannameMl()); + registryDetails.get(0).getBrideDetails().setParent_guardian(aplnDetails.get(0).getBrideDetails().getParentGuardian()); + + + //Marriage Groom Details + registryDetails.get(0).getGroomDetails().setResidentship(aplnDetails.get(0).getGroomDetails().getResidentship()); + registryDetails.get(0).getGroomDetails().setFirstname_en(aplnDetails.get(0).getGroomDetails().getFirstnameEn()); + registryDetails.get(0).getGroomDetails().setFirstname_ml(aplnDetails.get(0).getGroomDetails().getFirstnameMl()); + registryDetails.get(0).getGroomDetails().setMiddlename_en(aplnDetails.get(0).getGroomDetails().getMiddlenameEn()); + registryDetails.get(0).getGroomDetails().setMiddlename_ml(aplnDetails.get(0).getGroomDetails().getMiddlenameMl()); + registryDetails.get(0).getGroomDetails().setLastname_en(aplnDetails.get(0).getGroomDetails().getLastnameEn()); + registryDetails.get(0).getGroomDetails().setLastname_ml(aplnDetails.get(0).getGroomDetails().getLastnameMl()); + registryDetails.get(0).getGroomDetails().setDateofbirth(aplnDetails.get(0).getGroomDetails().getDateofbirth()); + registryDetails.get(0).getGroomDetails().setAge(aplnDetails.get(0).getGroomDetails().getAge()); + registryDetails.get(0).getGroomDetails().setFathername_en(aplnDetails.get(0).getGroomDetails().getFathernameEn()); + registryDetails.get(0).getGroomDetails().setFathername_ml(aplnDetails.get(0).getGroomDetails().getFathernameMl()); + registryDetails.get(0).getGroomDetails().setMothername_en(aplnDetails.get(0).getGroomDetails().getMothernameEn()); + registryDetails.get(0).getGroomDetails().setMothername_ml(aplnDetails.get(0).getGroomDetails().getMothernameMl()); + registryDetails.get(0).getGroomDetails().setGuardianname_en(aplnDetails.get(0).getGroomDetails().getGuardiannameEn()); + registryDetails.get(0).getGroomDetails().setGuardianname_ml(aplnDetails.get(0).getGroomDetails().getGuardiannameMl()); + registryDetails.get(0).getGroomDetails().setParent_guardian(aplnDetails.get(0).getGroomDetails().getParentGuardian()); + + + //Bride Address details + registryDetails.get(0).getBrideAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getCountryIdPermanent()); + registryDetails.get(0).getBrideAddressDetails().setStateIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getStateIdPermanent()); + registryDetails.get(0).getBrideAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getDistrictIdPermanent()); + registryDetails.get(0).getBrideAddressDetails().setPoNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPoNoPermanent()); + registryDetails.get(0).getBrideAddressDetails().setLocalityEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getLocalityEnPermanent()); + registryDetails.get(0).getBrideAddressDetails().setLocalityMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getLocalityMlPermanent()); + registryDetails.get(0).getBrideAddressDetails().setStreetNameEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getStreetNameEnPermanent()); + registryDetails.get(0).getBrideAddressDetails().setStreetNameMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getStreetNameMlPermanent()); + registryDetails.get(0).getBrideAddressDetails().setHouseNameNoEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getHouseNameNoEnPermanent()); + registryDetails.get(0).getBrideAddressDetails().setHouseNameNoMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getHouseNameNoMlPermanent()); + registryDetails.get(0).getBrideAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getBrideAddressDetails().getVillageNamePermanent()); + registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPincode()); + registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName()); + registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage()); + registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaWardNo()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + registryDetails.get(0).getBrideAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.get(0).getBrideAddressDetails().setPinNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPinNoPermanent()); + + + //Groom Address details + registryDetails.get(0).getGroomAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getCountryIdPermanent()); + registryDetails.get(0).getGroomAddressDetails().setStateIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getStateIdPermanent()); + registryDetails.get(0).getGroomAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getDistrictIdPermanent()); + registryDetails.get(0).getGroomAddressDetails().setPoNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPoNoPermanent()); + registryDetails.get(0).getGroomAddressDetails().setLocalityEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getLocalityEnPermanent()); + registryDetails.get(0).getGroomAddressDetails().setLocalityMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getLocalityMlPermanent()); + registryDetails.get(0).getGroomAddressDetails().setStreetNameEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getStreetNameEnPermanent()); + registryDetails.get(0).getGroomAddressDetails().setStreetNameMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getStreetNameMlPermanent()); + registryDetails.get(0).getGroomAddressDetails().setHouseNameNoEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getHouseNameNoEnPermanent()); + registryDetails.get(0).getGroomAddressDetails().setHouseNameNoMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getHouseNameNoMlPermanent()); + registryDetails.get(0).getGroomAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getGroomAddressDetails().getVillageNamePermanent()); + registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPincode()); + registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrLBName()); + registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrVillage()); + registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaWardNo()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + registryDetails.get(0).getGroomAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.get(0).getGroomAddressDetails().setPinNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPinNoPermanent()); + + marriageRegistryRequest.addMarriageDetails(registryDetails.get(0)); + } + return marriageRegistryRequest; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java index dfb52255022..067cb8830a8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java @@ -1,15 +1,20 @@ package org.ksmart.marriage.marriagecorrection.repository; -import com.google.gson.Gson; import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; +import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.utils.MarriageMdmsUtil; +import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; +import java.util.ArrayList; import java.util.List; @Slf4j @@ -20,12 +25,18 @@ public class MarriageCorrectionRepository { private final MarriageApplicationConfiguration marriageApplicationConfiguration; private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; + private final MarriageApplicationQueryBuilder marriageQueryBuilder; + private final JdbcTemplate jdbcTemplate; + private final MarriageApplicationRowMapper marriageApplicationRowMapper; - public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator) { + public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator, MarriageApplicationQueryBuilder marriageQueryBuilder, JdbcTemplate jdbcTemplate, MarriageApplicationRowMapper marriageApplicationRowMapper) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.util = util; this.mdmsValidator = mdmsValidator; + this.marriageQueryBuilder = marriageQueryBuilder; + this.jdbcTemplate = jdbcTemplate; + this.marriageApplicationRowMapper = marriageApplicationRowMapper; } @@ -39,4 +50,14 @@ public List saveCorrectionDetails(MarriageCorrection return request.getMarriageDetails(); } + + + public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + + return result; + } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 3c494aeb1c8..eb2597fd6f7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -2,18 +2,22 @@ import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriagecorrection.enrichment.MarriageCorrectionEnrichment; +import org.ksmart.marriage.marriagecorrection.mapper.CorrectionApplicationToRegistryMapper; import org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriagecorrection.repository.MarriageCorrectionRepository; import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.springframework.stereotype.Service; @@ -39,8 +43,9 @@ public class MarriageCorrectionService { private final MarriageApplicationConfiguration marriageApplicationConfiguration; private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; + private final CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper; - public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, MarriageApplicationService marriageService, MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator) { + public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, MarriageApplicationService marriageService, MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator, CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper) { this.correctionRepository = correctionRepository; this.registryRepository = registryRepository; this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; @@ -50,6 +55,7 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.util = util; this.mdmsValidator = mdmsValidator; + this.correctionApplicationToRegistryMapper = correctionApplicationToRegistryMapper; } public List createCorrection(MarriageCorrectionRequest request) { @@ -80,4 +86,31 @@ public List createCorrection(MarriageCorrectionReques private List searchRegistry(MarriageRegistrySearchCriteria criteria) { return registryRepository.searchMarriageRegistry(criteria); } + + + public List updateMarriageRegistry(MarriageCorrectionRequest request) { + MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); + criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); + criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); + List marriageRegistryDetails = searchRegistry(criteria); + + if (!marriageRegistryDetails.isEmpty()) { + MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); + aplnCriteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); + aplnCriteria.setApplicationNo(request.getMarriageCorrectionDetails().get(0).getApplicationNo()); + aplnCriteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); + + List marriageAplnDetails = correctionRepository.searchMarriageDetails(aplnCriteria, request.getRequestInfo()); + + if(!marriageAplnDetails.isEmpty()) { + MarriageRegistryRequest marriageRegistryRequest = correctionApplicationToRegistryMapper.convert(marriageRegistryDetails, marriageAplnDetails); + marriageRegistryRequest.setRequestInfo(request.getRequestInfo()); + marriageCorrectionEnrichment.enrichRegistryUpdate(marriageRegistryRequest); + producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryCorrectionTopic(), marriageRegistryRequest); + } + } + return request.getMarriageCorrectionDetails(); + } + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index 1b40f818530..6969b660e1f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -6,7 +6,10 @@ import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionResponse; import org.ksmart.marriage.marriagecorrection.service.MarriageCorrectionService; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; +import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.ResponseInfoFactory; +import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -33,7 +36,7 @@ public MarriageCorrectionController(MarriageCorrectionService marriageCorrection } @PostMapping("/_createmarriagecorrection") - public ResponseEntity create(@Valid @RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { + public ResponseEntity create(@RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { List marriageCorrectionDetailsList = marriageCorrectionService.createCorrection(request); MarriageCorrectionResponse response = MarriageCorrectionResponse @@ -43,4 +46,25 @@ public ResponseEntity create(@Valid @RequestBody Mar .build(); return ResponseEntity.ok(response); } + + + + @PostMapping(value = { "/updatemarriageregistry"}) + public ResponseEntity registryUpdate(@RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { + + + //Updating Marriage registry if Registrar Approved + //if(request.getMarriageCorrectionDetails().get(0).getStatus().equals(MarriageConstants.WORKFLOW_STATUS_APPROVED)) { + + + List marriageCorrectionDetailsList = marriageCorrectionService.updateMarriageRegistry(request); + + //} + MarriageCorrectionResponse response = MarriageCorrectionResponse + .builder() + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) + .marriageCorrectionDetails(request.getMarriageCorrectionDetails()) + .build(); + return ResponseEntity.ok(response); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java index 11cbdd47a09..a940f913f52 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -30,6 +30,9 @@ public class MarriageCorrectionDetails { @JsonProperty("applicationType") private String applicationtype; @Size(max = 64) + @JsonProperty("applicationNumber") + private String applicationNo; + @Size(max = 64) @JsonProperty("businessService") private String businessservice; @Size(max = 64) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 7a72787392b..7ef7009e0ad 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -179,3 +179,4 @@ egov.payment.search.endpoint=/collection-services/payments/_search #Marriage correction topics persister.save.marriage.correction.topic=save-marriage-correction-topic persister.update.marriage.correction.topic=update-marriage-correction-topic +persister.update.marriage.registry.correction.topic=correction-update-marriage-registry-topic \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql new file mode 100644 index 00000000000..9d19fbb1ce4 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql @@ -0,0 +1,39 @@ + + +ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS stamp; + + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS stamp; + + + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS stamp; + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS stamp; + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS stamp; + + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS stamp; \ No newline at end of file From de096be53766961eb3a810f1cb006cf14b9f5f1b Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 13 Apr 2023 10:51:40 +0530 Subject: [PATCH 182/420] migration file change --- .../main/V20230410141700__Foreignkey_deletion_new_dll.sql | 3 --- .../main/V20231304103301__Foreignkey_deletions_new_dll.sql | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230410141700__Foreignkey_deletion_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230410141700__Foreignkey_deletion_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230410141700__Foreignkey_deletion_new_dll.sql deleted file mode 100644 index 3cc5f7f0d57..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230410141700__Foreignkey_deletion_new_dll.sql +++ /dev/null @@ -1,3 +0,0 @@ - -ALTER table eg_marriage_document - DROP CONSTRAINT eg_marriage_document_document_fkey; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql new file mode 100644 index 00000000000..9723a13e64f --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql @@ -0,0 +1,3 @@ + +ALTER table eg_marriage_document + DROP CONSTRAINT IF EXISTS eg_marriage_document_document_fkey; \ No newline at end of file From 4c9707ade3a0b0911d385e32000c32e701570ff0 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 13 Apr 2023 11:14:31 +0530 Subject: [PATCH 183/420] document search --- .../querybuilder/MarriageApplicationQueryBuilder.java | 4 ++-- .../repository/rowmapper/MarriageDocumentRowMapper.java | 4 ++-- .../service/MarriageApplicationService.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 04353964d4e..9045d4d13de 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -163,8 +163,8 @@ else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenant } private static final String QUERYDOCUMENT = new StringBuilder() - .append("Select id ,tenantid ,document_name ,document_type ,filestoreid ,marriageid,bride_groom ,applicationtype , ") - .append("active , applicationnumber , createdby,createdtime,lastmodifiedby, lastmodifiedtime from eg_marriage_document") + .append("Select id ,tenantid ,document_link,document_name ,document_type ,filestoreid ,marriageid,bride_groom ,applicationtype , ") + .append("active , applicationnumber ,registrationno,correction_id,correction_field_name, createdby,createdtime,lastmodifiedby, lastmodifiedtime from eg_marriage_document") .toString(); public String getMarriageDocumentQuery(MarriageApplicationSearchCriteria criteria ,@NotNull List preparedStmtValues, Boolean isCount) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java index 0841ae8f45c..7c3c21b80c0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java @@ -24,7 +24,7 @@ public List extractData(ResultSet rs) throws SQLException, Dat .documentName(rs.getString("document_name")) .documentType(rs.getString("document_type")) .fileStoreId(rs.getString("filestoreid")) - .documentlink(rs.getString("document_link")) + // .documentlink(rs.getString("document_link")) .marriageId(rs.getString("marriageid")) .documentOwner(rs.getString("bride_groom")) .active(rs.getBoolean("active")) @@ -33,7 +33,7 @@ public List extractData(ResultSet rs) throws SQLException, Dat .correctionId(rs.getString("correction_id")) .correctionFieldName(rs.getString("correction_field_name")) .applicationType(rs.getString("applicationtype")) - .updatedFlag(rs.getInt("updated_flag")) + // .updatedFlag(rs.getInt("updated_flag")) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 8ef3952279c..7fa117e71f9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -55,7 +55,7 @@ public List saveMarriageDetails(MarriageDetailsReque WorkFlowCheck wfc = new WorkFlowCheck(); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); - validatorService.ruleEngineMarriage(request, wfc, mdmsData); + // validatorService.ruleEngineMarriage(request, wfc, mdmsData); validatorService.validateCommonFields( request); mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); From d235760d0775a097340793ecaf88d8ade8e212a3 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 13 Apr 2023 10:43:32 +0530 Subject: [PATCH 184/420] document --- .../repository/MarriageRegistryRepository.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index f73afe144df..ae94286ad29 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -86,7 +86,8 @@ public List searchMarriageRegistry(MarriageRegistrySear String query = queryBuilder.getMarriageRegistrySearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); - + System.out.println("Groom address -------"); + System.out.println(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(result.get(0))); return result; } From fe3949e6cde04d95f1cef1df66610a3f1bbd822b Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 13 Apr 2023 11:13:45 +0530 Subject: [PATCH 185/420] validation commented for bride postofficeEn --- .../MarriageApplicationValidator.java | 18 +++++++++--------- .../MarriageCorrectionController.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 499d1c98443..344fc349091 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -845,7 +845,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { .getPermntInKeralaAdrPostOffice())) { throw new CustomException( "GROOM PERMANENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", - "The Postofficef " + + "The Postoffice " + groomaddressInfo.getPermntInKeralaAdrPostOffice() + " is invalid"); } @@ -1411,14 +1411,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPermntInKeralaWardNo() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentOutsideKeralaPostOfficeEn())) { - throw new CustomException( - " BRIDE PERMANENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", - "The Postofficef " + - brideaddressInfo.getPresentOutsideKeralaPostOfficeEn() - + " is invalid"); - } +// if (StringUtils.isEmpty(brideaddressInfo +// .getPresentOutsideKeralaPostOfficeEn())) { +// throw new CustomException( +// " BRIDE PERMANENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", +// "The Postofficef " + +// brideaddressInfo.getPresentOutsideKeralaPostOfficeEn() +// + " is invalid"); +// } if (StringUtils.isEmpty(brideaddressInfo .getPermntInKeralaAdrPincode())) { throw new CustomException( diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index 6969b660e1f..b207e028e1b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -49,7 +49,7 @@ public ResponseEntity create(@RequestBody MarriageCo - @PostMapping(value = { "/updatemarriageregistry"}) + @PostMapping(value = { "/_updatemarriagecorrection"}) public ResponseEntity registryUpdate(@RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { From ffb3956e132fc86d0c8a6e9b0ae26cf6892acf70 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 13 Apr 2023 11:50:10 +0530 Subject: [PATCH 186/420] changes in address setting of marriage cert --- .../MarriageRegistryEnrichment.java | 140 ++++++++++++------ .../MarriageRegistryRepository.java | 6 +- .../service/MarriageRegistryService.java | 4 +- .../marriage/utils/MarriageMdmsUtil.java | 7 + 4 files changed, 109 insertions(+), 48 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 54833aa1e36..fb4e680d6cb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -1,6 +1,7 @@ package org.ksmart.marriage.marriageregistry.enrichment; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; import org.egov.tracer.model.CustomException; @@ -15,11 +16,13 @@ import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; +import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; import java.util.ListIterator; +import java.util.Map; import java.util.UUID; import lombok.extern.slf4j.Slf4j; @@ -39,6 +42,8 @@ public class MarriageRegistryEnrichment implements BaseEnrichment { IdGenRepository idGenRepository; @Autowired IDGenerator idGenerator; + @Autowired + MarriageMdmsUtil util; public void enrichCreate(MarriageRegistryRequest request) { @@ -516,7 +521,9 @@ private void validateFileCodes(List fileCodes, int count) { } - public String setGroomPermanentAddressForCertificate(MarriageRegistryDetails registryDetails) { + public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { + + StringBuilder groomAddressBuilder = new StringBuilder(); if (registryDetails.getGroomAddressDetails() != null) { @@ -527,54 +534,87 @@ public String setGroomPermanentAddressForCertificate(MarriageRegistryDetails reg if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()).append(","); + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() + , registryDetails.getGroomAddressDetails().getDistrictIdPermanent() + , registryDetails.getGroomAddressDetails().getStateIdPermanent() + , registryDetails.getGroomAddressDetails().getCountryIdPermanent() + , registryDetails.getGroomAddressDetails().getPoNoPermanent() + , registryDetails.getGroomAddressDetails().getVillageNamePermanent() + , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS,mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict()).append(","); + appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressStateName()).append(","); + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressCountry()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); + + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode(),groomAddressBuilder,false); + +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode(),groomAddressBuilder,false); } else { - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressStateName()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressCountry()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode(),groomAddressBuilder,false); } } } else { - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()).append(","); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn(),groomAddressBuilder,true); - groomAddressBuilder.append(registryDetails.getGroomAddressDetails().getPermtaddressCountry()); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,false); @@ -585,7 +625,7 @@ public String setGroomPermanentAddressForCertificate(MarriageRegistryDetails reg return groomAddressBuilder.toString(); } - public String setBridePermanentAddressForCertificate(MarriageRegistryDetails registryDetails) { + public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { StringBuilder brideAddressBuilder = new StringBuilder(); if (registryDetails.getBrideAddressDetails() != null) { @@ -596,54 +636,54 @@ public String setBridePermanentAddressForCertificate(MarriageRegistryDetails reg if (registryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressStateName()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressCountry()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode(),brideAddressBuilder,false); } else { - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressStateName()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressCountry()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode(),brideAddressBuilder,false); } } } else { - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()).append(","); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn(),brideAddressBuilder,true); - brideAddressBuilder.append(registryDetails.getBrideAddressDetails().getPermtaddressCountry()); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,false); } @@ -654,6 +694,20 @@ public String setBridePermanentAddressForCertificate(MarriageRegistryDetails reg } - + private StringBuilder appendIfNotBlank(String v,StringBuilder s,boolean addSemicolon){ + if(StringUtils.isNotBlank(v)){ + s.append(v); + if(addSemicolon){ + s.append(","); + } + } + return s; + } + public String getValueFromMap(String key,Map> mdmsMap){ + if(StringUtils.isNotBlank(key)&&null!=mdmsMap&&!mdmsMap.isEmpty()){ + return (mdmsMap.get(key)!=null&&!mdmsMap.get(key).isEmpty())?mdmsMap.get(key).get(0):null; + } + return null; + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index f73afe144df..28f604ef9c2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -207,7 +207,7 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla //Setting Groom Address data from MDMS Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPresent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPermanent() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() @@ -226,8 +226,8 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName()).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKerala).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); - req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); - req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); //Setting groom NRI address //Setting bride address data from MDMS diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 7160ef75975..ebfe2538939 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -49,8 +49,8 @@ public List createRegistry(MarriageRegistryRequest requ marriageRegistryEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageRegistryTopic(), request); - MarriageRegistrySearchCriteria criteria = MarriageRegistrySearchCriteria.builder().id(request.getMarriageDetails().get(0).getId()).tenantId(request.getMarriageDetails().get(0).getTenantid()).build(); - download(criteria,request.getRequestInfo()); + //MarriageRegistrySearchCriteria criteria = MarriageRegistrySearchCriteria.builder().id(request.getMarriageDetails().get(0).getId()).tenantId(request.getMarriageDetails().get(0).getTenantid()).build(); + //download(criteria,request.getRequestInfo()); MarriageRegistryRequest result = MarriageRegistryRequest .builder() .requestInfo(request.getRequestInfo()) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index b8536108f98..386b013ab13 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -516,6 +516,13 @@ public Map> getMarriageMDMSData(MarriageCertPDFRequest reque return masterData; } + public Map> getMarriageMDMSData(Object mdmsdata) { + Map errorMap = new HashMap<>(); + Map> masterData = getAttributeValues(mdmsdata); + // System.out.println(masterData); + return masterData; + } + private Map> getAttributeValues(Object mdmsdata) { List modulepaths = Arrays.asList( //MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH, From 14c85d6e9cc3f8ab2d083d9ab5efcda6504e03ce Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 13 Apr 2023 14:49:31 +0530 Subject: [PATCH 187/420] removed code --- .../repository/MarriageRegistryRepository.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 21ef0fa976a..9689a7f72b4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -86,8 +86,7 @@ public List searchMarriageRegistry(MarriageRegistrySear String query = queryBuilder.getMarriageRegistrySearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); - System.out.println("Groom address -------"); - System.out.println(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(result.get(0))); + return result; } From 076f57711b09f6dffca65f62f20d6dbde74d36ec Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 14 Apr 2023 01:51:46 +0530 Subject: [PATCH 188/420] changes in address setting of certificate --- .../MarriageRegistryRepository.java | 76 +++++-- .../marriage/utils/MarriageConstants.java | 11 + .../marriage/utils/MarriageMdmsUtil.java | 215 ++++++++++++++++-- 3 files changed, 271 insertions(+), 31 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 9689a7f72b4..5aa1abad128 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -134,21 +134,21 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en(); //Setting Marriage Place Data from MDMS - Object mdmsMarriagePlaceData = util.mDMSCallGetAddress(req.getRequestInfo() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() - , null - , null - , null - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid()); - -// Object mdmsData = util.mDMSCall(req.getRequestInfo(), req.getMarriageCertificate().get(0).getTenantid()); - Map> mdmsMap = util.getMarriageMDMSData(req,mdmsMarriagePlaceData); - req.getMarriageCertificate().get(0).setTenantNameEn(getValueFromMap(MarriageConstants.TENANTS,mdmsMap)); - req.getMarriageCertificate().get(0).setTalukNameEn(getValueFromMap(MarriageConstants.TALUK,mdmsMap)); - req.getMarriageCertificate().get(0).setDistrictNameEn(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); - req.getMarriageCertificate().get(0).setVillageNameEn(getValueFromMap(MarriageConstants.VILLAGE,mdmsMap)); +// Object mdmsMarriagePlaceData = util.mDMSCallGetAddress(req.getRequestInfo() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() +// , null +// , null +// , null +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid()); +// +//// Object mdmsData = util.mDMSCall(req.getRequestInfo(), req.getMarriageCertificate().get(0).getTenantid()); +// Map> mdmsMap = util.getMarriageMDMSData(req,mdmsMarriagePlaceData); +// req.getMarriageCertificate().get(0).setTenantNameEn(getValueFromMap(MarriageConstants.TENANTS,mdmsMap)); +// req.getMarriageCertificate().get(0).setTalukNameEn(getValueFromMap(MarriageConstants.TALUK,mdmsMap)); +// req.getMarriageCertificate().get(0).setDistrictNameEn(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); +// req.getMarriageCertificate().get(0).setVillageNameEn(getValueFromMap(MarriageConstants.VILLAGE,mdmsMap)); StringBuilder marriageAddr = new StringBuilder(); @@ -175,7 +175,33 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) { if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid()+","); +// marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid()+","); + Object mdmsMarriagePlaceData1 = util.mDMSCallGetMandapamAddress(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); + System.out.println(mdmsMarriagePlaceData1); + Map mdmsMap1 = util.getMandapamAttributeValues(mdmsMarriagePlaceData1); + util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_ADDRESS ,mdmsMap1),marriageAddr,true); + util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_MAIN_PLACE ,mdmsMap1),marriageAddr,true); + + + + Object mdmsMarriagePlaceData = util.mDMSCallGetAddressFromIds(req.getRequestInfo() + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_TENENT_CODE,mdmsMap1) + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_DIST_ID,mdmsMap1) + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_STATE_ID,mdmsMap1) + , null + , null + , null + , null); + +// Object mdmsData = util.mDMSCall(req.getRequestInfo(), req.getMarriageCertificate().get(0).getTenantid()); + Map> mdmsMap = util.getMarriageMDMSData(req,mdmsMarriagePlaceData); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap),marriageAddr,true); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsMap),marriageAddr,true); +// req.getMarriageCertificate().get(0).setTenantNameEn(getValueFromMap(MarriageConstants.TENANTS,mdmsMap)); +// req.getMarriageCertificate().get(0).setTalukNameEn(getValueFromMap(MarriageConstants.TALUK,mdmsMap)); +// req.getMarriageCertificate().get(0).setDistrictNameEn(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); +// req.getMarriageCertificate().get(0).setVillageNameEn(getValueFromMap(MarriageConstants.VILLAGE,mdmsMap)); + System.out.println(marriageAddr); } } @@ -252,8 +278,8 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); + // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); + // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; @@ -301,6 +327,20 @@ public String getValueFromMap(String key,Map> mdmsMap){ return null; } + public String getValueFromMapOfStr(String key,Map mdmsMap){ + if(StringUtils.isNotBlank(key)&&null!=mdmsMap&&!mdmsMap.isEmpty()){ + if (mdmsMap.get(key)!=null){ +// if(mdmsMap.get(key) instanceof String){ +// return StringUtils.isNotBlank(String.valueOf(mdmsMap.get(key)))?String.valueOf(mdmsMap.get(key)):null; +// } else if (mdmsMap.get(key) instanceof Integer) { +// return String.parseInt(mdmsMap.get(key)); +// } + return StringUtils.isNotBlank(String.valueOf(mdmsMap.get(key)))?String.valueOf(mdmsMap.get(key)):null; + } + } + return null; + } + // public List updateMarriageRegistry(MarriageRegistryRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 1aa96e2af41..d34da05c417 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -154,4 +154,15 @@ public class MarriageConstants { public static final String CR_MDMS_WORKFLOW_NEW = "WorkFlowMarriage"; + public static final String TENANT_EGOV_LOCATION= "egov-location"; + public static final String EGOV_LOCATION_JSONPATH = "$.MdmsRes.egov-location"; + public static final String MARRIAGE_PLACE_JSONPATH = "$.MdmsRes.egov-location.MarriagePlace[0]"; + + public static final String MARRIAGE_PLACE_NAME = "name"; + public static final String MARRIAGE_PLACE_ADDRESS = "address"; + public static final String MARRIAGE_PLACE_MAIN_PLACE = "mainPlace"; + + public static final String MARRIAGE_PLACE_DIST_ID = "distId"; + public static final String MARRIAGE_PLACE_STATE_ID = "stateid"; + public static final String MARRIAGE_PLACE_TENENT_CODE = "tenentCode"; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 386b013ab13..4645c7f238a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -2,6 +2,7 @@ import com.jayway.jsonpath.JsonPath; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.mdms.model.MasterDetail; import org.egov.mdms.model.MdmsCriteria; @@ -10,6 +11,7 @@ import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.repository.ServiceRequestRepository; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -229,6 +231,53 @@ private List getAddressRequest(String district return Arrays.asList(marriageModuleDtls); } + + private List getAddressRequestFromIds(String district + , String state + , String country + , String postOfficeId + , String village + , String taluk) { + // master details for marriage certificate + List marriageMasterDetails = new ArrayList<>(); + if(null!=district) { + final String filterCode = "$.[?(@.id=='" + district + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.DISTRICT).filter(filterCode).build()); + } + if(null!=state) { + final String filterCodeState = "$.[?(@.id=='" + state + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.STATE).filter(filterCodeState).build()); + } + if(null!=country) { + final String filterCodeCountry = "$.[?(@.id=='" + country + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.COUNTRY).filter(filterCodeCountry).build()); + } + if(null!=postOfficeId) { + final String filterCodePostOffice = "$.[?(@.id=='" + postOfficeId + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); + } + if(null!=village) { + final String filterCodeVillage = "$.[?(@.id=='" + village + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.VILLAGE).filter(filterCodeVillage).build()); + } + if(null!=taluk) { + //taluk + final String filterCodeTaluk = "$.[?(@.id=='" + taluk + "')].name"; + marriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.TALUK).filter(filterCodeTaluk).build()); + } + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) + .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); + + return Arrays.asList(marriageModuleDtls); + } + + private MdmsCriteriaReq getMDMSRequestForAddress(RequestInfo requestInfo , String tenantId , String presentAddressDistrict @@ -271,6 +320,23 @@ private ModuleDetail getTenantIdCertificate(String tenantId) { .moduleName(MarriageConstants.TENANT_MODULE_NAME).build(); + return marriageModuleDtls; + } + private ModuleDetail getMarriagePalceCertificate(String placeId,String placeType) { + + List masterDetails = new ArrayList<>(); + if(StringUtils.isNotBlank(placeId)) { + // filter to only get code field from master data + final String filterCode = "$.[?(@.code=='" + placeId + "')]"; + masterDetails + .add(MasterDetail.builder().name(MarriageConstants.MARRIAGE_PLACE).filter(filterCode).build()); + } + + + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(masterDetails) + .moduleName(MarriageConstants.TENANT_EGOV_LOCATION).build(); + + return marriageModuleDtls; } public Object mDMSCallGetAddress(RequestInfo requestInfo @@ -293,6 +359,19 @@ public Object mDMSCallGetAddress(RequestInfo requestInfo return result; } + public Object mDMSCallGetMandapamAddress(RequestInfo requestInfo, MarriageRegistryDetails marriageRegistryDetails){ + ModuleDetail moduleDetail = getMarriagePalceCertificate(marriageRegistryDetails.getPlaceid(),marriageRegistryDetails.getPlacetype()); + List moduleDetails = new LinkedList<>(); + moduleDetails.add(moduleDetail); + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(marriageRegistryDetails.getTenantid()) + .build(); + + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + return result; + } + // public Object mdmsCallForLocation (RequestInfo requestInfo, String tenantId) { // // Call MDMS microservice with MdmsCriteriaReq as params // @@ -517,7 +596,7 @@ public Map> getMarriageMDMSData(MarriageCertPDFRequest reque } public Map> getMarriageMDMSData(Object mdmsdata) { - Map errorMap = new HashMap<>(); +// Map errorMap = new HashMap<>(); Map> masterData = getAttributeValues(mdmsdata); // System.out.println(masterData); return masterData; @@ -528,19 +607,129 @@ private Map> getAttributeValues(Object mdmsdata) { //MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH, MarriageConstants.TENANT_JSONPATH, MarriageConstants.COMMON_MASTER_JSONPATH); - final Map> mdmsResMap = new HashMap<>(); - // System.out.println("Jasminemodulepaths"+modulepaths); - modulepaths.forEach(modulepath -> { - try { - mdmsResMap.putAll(JsonPath.read(mdmsdata, modulepath)); - // log.error("jsonpath1" + JsonPath.read(mdmsdata, modulepath)); - } catch (Exception e) { - log.error("Error while fetching MDMS data", e); - throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, - MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); +// final Map> mdmsResMap = new HashMap<>(); +// // System.out.println("Jasminemodulepaths"+modulepaths); +// modulepaths.forEach(modulepath -> { +// try { +// mdmsResMap.putAll(JsonPath.read(mdmsdata, modulepath)); +// // log.error("jsonpath1" + JsonPath.read(mdmsdata, modulepath)); +// } catch (Exception e) { +// log.error("Error while fetching MDMS data", e); +// throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, +// MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); +// } +// +// }); +// return mdmsResMap; + return getAttributeValuesForJsonPaths(mdmsdata,modulepaths); + } + private Map> getAttributeValuesForJsonPaths(Object mdmsdata,List modulepaths) { + if(modulepaths!=null&&!modulepaths.isEmpty()) { + final Map> mdmsResMap = new HashMap<>(); + modulepaths.forEach(modulepath -> { + try { + mdmsResMap.putAll(JsonPath.read(mdmsdata, modulepath)); + } catch (Exception e) { + log.error("Error while fetching MDMS data", e); + throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, + MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); + } + + }); + return mdmsResMap; + }else{ + log.error("Error while fetching MDMS data,modulepaths is invalid"); + throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, + MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); + } + } + private Map getAttributeStrValuesForJsonPaths(Object mdmsdata,List modulepaths) { + if(modulepaths!=null&&!modulepaths.isEmpty()) { + final Map mdmsResMap = new HashMap<>(); + modulepaths.forEach(modulepath -> { + try { + mdmsResMap.putAll(JsonPath.read(mdmsdata, modulepath)); + } catch (Exception e) { + log.error("Error while fetching MDMS data", e); + throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, + MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); + } + + }); + return mdmsResMap; + }else{ + log.error("Error while fetching MDMS data,modulepaths is invalid"); + throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, + MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); + } + } + public Map getMandapamAttributeValues(Object mdmsdata) { + List modulepaths = Arrays.asList( + //MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH, +// MarriageConstants.TENANT_JSONPATH, +// MarriageConstants.COMMON_MASTER_JSONPATH, +// MarriageConstants.EGOV_LOCATION_JSONPATH, + MarriageConstants.MARRIAGE_PLACE_JSONPATH); + + return getAttributeStrValuesForJsonPaths(mdmsdata,modulepaths); + } + + public StringBuilder appendIfNotBlank(String v,StringBuilder s,boolean addSemicolon){ + if(StringUtils.isNotBlank(v)){ + s.append(v); + if(addSemicolon){ + s.append(","); } + } + return s; + } - }); - return mdmsResMap; + private MdmsCriteriaReq getMDMSRequestForAddressFromIds(RequestInfo requestInfo + , String tenantId + , String presentAddressDistrict + , String presentAddressState + , String presentAddressCountry + , String presentPostOfficeId + , String presentAddressVillage + , String presentAddrTaluk) { + ModuleDetail tenantIdRequest = getTenantIdCertificate(tenantId); + List commonMasterRequest = getAddressRequestFromIds(presentAddressDistrict + ,presentAddressState + ,presentAddressCountry + ,presentPostOfficeId + ,presentAddressVillage + ,presentAddrTaluk); + + List moduleDetails = new LinkedList<>(); + moduleDetails.add(tenantIdRequest); + moduleDetails.addAll(commonMasterRequest); + + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) + .build(); + + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + + // System.out.println("mdmsreq2"+mdmsCriteriaReq); + return mdmsCriteriaReq; + } + public Object mDMSCallGetAddressFromIds(RequestInfo requestInfo + , String tenantId + , String presentAddressDistrict + , String presentAddressState + , String presentAddressCountry + , String presentPostOfficeId + , String presentAddressVillage + , String presentAddrTaluk) { + MdmsCriteriaReq mdmsCriteriaReq = getMDMSRequestForAddressFromIds(requestInfo + , tenantId + , presentAddressDistrict + , presentAddressState + , presentAddressCountry + , presentPostOfficeId + , presentAddressVillage + , presentAddrTaluk); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + return result; } } \ No newline at end of file From c861a1e95e07bb4993af319671affc7d11da0823 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 14 Apr 2023 12:54:33 +0530 Subject: [PATCH 189/420] certificate no and rule engine --- .../MarriageApplicationConfiguration.java | 9 ++++-- .../enrichment/MarriageDetailsEnrichment.java | 13 -------- .../MarriageApplicationRepository.java | 31 ++++++++++++------- .../BaseMarriageQueryBuilder.java | 8 +++++ .../MarriageApplicationQueryBuilder.java | 2 ++ .../MarriageApplicationRowMapper.java | 2 +- .../service/MarriageApplicationService.java | 21 ++++++++++--- .../MarriageApplicationValidator.java | 15 +++------ .../MarriageApplicationController.java | 8 ----- .../web/model/MarriageApplicationDetails.java | 4 +-- .../MarriageCertificateEnrichment.java | 23 ++++++++++++-- .../MarriageRegistryEnrichment.java | 26 +++++++++++++++- .../MarriageRegistryRepository.java | 2 +- .../querybuilder/BaseMarriageQuery.java | 8 +++++ .../MarriageRegistryQueryBuilder.java | 1 + 15 files changed, 116 insertions(+), 57 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index c49649ad549..e5ce5876543 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -31,7 +31,10 @@ public class MarriageApplicationConfiguration { private String marriageFileNumberName; @Value("${egov.idgen.marriagereg.name}") - private String getMarriageRegisNumberName; + private String getMarriageRegNumberName; + + @Value("${egov.idgen.marriagecert.name}") + private String getMarriageCertificateName; //Jasmine 24.03.2023 @@ -107,8 +110,8 @@ public class MarriageApplicationConfiguration { @Value("${persister.update.marriagecertificate.topic}") private String updateMarriageCertificateTopic; - @Value("${egov.idgen.marriageapplncertno.name}") - private String marriageCertNumberIdName; + // @Value("${egov.idgen.marriageapplncertno.name}") + // private String marriageCertNumberIdName; //Marriage Correction diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 76ddab9d5a1..746515246be 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -604,13 +604,8 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - - // } } - - - } }); @@ -696,8 +691,6 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { }); } - - //Jasmine 30.03.2023 public List saveDemand(RequestInfo requestInfo, List demands){ StringBuilder url = new StringBuilder(config.getBillingHost()); @@ -713,7 +706,6 @@ public List saveDemand(RequestInfo requestInfo, List demands){ } return response.getDemands(); } - // private void setApplicationNumbers(MarriageDetailsRequest request) { // Long currentTime = Long.valueOf(System.currentTimeMillis()); // String id = idGenerator.setIDGeneratorStill(request, MarriageConstants.FUN_MODULE_NEW,MarriageConstants.APP_NUMBER_CAPTION); @@ -724,11 +716,6 @@ public List saveDemand(RequestInfo requestInfo, List demands){ // setDateofreporting(currentTime); // }); // } - - - - - private List getIds(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { return idGenRepository.getIdList(requestInfo, tenantId, idName, moduleCode, fnType, count); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index cebadc171be..3892cbe5117 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -40,7 +40,8 @@ public class MarriageApplicationRepository { private final MarriageApplicationQueryBuilder marriageQueryBuilder; private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; - private final MarriageDocumentRowMapper documentRowMapper; + private final MarriageDocumentRowMapper marriagedocumentRowMapper; + // private final DocumentRowMapper marriagedocumentRowMapper; // private final MarriageRegistryRowMapper marriageRegistryRowMapper; // private final MarriageApplicationConfiguration marriageApplicationConfiguration; @@ -58,12 +59,12 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat JdbcTemplate jdbcTemplate, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, - MarriageDocumentRowMapper documentRowMapper) { + MarriageDocumentRowMapper marriagedocumentRowMapper) { this.producer = producer; this.jdbcTemplate = jdbcTemplate; this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; - this.documentRowMapper = documentRowMapper; + this.marriagedocumentRowMapper = marriagedocumentRowMapper; } //Jasmine 31.03.2023 @@ -101,21 +102,29 @@ else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); criteria.setApplicationType(marriage.getApplicationtype()); - criteria.setApplicationType(marriage.getApplicationNumber()); + criteria.setApplicationNo(marriage.getApplicationNumber()); criteria.setTenantId(marriage.getTenantid()); - System.out.println("criteria"+criteria); - // getDocumentSearchDetails( criteria, requestInfo); - }); - - + // System.out.println("criteriafordocument"+criteria); + List completeDocumentDetails = getDocumentSearchDetails( criteria, requestInfo); + // System.out.println("completeDocumentDetails"+completeDocumentDetails); + // List documentDetails1 = new ArrayList<>(); + // MarriageDocument document = new MarriageDocument(); + // document.setTenantId(marriage.getTenantid()); + // document.setConsumerCode(marriage.getApplicationNumber()); + // document.add(demand); + marriage.setMarriageDocuments(completeDocumentDetails); + + }); } + // result.get(0).setMarriageDocuments(completeDocumentDetails); + return result; } public List getDocumentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageDocumentQuery( criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), documentRowMapper); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagedocumentRowMapper); return result; } @@ -123,7 +132,7 @@ public List getDocumentDetails(MarriageApplicationSearchCriter public List getDocumentSearchDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageDocumentSearchQuery( criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), documentRowMapper); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagedocumentRowMapper); return result; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java index a20fe16b16b..20d1b899b3e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java @@ -62,6 +62,14 @@ void addFilter(String column, String value, StringBuilder query, List pa paramValues.add(value); } } + void addFilterDate(String column, Long value, StringBuilder query, List paramValues) { + if (value != null) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + } + } void addFilterString(String column, String value, StringBuilder query, List paramValues) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 9045d4d13de..f2ea946e724 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -124,6 +124,7 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri addFilter("MD.applicationNumber", criteria.getApplicationNo(), query, preparedStmtValues); addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); + addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); if (criteria.getBrideFirstnameEn() != null){ addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); } @@ -176,6 +177,7 @@ public String getMarriageDocumentQuery(MarriageApplicationSearchCriteria criteri addFilter("applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); addFilter("applicationtype", criteria.getApplicationType(), query, preparedStmtValues); addFilter("tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("active", "true", query, preparedStmtValues); return query.toString(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 95a678a9ee1..225f87e9f0f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -48,7 +48,7 @@ public List extractData(ResultSet rs) throws SQLExce .witnessDetails(getWitnessDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) - // .MarriageDocuments(getMarriageDocument(rs)) + //.MarriageDocuments(getMarriageDocument(rs)) .auditDetails(getAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 7fa117e71f9..b6b2972b924 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -18,6 +18,9 @@ import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.stereotype.Service; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import lombok.extern.slf4j.Slf4j; import java.util.ArrayList; import java.util.List; @@ -53,15 +56,26 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication public List saveMarriageDetails(MarriageDetailsRequest request) { + // try { + // ObjectMapper mapper = new ObjectMapper(); + // Object obj = request; + // mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + // System.out.println("MarriageRequest "+ mapper.writeValueAsString(obj)); + // }catch(Exception e) { + // log.error("Exception while fetching from searcher: ",e); + // } + System.out.println("Workflowtesting"+request.getMarriageDetails().get(0).getIsWorkflow()); WorkFlowCheck wfc = new WorkFlowCheck(); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); - // validatorService.ruleEngineMarriage(request, wfc, mdmsData); + validatorService.ruleEngineMarriage(request, wfc, mdmsData); validatorService.validateCommonFields( request); mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + + // System.out.println("CheckWorkFlow"+request.getMarriageDetails().get(0).isWorkflow()); - if (request.getMarriageDetails().get(0).isWorkflow()){ + if (request.getMarriageDetails().get(0).getIsWorkflow()){ workflowIntegrator.callWorkFlow(request); } request.getMarriageDetails().forEach(marriage->{ @@ -75,7 +89,6 @@ public List saveMarriageDetails(MarriageDetailsReque } }); return request.getMarriageDetails(); - } public List updateMarriageDetails(MarriageDetailsRequest request) { @@ -90,7 +103,7 @@ public List updateMarriageDetails(MarriageDetailsReq List searchResult = repository.getMarriageApplication(criteria,request.getRequestInfo()); validatorService.validateUpdate(request, searchResult); marriageDetailsEnrichment.enrichUpdate(request); - if (request.getMarriageDetails().get(0).isWorkflow()){ + if (request.getMarriageDetails().get(0).getIsWorkflow()){ workflowIntegrator.callWorkFlow(request); } producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 344fc349091..07faf8d42df 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -133,23 +133,18 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF String endStr = wfLists.get(n).get("enddateperiod").toString(); Long start = Long.parseLong(startStr); Long end = Long.parseLong(endStr); - Long comp = currentDate - dateOfMarriage; - - // System.out.println("StartDate " +start ); - // System.out.println("endDate " +end ); - // System.out.println("compDate " +comp ); - if (comp > start && comp <= end) - { + if (end > 0L) { + Long comp = currentDate - dateOfMarriage; + if (comp > start && comp <= end){ wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); wfc.setWorkflowCode(wfLists.get(n).get("WorkflowCode").toString()); wfc.setPayment(Boolean.getBoolean(wfLists.get(n).get("payment").toString())); wfc.setAmount(Integer.parseInt(wfLists.get(n).get("amount").toString())); wfc.setActive(Boolean.getBoolean(wfLists.get(n).get("active").toString())); - System.out.println("wfCodetesting"+wfLists.get(n).get("WorkflowCode").toString()); + // System.out.println("wfCodetesting"+wfLists.get(n).get("WorkflowCode").toString()); } } - - /// System.out.println("wfCodetesting"+wfLists.get(n).get("WorkflowCode").toString()); + } return wfc; } public void validateCommonFields(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index 60f6ce1a1ff..bc2db7d173d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -37,7 +37,6 @@ public class MarriageApplicationController { private final MarriageApplicationService MarriageService; private final ResponseInfoFactory responseInfoFactory; private final MarriageRegistryRequestService marriageRegistryRequestService; - private final MarriageRegistryService marriageRegistryService; @@ -47,8 +46,6 @@ public MarriageApplicationController(MarriageApplicationService MarriageService, this.marriageRegistryRequestService = marriageRegistryRequestService; this.marriageRegistryService = marriageRegistryService; } - - @PostMapping(value = {"/_createmarriage"}) public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { @@ -62,7 +59,6 @@ public ResponseEntity saveMarriageDetails(@RequestB .build(); return new ResponseEntity<>(response, HttpStatus.OK); } - @PostMapping(value = {"/_updatemarriage"}) public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsRequest request) { @@ -90,7 +86,6 @@ public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsReque } @PostMapping(value = { "/_searchmarriage"}) - public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { @@ -103,7 +98,4 @@ public ResponseEntity searchMarriageDetails(@Reques .build(); return ResponseEntity.ok(response); } - - - } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 5fcf329277f..0051018e42c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -180,7 +180,7 @@ public class MarriageApplicationDetails { private String workflowcode; @JsonProperty("isWorkflow") - private boolean isWorkflow; + private Boolean isWorkflow; private String assignuser; @@ -195,7 +195,7 @@ public class MarriageApplicationDetails { @JsonProperty("MarriageDocuments") @Valid - private List MarriageDocuments = null; + private List MarriageDocuments ; private boolean wfnormalRegn ; private boolean wfdelayedWithinFiveYear ; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java index 3aa9433cd2e..3933ec8dd87 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java @@ -33,6 +33,7 @@ public void enrichCreate(MarriageCertRequest request) { AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); request.getMarriageCertificate().setId(UUID.randomUUID().toString()); request.getMarriageCertificate().setAuditDetails(auditDetails); + createCertificateNo(request); } @@ -41,6 +42,7 @@ public void enrichUpdate(MarriageCertRequest request) { User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); request.getMarriageCertificate().setAuditDetails(auditDetails); + createCertificateNo(request); } @@ -51,17 +53,32 @@ public void createCertificateNo(MarriageCertRequest marriageCertRequest){ List ackNoDetails = idGenRepository.getIdList(requestInfo, tenantId, - config.getMarriageCertNumberIdName(), + config.getGetMarriageCertificateName(), marriageCertRequest.getMarriageCertificate().getModulecode(), "CERT",1); ListIterator itr = ackNoDetails.listIterator(); marriageCertRequest.getMarriageCertificate().setMarriagecertificateno(itr.next()); marriageCertRequest.getMarriageCertificate().setDateofissue(currentTime); - } + // private void setCertificateNumber(MarriageCertRequest marriageCertRequest) { + // RequestInfo requestInfo = marriageCertRequest.getRequestInfo(); + // MarriageCertificate marriageDetails = marriageCertRequest.getMarriageCertificate(); + // String tenantId = marriageDetails.getTenantid(); - + // List filecodes = getIdList(requestInfo, + // tenantId, + // config.getGetMarriageRegNumberName(), + // marriageCertRequest.getMarriageCertificate().getModulecode(), + // "CERT", + // 1); + // // validateFileCodes(filecodes, marriageDetails.size()); + // Long currentTime = Long.valueOf(System.currentTimeMillis()); + // ListIterator itr = filecodes.listIterator(); + // marriageDetails.setMarriagecertificateno(itr.next()); + // marriageDetails.setDateofissue(currentTime); + + // } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 54833aa1e36..6307017d3db 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -95,7 +95,7 @@ private void setRegistrationNumber(MarriageRegistryRequest request) { List filecodes = getIds(requestInfo, tenantId, - config.getGetMarriageRegisNumberName(), + config.getGetMarriageRegNumberName(), request.getMarriageDetails().get(0).getModulecode(), "REG", marriageDetails.size()); @@ -111,6 +111,30 @@ private void setRegistrationNumber(MarriageRegistryRequest request) { }); } + //Jasmine 14.04.2023 + private void setCertificateNumber(MarriageRegistryRequest request) { + + RequestInfo requestInfo = request.getRequestInfo(); + List marriageDetails = request.getMarriageDetails(); + String tenantId = marriageDetails.get(0).getTenantid(); + + List filecodes = getIds(requestInfo, + tenantId, + config.getGetMarriageCertificateName(), + request.getMarriageDetails().get(0).getModulecode(), + "CERT", + marriageDetails.size()); + validateFileCodes(filecodes, marriageDetails.size()); + Long currentTime = Long.valueOf(System.currentTimeMillis()); + ListIterator itr = filecodes.listIterator(); + request.getMarriageDetails() + .forEach(marriage -> { + //if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { + marriage.setRegistrationno(itr.next()); + marriage.setRegistrationDate(currentTime); + // } + }); + } //Jasmine 28.03.2023 private void setGroomPresentAddress(MarriageRegistryRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index ae94286ad29..9f93ac3abdb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -87,7 +87,7 @@ public List searchMarriageRegistry(MarriageRegistrySear List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); System.out.println("Groom address -------"); - System.out.println(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(result.get(0))); + // System.out.println(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(result.get(0))); return result; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java index b77f6012c5c..c418dc6f37c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java @@ -64,6 +64,14 @@ void addFilter(String column, String value, StringBuilder query, List pa paramValues.add(value); } } + void addFilterDate(String column, Long value, StringBuilder query, List paramValues) { + if (value != null) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + } + } void addFilterString(String column, String value, StringBuilder query, List paramValues) { if (StringUtils.isNotBlank(value)) { addWhereClause(paramValues, query); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 64837ade076..60a673ad420 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -216,6 +216,7 @@ public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCrit addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD.applicationnumber", criteria.getApplicationNumber(), query, preparedStmtValues); addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValue addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); if (criteria.getBrideFirstnameEn() != null){ From d6954ad20bba16973aeeb6fd3352aa0e135f25ab Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 14 Apr 2023 16:56:14 +0530 Subject: [PATCH 190/420] response count for paging --- .../MarriageApplicationRepository.java | 77 +++++++------------ .../MarriageApplicationQueryBuilder.java | 52 +++++++++++-- .../service/MarriageApplicationService.java | 11 +-- .../MarriageApplicationController.java | 32 +++++--- .../web/model/MarriageApplicationDetails.java | 1 - .../MarriageApplicationSearchCriteria.java | 1 - .../MarriageRegistryRepository.java | 32 +++----- .../MarriageRegistryQueryBuilder.java | 53 ++++++++++++- .../MarriageRegistryController.java | 11 ++- ...14121800__registry_certno_deletion_dll.sql | 1 + 10 files changed, 166 insertions(+), 105 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230414121800__registry_certno_deletion_dll.sql diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 3892cbe5117..26b59738593 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -11,7 +11,6 @@ import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; -//import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; @@ -19,15 +18,10 @@ import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; -//import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; -//import org.ksmart.marriage.marriageregistry.repository.rowmapper.MarriageRegistryRowMapper; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageDocumentRowMapper; -//import org.ksmart.marriage.utils.MarriageMdmsUtil; -// import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; - import lombok.extern.slf4j.Slf4j; import java.util.ArrayList; @@ -41,15 +35,6 @@ public class MarriageApplicationRepository { private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; private final MarriageDocumentRowMapper marriagedocumentRowMapper; - // private final DocumentRowMapper marriagedocumentRowMapper; - - // private final MarriageRegistryRowMapper marriageRegistryRowMapper; - // private final MarriageApplicationConfiguration marriageApplicationConfiguration; - // private final MarriageDetailsEnrichment marriageDetailsEnrichment; - // private final WorkflowIntegrator workflowIntegrator; - // private final MarriageMdmsUtil util; - // private final MarriageMDMSValidator mdmsValidator; - @Autowired EncryptionDecryptionUtil encryptionDecryptionUtil; @@ -74,8 +59,7 @@ public List searchMarriageDetails(MarriageApplicatio List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); if(result != null) { - result.forEach(marriage -> { - + result.forEach(marriage -> { GroomDetails groomDetails =marriage.getGroomDetails(); GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); groomDetails.setAadharno(groomDetailsDec.getAadharno()); @@ -96,51 +80,48 @@ else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); } - WitnessDetails witnessDetails =marriage.getWitnessDetails(); WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); + criteria.setApplicationType(marriage.getApplicationtype()); criteria.setApplicationNo(marriage.getApplicationNumber()); criteria.setTenantId(marriage.getTenantid()); - // System.out.println("criteriafordocument"+criteria); - List completeDocumentDetails = getDocumentSearchDetails( criteria, requestInfo); - // System.out.println("completeDocumentDetails"+completeDocumentDetails); - // List documentDetails1 = new ArrayList<>(); - // MarriageDocument document = new MarriageDocument(); - // document.setTenantId(marriage.getTenantid()); - // document.setConsumerCode(marriage.getApplicationNumber()); - // document.add(demand); + List completeDocumentDetails = getDocumentSearchDetails( criteria, requestInfo); marriage.setMarriageDocuments(completeDocumentDetails); - }); } - // result.get(0).setMarriageDocuments(completeDocumentDetails); - return result; } - public List getDocumentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { - List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageDocumentQuery( criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagedocumentRowMapper); - - return result; - } + public List getDocumentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageDocumentQuery( criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagedocumentRowMapper); + return result; + } - public List getDocumentSearchDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { - List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageDocumentSearchQuery( criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagedocumentRowMapper); - return result; - } + public List getDocumentSearchDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageDocumentSearchQuery( criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagedocumentRowMapper); + return result; + } - public List getMarriageApplication(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { - List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); - return result; - } + public List getMarriageApplication(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + return result; + } + + public int getMarriageCount(MarriageApplicationSearchCriteria criteria) { + List preparedStmtList = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageCountQuery(criteria, preparedStmtList, Boolean.FALSE); + int MarriageCount = jdbcTemplate.queryForObject(query,preparedStmtList.toArray(),Integer.class); + // System.out.println("Marriagecountquery"+query); + return MarriageCount; + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index f2ea946e724..df61b9207d1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -132,14 +132,6 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri if (criteria.getGroomFirstnameEn() != null){ addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); } - //addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); - // addFilter("GD.middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); - // addFilter("GD.lastname_en", criteria.getGroomLastnameEn(), query, preparedStmtValues); - // addFilter("MD_dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); - // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); - // addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); - // addFilter("BD.middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); - //addFilter("BD.lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); addDateRangeFilter("MD.dateofmarriage", criteria.getFromDate(), criteria.getToDate(), @@ -193,6 +185,50 @@ public String getMarriageDocumentSearchQuery(MarriageApplicationSearchCriteria c return query.toString(); } + private static final String COUNTQUERY= new StringBuilder() + .append("SELECT COUNT(*) ") + .append("FROM eg_marriage_details as MD ") + .append("INNER JOIN eg_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") + .append("BD.bride_groom ='B' ") + .append("INNER JOIN eg_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") + .append("GD.bride_groom ='G' ") + .append("INNER JOIN eg_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("BPMA.bride_groom ='B' ") + .append("INNER JOIN eg_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("GPMA.bride_groom ='G' ") + .append("LEFT JOIN eg_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("BPSA.bride_groom ='B' ") + .append("LEFT JOIN eg_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("GPSA.bride_groom ='G' ") + .append("LEFT JOIN eg_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("WD1.serial_no = 1 ") + .append("LEFT JOIN eg_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("WD2.serial_no = 2 ") + .toString(); + + public String getMarriageCountQuery(MarriageApplicationSearchCriteria criteria ,@NotNull List preparedStmtValues, Boolean isCount) { + + StringBuilder query = new StringBuilder(COUNTQUERY); + addFilter("MD.id", criteria.getId(), query, preparedStmtValues); + addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("MD.applicationNumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); + addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); + if (criteria.getBrideFirstnameEn() != null){ + addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + } + addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); + if (criteria.getGroomFirstnameEn() != null){ + addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + } + addDateRangeFilter("MD.dateofmarriage", + criteria.getFromDate(), + criteria.getToDate(), + query, + preparedStmtValues); + return query.toString(); + } public String getNextIDQuery() { StringBuilder query = new StringBuilder("select fn_next_id(?,?,?)"); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index b6b2972b924..6c58581c7dd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -56,15 +56,8 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication public List saveMarriageDetails(MarriageDetailsRequest request) { - // try { - // ObjectMapper mapper = new ObjectMapper(); - // Object obj = request; - // mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); - // System.out.println("MarriageRequest "+ mapper.writeValueAsString(obj)); - // }catch(Exception e) { - // log.error("Exception while fetching from searcher: ",e); - // } - System.out.println("Workflowtesting"+request.getMarriageDetails().get(0).getIsWorkflow()); + + //System.out.println("Workflowtesting"+request.getMarriageDetails().get(0).getIsWorkflow()); WorkFlowCheck wfc = new WorkFlowCheck(); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); validatorService.ruleEngineMarriage(request, wfc, mdmsData); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index bc2db7d173d..90e4837eeb9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -6,28 +6,23 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationResponse; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; import org.ksmart.marriage.marriageapplication.service.MarriageRegistryRequestService; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; + import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; - +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import lombok.extern.slf4j.Slf4j; - import javax.validation.Valid; import java.util.List; -//import org.ksmart.marriage.marriageregistry.web.model.BirthCertificate; -//import org.ksmart.marriage.marriageregistry.web.model.RegisterBirthDetail; -//import org.ksmart.marriage.marriageregistry.web.model.RegisterBirthDetailsRequest; -//import org.ksmart.marriage.marriageregistry.web.model.RegisterBirthSearchCriteria; -//import org.ksmart.marriage.marriageregistry.service.RegisterBirthService; -//import org.ksmart.marriage.utils.ResponseInfoFactory; - @Slf4j @RestController @@ -38,13 +33,19 @@ public class MarriageApplicationController { private final ResponseInfoFactory responseInfoFactory; private final MarriageRegistryRequestService marriageRegistryRequestService; private final MarriageRegistryService marriageRegistryService; + private final MarriageApplicationRepository repository; - public MarriageApplicationController(MarriageApplicationService MarriageService, ResponseInfoFactory responseInfoFactory, MarriageRegistryRequestService marriageRegistryRequestService, MarriageRegistryService marriageRegistryService) { + public MarriageApplicationController(MarriageApplicationService MarriageService, + ResponseInfoFactory responseInfoFactory, + MarriageRegistryRequestService marriageRegistryRequestService, + MarriageRegistryService marriageRegistryService, + MarriageApplicationRepository repository) { this.MarriageService = MarriageService; this.responseInfoFactory = responseInfoFactory; this.marriageRegistryRequestService = marriageRegistryRequestService; this.marriageRegistryService = marriageRegistryService; + this.repository = repository; } @PostMapping(value = {"/_createmarriage"}) @@ -89,12 +90,23 @@ public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsReque public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { + int count=repository.getMarriageCount(criteria); List marriageDetails = MarriageService.searchMarriageDetails(criteria, request.getRequestInfo()); + // try { + // ObjectMapper mapper = new ObjectMapper(); + // Object obj = criteria; + // mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + // System.out.println("MarriageRequest "+ mapper.writeValueAsString(obj)); + // }catch(Exception e) { + // log.error("Exception while fetching from searcher: ",e); + // } + MarriageApplicationResponse response = MarriageApplicationResponse .builder() .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),Boolean.TRUE)) .marriageApplicationDetails(marriageDetails) + .count(count) .build(); return ResponseEntity.ok(response); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 0051018e42c..c5a1cf0ace8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -32,7 +32,6 @@ public class MarriageApplicationDetails { private Long dateofreporting; - @Size(max = 64) @JsonProperty("marriageDistrictid") private String districtid; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java index 49ef2f57a8d..79b5823101c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java @@ -29,7 +29,6 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("certificateNo") private String certificateNo; - @JsonProperty("marriageDOM") private Long marriageDOM; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 5aa1abad128..929cb336b49 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -89,15 +89,22 @@ public List searchMarriageRegistry(MarriageRegistrySear return result; } - + public int getMarriageRegistryCount(MarriageRegistrySearchCriteria criteria) { + List preparedStmtList = new ArrayList<>(); + String query = queryBuilder.getMarriageRegistryCountQuery(criteria, preparedStmtList, Boolean.FALSE); + int MarriageCount = jdbcTemplate.queryForObject(query,preparedStmtList.toArray(),Integer.class); + System.out.println("Marriagecountquery"+query); + return MarriageCount; + } public List searchCertificateByMarriageId(String id) { List preparedStmtVals = new ArrayList<>(); String qry = queryBuilder.getMarriageCertificateSearchQuery(id,preparedStmtVals,Boolean.FALSE); List results = jdbcTemplate.query(qry, preparedStmtVals.toArray(), marriageCertificateRowMapper); return results; - } + + public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marriageCertPDFRequest) { MarriageCertPdfResponse pdfResponse = new MarriageCertPdfResponse(); try { @@ -342,25 +349,4 @@ public String getValueFromMapOfStr(String key,Map mdmsMap){ } - - // public List updateMarriageRegistry(MarriageRegistryRequest request) { - // marriageRegistryEnrichment.enrichUpdate(request); - // producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryTopic(), request); - // MarriageRegistryRequest result = MarriageRegistryRequest - // .builder() - // .requestInfo(request.getRequestInfo()) - // .marriageDetails(request.getMarriageDetails()) - // .build(); - // return result.getMarriageDetails(); - // } - - // public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { - // List preparedStmtValues = new ArrayList<>(); - // String query = marriageRegistryQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - // List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); - // return result; - // } - - //private final org.ksmart.birth.common.producer.MarriageProducer producer; - } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 60a673ad420..34661901983 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -201,9 +201,9 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BPSA.bride_groom ='B' ") .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") .append("GPSA.bride_groom ='G' ") - .append("INNER JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("LEFT JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") .append("WD1.serial_no = 1 ") - .append("INNER JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("LEFT JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") .toString(); @@ -267,4 +267,53 @@ public String getMarriageCertificateSearchQuery(String id, List prepared addFilter("MC.registrydetailsid", id, query, preparedStmtVals); return query.toString(); } + + private static final String REGISTRYCOUNTQUERY= new StringBuilder() + .append(" SELECT count(*) ") + .append("FROM public.eg_register_marriage_details as MD ") + .append("INNER JOIN eg_register_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") + .append("BD.bride_groom ='B' ") + .append("INNER JOIN eg_register_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") + .append("GD.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("BPMA.bride_groom ='B' ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("GPMA.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("BPSA.bride_groom ='B' ") + .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("GPSA.bride_groom ='G' ") + .append("LEFT JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("WD1.serial_no = 1 ") + .append("LEFT JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("WD2.serial_no = 2 ") + .toString(); + + + public String getMarriageRegistryCountQuery(@NotNull MarriageRegistrySearchCriteria criteria, + @NotNull List preparedStmtValues, Boolean isCount) { + + StringBuilder query = new StringBuilder(REGISTRYCOUNTQUERY); + + addFilter("MD.id", criteria.getId(), query, preparedStmtValues); + addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); + addFilter("MD.applicationnumber", criteria.getApplicationNumber(), query, preparedStmtValues); + addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); + addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); + addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); + if (criteria.getBrideFirstnameEn() != null){ + addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + } + addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); + if (criteria.getGroomFirstnameEn() != null){ + addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + } + addDateRangeFilter("MD.dateofmarriage", + criteria.getFromDate(), + criteria.getToDate(), + query, + preparedStmtValues); + return query.toString(); + +} } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index edaf561f189..58ee1bf15aa 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -11,6 +11,7 @@ import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertResponse; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; +import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -28,11 +29,14 @@ public class MarriageRegistryController { private final MarriageRegistryService marriageService; private final ResponseInfoFactory responseInfoFactory; + private final MarriageRegistryRepository registryRepository; - - public MarriageRegistryController( MarriageRegistryService marriageService, ResponseInfoFactory responseInfoFactory) { + public MarriageRegistryController( MarriageRegistryService marriageService, + ResponseInfoFactory responseInfoFactory, + MarriageRegistryRepository registryRepository) { this.marriageService = marriageService; this.responseInfoFactory = responseInfoFactory; + this.registryRepository = registryRepository; } @PostMapping(value = {"/_createregistry"}) @@ -50,13 +54,14 @@ public ResponseEntity saveMarriageDetails(@RequestBody public ResponseEntity search(@RequestBody MarriageRegistryRequest request, @ModelAttribute MarriageRegistrySearchCriteria criteria) { - + int registryCount=registryRepository.getMarriageRegistryCount(criteria); List marriageDetails = marriageService.searchRegistry(criteria); MarriageRegistryResponse response = MarriageRegistryResponse .builder() .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) .marriageApplicationDetails(marriageDetails) + .count(registryCount) .build(); return ResponseEntity.ok(response); } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230414121800__registry_certno_deletion_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230414121800__registry_certno_deletion_dll.sql new file mode 100644 index 00000000000..1c27a654fcc --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230414121800__registry_certno_deletion_dll.sql @@ -0,0 +1 @@ +ALTER TABLE IF EXISTS public.eg_register_marriage_details DROP COLUMN IF EXISTS certificatenumber; \ No newline at end of file From a63b918df5c8ba2d15e3e28d39766f7697364dd7 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Fri, 14 Apr 2023 22:23:34 +0530 Subject: [PATCH 191/420] setGroomPermanentAddressForCertificate --- .../src/main/resources/application.properties | 6 +- .../main/resources/marriage-correction.yml | 157 ++++----- .../src/main/resources/marriage-registry.yml | 219 ++++++------ .../src/main/resources/marriage.yml | 44 +-- .../enrichment/MarriageDetailsEnrichment.java | 19 +- .../service/MarriageApplicationService.java | 2 +- .../model/marriage/BrideAddressDetails.java | 7 +- .../model/marriage/GroomAddressDetails.java | 2 +- .../MarriageCorrectionEnrichment.java | 8 +- .../service/MarriageCorrectionService.java | 14 +- .../MarriageRegistryEnrichment.java | 321 ++++++++++++++---- .../MarriageRegistryRepository.java | 18 +- .../service/MarriageRegistryService.java | 12 +- .../MarriageRegistryController.java | 17 +- .../model/BrideRegistryAddressDetails.java | 9 +- .../model/GroomRegistryAddressDetails.java | 11 +- .../src/main/resources/application.properties | 4 +- 17 files changed, 541 insertions(+), 329 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/application.properties b/core-services/egov-persister/src/main/resources/application.properties index 21c552cf1d5..c7f6973a088 100644 --- a/core-services/egov-persister/src/main/resources/application.properties +++ b/core-services/egov-persister/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 #Set context root server.port = 9082 @@ -12,7 +12,7 @@ server.servlet.context-path=/common-persist #----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -44,7 +44,7 @@ kafka.topics.create.message=egov-message-create #egov.persist.yml.repo.path=classpath:pg-service-persister.yml #egov.persist.yml.repo.path=classpath:persister.yml -egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-registry.yml,classpath:marriage-correction.yml,file:///D:/UPYOG/MARRIAGE 23.03.2023/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml +egov.persist.yml.repo.path=classpath:marriage.yml,classpath:marriage-registry.yml,classpath:marriage-correction.yml,file:////home/neenu/Documents/marriage/KSMART/core-services/egov-workflow-v2/src/main/resources/egov-workflow-v2-persister.yml #logging.level.org.egov.infra.persist.repository=DEBUG tracer.kafkaMessageLoggingEnabled=true tracer.errorsTopic=egov-persister-deadletter diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index de2998c9cc3..e71f7afec00 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -248,159 +248,160 @@ serviceMaps: - query : INSERT INTO public.eg_marriage_permanent_address_details( - id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentOutsideIndiaPostCode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent - query : INSERT INTO public.eg_marriage_permanent_address_details( - id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentOutsideIndiaPostCode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 6c2afb8cbe3..7a9c6b25154 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -102,7 +102,7 @@ serviceMaps: - query: UPDATE eg_marriage_details SET registrationno = ? ,registration_date = ? WHERE applicationnumber = ? AND tenantid = ? - + basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.registrationno @@ -354,160 +354,166 @@ serviceMaps: id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, - ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentUuid + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentUuid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaVillage - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentWardNo + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentWardNo - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.isPermanentAddress + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.isPermanentAddress - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeEn + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEnB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEnB + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOthrIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePresent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPincode - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl - query : INSERT INTO public.eg_register_marriage_permanent_address_details( - id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaPostOffice + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent - query: INSERT INTO public.eg_register_marriage_present_address_details( id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, - ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentUuid @@ -546,19 +552,19 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.isPermanentAddress - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeEn @@ -570,22 +576,23 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOthrIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent - query : INSERT INTO public.eg_register_marriage_permanent_address_details( id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: @@ -595,11 +602,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk @@ -617,47 +624,45 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaPostOffice + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.AuditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.AuditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn - - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl - - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn - - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaprovinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaprovinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent # serviceMaps: # serviceName: marriage-services # mappings: diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index a7c784794c5..4174cd3e4dc 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -409,9 +409,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOthrIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePresent @@ -485,13 +485,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntOthrIndiaprovinceMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodepermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl @@ -566,9 +566,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOthrIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePresent @@ -644,16 +644,16 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodepermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePermanent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent - + - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , document_link ,marriageid ,bride_groom ,active ,applicationnumber , createdby ,createdtime,lastmodifiedby , lastmodifiedtime ,applicationtype) @@ -689,7 +689,7 @@ serviceMaps: - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails[*][?({id} in @.MarriageDocuments[*].id)].auditDetails.lastModifiedTime - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationType @@ -1117,9 +1117,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOthrIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePresent @@ -1200,9 +1200,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOthrIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePresent @@ -1279,11 +1279,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrVillage + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodepermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl @@ -1361,11 +1361,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrVillage + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodepermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePermanent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 746515246be..0541fcc8f1e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -89,7 +89,8 @@ public void enrichCreate(MarriageDetailsRequest request) { setBridePresentAddress(request); setGroomPermanentAddress(request); setGroomPresentAddress(request); - + + //Jasmine 07.04.2023 GroomDetails groomDetails =marriage.getGroomDetails(); GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); @@ -409,16 +410,16 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); //} } @@ -603,7 +604,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + // } } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 6c58581c7dd..c3dc725e67b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -80,7 +80,7 @@ public List saveMarriageDetails(MarriageDetailsReque demands.add(demand); marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); } - }); + }); return request.getMarriageDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index b38949f192e..65be467b495 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -411,7 +411,7 @@ public class BrideAddressDetails { @JsonProperty("permntOutsideIndiaCityTown") private String permntOutsideIndiaCityTown; - @Size(max = 10) + @JsonProperty("permanentOutsideIndiaPostCode") private String permanentOutsideIndiaPostCode; @@ -522,9 +522,10 @@ public class BrideAddressDetails { @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; - @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePermanent") - private String outSideIndiaPostCodepermanent; + private String outSideIndiaPostCodePermanent; + @JsonProperty("PermanentAddrCityOrVillageEn") private String permanentAddrCityOrVillageEn ; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 24e924fda47..26420a3b201 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -524,6 +524,6 @@ public class GroomAddressDetails { @Size(max = 10) @JsonProperty("outSideIndiaPostCodePermanent") - private String outSideIndiaPostCodepermanent; + private String outSideIndiaPostCodePermanent; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index bc3d8ef28b2..a0c9dead2e9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -330,7 +330,7 @@ private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); } } }else if (marriage.getGroomAddressDetails().getCountryIdPermanent() != null && marriage.getGroomAddressDetails().getStateIdPermanent() != null) { @@ -378,7 +378,7 @@ private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoMl , marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceEn , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceMl , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setOutSideIndiaPostCodepermanent , marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + setIfNotNull(marriage.getGroomAddressDetails()::setOutSideIndiaPostCodePermanent , marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); } } @@ -446,7 +446,7 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); } @@ -495,7 +495,7 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLinetwoMl, marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceEn, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceMl, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setOutSideIndiaPostCodepermanent, marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + setIfNotNull(marriage.getBrideAddressDetails()::setOutSideIndiaPostCodePermanent, marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index eb2597fd6f7..b13748c524a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -57,12 +57,12 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito this.mdmsValidator = mdmsValidator; this.correctionApplicationToRegistryMapper = correctionApplicationToRegistryMapper; } - +//req for testing public List createCorrection(MarriageCorrectionRequest request) { MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); - List marriageRegistryDetails = searchRegistry(criteria); + List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); if (!marriageRegistryDetails.isEmpty()) { MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); marriageCorrectionEnrichment.enrichCreate(request, marriageApplicationDetail); @@ -82,17 +82,17 @@ public List createCorrection(MarriageCorrectionReques return request.getMarriageCorrectionDetails(); } - - private List searchRegistry(MarriageRegistrySearchCriteria criteria) { - return registryRepository.searchMarriageRegistry(criteria); +//req For Testing + private List searchRegistry(MarriageRegistrySearchCriteria criteria, RequestInfo req) { + return registryRepository.searchMarriageRegistry(criteria,req); } - +//req for testing public List updateMarriageRegistry(MarriageCorrectionRequest request) { MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria); + List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); if (!marriageRegistryDetails.isEmpty()) { MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 5148bb97232..1c8dc425eac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -219,19 +219,20 @@ private void setGroomPresentAddress(MarriageRegistryRequest request) { else { // if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); - marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaPostCode()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); - marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); - marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); // } } @@ -316,7 +317,7 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getGroomAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); @@ -331,7 +332,7 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { } - private void setBridePresentAddress(MarriageRegistryRequest request) { + public void setBridePresentAddress(MarriageRegistryRequest request) { request.getMarriageDetails() .forEach(marriage ->{ if (marriage.getBrideAddressDetails()!=null) { @@ -408,20 +409,21 @@ private void setBridePresentAddress(MarriageRegistryRequest request) { else { // if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); - marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); - marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); @@ -515,7 +517,7 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getBrideAddressDetails().setOutSideIndiaPostCodepermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); // } } @@ -553,7 +555,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg if (registryDetails.getGroomAddressDetails() != null) { - if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != null && registryDetails.getGroomAddressDetails().getPermtaddressStateName() != null) { + if (registryDetails.getGroomAddressDetails().getDistrictIdPermanent() != null && registryDetails.getGroomAddressDetails().getStateIdPermanent() != null) { if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { @@ -566,31 +568,43 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg , registryDetails.getGroomAddressDetails().getPoNoPermanent() , registryDetails.getGroomAddressDetails().getVillageNamePermanent() , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); - registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); +// registryDetails.getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); +// registryDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn(),groomAddressBuilder,true); + registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn(),groomAddressBuilder,true); + registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn(),groomAddressBuilder,true); + registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap),groomAddressBuilder,true); + registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(), groomAddressBuilder, true); + + appendIfNotBlank(registryDetails.getGroomAddressDetails().getStreetNameEnPermanent(), groomAddressBuilder, true); + + appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName(),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode(),groomAddressBuilder,false); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); + +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode(),groomAddressBuilder,false); +// // appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn(),groomAddressBuilder,true); // // appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn(),groomAddressBuilder,true); @@ -608,44 +622,102 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg // appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode(),groomAddressBuilder,false); - } else { + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() + , registryDetails.getGroomAddressDetails().getDistrictIdPermanent() + , registryDetails.getGroomAddressDetails().getStateIdPermanent() + , registryDetails.getGroomAddressDetails().getCountryIdPermanent() + , registryDetails.getGroomAddressDetails().getPoNoPermanent() + , registryDetails.getGroomAddressDetails().getVillageNamePermanent() + , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(null); + registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); + + registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); + + registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); + + registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + + registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn(),groomAddressBuilder,true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(),groomAddressBuilder,true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getStreetNameEnPermanent(),groomAddressBuilder,true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(),groomAddressBuilder,true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap),groomAddressBuilder,true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),groomAddressBuilder,true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict(),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap),groomAddressBuilder,true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName(),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),groomAddressBuilder,true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(),groomAddressBuilder,true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode(),groomAddressBuilder,false); +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getStreetNameEnPermanent(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthPostOfficeEn(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode(),groomAddressBuilder,false); } } } else { - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn(),groomAddressBuilder,true); + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() + , registryDetails.getGroomAddressDetails().getDistrictIdPermanent() + , registryDetails.getGroomAddressDetails().getStateIdPermanent() + , registryDetails.getGroomAddressDetails().getCountryIdPermanent() + , registryDetails.getGroomAddressDetails().getPoNoPermanent() + , registryDetails.getGroomAddressDetails().getVillageNamePermanent() + , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(null); + registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setStateIdPermanent(null); + registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setPoNoPermanent(null); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode(),groomAddressBuilder,true); + registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaLineoneEn(),groomAddressBuilder,true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,false); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaprovinceEn(),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),groomAddressBuilder,true); + + appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(),groomAddressBuilder,true); } } + return groomAddressBuilder.toString(); } @@ -660,60 +732,161 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg if (registryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn(),brideAddressBuilder,true); + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() + , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() + , registryDetails.getBrideAddressDetails().getStateIdPermanent() + , registryDetails.getBrideAddressDetails().getCountryIdPermanent() + , registryDetails.getBrideAddressDetails().getPoNoPermanent() + , registryDetails.getBrideAddressDetails().getVillageNamePermanent() + , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); +// registryDetails.getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); +// registryDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn(),brideAddressBuilder,true); + registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn(),brideAddressBuilder,true); + registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice(),brideAddressBuilder,true); + registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict(),brideAddressBuilder,true); + registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode(),brideAddressBuilder,false); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), brideAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), brideAddressBuilder, true); - } else { + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), brideAddressBuilder, true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); + +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode(),brideAddressBuilder,false); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode(),brideAddressBuilder,false); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn(),brideAddressBuilder,true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn(),brideAddressBuilder,true); + } else { + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() + , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() + , registryDetails.getBrideAddressDetails().getStateIdPermanent() + , registryDetails.getBrideAddressDetails().getCountryIdPermanent() + , registryDetails.getBrideAddressDetails().getPoNoPermanent() + , registryDetails.getBrideAddressDetails().getVillageNamePermanent() + , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(null); + registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn(),brideAddressBuilder,true); + registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict(),brideAddressBuilder,true); + registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName(),brideAddressBuilder,true); + registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); + registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode(),brideAddressBuilder,false); + registryDetails.getBrideAddressDetails().setPoNoPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode(),brideAddressBuilder,false); +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(),brideAddressBuilder,true); +// +// appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap),brideAddressBuilder,true); +// +// appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),brideAddressBuilder,true); +// +// appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap),brideAddressBuilder,true); +// +// appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),brideAddressBuilder,true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(),brideAddressBuilder,true); } } } else { - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn(),brideAddressBuilder,true); + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() + , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() + , registryDetails.getBrideAddressDetails().getStateIdPermanent() + , registryDetails.getBrideAddressDetails().getCountryIdPermanent() + , registryDetails.getBrideAddressDetails().getPoNoPermanent() + , registryDetails.getBrideAddressDetails().getVillageNamePermanent() + , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(null); + registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setStateIdPermanent(null); + registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setPoNoPermanent(null); +// + registryDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaLineoneEn(),brideAddressBuilder,true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaprovinceEn(),brideAddressBuilder,true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,false); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getOutSideIndiaPostCodePermanent(),brideAddressBuilder,true); } - } + return brideAddressBuilder.toString(); } @@ -734,4 +907,6 @@ public String getValueFromMap(String key,Map> mdmsMap){ return null; } + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 929cb336b49..84d6181a3a9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -2,6 +2,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; +import org.egov.common.contract.request.RequestInfo; import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.producer.MarriageProducer; @@ -30,6 +31,11 @@ import java.util.List; import java.util.Map; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; + +import lombok.extern.slf4j.Slf4j; @Slf4j @Repository public class MarriageRegistryRepository { @@ -79,7 +85,7 @@ public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnr // return result.getMarriageDetails(); // } - public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { + public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria ,RequestInfo req) { List preparedStmtValues = new ArrayList<>(); @@ -87,7 +93,15 @@ public List searchMarriageRegistry(MarriageRegistrySear List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); - return result; + System.out.println("Groom address -------"); + String address=marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req, result.get(0)); + String address2=marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req, result.get(0)); + + System.out.println(address); + System.out.println(address2); + + return result; + } public int getMarriageRegistryCount(MarriageRegistrySearchCriteria criteria) { List preparedStmtList = new ArrayList<>(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index ebfe2538939..b8336713ba1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -66,14 +66,14 @@ public List createRegistry(MarriageRegistryRequest requ // return repository.updateMarriageRegistry(request); // } - public List searchRegistry(MarriageRegistrySearchCriteria criteria) { + public List searchRegistry(MarriageRegistrySearchCriteria criteria, RequestInfo req) { - return repository.searchMarriageRegistry(criteria); + return repository.searchMarriageRegistry(criteria,req); } public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { - List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria); + List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria,requestInfo); if (marriageRegistryDetailsList != null && !marriageRegistryDetailsList.isEmpty()) { // List marriageCertificateList = repository.searchCertificateByMarriageId(marriageRegistryDetailsList.get(0).getId()); try { @@ -83,7 +83,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req MarriageCertRequest marriageCertRequest = MarriageCertRequest.builder().marriageCertificate(marriageCertificate).requestInfo(requestInfo).build(); marriageCertificate.setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); marriageCertificate.setRegistrationno(marriageRegistryDetailsList.get(0).getRegistrationno()); - List marriageDtls = searchCertificate(criteria); + List marriageDtls = searchCertificate(criteria,requestInfo); if (null!=marriageDtls && marriageDtls.size() > 1) { throw new CustomException("Invalid_Input", "Error in processing data"); } @@ -145,8 +145,8 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req } - public List searchCertificate(MarriageRegistrySearchCriteria criteria) { - List obj = repository.searchMarriageRegistry(criteria); + public List searchCertificate(MarriageRegistrySearchCriteria criteria , RequestInfo req) { + List obj = repository.searchMarriageRegistry(criteria,req); return repository.searchCertificateByMarriageId(obj.get(0).getId()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index 58ee1bf15aa..04bfabe452d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -4,6 +4,7 @@ // import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryResponse; @@ -49,13 +50,15 @@ public ResponseEntity saveMarriageDetails(@RequestBody .build(); return new ResponseEntity<>(response, HttpStatus.OK); } - +//for testing req @PostMapping("_searchregistry") public ResponseEntity search(@RequestBody MarriageRegistryRequest request, - @ModelAttribute MarriageRegistrySearchCriteria criteria) { - int registryCount=registryRepository.getMarriageRegistryCount(criteria); - List marriageDetails = marriageService.searchRegistry(criteria); + + @ModelAttribute MarriageRegistrySearchCriteria criteria, RequestInfo req) { + int registryCount=registryRepository.getMarriageRegistryCount(criteria); + + List marriageDetails = marriageService.searchRegistry(criteria,req); MarriageRegistryResponse response = MarriageRegistryResponse .builder() @@ -65,11 +68,11 @@ public ResponseEntity search(@RequestBody MarriageReg .build(); return ResponseEntity.ok(response); } - + //for testing req @PostMapping("_certificate") public ResponseEntity certificateDownload(@RequestBody MarriageRegistryRequest request, - @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria) { - List marriageCertResponseList = marriageService.searchCertificate(criteria); + @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria,RequestInfo req) { + List marriageCertResponseList = marriageService.searchCertificate(criteria,req); MarriageCertResponse response; // if(null!=marriageCertResponseList&&!marriageCertResponseList.isEmpty()){ // response = MarriageCertResponse diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java index bd88cbcd988..72e5d0529a0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java @@ -262,6 +262,9 @@ public class BrideRegistryAddressDetails { private String presentOthrIndiaProvinceMl; + @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePresent") + private String outSideIndiaPostCodePresent; ////Permanant @JsonProperty("isPermanentAddress") @@ -419,7 +422,9 @@ public class BrideRegistryAddressDetails { @JsonProperty("permntOutsideIndiaCountry") private String permntOutsideIndiaCountry; - + @Size(max = 10) + @JsonProperty("presentOutSideIndiaPostCode") + private String presentOutSideIndiaPostCode; ////Db Fields////// @Size(max = 64) @@ -519,7 +524,7 @@ public class BrideRegistryAddressDetails { @Size(max = 10) @JsonProperty("outSideIndiaPostCodePermanent") - private String outSideIndiaPostCodepermanent; + private String outSideIndiaPostCodePermanent; // @Size(max = 64) // @JsonProperty("presentaddressCountry") // private String presentaddressCountry; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java index 773c437f413..5b6883e50dc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java @@ -261,6 +261,9 @@ public class GroomRegistryAddressDetails { @JsonProperty("presentOthrIndiaProvinceMl") private String presentOthrIndiaProvinceMl; + @Size(max = 10) + @JsonProperty("outSideIndiaPostCodePresent") + private String outSideIndiaPostCodePresent; ////Permanant @@ -419,7 +422,9 @@ public class GroomRegistryAddressDetails { @JsonProperty("permntOutsideIndiaCountry") private String permntOutsideIndiaCountry; - + @Size(max = 10) + @JsonProperty("presentOutSideIndiaPostCode") + private String presentOutSideIndiaPostCode; ////Db Fields////// @Size(max = 64) @@ -518,7 +523,9 @@ public class GroomRegistryAddressDetails { @Size(max = 10) @JsonProperty("outSideIndiaPostCodePermanent") - private String outSideIndiaPostCodepermanent; + private String outSideIndiaPostCodePermanent; + + // @Size(max = 64) // @JsonProperty("presentaddressCountry") diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 7ef7009e0ad..29a8a3aebb2 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true From 6c9f76a684ee4268b85af31d9230fc7e605e0f08 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 15 Apr 2023 10:02:18 +0530 Subject: [PATCH 192/420] setGroomPermanentAddressForCertificate --- .../MarriageRegistryEnrichment.java | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 1c8dc425eac..5204753a436 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -116,30 +116,6 @@ private void setRegistrationNumber(MarriageRegistryRequest request) { }); } - //Jasmine 14.04.2023 - private void setCertificateNumber(MarriageRegistryRequest request) { - - RequestInfo requestInfo = request.getRequestInfo(); - List marriageDetails = request.getMarriageDetails(); - String tenantId = marriageDetails.get(0).getTenantid(); - - List filecodes = getIds(requestInfo, - tenantId, - config.getGetMarriageCertificateName(), - request.getMarriageDetails().get(0).getModulecode(), - "CERT", - marriageDetails.size()); - validateFileCodes(filecodes, marriageDetails.size()); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - ListIterator itr = filecodes.listIterator(); - request.getMarriageDetails() - .forEach(marriage -> { - //if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { - marriage.setRegistrationno(itr.next()); - marriage.setRegistrationDate(currentTime); - // } - }); - } //Jasmine 28.03.2023 private void setGroomPresentAddress(MarriageRegistryRequest request) { @@ -555,7 +531,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg if (registryDetails.getGroomAddressDetails() != null) { - if (registryDetails.getGroomAddressDetails().getDistrictIdPermanent() != null && registryDetails.getGroomAddressDetails().getStateIdPermanent() != null) { + if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != null && registryDetails.getGroomAddressDetails().getPermtaddressStateName() != null) { if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { From 1a77a03aa2f4ed5429148b25324e113337d80e00 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 15 Apr 2023 11:23:48 +0530 Subject: [PATCH 193/420] setGroom and bride PermanentAddressForCertificate --- .../config/MarriageApplicationConfiguration.java | 2 +- .../repository/querybuilder/MarriageRegistryQueryBuilder.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index e5ce5876543..50e0f92e780 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -33,7 +33,7 @@ public class MarriageApplicationConfiguration { @Value("${egov.idgen.marriagereg.name}") private String getMarriageRegNumberName; - @Value("${egov.idgen.marriagecert.name}") +// @Value("${egov.idgen.marriagecert.name}") private String getMarriageCertificateName; //Jasmine 24.03.2023 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 34661901983..071b0e186e2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -55,7 +55,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") .append("GPMA.locality_en as GPMA_locality_en,GPMA.locality_ml as GPMA_locality_ml,GPMA.street_name_en as GPMA_street_name_en,GPMA.street_name_ml as GPMA_street_name_ml ,") - .append("GPMA.districtid as GPMA_districtid,GPMA.stateid as GPMA_stateid , GPMA.poid as GPMA_poid , GPMA.poname_en as GPMA_poname_en , GPMA.poname_ml as GPMA_poname_ml ,") + .append("GPMA.districtid as GPMA_districtid, GPMA.stateid as GPMA_stateid , GPMA.poid as GPMA_poid , GPMA.poname_en as GPMA_poname_en , GPMA.poname_ml as GPMA_poname_ml ,") .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") From 8ea52ea75957567d12b5f78d13c61ce478568975 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 15 Apr 2023 11:30:38 +0530 Subject: [PATCH 194/420] setGroom and bride PermanentAddressForCertificate --- .../MarriageRegistryEnrichment.java | 65 ++++--------------- 1 file changed, 14 insertions(+), 51 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 5204753a436..3711e560c9f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -749,26 +749,6 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode(),brideAddressBuilder,false); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode(),brideAddressBuilder,false); - } else { Object mdmsGroomAddressData = util.mDMSCallGetAddress(req @@ -794,39 +774,22 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - registryDetails.getBrideAddressDetails().setPoNoPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode(),brideAddressBuilder,false); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(),brideAddressBuilder,true); -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(),brideAddressBuilder,true); -// -// appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap),brideAddressBuilder,true); -// -// appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),brideAddressBuilder,true); -// -// appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap),brideAddressBuilder,true); -// -// appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),brideAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(),brideAddressBuilder,true); + + appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(),brideAddressBuilder,true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap),brideAddressBuilder,true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),brideAddressBuilder,true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap),brideAddressBuilder,true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),brideAddressBuilder,true); + + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(),brideAddressBuilder,true); } } From e4aa20de97cc0d2f27a48ebbe20df2ef0d4ce944 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 15 Apr 2023 11:46:10 +0530 Subject: [PATCH 195/420] setGroom and bride PermanentAddressForCertificate --- .../service/MarriageCorrectionService.java | 8 ++++---- .../repository/MarriageRegistryRepository.java | 16 ++++++++-------- .../service/MarriageRegistryService.java | 12 ++++++------ .../controller/MarriageRegistryController.java | 8 ++++---- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index b13748c524a..7ed0d6f5df7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -62,7 +62,7 @@ public List createCorrection(MarriageCorrectionReques MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); - List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); + List marriageRegistryDetails = searchRegistry(criteria); if (!marriageRegistryDetails.isEmpty()) { MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); marriageCorrectionEnrichment.enrichCreate(request, marriageApplicationDetail); @@ -83,8 +83,8 @@ public List createCorrection(MarriageCorrectionReques } //req For Testing - private List searchRegistry(MarriageRegistrySearchCriteria criteria, RequestInfo req) { - return registryRepository.searchMarriageRegistry(criteria,req); + private List searchRegistry(MarriageRegistrySearchCriteria criteria) { + return registryRepository.searchMarriageRegistry(criteria); } //req for testing @@ -92,7 +92,7 @@ public List updateMarriageRegistry(MarriageCorrection MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); + List marriageRegistryDetails = searchRegistry(criteria); if (!marriageRegistryDetails.isEmpty()) { MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 84d6181a3a9..a239eba4bca 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -85,20 +85,20 @@ public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnr // return result.getMarriageDetails(); // } - public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria ,RequestInfo req) { + public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { List preparedStmtValues = new ArrayList<>(); String query = queryBuilder.getMarriageRegistrySearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); - - System.out.println("Groom address -------"); - String address=marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req, result.get(0)); - String address2=marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req, result.get(0)); - - System.out.println(address); - System.out.println(address2); +// +// System.out.println("Groom address -------"); +// String address=marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req, result.get(0)); +// String address2=marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req, result.get(0)); +// +// System.out.println(address); +// System.out.println(address2); return result; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index b8336713ba1..ebfe2538939 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -66,14 +66,14 @@ public List createRegistry(MarriageRegistryRequest requ // return repository.updateMarriageRegistry(request); // } - public List searchRegistry(MarriageRegistrySearchCriteria criteria, RequestInfo req) { + public List searchRegistry(MarriageRegistrySearchCriteria criteria) { - return repository.searchMarriageRegistry(criteria,req); + return repository.searchMarriageRegistry(criteria); } public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { - List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria,requestInfo); + List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria); if (marriageRegistryDetailsList != null && !marriageRegistryDetailsList.isEmpty()) { // List marriageCertificateList = repository.searchCertificateByMarriageId(marriageRegistryDetailsList.get(0).getId()); try { @@ -83,7 +83,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req MarriageCertRequest marriageCertRequest = MarriageCertRequest.builder().marriageCertificate(marriageCertificate).requestInfo(requestInfo).build(); marriageCertificate.setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); marriageCertificate.setRegistrationno(marriageRegistryDetailsList.get(0).getRegistrationno()); - List marriageDtls = searchCertificate(criteria,requestInfo); + List marriageDtls = searchCertificate(criteria); if (null!=marriageDtls && marriageDtls.size() > 1) { throw new CustomException("Invalid_Input", "Error in processing data"); } @@ -145,8 +145,8 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req } - public List searchCertificate(MarriageRegistrySearchCriteria criteria , RequestInfo req) { - List obj = repository.searchMarriageRegistry(criteria,req); + public List searchCertificate(MarriageRegistrySearchCriteria criteria) { + List obj = repository.searchMarriageRegistry(criteria); return repository.searchCertificateByMarriageId(obj.get(0).getId()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index 04bfabe452d..81a9d07d89a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -55,10 +55,10 @@ public ResponseEntity saveMarriageDetails(@RequestBody public ResponseEntity search(@RequestBody MarriageRegistryRequest request, - @ModelAttribute MarriageRegistrySearchCriteria criteria, RequestInfo req) { + @ModelAttribute MarriageRegistrySearchCriteria criteria) { int registryCount=registryRepository.getMarriageRegistryCount(criteria); - List marriageDetails = marriageService.searchRegistry(criteria,req); + List marriageDetails = marriageService.searchRegistry(criteria); MarriageRegistryResponse response = MarriageRegistryResponse .builder() @@ -71,8 +71,8 @@ public ResponseEntity search(@RequestBody MarriageReg //for testing req @PostMapping("_certificate") public ResponseEntity certificateDownload(@RequestBody MarriageRegistryRequest request, - @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria,RequestInfo req) { - List marriageCertResponseList = marriageService.searchCertificate(criteria,req); + @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria) { + List marriageCertResponseList = marriageService.searchCertificate(criteria); MarriageCertResponse response; // if(null!=marriageCertResponseList&&!marriageCertResponseList.isEmpty()){ // response = MarriageCertResponse From 16bcf66b6673528801d95bc8afc4bffeb33c82c7 Mon Sep 17 00:00:00 2001 From: binilp Date: Sat, 15 Apr 2023 11:52:08 +0530 Subject: [PATCH 196/420] changes in marriage place address setting --- .../MarriageRegistryRepository.java | 3 ++ .../marriage/utils/MarriageMdmsUtil.java | 47 ++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 929cb336b49..b8e87ba64b4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -202,8 +202,11 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria // Object mdmsData = util.mDMSCall(req.getRequestInfo(), req.getMarriageCertificate().get(0).getTenantid()); Map> mdmsMap = util.getMarriageMDMSData(req,mdmsMarriagePlaceData); + System.out.println(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); util.appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap),marriageAddr,true); util.appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsMap),marriageAddr,true); + Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(),MarriageConstants.COUNTRY_CODE); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsCountryMap),marriageAddr,false); // req.getMarriageCertificate().get(0).setTenantNameEn(getValueFromMap(MarriageConstants.TENANTS,mdmsMap)); // req.getMarriageCertificate().get(0).setTalukNameEn(getValueFromMap(MarriageConstants.TALUK,mdmsMap)); // req.getMarriageCertificate().get(0).setDistrictNameEn(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 4645c7f238a..7040e928c05 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -241,7 +241,7 @@ private List getAddressRequestFromIds(String district // master details for marriage certificate List marriageMasterDetails = new ArrayList<>(); if(null!=district) { - final String filterCode = "$.[?(@.id=='" + district + "')].name"; + final String filterCode = "$.[?(@.districtid=='" + district + "')].name"; marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.DISTRICT).filter(filterCode).build()); } @@ -320,6 +320,21 @@ private ModuleDetail getTenantIdCertificate(String tenantId) { .moduleName(MarriageConstants.TENANT_MODULE_NAME).build(); + return marriageModuleDtls; + } + + private ModuleDetail getCountry(String counrtyCode){ + List masterDetails = new ArrayList<>(); + + // filter to only get code field from master data + final String filterCode = "$.[?(@.code=='"+counrtyCode+"')].name"; + masterDetails + .add(MasterDetail.builder().name(MarriageConstants.COUNTRY).filter(filterCode).build()); + + ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(masterDetails) + .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); + + return marriageModuleDtls; } private ModuleDetail getMarriagePalceCertificate(String placeId,String placeType) { @@ -589,7 +604,7 @@ private MdmsCriteriaReq getMdmsRequest(RequestInfo requestInfo) { // } public Map> getMarriageMDMSData(MarriageCertPDFRequest request, Object mdmsdata) { - Map errorMap = new HashMap<>(); +// Map errorMap = new HashMap<>(); Map> masterData = getAttributeValues(mdmsdata); // System.out.println(masterData); return masterData; @@ -623,6 +638,8 @@ private Map> getAttributeValues(Object mdmsdata) { // return mdmsResMap; return getAttributeValuesForJsonPaths(mdmsdata,modulepaths); } + + private Map> getAttributeValuesForJsonPaths(Object mdmsdata,List modulepaths) { if(modulepaths!=null&&!modulepaths.isEmpty()) { final Map> mdmsResMap = new HashMap<>(); @@ -684,6 +701,32 @@ public StringBuilder appendIfNotBlank(String v,StringBuilder s,boolean addSemico return s; } + private MdmsCriteriaReq MdmsRequestForCountry(RequestInfo requestInfo,String countryCode){ + List moduleDetails = new LinkedList<>(); + ModuleDetail countryRequest = getCountry(countryCode); + moduleDetails.add(countryRequest); + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) + .build(); + + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + + // System.out.println("mdmsreq2"+mdmsCriteriaReq); + return mdmsCriteriaReq; + } + + public Map> mDMSCallGetCountry(RequestInfo requestInfo + , String countryCode) { + MdmsCriteriaReq mdmsCriteriaReq = MdmsRequestForCountry(requestInfo, countryCode); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + if(null!=result){ + List modulepaths = Arrays.asList( + MarriageConstants.COMMON_MASTER_JSONPATH); + return getAttributeValuesForJsonPaths(result,modulepaths); + } + return null; + } + private MdmsCriteriaReq getMDMSRequestForAddressFromIds(RequestInfo requestInfo , String tenantId , String presentAddressDistrict From 40770c9b9c622a6d793e09b0c24f397026993a48 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 15 Apr 2023 14:13:54 +0530 Subject: [PATCH 197/420] response count for paging --- .../MarriageApplicationConfiguration.java | 45 +++++++++---------- .../MarriageApplicationController.java | 2 - .../src/main/resources/application.properties | 43 ++++-------------- 3 files changed, 31 insertions(+), 59 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index e5ce5876543..4a872b9fb3c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -64,24 +64,24 @@ public class MarriageApplicationConfiguration { //Demand - @Value("${egov.billingservice.host}") - private String billingHost; + @Value("${egov.billingservice.host}") + private String billingHost; - @Value("${egov.bill.gen.endpoint}") - private String fetchBillEndpoint; + @Value("${egov.bill.gen.endpoint}") + private String fetchBillEndpoint; - @Value("${egov.demand.create.endpoint}") - private String demandCreateEndpoint; + @Value("${egov.demand.create.endpoint}") + private String demandCreateEndpoint; - //MDMS - @Value("${egov.mdms.host}") - private String mdmsHost; + //MDMS + @Value("${egov.mdms.host}") + private String mdmsHost; - @Value("${egov.mdms.search.endpoint}") - private String mdmsEndPoint; + @Value("${egov.mdms.search.endpoint}") + private String mdmsEndPoint; - @Value("${egov.state.level.tenant.id}") - private String egovStateLevelTenant; + @Value("${egov.state.level.tenant.id}") + private String egovStateLevelTenant; @Value("${egov.ui.app.host}") private String uiAppHost; @@ -110,17 +110,16 @@ public class MarriageApplicationConfiguration { @Value("${persister.update.marriagecertificate.topic}") private String updateMarriageCertificateTopic; - // @Value("${egov.idgen.marriageapplncertno.name}") - // private String marriageCertNumberIdName; + @Value("${egov.idgen.marriageapplncertno.name}") + private String marriageCertNumberIdName; + //Marriage Correction + @Value("${persister.save.marriage.correction.topic}") + private String SaveMarriageCorrectionTopic; - //Marriage Correction - @Value("${persister.save.marriage.correction.topic}") - private String SaveMarriageCorrectionTopic; + @Value("${persister.update.marriage.correction.topic}") + private String UpdateMarriageCorrectionTopic; - @Value("${persister.update.marriage.correction.topic}") - private String UpdateMarriageCorrectionTopic; - - @Value("${persister.update.marriage.registry.correction.topic}") - private String UpdateMarriageRegistryCorrectionTopic; + @Value("${persister.update.marriage.registry.correction.topic}") + private String UpdateMarriageRegistryCorrectionTopic; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index 90e4837eeb9..5dbc8780e00 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -100,8 +100,6 @@ public ResponseEntity searchMarriageDetails(@Reques // }catch(Exception e) { // log.error("Exception while fetching from searcher: ",e); // } - - MarriageApplicationResponse response = MarriageApplicationResponse .builder() .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(),Boolean.TRUE)) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 7ef7009e0ad..a68cd3f003a 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -51,30 +51,6 @@ persister.update.marriage.application.topic=update-marriage-application-topic persister.save.marriage.registry.topic=save-marriage-registry-topic persister.update.marriage.registry.topic=update-marriage-registry-topic -#kafka topics for save and update birth -#persister.save.birth.cert.topic=save-birth-cert-topic -#persister.update.birth.cert.topic=update-birth-cert-topic - -#kafka topics for save and update birth -#persister.save.birth.topic=save-birth-details-topic -#persister.update.birth.topic=update-birth-details-topic - -#kafka topics for save and update registry details -#persister.save.birth.register.topic=save-birth-register-topic -#persister.update.birth.register.topic=update-birth-register-topic - -#kafka topics for save and update adoption registry details -#persister.save.adoption.register.topic=save-adoption-register-topic -#persister.update.adoption.register.topic=update-adoption-register-topic - -#kafka topics for save and update birth details -#persister.save.birth.application.topic=save-birth-application-topic -#persister.update.birth.application.topic=update-birth-application-topic - -#kafka topics for save and update adoption -#persister.save.adoption.topic=save-birth-adoption-topic -#persister.update.adoption.topic=update-birth-adoption-topic - #kafka topics for downloading receipt kafka.topics.receipt.create=egov.collection.payment-create @@ -84,14 +60,14 @@ egov.idgen.path=egov-idgen/id/_generate #workflow configurations -# egov.workflow.host=http://localhost:8280 -#https://ksmart-dev.lsgkerala.gov.in/ egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition -egov.workflow.host=http://localhost:8280 +egov.workflow.host=https://ksmart-dev.lsgkerala.gov.in/ +# egov.workflow.host=http://localhost:8280 #birth and death idFormat config egov.idgen.marriageapplnum.name=birth_cert.receipt.id egov.idgen.birthapplnum.format=BR-CB-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] + egov.idgen.marriageapplncertno.name=mr.marriagecertno # Ksmart marriage Application No @@ -103,12 +79,11 @@ egov.idgen.marriagehapp.name=mr.applicationno egov.idgen.marriagefile.name=mr.fileno #egov.idgen.birthfile.format=BR-FM-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON]_[TENANT_ID] - # Ksmart Birth Registration Number egov.idgen.marriagereg.name=mr.registrationno #egov.idgen.birthreg.format=BR-REGY-[cb.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] - +egov.idgen.marriagecert.name=mr.certificateno #mdms configurations egov.mdms.host=https://ksmart-dev.lsgkerala.gov.in/ egov.mdms.search.endpoint=/egov-mdms-service/v1/_search @@ -127,8 +102,8 @@ egov.pdf.birthcert.postendpoint=/egov-pdf/download/BIRTHDEATH/birth-certificate? egov.pdf.deathcert.postendpoint=/egov-pdf/download/BIRTHDEATH/death-certificate?tenantId=$tenantId #pdf service path config -egov.pdfservice.host=http://localhost:8080/ - #https://ksmart-dev.lsgkerala.gov.in/ +# egov.pdfservice.host=http://localhost:8080/ +egov.pdfservice.host= https://ksmart-dev.lsgkerala.gov.in/ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certificate&tenantId=$tenantId egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId @@ -156,9 +131,10 @@ egov.state.level.tenant.id=kl decryption.abac.enabled=false #egov-encrypt service configs -egov.enc.host=http://localhost:1234 +# egov.enc.host=http://localhost:1234 +egov.enc.host=https://ksmart-dev.lsgkerala.gov.in egov.enc.encrypt.endpoint=/egov-enc-service/crypto/v1/_encrypt -egov.enc.decrypt.endpoint=/egov-enc-service/crypto/v1/_decrypt +# egov.enc.decrypt.endpoint=/egov-enc-service/crypto/v1/_decrypt #testing tenants egov.bnd.freedownload.tenants=kl @@ -175,7 +151,6 @@ egov.collection.service.host=https://ksmart-dev.lsgkerala.gov.in/ egov.payment.search.endpoint=/collection-services/payments/_search - #Marriage correction topics persister.save.marriage.correction.topic=save-marriage-correction-topic persister.update.marriage.correction.topic=update-marriage-correction-topic From 16ff147d8f78dec076a1bb6cdac04d8e5d18eb28 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 15 Apr 2023 19:13:52 +0530 Subject: [PATCH 198/420] setGroom and bride PermanentAddressForCertificate --- .../main/resources/marriage-correction.yml | 140 +++++++++--------- .../src/main/resources/marriage-registry.yml | 6 +- .../src/main/resources/marriage.yml | 89 +++++------ .../MarriageApplicationConfiguration.java | 2 +- .../BrideAddressDetailsRowMapper.java | 101 ++++++++----- .../GroomAddressDetailsRowMapper.java | 99 ++++++++----- .../MarriageRegistryEnrichment.java | 85 +++-------- .../BrideRegistryAddressRowMapper.java | 106 ++++++++----- .../GroomRegistryAddressRowMapper.java | 100 ++++++++----- 9 files changed, 387 insertions(+), 341 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index e71f7afec00..af597bd536b 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -253,76 +253,75 @@ serviceMaps: createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntOthrIndiaprovinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent @@ -332,76 +331,77 @@ serviceMaps: createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent + - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthPostOfficeEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntOthrIndiaprovinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 7a9c6b25154..c5c188eb18f 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -488,7 +488,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeEn - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn @@ -504,7 +504,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent @@ -644,7 +644,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthPostOfficeEn - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLineoneEn diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 4174cd3e4dc..8f8c4f4e640 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -426,76 +426,77 @@ serviceMaps: createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent - - jsonPath: $.MarriageDetails.*.id + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.auditDetails.createdTime + - jsonPath: $.MarriageDetails.*.auditDetails.createdTime - - jsonPath: $.MarriageDetails.*.auditDetails.createdBy + - jsonPath: $.MarriageDetails.*.auditDetails.createdBy - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime - - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent + + - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.brideGroomPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntOthrIndiaprovinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermntOthrIndiaprovinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent - query: INSERT INTO public.eg_marriage_present_address_details( @@ -583,7 +584,6 @@ serviceMaps: createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid @@ -632,21 +632,21 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.brideGroomPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthPostOfficeEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntOthrIndiaprovinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermntOthrIndiaprovinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaprovinceMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePermanent @@ -655,6 +655,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , document_link ,marriageid ,bride_groom ,active ,applicationnumber , createdby ,createdtime,lastmodifiedby , lastmodifiedtime ,applicationtype) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ? , ? ); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index 38117214209..4a872b9fb3c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -33,7 +33,7 @@ public class MarriageApplicationConfiguration { @Value("${egov.idgen.marriagereg.name}") private String getMarriageRegNumberName; -// @Value("${egov.idgen.marriagecert.name}") + @Value("${egov.idgen.marriagecert.name}") private String getMarriageCertificateName; //Jasmine 24.03.2023 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 2eb1132dbea..b65e4b5a3c1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -10,73 +10,94 @@ public interface BrideAddressDetailsRowMapper { default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLException { return BrideAddressDetails.builder() - .countryIdPresent(rs.getString("BPSA_countryid")) - .stateIdPresent(rs.getString("BPSA_stateid")) - .districtIdPresent(rs.getString("BPSA_districtid")) - .poNoPresent(rs.getString("BPSA_poid")) - .presentaddressCountry(rs.getString("GPMA_countryid")) - .localityEnPresent(rs.getString("BPSA_locality_en")) - .localityMlPresent(rs.getString("BPSA_locality_ml")) - .streetNameEnPresent(rs.getString("BPSA_street_name_en")) - .streetNameMlPresent(rs.getString("BPSA_street_name_ml")) - .houseNameNoEnPresent(rs.getString("BPSA_housename_en")) - .houseNameNoMlPresent(rs.getString("BPSA_housename_ml")) - .villageNamePresent(rs.getString("BPSA_village_name")) + +// PRESENT + + + .presentUuid(rs.getString("BPSA_id")) + .presentaddressCountry(rs.getString("BPSA_countryid")) + .presentaddressStateName(rs.getString("BPSA_stateid")) .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) + .presentInsideKeralaDistrict(rs.getString("BPSA_districtid")) .presentInsideKeralaTaluk(rs.getString("BPSA_talukid")) - .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) - .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) + .presentInsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) + .presentInsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) + .presentInsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) + .presentInsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) + .presentInsideKeralaStreetNameMl(rs.getString("BPSA_street_name_ml")) + .presentInsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) + .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) + .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) .presentWardNo(rs.getString("BPSA_ward_code")) + .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) + .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) + // .presentOutsideKeralaCityVilgeEn(rs.getString("BPSA_village_name ")) + .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) - .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) -// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) - - + .presentOutsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) + .presentOutsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) + .presentOutsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) + .presentOutsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) + .presentOutsideKeralaStreetNameMl(rs.getString("BPSA_street_name_en")) + .presentOutsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) .presentOutSideIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) -// .presentOutSideIndiaadrsCityTown(rs.getString("stat_mother_resdnce_placetype")) - - .countryIdPermanent(rs.getString("BPMA_countryid")) - .stateIdPermanent(rs.getString("BPMA_stateid")) - .districtIdPermanent(rs.getString("BPMA_districtid")) - .poNoPermanent(rs.getString("BPMA_poid")) - .localityEnPermanent(rs.getString("BPMA_locality_en")) - .localityMlPermanent(rs.getString("BPMA_locality_ml")) - .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) - .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) - .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) - .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) - .villageNamePermanent(rs.getString("BPMA_village_name")) - .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) - .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) + .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) + +// PERMANENT + + + .permanentUuid(rs.getString("BPMA_id")) + .permtaddressCountry(rs.getString("BPMA_countryid")) + .permtaddressStateName(rs.getString("BPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + .permntInKeralaAdrDistrict(rs.getString("BPMA_districtid")) + // .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name ")) .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) + .permntInKeralaAdrLocalityNameEn(rs.getString("BPMA_locality_en")) + .permntInKeralaAdrStreetNameEn(rs.getString("BPMA_street_name_en")) + .permntInKeralaAdrHouseNameEn(rs.getString("BPMA_housename_en")) + .permntInKeralaAdrLocalityNameMl(rs.getString("BPMA_locality_en")) + .permntInKeralaAdrStreetNameMl(rs.getString("BPMA_street_name_ml")) + .permntInKeralaAdrHouseNameMl(rs.getString("BPMA_housename_ml")) + .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) + .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) + .permntOutsideKeralaDistrict(rs.getString("BPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) -// .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) + //.permntOutsideKeralaVillage(rs.getString("BPMA_village_name")) + .permntOutsideKeralaPincode(rs.getString("BPMA_pinno")) + .permntOutsideKeralaLocalityNameEn(rs.getString("BPMA_locality_en")) + .permntOutsideKeralaStreetNameEn(rs.getString("BPMA_street_name_en")) + .permntOutsideKeralaHouseNameEn(rs.getString("BPMA_housename_en")) + .permntOutsideKeralaLocalityNameMl(rs.getString("BPMA_locality_en")) + .permntOutsideKeralaStreetNameMl(rs.getString("BPMA_street_name_ml")) + .permntOutsideKeralaHouseNameMl(rs.getString("BPMA_housename_ml")) .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) -// .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) -// .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) .permntOutsideIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) .permntOutsideIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) .permntOutsideIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) - .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) + // .permntOutsideIndiaVillage(rs.getString("")) + // .permntOutsideIndiaCityTown(rs.getString("")) .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) + .permntOutSideIndiaProvinceMl(rs.getString("BPMA_ot_state_region_province_ml")) + .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) + +// .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) +// .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) + .build(); - .presentUuid(rs.getString("BPSA_id")) - .permanentUuid(rs.getString("BPMA_id")) - .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index c6104e4ba4e..268d41354fe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -11,71 +11,92 @@ public interface GroomAddressDetailsRowMapper { default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throws SQLException { return GroomAddressDetails.builder() - .countryIdPresent(rs.getString("GPSA_countryid")) - .stateIdPresent(rs.getString("GPSA_stateid")) - .districtIdPresent(rs.getString("GPSA_districtid")) - .poNoPresent(rs.getString("GPSA_poid")) - .presentaddressCountry(rs.getString("GPMA_countryid")) - .localityEnPresent(rs.getString("GPSA_locality_en")) - .localityMlPresent(rs.getString("GPSA_locality_ml")) - .streetNameEnPresent(rs.getString("GPSA_street_name_en")) - .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) - .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) - .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) - .villageNamePresent(rs.getString("GPSA_village_name")) + +// PRESENT + + .presentUuid(rs.getString("GPSA_id")) + .presentaddressCountry(rs.getString("GPSA_countryid")) + .presentaddressStateName(rs.getString("GPSA_stateid")) .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) + .presentInsideKeralaDistrict(rs.getString("GPSA_districtid")) .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) - .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) - .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) + .presentInsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) + .presentInsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) + .presentInsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) + .presentInsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) + .presentInsideKeralaStreetNameMl(rs.getString("GPSA_street_name_ml")) + .presentInsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) + .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) + .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) .presentWardNo(rs.getString("GPSA_ward_code")) + .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) + .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) + // .presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name ")) + .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) - .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) -// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) - - + .presentOutsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) + .presentOutsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) + .presentOutsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) + .presentOutsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) + .presentOutsideKeralaStreetNameMl(rs.getString("GPSA_street_name_en")) + .presentOutsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) .presentOutSideIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) -// .presentOutSideIndiaadrsCityTown(rs.getString("stat_mother_resdnce_placetype")) + .presentOutSideIndiaPostCode(rs.getString("GPSA_ot_zipcode")) - .countryIdPermanent(rs.getString("GPMA_countryid")) - .stateIdPermanent(rs.getString("GPMA_stateid")) - .districtIdPermanent(rs.getString("GPMA_districtid")) - .poNoPermanent(rs.getString("GPMA_poid")) - .localityEnPermanent(rs.getString("GPMA_locality_en")) - .localityMlPermanent(rs.getString("GPMA_locality_ml")) - .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) - .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) - .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) - .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) - .villageNamePermanent(rs.getString("GPMA_village_name")) - .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) - .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) + + + +// PERMANENT + + + .permanentUuid(rs.getString("GPMA_id")) + .permtaddressCountry(rs.getString("GPMA_countryid")) + .permtaddressStateName(rs.getString("GPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) + .permntInKeralaAdrDistrict(rs.getString("GPMA_districtid")) + //.permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name ")) .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) + .permntInKeralaAdrLocalityNameEn(rs.getString("GPMA_locality_en")) + .permntInKeralaAdrStreetNameEn(rs.getString("GPMA_street_name_en")) + .permntInKeralaAdrHouseNameEn(rs.getString("GPMA_housename_en")) + .permntInKeralaAdrLocalityNameMl(rs.getString("GPMA_locality_en")) + .permntInKeralaAdrStreetNameMl(rs.getString("GPMA_street_name_ml")) + .permntInKeralaAdrHouseNameMl(rs.getString("GPMA_housename_ml")) + .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) + .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) + .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) -// .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) + // .permntOutsideKeralaVillage(rs.getString("GPMA_village_name")) + .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) + .permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) + .permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) + .permntOutsideKeralaHouseNameEn(rs.getString("GPMA_housename_en")) + .permntOutsideKeralaLocalityNameMl(rs.getString("GPMA_locality_en")) + .permntOutsideKeralaStreetNameMl(rs.getString("GPMA_street_name_ml")) + .permntOutsideKeralaHouseNameMl(rs.getString("GPMA_housename_ml")) .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) .permntOutsideKeralaPostOfficeMl(rs.getString("GPMA_poname_ml")) -// .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) -// .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) .permntOutsideIndiaLineoneEn(rs.getString("GPMA_ot_address1_en")) .permntOutsideIndiaLineoneMl(rs.getString("GPMA_ot_address1_ml")) .permntOutsideIndiaLinetwoEn(rs.getString("GPMA_ot_address2_en")) .permntOutsideIndiaLinetwoMl(rs.getString("GPMA_ot_address2_ml")) - .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) + // .permntOutsideIndiaVillage(rs.getString("")) + // .permntOutsideIndiaCityTown(rs.getString("")) .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) + .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) + .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) - .presentUuid(rs.getString("GPSA_id")) - .permanentUuid(rs.getString("GPMA_id")) - +// .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) +// .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) .build(); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 3711e560c9f..6e5be02a1d8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -249,7 +249,7 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getGroomAddressDetails().setPoNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); } else { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); @@ -450,7 +450,7 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); } else { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); @@ -550,16 +550,14 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); registryDetails.getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); -// registryDetails.getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); -// registryDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); - +// registryDetails.getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); +// registryDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); - registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); - registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + registryDetails.getGroomAddressDetails().setPoNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(), groomAddressBuilder, true); @@ -567,7 +565,9 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent(), groomAddressBuilder, true); + +// appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), groomAddressBuilder, true); appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); @@ -577,26 +577,6 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode(),groomAddressBuilder,false); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode(),groomAddressBuilder,false); - } else { Object mdmsGroomAddressData = util.mDMSCallGetAddress(req @@ -612,16 +592,12 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); - + registryDetails.getGroomAddressDetails().setPoNoPermanent(null); registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); - registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); - registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - + registryDetails.getGroomAddressDetails().setPermntOthPostOfficeEn(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(),groomAddressBuilder,true); @@ -629,7 +605,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(),groomAddressBuilder,true); - appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthPostOfficeEn(),groomAddressBuilder,true); appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),groomAddressBuilder,true); @@ -639,21 +615,6 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(),groomAddressBuilder,true); -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getStreetNameEnPermanent(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthPostOfficeEn(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry(),groomAddressBuilder,true); -// -// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode(),groomAddressBuilder,false); } @@ -721,17 +682,16 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); + registryDetails.getBrideAddressDetails().setPoNoPermanent(null); // registryDetails.getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); // registryDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); - registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); - registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + registryDetails.getBrideAddressDetails().setPoNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + + appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(), brideAddressBuilder, true); @@ -739,7 +699,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPoNoPermanent(),brideAddressBuilder,true); appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), brideAddressBuilder, true); @@ -765,14 +725,11 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); registryDetails.getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); - registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); - registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + registryDetails.getBrideAddressDetails().setPermntOthPostOfficeEn(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(),brideAddressBuilder,true); @@ -781,12 +738,12 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(),brideAddressBuilder,true); - appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(),brideAddressBuilder,true); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),brideAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), brideAddressBuilder, true); appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap),brideAddressBuilder,true); - +// appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),brideAddressBuilder,true); appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(),brideAddressBuilder,true); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java index 5250fe22699..d6ba3659fef 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java @@ -2,79 +2,105 @@ import java.sql.ResultSet; import java.sql.SQLException; + +import com.fasterxml.jackson.annotation.JsonProperty; import org.ksmart.marriage.marriageregistry.web.model.BrideRegistryAddressDetails; +import javax.validation.constraints.Size; + public interface BrideRegistryAddressRowMapper { default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLException { return BrideRegistryAddressDetails.builder() - .countryIdPresent(rs.getString("BPSA_countryid")) - .stateIdPresent(rs.getString("BPSA_stateid")) - .districtIdPresent(rs.getString("BPSA_districtid")) - .poNoPresent(rs.getString("BPSA_poid")) - .presentaddressCountry(rs.getString("GPMA_countryid")) - .localityEnPresent(rs.getString("BPSA_locality_en")) - .localityMlPresent(rs.getString("BPSA_locality_ml")) - .streetNameEnPresent(rs.getString("BPSA_street_name_en")) - .streetNameMlPresent(rs.getString("BPSA_street_name_ml")) - .houseNameNoEnPresent(rs.getString("BPSA_housename_en")) - .houseNameNoMlPresent(rs.getString("BPSA_housename_ml")) - .villageNamePresent(rs.getString("BPSA_village_name")) + +// PRESENT + + + .presentUuid(rs.getString("BPSA_id")) + .presentaddressCountry(rs.getString("BPSA_countryid")) + .presentaddressStateName(rs.getString("BPSA_stateid")) .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) + .presentInsideKeralaDistrict(rs.getString("BPSA_districtid")) .presentInsideKeralaTaluk(rs.getString("BPSA_talukid")) - .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) - .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) + .presentInsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) + .presentInsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) + .presentInsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) + .presentInsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) + .presentInsideKeralaStreetNameMl(rs.getString("BPSA_street_name_ml")) + .presentInsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) + .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) + .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) .presentWardNo(rs.getString("BPSA_ward_code")) + .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) + .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) + // .presentOutsideKeralaCityVilgeEn(rs.getString("BPSA_village_name ")) + .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) - .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) -// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) - - + .presentOutsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) + .presentOutsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) + .presentOutsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) + .presentOutsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) + .presentOutsideKeralaStreetNameMl(rs.getString("BPSA_street_name_en")) + .presentOutsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) .presentOutSideIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) -// .presentOutSideIndiaadrsCityTown(rs.getString("stat_mother_resdnce_placetype")) - - .countryIdPermanent(rs.getString("BPMA_countryid")) - .stateIdPermanent(rs.getString("BPMA_stateid")) - .districtIdPermanent(rs.getString("BPMA_districtid")) - .poNoPermanent(rs.getString("BPMA_poid")) - .localityEnPermanent(rs.getString("BPMA_locality_en")) - .localityMlPermanent(rs.getString("BPMA_locality_ml")) - .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) - .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) - .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) - .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) - .villageNamePermanent(rs.getString("BPMA_village_name")) - .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) - .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) + .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) + +// PERMANENT + + + .permanentUuid(rs.getString("BPMA_id")) + .permtaddressCountry(rs.getString("BPMA_countryid")) + .permtaddressStateName(rs.getString("BPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + .permntInKeralaAdrDistrict(rs.getString("BPMA_districtid")) + // .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name ")) .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) + .permntInKeralaAdrLocalityNameEn(rs.getString("BPMA_locality_en")) + .permntInKeralaAdrStreetNameEn(rs.getString("BPMA_street_name_en")) + .permntInKeralaAdrHouseNameEn(rs.getString("BPMA_housename_en")) + .permntInKeralaAdrLocalityNameMl(rs.getString("BPMA_locality_en")) + .permntInKeralaAdrStreetNameMl(rs.getString("BPMA_street_name_ml")) + .permntInKeralaAdrHouseNameMl(rs.getString("BPMA_housename_ml")) + .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) + .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) + .permntOutsideKeralaDistrict(rs.getString("BPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) -// .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) + .permntOutsideKeralaVillage(rs.getString("BPMA_village_name")) + .permntOutsideKeralaPincode(rs.getString("BPMA_pinno")) + .permntOutsideKeralaLocalityNameEn(rs.getString("BPMA_locality_en")) + .permntOutsideKeralaStreetNameEn(rs.getString("BPMA_street_name_en")) + .permntOutsideKeralaHouseNameEn(rs.getString("BPMA_housename_en")) + .permntOutsideKeralaLocalityNameMl(rs.getString("BPMA_locality_en")) + .permntOutsideKeralaStreetNameMl(rs.getString("BPMA_street_name_ml")) + .permntOutsideKeralaHouseNameMl(rs.getString("BPMA_housename_ml")) .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) -// .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) -// .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) .permntOutsideIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) .permntOutsideIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) .permntOutsideIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) - .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) + // .permntOutsideIndiaVillage(rs.getString("")) + // .permntOutsideIndiaCityTown(rs.getString("")) .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) + .permntOutSideIndiaProvinceMl(rs.getString("BPMA_ot_state_region_province_ml")) + .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) + +// .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) +// .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) + .build(); + - .presentUuid(rs.getString("BPSA_id")) - .permanentUuid(rs.getString("BPMA_id")) - .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java index 6c10063beae..92bea138c49 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -9,72 +9,92 @@ public interface GroomRegistryAddressRowMapper { default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws SQLException { return GroomRegistryAddressDetails.builder() - .countryIdPresent(rs.getString("GPSA_countryid")) - .stateIdPresent(rs.getString("GPSA_stateid")) - .districtIdPresent(rs.getString("GPSA_districtid")) - .poNoPresent(rs.getString("GPSA_poid")) - .presentaddressCountry(rs.getString("GPMA_countryid")) - .localityEnPresent(rs.getString("GPSA_locality_en")) - .localityMlPresent(rs.getString("GPSA_locality_ml")) - .streetNameEnPresent(rs.getString("GPSA_street_name_en")) - .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) - .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) - .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) - .villageNamePresent(rs.getString("GPSA_village_name")) + +// PRESENT + + .presentUuid(rs.getString("GPSA_id")) + .presentaddressCountry(rs.getString("GPSA_countryid")) + .presentaddressStateName(rs.getString("GPSA_stateid")) .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) + .presentInsideKeralaDistrict(rs.getString("GPSA_districtid")) .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) - .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) - .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) + .presentInsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) + .presentInsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) + .presentInsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) + .presentInsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) + .presentInsideKeralaStreetNameMl(rs.getString("GPSA_street_name_ml")) + .presentInsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) + .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) + .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) .presentWardNo(rs.getString("GPSA_ward_code")) + .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) + .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) + //.presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name ")) + .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) - .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) -// .townOrVillagePresent(rs.getString("stat_mother_resdnce_placetype")) - - + .presentOutsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) + .presentOutsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) + .presentOutsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) + .presentOutsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) + .presentOutsideKeralaStreetNameMl(rs.getString("GPSA_street_name_en")) + .presentOutsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) .presentOutSideIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) -// .presentOutSideIndiaadrsCityTown(rs.getString("stat_mother_resdnce_placetype")) + .presentOutSideIndiaPostCode(rs.getString("GPSA_ot_zipcode")) - .countryIdPermanent(rs.getString("GPMA_countryid")) - .stateIdPermanent(rs.getString("GPMA_stateid")) - .districtIdPermanent(rs.getString("GPMA_districtid")) - .poNoPermanent(rs.getString("GPMA_poid")) - .localityEnPermanent(rs.getString("GPMA_locality_en")) - .localityMlPermanent(rs.getString("GPMA_locality_ml")) - .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) - .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) - .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) - .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) - .villageNamePermanent(rs.getString("GPMA_village_name")) - .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) - .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) + + + +// PERMANENT + + + .permanentUuid(rs.getString("GPMA_id")) + .permtaddressCountry(rs.getString("GPMA_countryid")) + .permtaddressStateName(rs.getString("GPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) + .permntInKeralaAdrDistrict(rs.getString("GPMA_districtid")) + // .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name ")) .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) + .permntInKeralaAdrLocalityNameEn(rs.getString("GPMA_locality_en")) + .permntInKeralaAdrStreetNameEn(rs.getString("GPMA_street_name_en")) + .permntInKeralaAdrHouseNameEn(rs.getString("GPMA_housename_en")) + .permntInKeralaAdrLocalityNameMl(rs.getString("GPMA_locality_en")) + .permntInKeralaAdrStreetNameMl(rs.getString("GPMA_street_name_ml")) + .permntInKeralaAdrHouseNameMl(rs.getString("GPMA_housename_ml")) + .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) + .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) - + .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) -// .permntOutsideKeralaCityVilgeEn(rs.getString("stat_mother_resdnce_placetype")) + .permntOutsideKeralaVillage(rs.getString("GPMA_village_name")) + .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) + .permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) + .permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) + .permntOutsideKeralaHouseNameEn(rs.getString("GPMA_housename_en")) + .permntOutsideKeralaLocalityNameMl(rs.getString("GPMA_locality_en")) + .permntOutsideKeralaStreetNameMl(rs.getString("GPMA_street_name_ml")) + .permntOutsideKeralaHouseNameMl(rs.getString("GPMA_housename_ml")) .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) .permntOutsideKeralaPostOfficeMl(rs.getString("GPMA_poname_ml")) -// .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) -// .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) .permntOutsideIndiaLineoneEn(rs.getString("GPMA_ot_address1_en")) .permntOutsideIndiaLineoneMl(rs.getString("GPMA_ot_address1_ml")) .permntOutsideIndiaLinetwoEn(rs.getString("GPMA_ot_address2_en")) .permntOutsideIndiaLinetwoMl(rs.getString("GPMA_ot_address2_ml")) - .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) + // .permntOutsideIndiaVillage(rs.getString("")) + // .permntOutsideIndiaCityTown(rs.getString("")) .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) + .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) + .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) - .presentUuid(rs.getString("GPSA_id")) - .permanentUuid(rs.getString("GPMA_id")) - +// .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) +// .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) .build(); } } From ad1d12365a9a9e5cd03e3f9eb3e261a702334e22 Mon Sep 17 00:00:00 2001 From: binilp Date: Sun, 16 Apr 2023 00:44:20 +0530 Subject: [PATCH 199/420] changes in marriage certificate --- .../config/MarriageApplicationConfiguration.java | 2 +- .../enrichment/MarriageCertificateEnrichment.java | 4 ++-- .../repository/MarriageRegistryRepository.java | 8 ++++---- .../service/MarriageRegistryService.java | 10 +++++++--- .../web/model/certmodel/MarriageCertificate.java | 3 +++ 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index 50e0f92e780..e5ce5876543 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -33,7 +33,7 @@ public class MarriageApplicationConfiguration { @Value("${egov.idgen.marriagereg.name}") private String getMarriageRegNumberName; -// @Value("${egov.idgen.marriagecert.name}") + @Value("${egov.idgen.marriagecert.name}") private String getMarriageCertificateName; //Jasmine 24.03.2023 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java index 3933ec8dd87..fb7d36ae9cd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java @@ -33,7 +33,7 @@ public void enrichCreate(MarriageCertRequest request) { AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); request.getMarriageCertificate().setId(UUID.randomUUID().toString()); request.getMarriageCertificate().setAuditDetails(auditDetails); - createCertificateNo(request); + //createCertificateNo(request); } @@ -42,7 +42,7 @@ public void enrichUpdate(MarriageCertRequest request) { User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); request.getMarriageCertificate().setAuditDetails(auditDetails); - createCertificateNo(request); + //createCertificateNo(request); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 8f5b61e4f34..458a1bfe172 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -178,15 +178,15 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_HOUSE)) { + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn()+","); + } if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en()+","); + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en()+","); } if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en()+","); } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn()+","); - } if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark()+","); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index ebfe2538939..45a87d600b8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -5,6 +5,7 @@ import org.apache.commons.lang3.StringUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriageregistry.enrichment.MarriageCertificateEnrichment; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; @@ -33,15 +34,17 @@ public class MarriageRegistryService { private final MarriageApplicationConfiguration marriageApplicationConfiguration; private final MarriageRegistryEnrichment marriageRegistryEnrichment; private final MarriageRegistryRepository repository; + private final MarriageCertificateEnrichment marriageCertificateEnrichment; - public MarriageRegistryService(MarriageRegistryRepository repository,MarriageRegistryEnrichment marriageRegistryEnrichment, - MarriageProducer producer, - MarriageApplicationConfiguration marriageApplicationConfiguration ) { + public MarriageRegistryService(MarriageRegistryRepository repository, MarriageRegistryEnrichment marriageRegistryEnrichment, + MarriageProducer producer, + MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageCertificateEnrichment marriageCertificateEnrichment) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageRegistryEnrichment = marriageRegistryEnrichment; this.repository = repository; + this.marriageCertificateEnrichment = marriageCertificateEnrichment; } // private final MarriageApplicationConfiguration marriageApplicationConfiguration; public List createRegistry(MarriageRegistryRequest request) { @@ -115,6 +118,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req Calendar cal = Calendar.getInstance(); marriageCertificate.setDateofissue(cal.getTimeInMillis()); marriageCertificate.setEmbeddedUrl(marriageCertPDFRequest.getMarriageCertificate().get(0).getEmbeddedUrl()); + //marriageCertificateEnrichment.createCertificateNo(marriageCertRequest); //TODO check IdGenError MarriageCertPdfResponse pdfResp = repository.saveMarriageCertPdf(marriageCertPDFRequest); // marriageCertificate.setDateofissue(marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getRegistrationDate()); marriageCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index 0a867777a39..981fd417133 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -84,6 +84,9 @@ public class MarriageCertificate { @JsonProperty("marriagePlaceFullAddr") private String marriagePlaceFullAddr; + @JsonProperty("groomNRIAddress") + private String groomNRIAddress; + // // @Size(max = 64) // @JsonProperty("marriagePlacetype") From 21952cf173a73575cf3d17bc014bdbf26c01bc68 Mon Sep 17 00:00:00 2001 From: binilp Date: Sun, 16 Apr 2023 12:34:51 +0530 Subject: [PATCH 200/420] changes in marriage certificate address --- .../MarriageRegistryRepository.java | 98 +++++++++---------- .../marriage/utils/MarriageMdmsUtil.java | 36 ++++--- 2 files changed, 66 insertions(+), 68 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 458a1bfe172..59e00148e2b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -151,31 +151,9 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria brideFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en()); } req.getMarriageCertificate().get(0).setBrideFullName(brideFullName.toString()); - - - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en(); - //Setting Marriage Place Data from MDMS -// Object mdmsMarriagePlaceData = util.mDMSCallGetAddress(req.getRequestInfo() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() -// , null -// , null -// , null -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getVillage_name() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTalukid()); -// -//// Object mdmsData = util.mDMSCall(req.getRequestInfo(), req.getMarriageCertificate().get(0).getTenantid()); -// Map> mdmsMap = util.getMarriageMDMSData(req,mdmsMarriagePlaceData); -// req.getMarriageCertificate().get(0).setTenantNameEn(getValueFromMap(MarriageConstants.TENANTS,mdmsMap)); -// req.getMarriageCertificate().get(0).setTalukNameEn(getValueFromMap(MarriageConstants.TALUK,mdmsMap)); -// req.getMarriageCertificate().get(0).setDistrictNameEn(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); -// req.getMarriageCertificate().get(0).setVillageNameEn(getValueFromMap(MarriageConstants.VILLAGE,mdmsMap)); + //Setting Marriage Place Address------------------------------------------------------------------------------------------ StringBuilder marriageAddr = new StringBuilder(); - - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype())) { - - if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_HOUSE)) { if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn())) { @@ -190,42 +168,43 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark()+","); } + Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); + System.out.println(marriageAddr); }else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) || req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) { - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid())) { -// marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid()+","); - Object mdmsMarriagePlaceData1 = util.mDMSCallGetMandapamAddress(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); - System.out.println(mdmsMarriagePlaceData1); - Map mdmsMap1 = util.getMandapamAttributeValues(mdmsMarriagePlaceData1); - util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_ADDRESS ,mdmsMap1),marriageAddr,true); - util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_MAIN_PLACE ,mdmsMap1),marriageAddr,true); - - - - Object mdmsMarriagePlaceData = util.mDMSCallGetAddressFromIds(req.getRequestInfo() - , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_TENENT_CODE,mdmsMap1) - , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_DIST_ID,mdmsMap1) - , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_STATE_ID,mdmsMap1) - , null - , null - , null - , null); - -// Object mdmsData = util.mDMSCall(req.getRequestInfo(), req.getMarriageCertificate().get(0).getTenantid()); - Map> mdmsMap = util.getMarriageMDMSData(req,mdmsMarriagePlaceData); - System.out.println(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); - util.appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap),marriageAddr,true); - util.appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsMap),marriageAddr,true); - Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(),MarriageConstants.COUNTRY_CODE); - util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsCountryMap),marriageAddr,false); -// req.getMarriageCertificate().get(0).setTenantNameEn(getValueFromMap(MarriageConstants.TENANTS,mdmsMap)); -// req.getMarriageCertificate().get(0).setTalukNameEn(getValueFromMap(MarriageConstants.TALUK,mdmsMap)); -// req.getMarriageCertificate().get(0).setDistrictNameEn(getValueFromMap(MarriageConstants.DISTRICT,mdmsMap)); -// req.getMarriageCertificate().get(0).setVillageNameEn(getValueFromMap(MarriageConstants.VILLAGE,mdmsMap)); - System.out.println(marriageAddr); + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid())) { + Object mdmsMarriagePlaceData1 = util.mDMSCallGetMandapamAddress(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); + System.out.println(mdmsMarriagePlaceData1); + if (null != mdmsMarriagePlaceData1) { + Map mdmsMap1 = util.getMandapamAttributeValues(mdmsMarriagePlaceData1); + if (null != mdmsMap1) { + util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_ADDRESS, mdmsMap1), marriageAddr, true); + util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_MAIN_PLACE, mdmsMap1), marriageAddr, true); + Object mdmsMarriagePlaceData = util.mDMSCallGetAddressFromIds(req.getRequestInfo() + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_TENENT_CODE, mdmsMap1) + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_DIST_ID, mdmsMap1) + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_STATE_ID, mdmsMap1) + , null + , null + , null + , null); + if(null!=mdmsMarriagePlaceData) { + Map> mdmsMap = util.getMarriageMDMSData(req, mdmsMarriagePlaceData); + if(null!=mdmsMap) { + System.out.println(getValueFromMap(MarriageConstants.DISTRICT, mdmsMap)); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsMap), marriageAddr, true); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsMap), marriageAddr, true); + Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); + System.out.println(marriageAddr); + } + } + } + } } } @@ -247,6 +226,17 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark()+","); } +// Object mdmsMarriagePlaceAddressData = util.mDMSCallGetAddress(req.getRequestInfo() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); + System.out.println(marriageAddr); } req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(marriageAddr.toString()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 7040e928c05..6c8b0a63370 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -375,16 +375,20 @@ public Object mDMSCallGetAddress(RequestInfo requestInfo } public Object mDMSCallGetMandapamAddress(RequestInfo requestInfo, MarriageRegistryDetails marriageRegistryDetails){ - ModuleDetail moduleDetail = getMarriagePalceCertificate(marriageRegistryDetails.getPlaceid(),marriageRegistryDetails.getPlacetype()); - List moduleDetails = new LinkedList<>(); - moduleDetails.add(moduleDetail); - MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(marriageRegistryDetails.getTenantid()) - .build(); - - MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) - .requestInfo(requestInfo).build(); - Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); - return result; + if(StringUtils.isNotBlank(marriageRegistryDetails.getPlaceid())) { + ModuleDetail moduleDetail = getMarriagePalceCertificate(marriageRegistryDetails.getPlaceid(), marriageRegistryDetails.getPlacetype()); + List moduleDetails = new LinkedList<>(); + moduleDetails.add(moduleDetail); + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(marriageRegistryDetails.getTenantid()) + .build(); + + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + return result; + }else{ + return null; + } } // public Object mdmsCallForLocation (RequestInfo requestInfo, String tenantId) { @@ -681,14 +685,18 @@ private Map getAttributeStrValuesForJsonPaths(Object mdmsdata,Li } } public Map getMandapamAttributeValues(Object mdmsdata) { - List modulepaths = Arrays.asList( - //MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH, + if(null!=mdmsdata) { + List modulepaths = Arrays.asList( + //MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH, // MarriageConstants.TENANT_JSONPATH, // MarriageConstants.COMMON_MASTER_JSONPATH, // MarriageConstants.EGOV_LOCATION_JSONPATH, - MarriageConstants.MARRIAGE_PLACE_JSONPATH); + MarriageConstants.MARRIAGE_PLACE_JSONPATH); - return getAttributeStrValuesForJsonPaths(mdmsdata,modulepaths); + return getAttributeStrValuesForJsonPaths(mdmsdata, modulepaths); + }else{ + return null; + } } public StringBuilder appendIfNotBlank(String v,StringBuilder s,boolean addSemicolon){ From 6604fa40db3add08e9dabc9f82cd254f07e400b6 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 16 Apr 2023 12:41:28 +0530 Subject: [PATCH 201/420] correction updation --- .../MarriageApplicationConfiguration.java | 10 +- .../service/MarriageApplicationService.java | 3 +- .../MarriageApplicationValidator.java | 1 + .../MarriageCorrectionEnrichment.java | 5 + .../service/MarriageCorrectionService.java | 48 +++++- .../MarriageCorrectionValidator.java | 151 ++++++++++++++++++ .../MarriageCorrectionController.java | 9 +- .../web/model/MarriageCorrectionDetails.java | 13 ++ .../marriage/utils/MarriageConstants.java | 2 + .../marriage/workflow/WorkflowIntegrator.java | 97 +++++++++++ .../src/main/resources/application.properties | 3 +- 11 files changed, 331 insertions(+), 11 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index 38117214209..eff7fa425e8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -115,11 +115,15 @@ public class MarriageApplicationConfiguration { //Marriage Correction @Value("${persister.save.marriage.correction.topic}") - private String SaveMarriageCorrectionTopic; + private String saveMarriageCorrectionTopic; @Value("${persister.update.marriage.correction.topic}") - private String UpdateMarriageCorrectionTopic; + private String updateMarriageCorrectionTopic; @Value("${persister.update.marriage.registry.correction.topic}") - private String UpdateMarriageRegistryCorrectionTopic; + private String updateMarriageRegistryCorrectionTopic; + + @Value("${persister.update.marriage.application.correction.topic}") + private String updateMarriageApplicationCorrectionTopic; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index c3dc725e67b..a020ee312b9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -43,7 +43,8 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication MarriageDetailsEnrichment marriageDetailsEnrichment, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator, - MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageApplicationValidator validatorService) { + MarriageApplicationConfiguration marriageApplicationConfiguration, + MarriageApplicationValidator validatorService) { this.repository = repository; this.workflowIntegrator = workflowIntegrator; this. marriageDetailsEnrichment= marriageDetailsEnrichment; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 07faf8d42df..72c5b29eea2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -52,6 +52,7 @@ public void validateUpdate(MarriageDetailsRequest request, List personal.setAuditDetails(auditDetails)); } + + public void enrichUpdate(MarriageCorrectionRequest request) { + + + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 7ed0d6f5df7..22195bc1329 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -5,7 +5,9 @@ import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; +import org.ksmart.marriage.marriageapplication.validator.MarriageApplicationValidator; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; @@ -20,6 +22,7 @@ import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.utils.MarriageMdmsUtil; +import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -44,8 +47,19 @@ public class MarriageCorrectionService { private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; private final CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper; - - public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, MarriageApplicationService marriageService, MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator, CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper) { + private final MarriageApplicationRepository applnRepository; + private final MarriageApplicationValidator applnvalidatorService; + private final WorkflowIntegrator workflowIntegrator; + + public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, + MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, + MarriageApplicationService marriageService, MarriageProducer producer, + MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, + MarriageMDMSValidator mdmsValidator, + CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper, + MarriageApplicationRepository applnRepository, + MarriageApplicationValidator applnvalidatorService, + WorkflowIntegrator workflowIntegrator) { this.correctionRepository = correctionRepository; this.registryRepository = registryRepository; this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; @@ -56,6 +70,9 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito this.util = util; this.mdmsValidator = mdmsValidator; this.correctionApplicationToRegistryMapper = correctionApplicationToRegistryMapper; + this.applnRepository = applnRepository; + this.applnvalidatorService = applnvalidatorService; + this.workflowIntegrator = workflowIntegrator; } //req for testing public List createCorrection(MarriageCorrectionRequest request) { @@ -111,6 +128,33 @@ public List updateMarriageRegistry(MarriageCorrection } return request.getMarriageCorrectionDetails(); } +//Jasmine 15.04.2023 +public List updateMarriageCorrectionDetails(MarriageCorrectionRequest request) { + + + String applicationNumber = request.getMarriageCorrectionDetails().get(0).getApplicationNo(); + MarriageApplicationSearchCriteria criteria =(MarriageApplicationSearchCriteria.builder() + .applicationNo(applicationNumber) + .build()); + List searchResult = applnRepository.getMarriageApplication(criteria,request.getRequestInfo()); + + if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ + workflowIntegrator.callCorrectionWorkFlow(request); + } + producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationCorrectionTopic(), request); + + // request.getMarriageDetails().forEach(marriage->{ + // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + // List demands = new ArrayList<>(); + // Demand demand = new Demand(); + // demand.setTenantId(marriage.getTenantid()); + // demand.setConsumerCode(marriage.getApplicationNumber()); + // demands.add(demand); + // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + // } + // }); + return request.getMarriageCorrectionDetails(); +} } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java new file mode 100644 index 00000000000..c9d4e895c1f --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java @@ -0,0 +1,151 @@ +package org.ksmart.marriage.marriagecorrection.validator; + +import org.apache.commons.collections4.CollectionUtils; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; + +import java.util.Calendar; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WorkFlowCheck; +import org.ksmart.marriage.utils.MarriageConstants; +import org.springframework.stereotype.Component; + +import com.jayway.jsonpath.JsonPath; + +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_UPDATE; +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_REQUIRED; +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_CREATE; + + + +//import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.BIRTH_DETAILS_REQUIRED; + +@Component +public class MarriageCorrectionValidator { + + public void validateUpdate(MarriageDetailsRequest request, List searchResult) { + List marriageDetails = request.getMarriageDetails(); + + if (CollectionUtils.isEmpty(marriageDetails)) { + throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), + "Marriage registration is required."); + } + + if (marriageDetails.size() > 1) { // NOPMD + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Supports only single Marriage registration update request."); + } + + if (marriageDetails.size() != searchResult.size()) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Marriage registration(s) not found in database."); + } + // IMP:Have to enable after URI submission + // validateCommonFields(request); + } + public void ruleEngineMarriage(MarriageDetailsRequest request, WorkFlowCheck wfc,Object mdmsdata){ + Long dateOfMarriage = 0L; + String marriagePlace = null; + String wfCode = null; + String applicationType = null; + + List marriageApplication = request.getMarriageDetails(); + for (MarriageApplicationDetails marriage : marriageApplication) { + dateOfMarriage = marriage.getDateofmarriage(); + wfCode = marriage.getWorkflowcode(); + applicationType = marriage.getModuleCode(); + } + if (dateOfMarriage == null) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Date of birth is required for create request."); + } else { + validateDoM(dateOfMarriage, wfCode,applicationType,mdmsdata, wfc); + } + if (marriageApplication!=null){ + marriageApplication.forEach(marriagedtls -> { + + Long dom = marriagedtls.getDateofmarriage(); + java.sql.Date domDate=new java.sql.Date(dom); + int diffDays= getDaysDiff(domDate); + + if(diffDays <= 45){ + marriagedtls.setWfnormalRegn(true); + } + else if(diffDays > 45 && diffDays <= 1825){ + marriagedtls.setWfdelayedWithinFiveYear(true); + } + else if(diffDays > 1825){ + marriagedtls.setWfdelayedAfterFiveYear(true); + } + }); + } + } + //Jasmine - Date of Marriage 11.04.2023 + public int getDaysDiff(Date dateToCheck) + { + long diffMilliseconds = new Date().getTime() - dateToCheck.getTime(); + double diffSeconds = diffMilliseconds / 1000; + double diffMinutes = diffSeconds / 60; + double diffHours = diffMinutes / 60; + double diffDays = diffHours / 24; + + return (int) Math.round(diffDays); + } + //Jasmine - Date of Marriage 11.04.2023 + private void validateDoM(Long dateOfMarriage, String wfCode, String applicationType,Object mdmsData, WorkFlowCheck wfc) { + Calendar calendar = Calendar.getInstance(); + Long currentDate = calendar.getTimeInMillis(); + + if (dateOfMarriage > currentDate) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Date of death should be less than or same as current date."); + } else { + wfc = checkValidation(mdmsData, dateOfMarriage, wfc); + + if(!wfc.getWorkflowCode().equals(wfCode)) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Workflow code from the application request is wrong."); + } + if(!wfc.getApplicationType().equals(applicationType)) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Application type from the application request is wrong."); + } + } + } + // Validate Marriage date MDMS data + public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkFlowCheck wfc) { + // WorkFlowCheck wfc = new WorkFlowCheck(); + Calendar calendar = Calendar.getInstance(); + Long currentDate = calendar.getTimeInMillis(); + + List> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); + for (int n = 0; n < wfLists.size(); n++) { + String startStr = wfLists.get(n).get("startdateperiod").toString(); + String endStr = wfLists.get(n).get("enddateperiod").toString(); + Long start = Long.parseLong(startStr); + Long end = Long.parseLong(endStr); + if (end > 0L) { + Long comp = currentDate - dateOfMarriage; + if (comp > start && comp <= end){ + wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); + wfc.setWorkflowCode(wfLists.get(n).get("WorkflowCode").toString()); + wfc.setPayment(Boolean.getBoolean(wfLists.get(n).get("payment").toString())); + wfc.setAmount(Integer.parseInt(wfLists.get(n).get("amount").toString())); + wfc.setActive(Boolean.getBoolean(wfLists.get(n).get("active").toString())); + // System.out.println("wfCodetesting"+wfLists.get(n).get("WorkflowCode").toString()); + } + } + } + return wfc; + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index b207e028e1b..8927a2adae0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -51,15 +51,15 @@ public ResponseEntity create(@RequestBody MarriageCo @PostMapping(value = { "/_updatemarriagecorrection"}) public ResponseEntity registryUpdate(@RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { - + + List marriageapplnDetails = marriageCorrectionService.updateMarriageCorrectionDetails(request); //Updating Marriage registry if Registrar Approved - //if(request.getMarriageCorrectionDetails().get(0).getStatus().equals(MarriageConstants.WORKFLOW_STATUS_APPROVED)) { - + if(request.getMarriageCorrectionDetails().get(0).getStatus().equals(MarriageConstants.WORKFLOW_STATUS_APPROVED) && (request.getMarriageCorrectionDetails().get(0).getApplicationtype().equals(MarriageConstants.APPLICATION_CORRECTION))) { List marriageCorrectionDetailsList = marriageCorrectionService.updateMarriageRegistry(request); - //} + } MarriageCorrectionResponse response = MarriageCorrectionResponse .builder() .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) @@ -67,4 +67,5 @@ public ResponseEntity registryUpdate(@RequestBody Ma .build(); return ResponseEntity.ok(response); } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java index a940f913f52..4a25878501a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -5,6 +5,7 @@ import org.ksmart.marriage.common.model.AuditDetails; import org.springframework.validation.annotation.Validated; +import javax.swing.text.Document; import javax.validation.constraints.Size; import java.util.List; @@ -55,5 +56,17 @@ public class MarriageCorrectionDetails { @JsonProperty("auditDetails") private AuditDetails auditDetails; + @JsonProperty("assignee") + private List assignees; + + @Size(max = 128) + private String comment; + + @JsonProperty("wfDocuments") + private List wfDocuments; + + @JsonProperty("isWorkflow") + private Boolean isWorkflow; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index d34da05c417..d8454471b1c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -150,6 +150,8 @@ public class MarriageConstants { public static final String APPLICATION_NEW = "new"; + public static final String APPLICATION_CORRECTION = "corr"; + public static final String CR_MDMS_MARRIAGE_NEW_WF_JSONPATH = "$.MdmsRes.birth-death-service.WorkFlowMarriage"; public static final String CR_MDMS_WORKFLOW_NEW = "WorkFlowMarriage"; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java index fb44c34bcdc..7d27540525e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -9,6 +9,8 @@ import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; //import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.beans.factory.annotation.Autowired; @@ -178,4 +180,99 @@ private List> buildUUIDList(List assignees) { return result; } + + //Correction workflow + + public void callCorrectionWorkFlow(MarriageCorrectionRequest request) { + + // System.out.println("HiWorkflow"); + List currentFile = request.getMarriageCorrectionDetails(); + + JSONArray array = new JSONArray(); + for (MarriageCorrectionDetails marriageDtl : request.getMarriageCorrectionDetails()) { + String businessServiceFromMDMS=marriageDtl.getBusinessservice(); + // System.out.println("Jasmine-BusinessService"+businessServiceFromMDMS); + if (businessServiceFromMDMS == null) { + businessServiceFromMDMS = MarriageConstants.BUSINESS_SERVICE_BND; + } + if (businessServiceFromMDMS.equals(MarriageConstants.BUSINESS_SERVICE_BND) || !request.getMarriageDetails() + .get(0).getAction().equalsIgnoreCase(MarriageConstants.TRIGGER_NOWORKFLOW)) { + + JSONObject obj = new JSONObject(); + currentFile + .forEach(marriagedtl -> { + obj.put(MarriageConstants.BUSINESSIDKEY, marriagedtl.getApplicationNo()); + obj.put(MarriageConstants.TENANTIDKEY, marriagedtl.getTenantid()); + obj.put(MarriageConstants.BUSINESSSERVICEKEY, marriagedtl.getWorkflowcode()); + List> uuidMaps = buildUUIDList(marriagedtl.getAssignees()); + // System.out.println("uuidMaps"+uuidMaps); + if (CollectionUtils.isNotEmpty(uuidMaps)) { + obj.put(MarriageConstants.ASSIGNEEKEY, uuidMaps.get(0).get("uuid")); + } + }); + + obj.put(MarriageConstants.MODULENAMEKEY, MarriageConstants.BNDMODULENAMEVALUE); + obj.put(MarriageConstants.ACTIONKEY, marriageDtl.getAction()); + obj.put(MarriageConstants.COMMENTKEY, marriageDtl.getComment()); + obj.put(MarriageConstants.DOCUMENTSKEY, marriageDtl.getWfDocuments()); + array.add(obj); + } + } + + if (!CollectionUtils.isEmpty(array)) { + JSONObject workFlowRequest = new JSONObject(); + workFlowRequest.put(MarriageConstants.REQUESTINFOKEY, request.getRequestInfo()); + workFlowRequest.put(MarriageConstants.WORKFLOWREQUESTARRAYKEY, array); + String response = null; + //System.out.println("workflow Check :" + workFlowRequest); + // log.info("workflow integrator request " + workFlowRequest); + + try { + response = restTemplate.postForObject(bndConfig.getWfHost().concat(bndConfig.getWfTransitionPath()), + workFlowRequest, String.class); + } catch (HttpClientErrorException e) { + /* + * extracting message from client error exception + */ + DocumentContext responseContext = JsonPath.parse(e.getResponseBodyAsString()); + List errros = null; + try { + errros = responseContext.read("$.Errors"); + } catch (PathNotFoundException pnfe) { + log.error("EG_BND_WF_ERROR_KEY_NOT_FOUND", + " Unable to read the json path in error object : " + pnfe.getMessage()); + throw new CustomException("EG_BND_WF_ERROR_KEY_NOT_FOUND", + " Unable to read the json path in error object : " + pnfe.getMessage()); + } + throw new CustomException("EG_WF_ERROR", errros.toString()); + } catch (Exception e) { + throw new CustomException("EG_WF_ERROR", + " Exception occured while integrating with workflow : " + e.getMessage()); + } + + log.info("workflow integrator response " + response); + + /* + * on success result from work-flow read the data and set the status back to TL + * object + */ + // System.out.println("response Check :" + response); + DocumentContext responseContext = JsonPath.parse(response); + List> responseArray = responseContext.read(MarriageConstants.PROCESSINSTANCESJOSNKEY); + Map idStatusMap = new HashMap<>(); + responseArray.forEach(object -> { + + DocumentContext instanceContext = JsonPath.parse(object); + idStatusMap.put(instanceContext.read(MarriageConstants.BUSINESSIDJOSNKEY), + instanceContext.read(MarriageConstants.STATUSJSONKEY)); + }); + + // setting the status back to TL object from wf response + + request.getMarriageCorrectionDetails().forEach( + bndObj -> bndObj.setStatus(idStatusMap.get(bndObj.getApplicationNo()))); + + } + + } } \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 7151fdfec37..f840bc05c88 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -154,4 +154,5 @@ egov.payment.search.endpoint=/collection-services/payments/_search #Marriage correction topics persister.save.marriage.correction.topic=save-marriage-correction-topic persister.update.marriage.correction.topic=update-marriage-correction-topic -persister.update.marriage.registry.correction.topic=correction-update-marriage-registry-topic \ No newline at end of file +persister.update.marriage.registry.correction.topic=correction-update-marriage-registry-topic +persister.update.marriage.application.correction.topic=correction-update-marriage-application-topic \ No newline at end of file From 62b275f32034e2a16317be1205856fc802af1dce Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 16 Apr 2023 13:18:57 +0530 Subject: [PATCH 202/420] correction updation --- .../main/resources/marriage-correction.yml | 38 +++++++++++++++++++ .../service/MarriageCorrectionService.java | 9 +++-- .../MarriageCorrectionValidator.java | 12 ++---- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index af597bd536b..00961c85205 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -505,6 +505,44 @@ serviceMaps: - jsonPath: $.CorrectionFieldValue.*.auditDetails.lastModifiedBy + - version: 1.0 + description: Persists update marriage correction details in marriage tables + fromTopic: correction-update-marriage-application-topic + isTransaction: true + queryMaps: + + - query: INSERT INTO public.eg_marriage_details_audit SELECT * FROM public.eg_marriage_details WHERE id =? and tenantid=? AND applicationnumber = ? ; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageTenantid + + - jsonPath: $.MarriageDetails.*.applicationNumber + + - query: UPDATE public.eg_marriage_details SET businessservice = ? ,action = ? , status = ? ,lastmodifiedtime = ? ,lastmodifiedby= ? + WHERE id = ? AND tenantid = ? AND applicationnumber = ? + + basePath: MarriageDetails.* + jsonMaps: + + - jsonPath: $.MarriageDetails.*.businessService + + - jsonPath: $.MarriageDetails.*.action + + - jsonPath: $.MarriageDetails.*.status + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + + - jsonPath: $.MarriageDetails.*.id + + - jsonPath: $.MarriageDetails.*.marriageTenantid + + - jsonPath: $.MarriageDetails.*.applicationNumber + # - version: 1.0 # description: Persists save marriage details in marriage table # fromTopic: update-marriage-application-topic diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 22195bc1329..6d7418c36b5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -17,6 +17,7 @@ import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriagecorrection.repository.MarriageCorrectionRepository; +import org.ksmart.marriage.marriagecorrection.validator.MarriageCorrectionValidator; import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; @@ -50,6 +51,7 @@ public class MarriageCorrectionService { private final MarriageApplicationRepository applnRepository; private final MarriageApplicationValidator applnvalidatorService; private final WorkflowIntegrator workflowIntegrator; + private final MarriageCorrectionValidator correctionValidatorService ; public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, @@ -59,7 +61,8 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper, MarriageApplicationRepository applnRepository, MarriageApplicationValidator applnvalidatorService, - WorkflowIntegrator workflowIntegrator) { + WorkflowIntegrator workflowIntegrator, + MarriageCorrectionValidator correctionValidatorService) { this.correctionRepository = correctionRepository; this.registryRepository = registryRepository; this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; @@ -73,6 +76,7 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito this.applnRepository = applnRepository; this.applnvalidatorService = applnvalidatorService; this.workflowIntegrator = workflowIntegrator; + this.correctionValidatorService = correctionValidatorService; } //req for testing public List createCorrection(MarriageCorrectionRequest request) { @@ -131,13 +135,12 @@ public List updateMarriageRegistry(MarriageCorrection //Jasmine 15.04.2023 public List updateMarriageCorrectionDetails(MarriageCorrectionRequest request) { - String applicationNumber = request.getMarriageCorrectionDetails().get(0).getApplicationNo(); MarriageApplicationSearchCriteria criteria =(MarriageApplicationSearchCriteria.builder() .applicationNo(applicationNumber) .build()); List searchResult = applnRepository.getMarriageApplication(criteria,request.getRequestInfo()); - + correctionValidatorService.validateCorrectionUpdate(request, searchResult); if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ workflowIntegrator.callCorrectionWorkFlow(request); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java index c9d4e895c1f..a0c2418fa5f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java @@ -10,12 +10,8 @@ import java.util.LinkedHashMap; import java.util.List; import org.apache.commons.lang3.StringUtils; -import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.WorkFlowCheck; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.stereotype.Component; @@ -31,9 +27,9 @@ @Component public class MarriageCorrectionValidator { - - public void validateUpdate(MarriageDetailsRequest request, List searchResult) { - List marriageDetails = request.getMarriageDetails(); +// + public void validateCorrectionUpdate(MarriageCorrectionRequest request, List searchResult) { + List marriageDetails = searchResult; if (CollectionUtils.isEmpty(marriageDetails)) { throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), From eb2b511c128636d70b596fffbf10201345ae9502 Mon Sep 17 00:00:00 2001 From: binilp Date: Sun, 16 Apr 2023 14:28:38 +0530 Subject: [PATCH 203/420] changes in marriage certificate --- .../marriageregistry/service/MarriageRegistryService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 45a87d600b8..e975ee67722 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -151,6 +151,10 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req public List searchCertificate(MarriageRegistrySearchCriteria criteria) { List obj = repository.searchMarriageRegistry(criteria); - return repository.searchCertificateByMarriageId(obj.get(0).getId()); + if(null!=obj&&obj.size()>0) { + return repository.searchCertificateByMarriageId(obj.get(0).getId()); + }else{ + throw new CustomException("MARRIAGE REGISTRY DATA NOT FOUND", " Marriage Registry data not found"); + } } } From 4d812883f0a56e35c2a565dedd93a645d875f3c4 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 16 Apr 2023 15:22:25 +0530 Subject: [PATCH 204/420] correction updation --- .../service/MarriageCorrectionService.java | 2 +- .../querybuilder/MarriageRegistryQueryBuilder.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 6d7418c36b5..0ba857e7f43 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -140,7 +140,7 @@ public List updateMarriageCorrectionDetails(MarriageC .applicationNo(applicationNumber) .build()); List searchResult = applnRepository.getMarriageApplication(criteria,request.getRequestInfo()); - correctionValidatorService.validateCorrectionUpdate(request, searchResult); + correctionValidatorService.validateCorrectionUpdate(request, searchResult); if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ workflowIntegrator.callCorrectionWorkFlow(request); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 071b0e186e2..58dd4b47eb2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -98,17 +98,17 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BD.bride_groom ='B' ") .append("INNER JOIN eg_register_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") .append("GD.bride_groom ='G' ") - .append("INNER JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") .append("BPMA.bride_groom ='B' ") - .append("INNER JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") .append("GPMA.bride_groom ='G' ") - .append("INNER JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") .append("BPSA.bride_groom ='B' ") - .append("INNER JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") + .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") .append("GPSA.bride_groom ='G' ") - .append("INNER JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") + .append("LEFT JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") .append("WD1.serial_no = 1 ") - .append("INNER JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") + .append("LEFT JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") .append("WD2.serial_no = 2 ") .toString(); From 8fb2e3a7e2a7c22267e3cebebe4ebe3c211cb9bd Mon Sep 17 00:00:00 2001 From: binilp Date: Sun, 16 Apr 2023 15:25:06 +0530 Subject: [PATCH 205/420] changes in marriage services --- .../marriageregistry/service/MarriageRegistryService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index e975ee67722..5b6634396a3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -138,8 +138,9 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req return marriageCertificate; } catch (Exception e) { + System.out.println(e.getMessage()); e.printStackTrace(); - throw new CustomException("DOWNLOAD_ERROR", "Error in Downloading Certificate"); + throw new CustomException("DOWNLOAD_ERROR", "Error in Downloading Certificate"+e.getMessage()); } }else if (marriageRegistryDetailsList == null && marriageRegistryDetailsList.isEmpty()){ throw new CustomException("DOWNLOAD_ERROR", "Marriage registry not found"); From e445156aa319d7e69545ae34291897cd02aba721 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 16 Apr 2023 17:41:48 +0530 Subject: [PATCH 206/420] application search updation --- .../querybuilder/MarriageApplicationQueryBuilder.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index df61b9207d1..94316e98eeb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -54,7 +54,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") - .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode ,") + .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode , GPMA.city_town_village as GPMA_city_town_village ,") .append("BPMA.id as BPMA_id ,BPMA.housename_no_en as BPMA_housename_en ,BPMA.housename_no_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") @@ -63,7 +63,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , ") .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") - .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml , BPMA.ot_zipcode as BPMA_ot_zipcode ,") + .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml , BPMA.ot_zipcode as BPMA_ot_zipcode ,BPMA.city_town_village as BPMA_city_town_village ,") .append("GPSA.id as GPSA_id ,GPSA.housename_no_en as GPSA_housename_en,GPSA.housename_no_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") @@ -72,7 +72,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom , ") .append("GPSA.ot_address1_en as GPSA_ot_address1_en,GPSA.ot_address1_ml as GPSA_ot_address1_ml , GPSA.ot_address2_en as GPSA_ot_address2_en , ") .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") - .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml,") + .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml, GPSA.ot_zipcode as GPSA_ot_zipcode, GPSA.city_town_village as GPSA_city_town_village , ") .append("BPSA.id as BPSA_id ,BPSA.housename_no_en as BPSA_housename_en,BPSA.housename_no_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") .append("BPSA.talukid as BPSA_talukid , BPSA.taluk_name as BPSA_taluk_name , BPSA.tenantid as BPSA_tenantid , BPSA.ward_code as BPSA_ward_code ,") @@ -81,7 +81,9 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") - .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,") + .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml, ") + .append("BPSA.ot_zipcode as BPSA_ot_zipcode,BPSA.city_town_village as BPSA_city_town_village , ") + .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") From c11b408457c6b3aaef8d0380f50c81215ded2340 Mon Sep 17 00:00:00 2001 From: binilp Date: Sun, 16 Apr 2023 18:20:58 +0530 Subject: [PATCH 207/420] changes in application properties --- .../MarriageApplicationConfiguration.java | 3 + .../MarriageRegistryEnrichment.java | 232 +++++++++--------- .../MarriageRegistryRepository.java | 14 +- .../MarriageRegistryQueryBuilder.java | 92 ------- .../marriage/utils/MarriageMdmsUtil.java | 2 + .../src/main/resources/application.properties | 8 +- 6 files changed, 141 insertions(+), 210 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index d4ad6ac3996..caea8301c83 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -126,4 +126,7 @@ public class MarriageApplicationConfiguration { @Value("${persister.update.marriage.application.correction.topic}") private String updateMarriageApplicationCorrectionTopic; + @Value("${egov.marriage.image.startPoint}") + private String imageURLStartPath; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 6e5be02a1d8..8a5680df451 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -544,41 +544,43 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg , registryDetails.getGroomAddressDetails().getPoNoPermanent() , registryDetails.getGroomAddressDetails().getVillageNamePermanent() , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); - registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); + if(null!=mdmsGroomAddressData) { + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); // registryDetails.getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); // registryDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); - registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); - registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - registryDetails.getGroomAddressDetails().setPoNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); + registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); + registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + registryDetails.getGroomAddressDetails().setPoNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); // - appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getStreetNameEnPermanent(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getStreetNameEnPermanent(), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent(), groomAddressBuilder, true); // appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); - - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); + } } else { + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() , registryDetails.getGroomAddressDetails().getDistrictIdPermanent() @@ -587,35 +589,36 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg , registryDetails.getGroomAddressDetails().getPoNoPermanent() , registryDetails.getGroomAddressDetails().getVillageNamePermanent() , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); - registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(null); - registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setPoNoPermanent(null); - registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); - registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); - registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - registryDetails.getGroomAddressDetails().setPermntOthPostOfficeEn(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - - appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(),groomAddressBuilder,true); + if(null!=mdmsGroomAddressData) { + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(null); + registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setPoNoPermanent(null); + registryDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); + registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); + registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + registryDetails.getGroomAddressDetails().setPermntOthPostOfficeEn(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getStreetNameEnPermanent(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getStreetNameEnPermanent(), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthPostOfficeEn(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthPostOfficeEn(), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); + } } } @@ -629,26 +632,27 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg , registryDetails.getGroomAddressDetails().getPoNoPermanent() , registryDetails.getGroomAddressDetails().getVillageNamePermanent() , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); - registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(null); - registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setStateIdPermanent(null); - registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setPoNoPermanent(null); - - registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + if(null!=mdmsGroomAddressData) { + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); + registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(null); + registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setStateIdPermanent(null); + registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); + registryDetails.getGroomAddressDetails().setPoNoPermanent(null); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaLineoneEn(),groomAddressBuilder,true); + registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaprovinceEn(),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaLineoneEn(), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),groomAddressBuilder,true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaprovinceEn(), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(),groomAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(), groomAddressBuilder, true); + } } @@ -669,7 +673,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg if (registryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + Object mdmsBrideAddressData = util.mDMSCallGetAddress(req , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() , registryDetails.getBrideAddressDetails().getStateIdPermanent() @@ -677,41 +681,41 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg , registryDetails.getBrideAddressDetails().getPoNoPermanent() , registryDetails.getBrideAddressDetails().getVillageNamePermanent() , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); - registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setPoNoPermanent(null); + if(null!=mdmsBrideAddressData) { + Map> mdmsBrideAddressMap = util.getMarriageMDMSData(mdmsBrideAddressData); + registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setPoNoPermanent(null); // registryDetails.getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); // registryDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); - registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); - registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - registryDetails.getBrideAddressDetails().setPoNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); + registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); + registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + registryDetails.getBrideAddressDetails().setPoNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPoNoPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPoNoPermanent(),brideAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), brideAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), brideAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), brideAddressBuilder, true); - - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); + } } else { - Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + Object mdmsBrideAddressData = util.mDMSCallGetAddress(req , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() , registryDetails.getBrideAddressDetails().getStateIdPermanent() @@ -719,39 +723,41 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg , registryDetails.getBrideAddressDetails().getPoNoPermanent() , registryDetails.getBrideAddressDetails().getVillageNamePermanent() , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); - registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(null); - registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); - registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); - registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - registryDetails.getBrideAddressDetails().setPermntOthPostOfficeEn(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + if (null != mdmsBrideAddressData) { + Map> mdmsBrideAddressMap = util.getMarriageMDMSData(mdmsBrideAddressData); + registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(null); + registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); + registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); + registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + registryDetails.getBrideAddressDetails().setPermntOthPostOfficeEn(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getStreetNameEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(), brideAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), brideAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap),brideAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); // - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),brideAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); + } } } } else { - Object mdmsGroomAddressData = util.mDMSCallGetAddress(req + Object mdmsBrideAddressData = util.mDMSCallGetAddress(req , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() , registryDetails.getBrideAddressDetails().getStateIdPermanent() @@ -759,26 +765,28 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg , registryDetails.getBrideAddressDetails().getPoNoPermanent() , registryDetails.getBrideAddressDetails().getVillageNamePermanent() , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); - registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(null); - registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setStateIdPermanent(null); - registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap)); - registryDetails.getBrideAddressDetails().setPoNoPermanent(null); + if (null != mdmsBrideAddressData) { + Map> mdmsBrideAddressMap = util.getMarriageMDMSData(mdmsBrideAddressData); + registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(null); + registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setStateIdPermanent(null); + registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setPoNoPermanent(null); // - registryDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - registryDetails.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); - registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaLineoneEn(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaLineoneEn(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaprovinceEn(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaprovinceEn(), brideAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap),brideAddressBuilder,true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getOutSideIndiaPostCodePermanent(),brideAddressBuilder,true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getOutSideIndiaPostCodePermanent(), brideAddressBuilder, true); + } } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 59e00148e2b..26035c4e8bc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -211,7 +211,8 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( MarriageConstants.PLACE_TYPE_PRIVATE_PLACE) || (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( - MarriageConstants.PLACE_TYPE_PUBLIC_PLACE))) { + MarriageConstants.PLACE_TYPE_PUBLIC_PLACE))||(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( + MarriageConstants.PLACE_OTHER))) { if (!StringUtils.isEmpty( req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn())) { marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn()+","); @@ -291,9 +292,13 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); - // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); - // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl("https://ulb-logos.s3.ap-south-1.amazonaws.com/cochin/cochin.jpg"); + } + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); + } marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; @@ -310,7 +315,8 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla }catch (Exception e){ e.printStackTrace(); - throw new CustomException("PDF_ERROR","Error in generating PDF"); + System.out.println(e.getMessage()); + throw new CustomException("PDF_ERROR","Error in generating PDF"+e.getMessage()); } return pdfResponse; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 58dd4b47eb2..f7bbcb95753 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -113,99 +113,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .toString(); - private static final String CERTIFICATE_DATA_QUERY_ = new StringBuilder() - .append(" SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") - .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") - .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.housenameno_en as MD_housenameno_en , MD.housenameno_ml as MD_housenameno_ml ,") - .append("MD.locality_en as MD_locality_en , MD.locality_ml as MD_locality_ml , MD.street_name_en as MD_street_name_en , MD.street_name_ml as MD_street_name_ml , ") - .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") - .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") - .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") - .append("MD.applicationnumber as MD_applicationnumber ,") - .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") - .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") - .append("GD.firstname_ml as GD_firstname_ml , GD.middlename_ml as GD_middlename_ml , GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,") - .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") - .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") - .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") - .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") - - .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") - .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") - .append("BD.middlename_ml as BD_middlename_ml , BD.lastname_ml as BD_lastname_ml , BD.mobile as BD_mobile , BD.emailid as BD_emailid , ") - .append("BD.gender as BD_gender , BD.dateofbirth as BD_dateofbirth , BD.age as BD_age , BD.parent_guardian as BD_parent_guardian ,BD.fathername_en as BD_fathername_en ,") - .append("BD.mothername_en as BD_mothername_en, BD.fathername_ml as BD_fathername_ml , BD.mothername_ml as BD_mothername_ml , BD.father_aadharno as BD_father_aadharno ,") - .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") - .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.bride_groom as BD_bride_groom,") - - .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") - .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") - .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") - .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") - .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") - .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") - .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") - - .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") - .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") - .append("GPMA.locality_en as GPMA_locality_en,GPMA.locality_ml as GPMA_locality_ml,GPMA.street_name_en as GPMA_street_name_en,GPMA.street_name_ml as GPMA_street_name_ml ,") - .append("GPMA.districtid as GPMA_districtid,GPMA.stateid as GPMA_stateid , GPMA.poid as GPMA_poid , GPMA.poname_en as GPMA_poname_en , GPMA.poname_ml as GPMA_poname_ml ,") - .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") - .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") - .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") - .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode,") - - .append("BPMA.id as BPMA_id ,BPMA.housename_en as BPMA_housename_en ,BPMA.housename_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") - .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") - .append("BPMA.locality_en as BPMA_locality_en , BPMA.locality_ml as BPMA_locality_ml , BPMA.street_name_en as BPMA_street_name_en , BPMA.street_name_ml as BPMA_street_name_ml,") - .append("BPMA.districtid as BPMA_districtid , BPMA.stateid BPMA_stateid , BPMA.poid as BPMA_poid , BPMA.poname_en as BPMA_poname_en , BPMA.poname_ml as BPMA_poname_ml ,") - .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , ") - .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") - .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") - .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml , BPMA.ot_zipcode as BPMA_ot_zipcode,") - - .append("GPSA.id as GPSA_id ,GPSA.housename_en as GPSA_housename_en,GPSA.housename_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") - .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") - .append("GPSA.locality_en as GPSA_locality_en,GPSA.locality_ml as GPSA_locality_ml , GPSA.street_name_en as GPSA_street_name_en , GPSA.street_name_ml as GPSA_street_name_ml , ") - .append("GPSA.districtid as GPSA_districtid , GPSA.stateid GPSA_stateid , GPSA.poid as GPSA_poid , GPSA.poname_en as GPSA_poname_en , GPSA.poname_ml as GPSA_poname_ml , ") - .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom , ") - .append("GPSA.ot_address1_en as GPSA_ot_address1_en,GPSA.ot_address1_ml as GPSA_ot_address1_ml , GPSA.ot_address2_en as GPSA_ot_address2_en , ") - .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") - .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml, GPSA.ot_zipcode as GPSA_ot_zipcode,") - - .append("BPSA.id as BPSA_id ,BPSA.housename_en as BPSA_housename_en,BPSA.housename_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") - .append("BPSA.talukid as BPSA_talukid , BPSA.taluk_name as BPSA_taluk_name , BPSA.tenantid as BPSA_tenantid , BPSA.ward_code as BPSA_ward_code ,") - .append("BPSA.locality_en as BPSA_locality_en , BPSA.locality_ml as BPSA_locality_ml ,") - .append("BPSA.street_name_en as BPSA_street_name_en , BPSA.street_name_ml as BPSA_street_name_ml , BPSA.districtid as BPSA_districtid , BPSA.stateid BPSA_stateid ,") - .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") - .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") - .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") - .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode , ") - - .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") - .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") - .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") - .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") - - .append("FROM public.eg_register_marriage_details as MD ") - .append("INNER JOIN eg_register_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") - .append("BD.bride_groom ='B' ") - .append("INNER JOIN eg_register_marriage_bride_groom_details as GD ON GD.marriageid = MD.id AND ") - .append("GD.bride_groom ='G' ") - .append("LEFT JOIN eg_register_marriage_permanent_address_details as BPMA ON BPMA.marriageid = MD.id AND ") - .append("BPMA.bride_groom ='B' ") - .append("LEFT JOIN eg_register_marriage_permanent_address_details as GPMA ON GPMA.marriageid = MD.id AND ") - .append("GPMA.bride_groom ='G' ") - .append("LEFT JOIN eg_register_marriage_present_address_details as BPSA ON BPSA.marriageid = MD.id AND ") - .append("BPSA.bride_groom ='B' ") - .append("LEFT JOIN eg_register_marriage_present_address_details as GPSA ON GPSA.marriageid = MD.id AND ") - .append("GPSA.bride_groom ='G' ") - .append("LEFT JOIN eg_register_marriage_witness_details as WD1 ON WD1.marriageid = MD.id AND ") - .append("WD1.serial_no = 1 ") - .append("LEFT JOIN eg_register_marriage_witness_details as WD2 ON WD2.marriageid = MD.id AND ") - .append("WD2.serial_no = 2 ") - .toString(); public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCriteria criteria, @NotNull List preparedStmtValues, Boolean isCount) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 6c8b0a63370..dee45b4427a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -725,8 +725,10 @@ private MdmsCriteriaReq MdmsRequestForCountry(RequestInfo requestInfo,String cou public Map> mDMSCallGetCountry(RequestInfo requestInfo , String countryCode) { + log.info("Inside mDMSCallGetCountry "+countryCode); MdmsCriteriaReq mdmsCriteriaReq = MdmsRequestForCountry(requestInfo, countryCode); Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + log.info("result mDMSCallGetCountry "+result.toString()); if(null!=result){ List modulepaths = Arrays.asList( MarriageConstants.COMMON_MASTER_JSONPATH); diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index f840bc05c88..d4b2c71f22d 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -107,6 +107,8 @@ egov.pdfservice.host= https://ksmart-dev.lsgkerala.gov.in/ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certificate&tenantId=$tenantId egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId +#imagePath +egov.marriage.image.startPoint = https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/crmarriage #view certificate path config egov.ui.app.host=https://ksmart-dev.lsgkerala.gov.in/ @@ -114,6 +116,8 @@ egov.bnd.marriagecert.link=/citizen/withoutAuth/bnd/viewcertificate?id=$id&tenan egov.bnd.birthcert.link=/citizen/withoutAuth/bnd/viewcertificate?id=$id&tenantId=$tenantId&module=birth®No=$regNo&dateofbirth=$dateofbirth&gender=$gender&birthcertificateno=$birthcertificateno egov.bnd.deathcert.link=/citizen/withoutAuth/bnd/viewcertificate?id=$id&tenantId=$tenantId&module=death®No=$regNo&dateofdeath=$dateofdeath&gender=$gender&deathcertificateno=$deathcertificateno +#egov.idgen.marriagecert.name=MR-CERT-[mr.name]-[fy:yyyy]-[SEQ_EGOV_COMMON] + #kafka topics for marriage certificate persister.save.marriagecertificate.topic=save-marriagecertificate-topic From 263f3bd9536c3b00129a9c309b43f8f4fad3551a Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Mon, 17 Apr 2023 10:14:30 +0530 Subject: [PATCH 208/420] marriage correction validations --- .../MarriageCorrectionRepository.java | 8 + .../service/MarriageCorrectionService.java | 69 +++--- .../MarriageCorrectionApplnValidator.java | 103 +++++++++ .../MarriageCorrectionMDMSValidator.java | 212 ++++++++++++++++++ .../MarriageCorrectionController.java | 19 +- .../web/model/MarriageCorrectionDetails.java | 3 + .../web/model/MarriageCorrectionResponse.java | 9 + 7 files changed, 392 insertions(+), 31 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java index 067cb8830a8..06003c57724 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java @@ -60,4 +60,12 @@ public List searchMarriageDetails(MarriageApplicatio return result; } + public List searchMarriageCorrectionApplnDetails(MarriageApplicationSearchCriteria criteria) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + + return result; + } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 0ba857e7f43..d654754af56 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -2,7 +2,7 @@ import lombok.extern.slf4j.Slf4j; -import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; @@ -11,9 +11,12 @@ import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriagecorrection.enrichment.MarriageCorrectionEnrichment; import org.ksmart.marriage.marriagecorrection.mapper.CorrectionApplicationToRegistryMapper; import org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper; +import org.ksmart.marriage.marriagecorrection.validator.MarriageCorrectionApplnValidator; +import org.ksmart.marriage.marriagecorrection.validator.MarriageCorrectionMDMSValidator; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriagecorrection.repository.MarriageCorrectionRepository; @@ -29,6 +32,8 @@ import java.util.ArrayList; import java.util.List; +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_CREATE; + @Slf4j @Service public class MarriageCorrectionService { @@ -53,16 +58,20 @@ public class MarriageCorrectionService { private final WorkflowIntegrator workflowIntegrator; private final MarriageCorrectionValidator correctionValidatorService ; - public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, - MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, - MarriageApplicationService marriageService, MarriageProducer producer, - MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, - MarriageMDMSValidator mdmsValidator, - CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper, - MarriageApplicationRepository applnRepository, - MarriageApplicationValidator applnvalidatorService, - WorkflowIntegrator workflowIntegrator, - MarriageCorrectionValidator correctionValidatorService) { + private final MarriageCorrectionApplnValidator marriageCorrectionApplnValidator; + private final MarriageCorrectionMDMSValidator marriageCorrectionMDMSValidator; + + + public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, + MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, + MarriageApplicationService marriageService, MarriageProducer producer, + MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, + MarriageMDMSValidator mdmsValidator, + CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper, + MarriageApplicationRepository applnRepository, + MarriageApplicationValidator applnvalidatorService, + WorkflowIntegrator workflowIntegrator, + MarriageCorrectionValidator correctionValidatorService, MarriageCorrectionApplnValidator marriageCorrectionApplnValidator, MarriageCorrectionMDMSValidator marriageCorrectionMDMSValidator) { this.correctionRepository = correctionRepository; this.registryRepository = registryRepository; this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; @@ -77,10 +86,16 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito this.applnvalidatorService = applnvalidatorService; this.workflowIntegrator = workflowIntegrator; this.correctionValidatorService = correctionValidatorService; + this.marriageCorrectionApplnValidator = marriageCorrectionApplnValidator; + this.marriageCorrectionMDMSValidator = marriageCorrectionMDMSValidator; } //req for testing public List createCorrection(MarriageCorrectionRequest request) { + marriageCorrectionApplnValidator.validateCorrectionCreate(request); + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageCorrectionDetails().get(0).getTenantid()); + marriageCorrectionMDMSValidator.validateMarriageCorrectionMDMSData(request,mdmsData); + MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); List marriageRegistryDetails = searchRegistry(criteria); @@ -90,15 +105,16 @@ public List createCorrection(MarriageCorrectionReques List marriageApplicationDetailsList = new ArrayList<>(); marriageApplicationDetailsList.add(marriageApplicationDetail); - request.setMarriageDetails(marriageApplicationDetailsList); - //correctionRepository.saveCorrectionDetails(request); - - //Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); - //mdmsValidator.validateMarriageMDMSData(request,mdmsData); + MarriageDetailsRequest marriageDetailsRequest=new MarriageDetailsRequest(); + marriageDetailsRequest.setMarriageDetails(marriageApplicationDetailsList); + mdmsValidator.validateMarriageMDMSData(marriageDetailsRequest,mdmsData); producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); + }else{ + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Marriage registration(s) not found in database."); } return request.getMarriageCorrectionDetails(); } @@ -136,16 +152,16 @@ public List updateMarriageRegistry(MarriageCorrection public List updateMarriageCorrectionDetails(MarriageCorrectionRequest request) { String applicationNumber = request.getMarriageCorrectionDetails().get(0).getApplicationNo(); - MarriageApplicationSearchCriteria criteria =(MarriageApplicationSearchCriteria.builder() - .applicationNo(applicationNumber) - .build()); - List searchResult = applnRepository.getMarriageApplication(criteria,request.getRequestInfo()); - correctionValidatorService.validateCorrectionUpdate(request, searchResult); - if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ + MarriageApplicationSearchCriteria criteria = (MarriageApplicationSearchCriteria.builder() + .applicationNo(applicationNumber) + .build()); + List searchResult = applnRepository.getMarriageApplication(criteria, request.getRequestInfo()); + correctionValidatorService.validateCorrectionUpdate(request, searchResult); + if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()) { workflowIntegrator.callCorrectionWorkFlow(request); } producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationCorrectionTopic(), request); - + // request.getMarriageDetails().forEach(marriage->{ // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ // List demands = new ArrayList<>(); @@ -156,8 +172,9 @@ public List updateMarriageCorrectionDetails(MarriageC // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); // } // }); - return request.getMarriageCorrectionDetails(); - + return request.getMarriageCorrectionDetails(); } - + public List searchCorrectionDetails(MarriageCorrectionRequest request,MarriageApplicationSearchCriteria criteria) { + return correctionRepository.searchMarriageCorrectionApplnDetails(criteria); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java new file mode 100644 index 00000000000..ddde2c46118 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java @@ -0,0 +1,103 @@ +package org.ksmart.marriage.marriagecorrection.validator; + +import org.apache.commons.lang3.StringUtils; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; + +import java.util.List; + +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.*; + +@Component +public class MarriageCorrectionApplnValidator { + + + public void validateCorrectionCreate(MarriageCorrectionRequest request) { + List correctionApplications = request.getMarriageCorrectionDetails(); + if (CollectionUtils.isEmpty(request.getMarriageCorrectionDetails())) { + throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), + "Marriage Correction Details is required."); + } + + if (correctionApplications.size() > 1) { // NOPMD + throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), + "Supports only single Marriage correction application create request."); + } + if (StringUtils.isBlank(correctionApplications.get(0).getRegisterId())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Register id is required for create correction request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getRegistrationno())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Registration number is required for create correction request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getTenantid())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Tenant id is required for create correction request."); + } + } + + public void validateCorrectionUpdate(MarriageCorrectionRequest request) { + List correctionApplications = request.getMarriageCorrectionDetails(); + if (CollectionUtils.isEmpty(request.getMarriageCorrectionDetails())) { + throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), + "Marriage details is required."); + } + + if (correctionApplications.size() > 1) { + throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), + "Supports only single application update request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getRegisterId())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Register id is required for update correction request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getRegistrationno())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Registration number is required for update correction request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getTenantid())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Tenant id is required for update request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getId())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Application id is required for update request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getApplicationtype())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Application type is required for update request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getBusinessservice())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Bussiness service is required for update request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getApplicationNo())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Application number is required for update request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getWorkflowcode())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Workflow code is required for update request."); + } + + if (StringUtils.isBlank(correctionApplications.get(0).getAction())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Workflow action is required for update request."); + } + //mdmsValidator.validateMdmsData(request, mdmsData); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java new file mode 100644 index 00000000000..898a905a5e5 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java @@ -0,0 +1,212 @@ +package org.ksmart.marriage.marriagecorrection.validator; + +import com.jayway.jsonpath.JsonPath; +import lombok.extern.slf4j.Slf4j; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; +import org.ksmart.marriage.utils.MarriageConstants; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Component +@Slf4j +public class MarriageCorrectionMDMSValidator { + + public void validateMarriageCorrectionMDMSData(MarriageCorrectionRequest correctionRequest, Object mdmsdata) { + Map errorMap = new HashMap<>(); + Map> masterData = getAttributeValues(mdmsdata); + + String[] masterArray = {MarriageConstants.TENANTS, MarriageConstants.GENDERTYPE, + MarriageConstants.MARITAL_STATUS, MarriageConstants.MARRIAGE_TYPE, + MarriageConstants.MARRIAGE_PLACE_TYPE}; + + + validateIfMasterPresent(masterArray, masterData); + + if (!masterData.get(MarriageConstants.TENANTS).contains(correctionRequest.getMarriageCorrectionDetails().get(0).getTenantid())) + errorMap.put("INVALID TENAND ID", "The tenand id " + correctionRequest.getMarriageCorrectionDetails().get(0).getTenantid() + + " does not exists"); + + correctionRequest.getMarriageCorrectionDetails().forEach(correctionDtls -> { + correctionDtls.getCorrectionField().forEach(correctionField -> { + correctionField.getCorrectionFieldValue().forEach(field -> { + // MASTER DETAILS VALIDATION + if (field.getField().equalsIgnoreCase("marriagePlacetype")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE).contains(field.getNewValue())) + errorMap.put(" MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("marriageDistrictid")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.DISTRICT).contains(field.getNewValue())) + errorMap.put(" DISTRICT NAME INVALID", "The district name of marriage place " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("marriageTalukID")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.TALUK).contains(field.getNewValue())) + errorMap.put(" TALUK NAME INVALID", "The taluk name of marriage place " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("marriageVillageName")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.VILLAGE).contains(field.getNewValue())) + errorMap.put(" VILLAGE NAME INVALID", "The village name of marriage place " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("marriageLBtype")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.LBTYPE).contains(field.getNewValue())) + errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + + field.getNewValue() + " is invalid"); + } + } + + //GROOM PERMANENT ADDRESS DETAILS VALIDATION + else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permtaddressCountry")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.COUNTRY).contains(field.getNewValue())) + errorMap.put("GROOM PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permtaddressStateName")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.STATE).contains(field.getNewValue())) + errorMap.put("GROOM PERMANENT ADDRESS: STATE NAME INVALID", "The state name of groom " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permntInKeralaAdrDistrict")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.DISTRICT).contains(field.getNewValue())) + errorMap.put("GROOM PERMANENT ADDRESS: DISTRICT NAME INVALID", "groom district inside kerala " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permntOutsideKeralaDistrict")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.DISTRICT).contains(field.getNewValue())) + errorMap.put("GROOM PERMANENT ADDRESS: DISTRICT INVALID", "groom district outside kerala is " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permntInKeralaAdrTaluk")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.TALUK).contains(field.getNewValue())) + errorMap.put("GROOM PERMANENT ADDRESS: TALUK NAME INVALID", "groom taluk inside kerala " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permntInKeralaAdrVillage")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.VILLAGE).contains(field.getNewValue())) + errorMap.put("GROOM PERMANENT ADDRESS: VILLAGE NAME INVALID", "groom village inside kerala " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permntInKeralaAdrLBName")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.TENANTS).contains(field.getNewValue())) + errorMap.put("GROOM PERMANENT ADDRESS: LB NAME INVALID", "groom lbname inside kerala " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permntInKeralaAdrPostOffice")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.POSTOFFICE).contains(field.getNewValue())) + errorMap.put("GROOM PERMANENT ADDRESS: POST OFFICE INVALID", "groom post office inside kerala is invalid" + + field.getNewValue() + " is invalid"); + } + } + + //BRIDE PERMANENT ADDRESS DETAILS VALIDATION + else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permtaddressCountry")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.COUNTRY).contains(field.getNewValue())) + errorMap.put("BRIDE PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of bride " + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permtaddressStateName")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.STATE).contains(field.getNewValue())) + errorMap.put("BRIDE PERMANENT ADDRESS: STATE NAME INVALID", "The state name of bride " + + field.getNewValue()+ " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permntInKeralaAdrDistrict")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.DISTRICT).contains(field.getNewValue())) + errorMap.put("BRIDE PERMANENT ADDRESS: DISTRICT NAME INVALID", "bride district inside kerala " + + field.getNewValue()+ " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permntOutsideKeralaDistrict")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.DISTRICT).contains(field.getNewValue())) + errorMap.put("BRIDE PERMANENT ADDRESS: DISTRICT INVALID", "bride district ouside kerala" + + field.getNewValue()+ " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permntInKeralaAdrTaluk")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.TALUK).contains(field.getNewValue())) + errorMap.put("BRIDE PERMANENT ADDRESS: TALUK NAME INVALID", "bride taluk inside kerala" + + field.getNewValue() + " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permntInKeralaAdrVillage")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.VILLAGE).contains(field.getNewValue())) + errorMap.put("BRIDE PERMANENT ADDRESS: VILLAGE NAME INVALID", "bride village inside kerala " + + field.getNewValue()+ " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permntInKeralaAdrLBName")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.TENANTS).contains(field.getNewValue())) + errorMap.put("BRIDE PERMANENT ADDRESS: LB NAME INVALID", "bride lbname inside kerala " + + field.getNewValue()+ " is invalid"); + } + } else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permntInKeralaAdrPostOffice")) { + if (field.getNewValue() != null) { + if (!masterData.get(MarriageConstants.POSTOFFICE).contains(field.getNewValue())) + errorMap.put("BRIDE PERMANENT ADDRESS: POST OFFICE INVALID", "bride post office inside kerala " + + field.getNewValue()+ " is invalid"); + } + } + }); + }); + }); + + if (!CollectionUtils.isEmpty(errorMap)) + throw new CustomException(errorMap); + + } + + private Map> getAttributeValues(Object mdmsdata) { + List modulepaths = Arrays.asList( + //MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH, + MarriageConstants.TENANT_JSONPATH, + MarriageConstants.COMMON_MASTER_JSONPATH, + MarriageConstants.BND_LIST_JSONPATH); + final Map> mdmsResMap = new HashMap<>(); + modulepaths.forEach(modulepath -> { + try { + mdmsResMap.putAll(JsonPath.read(mdmsdata, modulepath)); + } catch (Exception e) { + log.error("Error while fetching MDMS data", e); + throw new CustomException(MarriageConstants.INVALID_TENANT_ID_MDMS_KEY, + MarriageConstants.INVALID_TENANT_ID_MDMS_MSG); + } + + }); + return mdmsResMap; + } + + private void validateIfMasterPresent(String[] masterNames, Map> codes) { + Map errorMap = new HashMap<>(); + for (String masterName : masterNames) { + if (!codes.containsKey(masterName)) { + errorMap.put("MDMS DATA ERROR ", "Unable to fetch " + masterName + " codes from MDMS "); + } + } + if (!errorMap.isEmpty()) + throw new CustomException(errorMap); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index 8927a2adae0..3e87627d3d0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -2,6 +2,8 @@ import com.google.gson.Gson; import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionResponse; @@ -11,10 +13,7 @@ import org.ksmart.marriage.utils.ResponseInfoFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.lang.reflect.InvocationTargetException; @@ -67,5 +66,15 @@ public ResponseEntity registryUpdate(@RequestBody Ma .build(); return ResponseEntity.ok(response); } - + + +// @PostMapping(value = {"/searchmarriagecorrection"}) +// public ResponseEntity searchKsmartBirth(@RequestBody MarriageCorrectionRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { +// List marriageCorrectionAplnDetails=marriageCorrectionService.searchCorrectionDetails(request, criteria); +// MarriageCorrectionResponse response=MarriageCorrectionResponse.builder() +// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) +// .marriageDetails(marriageCorrectionAplnDetails) +// .build(); +// return ResponseEntity.ok(response); +// } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java index 4a25878501a..b99448554da 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -40,6 +40,9 @@ public class MarriageCorrectionDetails { @JsonProperty("workflowCode") private String workflowcode; @Size(max = 64) + @JsonProperty("registerId") + private String registerId; + @Size(max = 64) @JsonProperty("registrationno") private String registrationno; @JsonProperty("registration_date") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionResponse.java index 7d5c1335896..4a07a4a4ef3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionResponse.java @@ -3,6 +3,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.egov.common.contract.response.ResponseInfo; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; import org.springframework.validation.annotation.Validated; import javax.validation.Valid; @@ -24,6 +26,10 @@ public class MarriageCorrectionResponse { @Valid private List marriageCorrectionDetails; + @JsonProperty("marriageCertificate") + @Valid + private MarriageCertificate marriageCertificate; + public MarriageCorrectionResponse addCrMarriageDtl(MarriageCorrectionDetails marriageCorrection) { if (marriageCorrectionDetails == null) { marriageCorrectionDetails = new ArrayList<>(); @@ -31,4 +37,7 @@ public MarriageCorrectionResponse addCrMarriageDtl(MarriageCorrectionDetails mar marriageCorrectionDetails.add(marriageCorrection); return this; } + @JsonProperty("MarriageDetails") + private List marriageDetails; + } From 1e1d363b2ff5c03b99bbfd71b4a7d36d73c5ba93 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 17 Apr 2023 13:12:43 +0530 Subject: [PATCH 209/420] rowmapper change --- .../MarriageApplicationQueryBuilder.java | 3 ++- .../rowmapper/BrideDetailsRowMapper.java | 2 ++ .../rowmapper/GroomDetailsRowMapper.java | 2 ++ .../rowmapper/WitnessDetailsRowMapper.java | 18 +++++++++++++++++- .../web/model/marriage/BrideDetails.java | 2 +- .../web/model/marriage/MarriageDocument.java | 2 +- .../web/model/marriage/WitnessDetails.java | 6 +++--- .../MarriageRegistryQueryBuilder.java | 5 +++-- .../rowmapper/BrideRegistryRowMapper.java | 8 ++++++-- .../rowmapper/GroomRegistryRowMapper.java | 6 +++--- .../rowmapper/WitnessRegistryRowMapper.java | 11 ++++++++++- .../web/model/WitnessRegistryDetails.java | 7 ++++--- 12 files changed, 54 insertions(+), 18 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 94316e98eeb..0d09d0fc059 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -21,7 +21,8 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date ,") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") - .append("MD.applicationNumber as MD_applicationnumber ,") + .append("MD.applicationNumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java index 45259f1315d..a513eb66b1a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideDetailsRowMapper.java @@ -39,6 +39,8 @@ default BrideDetails getBrideDetails (ResultSet rs) throws SQLException{ .brideIsSpouseLiving(rs.getBoolean("BD_is_spouse_living")) .brideNoOfSpouse(rs.getInt("BD_livingspouseNo")) .brideGroom(rs.getString("BD_bride_groom")) + .marriageid(rs.getString("MD_id")) + .tenentId(rs.getString("MD_tenantid")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java index 748e8d5c87e..8adb40b6032 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomDetailsRowMapper.java @@ -41,6 +41,8 @@ default GroomDetails getGroomDetails (ResultSet rs) throws SQLException{ .groomIsSpouseLiving(rs.getBoolean("GD_is_spouse_living")) .groomNoOfSpouse(rs.getInt("GD_livingspouseNo")) .brideGroom(rs.getString("GD_bride_groom")) + .marriageid(rs.getString("MD_id")) + .tenentId(rs.getString("MD_tenantid")) .build(); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index 3ace0840ddd..70a8c9b30c9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -19,6 +19,7 @@ default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { .witness1AddressMl(rs.getString("WD1_address_ml")) .witness1Mobile(rs.getLong("WD1_mobile")) .witness1Esigned(rs.getBoolean("WD1_is_esigned")) + //.witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) .serialNo1(rs.getInt("WD1_serial_no")) .witnessId2(rs.getString("WD2_id")) .witness2AadharNo(rs.getString("WD2_aadharno")) @@ -28,8 +29,23 @@ default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { .witness2AddresSEn(rs.getString("WD2_address_en")) .witness2AddressMl(rs.getString("WD2_address_ml")) .witness2Mobile(rs.getLong("WD2_mobile")) + .serialNo2(rs.getInt("WD1_serial_no")) .witness2Esigned(rs.getBoolean("WD2_is_esigned")) - .serialNo2(rs.getInt("WD2_serial_no")) + .brideUrl(rs.getString("MD_brideurl")) + .groomUrl(rs.getString("MD_groomurl")) + .imageUuid(rs.getString("MD_imageuuid")) + .brideFilestoreId(rs.getString("MD_bride_filestoreid")) + .groomFilestoreId(rs.getString("MD_groom_filestoreid")) + // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) + .tenentId(rs.getString("MD_tenantid")) + .brideExpired(rs.getBoolean("MD_bride_expired")) + .brideUrl(rs.getString("MD_brideurl")) + .brideFilestoreId(rs.getString("MD_bride_filestoreid")) + .groomExpired(rs.getBoolean("MD_groom_expired")) + .groomUrl(rs.getString("MD_groomurl")) + .groomFilestoreId(rs.getString("MD_groom_filestoreid")) + .imageUuid(rs.getString("MD_imageuuid")) + .isBackward(rs.getBoolean("MD_is_backward")) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java index 04231428267..726a56acee6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java @@ -132,7 +132,7 @@ public class BrideDetails { private String maritalstatusid; @JsonProperty("brideIsSpouseLiving") - private boolean brideIsSpouseLiving; + private Boolean brideIsSpouseLiving; @JsonProperty("brideNoOfSpouse") private Integer brideNoOfSpouse; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java index baaef508417..a5a5cd4fd4e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java @@ -58,7 +58,7 @@ public class MarriageDocument { private Integer updatedFlag ; @JsonProperty("activeFalse") - private boolean activeFalse ; + private Boolean activeFalse ; @JsonProperty("auditDetails") private AuditDetails marriageDocAuditDetails ; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java index 0e008926002..ada923c6a31 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java @@ -118,13 +118,13 @@ public class WitnessDetails { private String groomFilestoreId; @JsonProperty("brideExpired") - private boolean brideExpired; + private Boolean brideExpired; @JsonProperty("groomExpired") - private boolean groomExpired; + private Boolean groomExpired; @JsonProperty("isBackward") - private boolean isBackward; + private Boolean isBackward; @JsonProperty("auditDetails") private AuditDetails witnessAuditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index f7bbcb95753..fe9eeb50dd4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -27,14 +27,15 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,") + .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") .append("GD.firstname_ml as GD_firstname_ml , GD.middlename_ml as GD_middlename_ml , GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,") .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") - .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.is_spouse_living as GD_is_spouse_living ,GD.bride_groom GD_bride_groom ,") + .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.is_spouse_living as GD_is_spouse_living ,GD.bride_groom GD_bride_groom ,") .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index 0c4d5387d37..e065fa18333 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -15,6 +15,7 @@ public interface BrideRegistryRowMapper { default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ return BrideRegistryDetails.builder() + .brideId(rs.getString("BD_id")) .residentship(rs.getString("BD_residentship")) .aadharno(rs.getString("BD_aadharno")) .passportno(rs.getString("BD_passportno")) @@ -46,8 +47,11 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ // .brideNoOfSpouse(Integer.valueOf(rs.getString("BD_livingspouseNo"))) .brideNoOfSpouse(rs.getInt("BD_livingspouseNo")) //.photo_url(rs.getString("BD_photo_url")) - // .marriageid(rs.getString("BD_marriageid")) - .build(); + .marriageid(rs.getString("MD_id")) + .tenentId(rs.getString("MD_tenantid")) + + + .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index 70513899454..c4e50f2bdaf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -10,7 +10,7 @@ public interface GroomRegistryRowMapper { default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ return GroomRegistryDetails.builder() - // .groomId(rs.getString("GD_id")) + .groomId(rs.getString("GD_id")) .residentship(rs.getString("GD_residentship")) .aadharno(rs.getString("GD_aadharno")) .passportno(rs.getString("GD_passportno")) @@ -43,9 +43,9 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ .groomIsSpouseLiving(rs.getBoolean("GD_is_spouse_living")) // .groomNoOfSpouse(Integer.valueOf(rs.getString("GD_livingspouseNo"))) .groomNoOfSpouse(rs.getInt("GD_livingspouseNo")) - // .marriageid(rs.getString("GD_marriageid")) + .marriageid(rs.getString("MD_id")) // .photo_url(rs.getString("GD_photo_url")) - + .tenentId(rs.getString("MD_tenantid")) .build(); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index 5e6b2eec8ce..a245b717de8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -11,7 +11,7 @@ public interface WitnessRegistryRowMapper { default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { return WitnessRegistryDetails.builder() - // .marriageid(rs.getString("MD_id")) + .marriageid(rs.getString("MD_id")) .witnessId1(rs.getString("WD1_id")) .witness1AadharNo(rs.getString("WD1_aadharno")) .witness1NameEn(rs.getString("WD1_name_en")) @@ -39,6 +39,15 @@ default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLExcepti .brideFilestoreId(rs.getString("MD_bride_filestoreid")) .groomFilestoreId(rs.getString("MD_groom_filestoreid")) // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) + .tenentId(rs.getString("MD_tenantid")) + .brideExpired(rs.getBoolean("MD_bride_expired")) + .brideUrl(rs.getString("MD_brideurl")) + .brideFilestoreId(rs.getString("MD_bride_filestoreid")) + .groomExpired(rs.getBoolean("MD_groom_expired")) + .groomUrl(rs.getString("MD_groomurl")) + .groomFilestoreId(rs.getString("MD_groom_filestoreid")) + .imageUuid(rs.getString("MD_imageuuid")) + .isBackward(rs.getBoolean("MD_is_backward")) .build(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java index 17c36bf90bc..843a1f291d2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java @@ -121,13 +121,14 @@ public class WitnessRegistryDetails { private String groomFilestoreId; @JsonProperty("brideExpired") - private boolean brideExpired; + private Boolean brideExpired; @JsonProperty("groomExpired") - private boolean groomExpired; + private Boolean groomExpired; @JsonProperty("isBackward") - private boolean isBackward; + private Boolean isBackward; + @JsonProperty("AuditDetails") private AuditDetails WitnessAuditDetails; From 88784a5ed6098cbab9329da25089d27d8e87edfa Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 17 Apr 2023 13:50:57 +0530 Subject: [PATCH 210/420] rowmapper change --- .../repository/rowmapper/BrideAddressDetailsRowMapper.java | 2 ++ .../repository/rowmapper/GroomAddressDetailsRowMapper.java | 2 ++ .../repository/rowmapper/BrideRegistryAddressRowMapper.java | 4 ++-- .../repository/rowmapper/BrideRegistryRowMapper.java | 1 + .../repository/rowmapper/GroomRegistryAddressRowMapper.java | 4 ++-- .../repository/rowmapper/GroomRegistryRowMapper.java | 1 + 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index b65e4b5a3c1..d4f6b6dce50 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -49,6 +49,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) + .brideGroomPresent(rs.getString("BPSA_bride_groom")) // PERMANENT @@ -91,6 +92,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) .permntOutSideIndiaProvinceMl(rs.getString("BPMA_ot_state_region_province_ml")) .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) + .brideGroomPermanent(rs.getString("BPMA_bride_groom")) // .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 268d41354fe..50fcda99953 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -49,6 +49,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) .presentOutSideIndiaPostCode(rs.getString("GPSA_ot_zipcode")) + .brideGroomPresent(rs.getString("GPSA_bride_groom")) @@ -94,6 +95,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) + .brideGroomPermanent(rs.getString("GPMA_bride_groom")) // .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java index d6ba3659fef..7f389adb430 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java @@ -51,7 +51,7 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) - + .brideGroomPresent(rs.getString("BPSA_bride_groom")) // PERMANENT @@ -93,7 +93,7 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) .permntOutSideIndiaProvinceMl(rs.getString("BPMA_ot_state_region_province_ml")) .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) - + .brideGroomPermanent(rs.getString("BPMA_bride_groom")) // .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index e065fa18333..585aa1fbd89 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -49,6 +49,7 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ //.photo_url(rs.getString("BD_photo_url")) .marriageid(rs.getString("MD_id")) .tenentId(rs.getString("MD_tenantid")) + .brideGroom(rs.getString("BD_bride_groom")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java index 92bea138c49..5f45c7ee214 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -47,7 +47,7 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) .presentOutSideIndiaPostCode(rs.getString("GPSA_ot_zipcode")) - + .brideGroomPresent(rs.getString("GPSA_bride_groom")) @@ -92,7 +92,7 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) - + .brideGroomPermanent(rs.getString("GPMA_bride_groom")) // .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java index c4e50f2bdaf..98af7b1ba99 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryRowMapper.java @@ -45,6 +45,7 @@ default GroomRegistryDetails getGroomDetails (ResultSet rs) throws SQLException{ .groomNoOfSpouse(rs.getInt("GD_livingspouseNo")) .marriageid(rs.getString("MD_id")) // .photo_url(rs.getString("GD_photo_url")) + .brideGroom(rs.getString("GD_bride_groom")) .tenentId(rs.getString("MD_tenantid")) .build(); } From 2dd69413cd53fa793be8f73f5f47decc7cca9625 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 17 Apr 2023 14:02:47 +0530 Subject: [PATCH 211/420] application search updation --- .../enrichment/MarriageDetailsEnrichment.java | 4 +++- .../querybuilder/BaseMarriageQueryBuilder.java | 10 ++++++++++ .../MarriageApplicationQueryBuilder.java | 3 ++- .../MarriageApplicationSearchCriteria.java | 3 +++ .../src/main/resources/application.properties | 15 ++++++++------- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 0541fcc8f1e..53eb0a14948 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -176,10 +176,11 @@ public void enrichUpdate(MarriageDetailsRequest request) { criteria.setDocumentType(documentType); criteria.setDocumentOwner(documentOwner); criteria.setTenantId(marriage.getTenantid()); + criteria.setActive(true); document.setActiveFalse(true); List searchResult = repository.getDocumentDetails(criteria,requestInfo); - // document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); + document.setUpdatedFlag( MarriageConstants.VALUE_FALSE); if(searchResult!=null){ searchResult.forEach(existingDocument -> { if(document.getFileStoreId().equals(existingDocument.getFileStoreId())){ @@ -188,6 +189,7 @@ public void enrichUpdate(MarriageDetailsRequest request) { else{ document.setUpdatedFlag( MarriageConstants.VALUE_TRUE); document.setActiveFalse(false); + criteria.setActive(false); } }); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java index 20d1b899b3e..d4625b18385 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java @@ -62,6 +62,16 @@ void addFilter(String column, String value, StringBuilder query, List pa paramValues.add(value); } } + + + void checkFilter(String column, Boolean value, StringBuilder query, List paramValues) { + // if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + // } + } void addFilterDate(String column, Long value, StringBuilder query, List paramValues) { if (value != null) { addWhereClause(paramValues, query); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 94316e98eeb..e87c4320eb6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -171,7 +171,8 @@ public String getMarriageDocumentQuery(MarriageApplicationSearchCriteria criteri addFilter("applicationnumber", criteria.getApplicationNo(), query, preparedStmtValues); addFilter("applicationtype", criteria.getApplicationType(), query, preparedStmtValues); addFilter("tenantid", criteria.getTenantId(), query, preparedStmtValues); - addFilter("active", "true", query, preparedStmtValues); + checkFilter("active", criteria.getActive(), query, preparedStmtValues); + //addFilter("active", "true", query, preparedStmtValues); return query.toString(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java index 79b5823101c..f710bd60540 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java @@ -32,6 +32,9 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("marriageDOM") private Long marriageDOM; + @JsonProperty("active") + private Boolean active; + //Groom @JsonProperty("groomFirstnameEn") private String groomFirstnameEn; diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index f840bc05c88..b7e8dcc5e24 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true @@ -61,8 +61,8 @@ egov.idgen.path=egov-idgen/id/_generate #workflow configurations egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition -egov.workflow.host=https://ksmart-dev.lsgkerala.gov.in/ -# egov.workflow.host=http://localhost:8280 +# egov.workflow.host=https://ksmart-dev.lsgkerala.gov.in/ + egov.workflow.host=http://localhost:8280 #birth and death idFormat config egov.idgen.marriageapplnum.name=birth_cert.receipt.id @@ -128,13 +128,14 @@ egov.url.shortner.endpoint=/egov-url-shortening/shortener egov.state.level.tenant.id=kl #decryption enable -decryption.abac.enabled=false +decryption.abac.enabled=true #egov-encrypt service configs # egov.enc.host=http://localhost:1234 -egov.enc.host=https://ksmart-dev.lsgkerala.gov.in +egov.enc.host=http://localhost:1234 +# egov.enc.host=https://ksmart-dev.lsgkerala.gov.in egov.enc.encrypt.endpoint=/egov-enc-service/crypto/v1/_encrypt -# egov.enc.decrypt.endpoint=/egov-enc-service/crypto/v1/_decrypt +egov.enc.decrypt.endpoint=/egov-enc-service/crypto/v1/_decrypt #testing tenants egov.bnd.freedownload.tenants=kl From d89866dd8764b556595f998a55aedc75067da36e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 17 Apr 2023 14:14:49 +0530 Subject: [PATCH 212/420] application search updation --- .../enrichment/MarriageDetailsEnrichment.java | 1 + .../querybuilder/MarriageApplicationQueryBuilder.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 53eb0a14948..72367329ada 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -168,6 +168,7 @@ public void enrichUpdate(MarriageDetailsRequest request) { criteria.setApplicationType(applicationType); // String registrationNumber = marriage.getRegistrationNo(); //Jasmine 07.04.2023 + //Updated on 17.04.2023 List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ marriagedocument.forEach(document -> { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index cd098fb237b..75707c144c2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -173,7 +173,7 @@ public String getMarriageDocumentQuery(MarriageApplicationSearchCriteria criteri addFilter("applicationtype", criteria.getApplicationType(), query, preparedStmtValues); addFilter("tenantid", criteria.getTenantId(), query, preparedStmtValues); checkFilter("active", criteria.getActive(), query, preparedStmtValues); - //addFilter("active", "true", query, preparedStmtValues); + //addFilter("active", "TRUE", query, preparedStmtValues); return query.toString(); } From 47f1160bf04825235d78053600ea37fa4add905f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 17 Apr 2023 15:45:55 +0530 Subject: [PATCH 213/420] rowmapper changes --- .../querybuilder/MarriageApplicationQueryBuilder.java | 2 +- .../repository/rowmapper/BrideAddressDetailsRowMapper.java | 1 + .../repository/rowmapper/GroomAddressDetailsRowMapper.java | 4 ++-- .../repository/rowmapper/MarriageApplicationRowMapper.java | 1 + .../service/MarriageRegistryRequestService.java | 2 +- .../enrichment/MarriageRegistryEnrichment.java | 2 +- .../repository/querybuilder/MarriageRegistryQueryBuilder.java | 2 +- .../repository/rowmapper/BrideRegistryRowMapper.java | 4 +--- .../repository/rowmapper/MarriageRegistryRowMapper.java | 3 ++- .../marriageregistry/web/model/MarriageRegistryDetails.java | 4 ++-- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 75707c144c2..e6fe4b973dd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -22,7 +22,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date ,") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationNumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index d4f6b6dce50..44357b503f7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -94,6 +94,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) .brideGroomPermanent(rs.getString("BPMA_bride_groom")) + // .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 50fcda99953..edc0ffbcbe6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -32,7 +32,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentWardNo(rs.getString("GPSA_ward_code")) .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) - // .presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name ")) +// .presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name ")) .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) @@ -76,7 +76,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) - // .permntOutsideKeralaVillage(rs.getString("GPMA_village_name")) + .permntOutsideKeralaVillage(rs.getString("GPMA_village_name")) .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) .permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) .permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 225f87e9f0f..11d0aef9a54 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -42,6 +42,7 @@ public List extractData(ResultSet rs) throws SQLExce .applicationNumber(rs.getString("MD_applicationnumber")) .registrationDate(rs.getLong("MD_registration_date")) .registrationNo(rs.getString("MD_registrationno")) + .moduleCode(rs.getString("MD_module_code")) // .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index 44b97757a78..83c387957e6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -53,7 +53,7 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr registerMarriageDetail.setAction(Marriagerequest.getMarriageDetails().get(0).getAction()); registerMarriageDetail.setStatus(Marriagerequest.getMarriageDetails().get(0).getStatus()); registerMarriageDetail.setApplicationtype(Marriagerequest.getMarriageDetails().get(0).getApplicationtype()); - registerMarriageDetail.setModulecode(Marriagerequest.getMarriageDetails().get(0).getModuleCode()); + registerMarriageDetail.setModuleCode(Marriagerequest.getMarriageDetails().get(0).getModuleCode()); registerMarriageDetail.setBrideDetails(brideRegistryDetails(Marriagerequest)); registerMarriageDetail.setGroomDetails(groomRegistryDetails(Marriagerequest)); registerMarriageDetail.setWitnessDetails(witnessRegistryDetails(Marriagerequest)); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 8a5680df451..d844536b856 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -101,7 +101,7 @@ private void setRegistrationNumber(MarriageRegistryRequest request) { List filecodes = getIds(requestInfo, tenantId, config.getGetMarriageRegNumberName(), - request.getMarriageDetails().get(0).getModulecode(), + request.getMarriageDetails().get(0).getModuleCode(), "REG", marriageDetails.size()); validateFileCodes(filecodes, marriageDetails.size()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index fe9eeb50dd4..fbf65ed5309 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -27,7 +27,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java index 585aa1fbd89..4f360bb9944 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryRowMapper.java @@ -50,9 +50,7 @@ default BrideRegistryDetails getBrideDetails (ResultSet rs) throws SQLException{ .marriageid(rs.getString("MD_id")) .tenentId(rs.getString("MD_tenantid")) .brideGroom(rs.getString("BD_bride_groom")) - - - .build(); + .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index bc0fd53060e..603cfab0dcc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -48,6 +48,7 @@ public List extractData(ResultSet rs) throws SQLExcepti .registrationDate(rs.getLong("MD_registration_date")) .registrationno(rs.getString("MD_registrationno")) .status(rs.getString("MD_registration_status")) + .moduleCode(rs.getString("MD_module_code")) .brideDetails(getBrideDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomDetails(getGroomDetails(rs)) @@ -59,4 +60,4 @@ public List extractData(ResultSet rs) throws SQLExcepti return result; } -} \ No newline at end of file +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java index 694a79663ec..455a7e07154 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java @@ -179,8 +179,8 @@ public class MarriageRegistryDetails { @JsonProperty("applicationNumber") private String applicationNumber; - @JsonProperty("modulecode") - private String modulecode; + @JsonProperty("moduleCode") + private String moduleCode; @JsonProperty("BrideDetails") private BrideRegistryDetails brideDetails; From c6b7036aedaab4039f66b3298d321f847055fdfb Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 18 Apr 2023 13:05:16 +0530 Subject: [PATCH 214/420] application search updation --- .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../service/DemandService.java | 102 ++++++++++++++++++ .../service/MarriageCorrectionService.java | 4 +- .../MarriageRegistryRepository.java | 19 ++-- .../service/MarriageRegistryService.java | 7 -- .../marriage/utils/MarriageConstants.java | 1 + 6 files changed, 116 insertions(+), 19 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 72367329ada..daef4ccf9cb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -677,7 +677,7 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { tenantId, config.getMarriageApplNumberIdName(), request.getMarriageDetails().get(0).getModuleCode(), - "APPL", + "ACK", marriageDetails.size()); validateFileCodes(filecodes, marriageDetails.size()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java new file mode 100644 index 00000000000..fbacb56bcbe --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java @@ -0,0 +1,102 @@ +package org.ksmart.marriage.marriageapplication.service; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.egov.common.contract.request.RequestInfo; +import org.egov.mdms.model.MasterDetail; +import org.egov.mdms.model.MdmsCriteria; +import org.egov.mdms.model.MdmsCriteriaReq; +import org.egov.mdms.model.ModuleDetail; +import org.ksmart.marriage.common.repository.ServiceRequestRepository; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; +import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; +import org.ksmart.marriage.marriageapplication.web.model.Demand.DemandDetail; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WorkFlowCheck; +import org.ksmart.marriage.utils.MarriageConstants; +// import org.ksmart.death.common.repository.ServiceRequestRepository; +// import org.ksmart.death.deathapplication.config.DeathConfiguration; +// import org.ksmart.death.deathapplication.enrichment.DeathEnrichment; +// import org.ksmart.death.deathapplication.web.models.WorkFlowCheck; +// import org.ksmart.death.deathapplication.web.models.Demand.Demand; +// import org.ksmart.death.deathapplication.web.models.Demand.DemandDetail; +// import org.ksmart.death.utils.BirthDeathConstants; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.jayway.jsonpath.JsonPath; +/** + * Creates DemandService + * RAkhi S on 28.03.2023 + * + */ + +@Service +public class DemandService { + + public static final String TAX_MASTER = "TaxHeadMaster"; + + public static final String TAX_MASTER_JSONPATH_CODE = "$.MdmsRes.BillingService.TaxHeadMaster[?(@.code==\"{}\")]"; + + @Autowired + MarriageApplicationConfiguration config; + + @Autowired + ServiceRequestRepository serviceRequestRepository; + + @Autowired + MarriageDetailsEnrichment enrichmentService; + + public List saveDemandDetails(List demands, RequestInfo requestInfo, WorkFlowCheck wfc) { + demands.forEach(demand -> setDemandParamsLateFee(demand, requestInfo, wfc)); + return enrichmentService.saveDemand(requestInfo,demands); + } + public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkFlowCheck wfc) { + demand.setConsumerType("FEE"); + demand.setBusinessService("CR"); + ArrayList demandDetails = new ArrayList<>(); + DemandDetail demandDetail=new DemandDetail(); + demandDetail.setTaxHeadMasterCode("CRB_FEES"); + demandDetail.setTaxAmount(new BigDecimal(wfc.getAmount())); + demandDetail.setTenantId(demand.getTenantId()); + setGLCode(demandDetail, requestInfo); + demandDetails.add(demandDetail); + demand.setDemandDetails(demandDetails); + demand.setPayer(requestInfo.getUserInfo()); + demand.setTaxPeriodFrom(System.currentTimeMillis()); + demand.setTaxPeriodTo(System.currentTimeMillis()+86400000); + demand.setMinimumAmountPayable(new BigDecimal(12)); + } + + private ModuleDetail getGLCodeRequest() { + List masterDetails = new ArrayList<>(); + masterDetails.add(MasterDetail.builder().name(TAX_MASTER).build()); + return ModuleDetail.builder().masterDetails(masterDetails) + .moduleName(MarriageConstants.BILLING_SERVICE).build(); + } + + public void setGLCode(DemandDetail demandDetail, RequestInfo requestInfo) { + String tenantId = demandDetail.getTenantId(); + ModuleDetail glCodeRequest = getGLCodeRequest(); + List moduleDetails = new LinkedList<>(); + moduleDetails.add(glCodeRequest); + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(tenantId) + .build(); + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + + StringBuilder url = new StringBuilder().append(config.getMdmsHost()).append(config.getMdmsEndPoint()); + + Object result = serviceRequestRepository.fetchResult(url, mdmsCriteriaReq); + String jsonPath = TAX_MASTER_JSONPATH_CODE.replace("{}",demandDetail.getTaxHeadMasterCode()); + List> jsonOutput = JsonPath.read(result, jsonPath); + if(!jsonOutput.isEmpty()) { + Map glCodeObj = jsonOutput.get(0); + demandDetail.setAdditionalDetails(glCodeObj); + } + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index d654754af56..9797a2d4bf1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -153,8 +153,8 @@ public List updateMarriageCorrectionDetails(MarriageC String applicationNumber = request.getMarriageCorrectionDetails().get(0).getApplicationNo(); MarriageApplicationSearchCriteria criteria = (MarriageApplicationSearchCriteria.builder() - .applicationNo(applicationNumber) - .build()); + .applicationNo(applicationNumber) + .build()); List searchResult = applnRepository.getMarriageApplication(criteria, request.getRequestInfo()); correctionValidatorService.validateCorrectionUpdate(request, searchResult); if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 26035c4e8bc..b8b65550edd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -121,7 +121,7 @@ public List searchCertificateByMarriageId(String id) { public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marriageCertPDFRequest) { MarriageCertPdfResponse pdfResponse = new MarriageCertPdfResponse(); - try { + // try { // marriagecertpdfrequest.getmarriagecertificate().foreach(cert->{ // string uihost = marriageapplicationconfiguration.getuiapphost(); // string marriagecertpath = stringutils.replaceeach(marriageapplicationconfiguration.getmarriagecertlink(),new string[]{"$id","$tenantid","$regno","$marriagecertificateno"}, new string[]{cert.getid(),cert.gettenantid(),cert.getregistrationno(),cert.getmarriagecertificateno()}); @@ -170,12 +170,13 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); - System.out.println(marriageAddr); + System.out.println("PlaceAddress"+marriageAddr); }else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) || req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) { + System.out.println("Enter Mandapam"); if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid())) { Object mdmsMarriagePlaceData1 = util.mDMSCallGetMandapamAddress(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); System.out.println(mdmsMarriagePlaceData1); @@ -200,7 +201,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria util.appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsMap), marriageAddr, true); Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); - System.out.println(marriageAddr); + System.out.println("MandapammarriageAddr"+marriageAddr); } } } @@ -268,7 +269,7 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKerala).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); - req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); //Setting groom NRI address //Setting bride address data from MDMS @@ -313,11 +314,11 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla pdfResponse.setFilestoreIds(response.getFilestoreIds()); }); - }catch (Exception e){ - e.printStackTrace(); - System.out.println(e.getMessage()); - throw new CustomException("PDF_ERROR","Error in generating PDF"+e.getMessage()); - } + // }catch (Exception e){ + // e.printStackTrace(); + // System.out.println(e.getMessage()); + // throw new CustomException("PDF_ERROR","Error in generating PDF"+e.getMessage()); + // } return pdfResponse; } public String getShortenedUrl(String url) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 5b6634396a3..8a142e030de 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -63,18 +63,11 @@ public List createRegistry(MarriageRegistryRequest requ } - - // public List updateRegistry(MarriageRegistryRequest request) { - - // return repository.updateMarriageRegistry(request); - // } - public List searchRegistry(MarriageRegistrySearchCriteria criteria) { return repository.searchMarriageRegistry(criteria); } - public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria); if (marriageRegistryDetailsList != null && !marriageRegistryDetailsList.isEmpty()) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index d8454471b1c..dbbbd40aa35 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -167,4 +167,5 @@ public class MarriageConstants { public static final String MARRIAGE_PLACE_DIST_ID = "distId"; public static final String MARRIAGE_PLACE_STATE_ID = "stateid"; public static final String MARRIAGE_PLACE_TENENT_CODE = "tenentCode"; + public static final String BILLING_SERVICE = "BillingService"; } From d66453fa2add7ef816fa13f33ffe2eb5b256159c Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 18 Apr 2023 13:19:45 +0530 Subject: [PATCH 215/420] changes in marriage registry yml added certificate number --- .../src/main/resources/marriage-registry.yml | 63 ++++++++++++++++++- .../MarriageCertificateEnrichment.java | 28 ++++----- .../MarriageRegistryEnrichment.java | 24 +++++++ .../MarriageRegistryRepository.java | 16 ++--- .../service/MarriageRegistryService.java | 2 +- 5 files changed, 109 insertions(+), 24 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index c5c188eb18f..3f04ed5a1a9 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, housenameno_en, housenameno_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationnumber, registrationno, registration_date, registration_status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?,? ); + lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward,certificateno) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?,? ,?); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -99,6 +99,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.groomExpired - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + - jsonPath: $.MarriageDetails.*.certificateNo - query: UPDATE eg_marriage_details SET registrationno = ? ,registration_date = ? WHERE applicationnumber = ? AND tenantid = ? @@ -663,6 +664,64 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + - version: 1.0 + description: Persists save marriage certificate details in marriage certificate table + fromTopic: save-marriagecertificate-topic + isTransaction: true + queryMaps: + - query: INSERT INTO public.eg_marriage_certificate + (id, registrationno, registrydetailsid, filestoreid, status,embeddedurl, dateofissue, tenantid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); + basePath: marriageCertificate + jsonMaps: + - jsonPath: $.marriageCertificate.id + + - jsonPath: $.marriageCertificate.registrationno + + - jsonPath: $.marriageCertificate.marriageRegistryDetails.id + + - jsonPath: $.marriageCertificate.filestoreid + + - jsonPath: $.marriageCertificate.certificateStatus + + - jsonPath: $.marriageCertificate.embeddedUrl + + - jsonPath: $.marriageCertificate.dateOfIssue + + - jsonPath: $.marriageCertificate.marriageRegistryDetails.marriageTenantid + + - jsonPath: $.marriageCertificate.AuditDetails.createdTime + + - jsonPath: $.marriageCertificate.AuditDetails.createdBy + + - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedTime + + - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedBy + + - version: 1.0 + description: Persists update marriage certificate details in marriage certificate table + fromTopic: update-marriagecertificate-topic + isTransaction: true + queryMaps: + - query: UPDATE public.eg_marriage_certificate + set filestoreid=? , embeddedurl=?, dateofissue=?, lastmodifiedtime=?, lastmodifiedby=? where id=? and registrydetailsid=?; + basePath: marriageCertificate + jsonMaps: + - jsonPath: $.marriageCertificate.filestoreid + + - jsonPath: $.marriageCertificate.embeddedUrl + + - jsonPath: $.marriageCertificate.dateOfIssue + + - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedTime + + - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedBy + + - jsonPath: $.marriageCertificate.id + + - jsonPath: $.marriageCertificate.marriageRegistryId + + # serviceMaps: # serviceName: marriage-services # mappings: diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java index fb7d36ae9cd..2ee48c8ca62 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java @@ -46,20 +46,20 @@ public void enrichUpdate(MarriageCertRequest request) { } - public void createCertificateNo(MarriageCertRequest marriageCertRequest){ - RequestInfo requestInfo = marriageCertRequest.getRequestInfo(); - Long currentTime = Long.valueOf(System.currentTimeMillis()); - String tenantId = marriageCertRequest.getMarriageCertificate().getMarriageRegistryDetails().getTenantid(); - - List ackNoDetails = idGenRepository.getIdList(requestInfo, - tenantId, - config.getGetMarriageCertificateName(), - marriageCertRequest.getMarriageCertificate().getModulecode(), - "CERT",1); - ListIterator itr = ackNoDetails.listIterator(); - marriageCertRequest.getMarriageCertificate().setMarriagecertificateno(itr.next()); - marriageCertRequest.getMarriageCertificate().setDateofissue(currentTime); - } +// public void createCertificateNo(MarriageCertRequest marriageCertRequest){ +// RequestInfo requestInfo = marriageCertRequest.getRequestInfo(); +// Long currentTime = Long.valueOf(System.currentTimeMillis()); +// String tenantId = marriageCertRequest.getMarriageCertificate().getMarriageRegistryDetails().getTenantid(); +// +// List ackNoDetails = idGenRepository.getIdList(requestInfo, +// tenantId, +// config.getGetMarriageCertificateName(), +// marriageCertRequest.getMarriageCertificate().getModulecode(), +// "CERT",1); +// ListIterator itr = ackNoDetails.listIterator(); +// marriageCertRequest.getMarriageCertificate().setMarriagecertificateno(itr.next()); +// marriageCertRequest.getMarriageCertificate().setDateofissue(currentTime); +// } // private void setCertificateNumber(MarriageCertRequest marriageCertRequest) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index d844536b856..6ed4dcc3d50 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -12,6 +12,7 @@ // import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetail; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; +import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertRequest; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; import org.ksmart.marriage.utils.IDGenerator; import org.ksmart.marriage.utils.MarriageConstants; @@ -90,6 +91,7 @@ public void enrichCreate(MarriageRegistryRequest request) { setBridePresentAddress(request); setGroomPermanentAddress(request); setGroomPresentAddress(request); + createCertificateNo(request); } private void setRegistrationNumber(MarriageRegistryRequest request) { @@ -811,6 +813,28 @@ public String getValueFromMap(String key,Map> mdmsMap){ return null; } + public void createCertificateNo(MarriageRegistryRequest marriageRegistryRequest) { + if (null != marriageRegistryRequest) { + if (null != marriageRegistryRequest.getMarriageDetails() && marriageRegistryRequest.getMarriageDetails().size() > 0) { + marriageRegistryRequest.getMarriageDetails().forEach(e-> { + + + RequestInfo requestInfo = marriageRegistryRequest.getRequestInfo(); + Long currentTime = Long.valueOf(System.currentTimeMillis()); + String tenantId = marriageRegistryRequest.getMarriageDetails().get(0).getTenantid(); + + List ackNoDetails = idGenRepository.getIdList(requestInfo, + tenantId, + config.getGetMarriageCertificateName(), + e.getModuleCode(), + "CERT", 1); + ListIterator itr = ackNoDetails.listIterator(); + e.setCertificateNo(itr.next()); +// e.setDateofIssue(currentTime); + }); + } + } + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 26035c4e8bc..8633abaff55 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -1,5 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository; +import com.google.gson.Gson; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.egov.common.contract.request.RequestInfo; @@ -292,18 +293,19 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); - - } - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); - } +// if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); +// +// } +// if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); +// } marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; String marriageCertPath = StringUtils.replace(marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(),"$tenantId", tenantId); String pdfFinalPath = uiHost + marriageCertPath; + System.out.println(new Gson().toJson(req)); MarriageCertPdfResponse response = restTemplate.postForObject(pdfFinalPath, req, MarriageCertPdfResponse.class);//Creating PDF if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 5b6634396a3..4904b314fe6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -118,7 +118,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req Calendar cal = Calendar.getInstance(); marriageCertificate.setDateofissue(cal.getTimeInMillis()); marriageCertificate.setEmbeddedUrl(marriageCertPDFRequest.getMarriageCertificate().get(0).getEmbeddedUrl()); - //marriageCertificateEnrichment.createCertificateNo(marriageCertRequest); //TODO check IdGenError + // marriageCertificateEnrichment.createCertificateNo(marriageCertRequest); //TODO check IdGenError MarriageCertPdfResponse pdfResp = repository.saveMarriageCertPdf(marriageCertPDFRequest); // marriageCertificate.setDateofissue(marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getRegistrationDate()); marriageCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); From 945cba820e53af32d2729cb7f826a44c79da3363 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 18 Apr 2023 13:21:45 +0530 Subject: [PATCH 216/420] migration for new feild --- .../V20231804131005__addNewfeild_new_dll.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql new file mode 100644 index 00000000000..686013b1a47 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql @@ -0,0 +1,19 @@ +ALTER TABLE public.eg_marriage_permanent_address_details +ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_permanent_address_details_audit +ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_permanent_address_details +ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_permanent_address_details_audit +ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file From b1c6a57afc64e71e346b4feb39c65185b7f389db Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 18 Apr 2023 13:35:39 +0530 Subject: [PATCH 217/420] application search updation --- .../web/controller/MarriageRegistryController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index 81a9d07d89a..82c0698237a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -56,7 +56,7 @@ public ResponseEntity saveMarriageDetails(@RequestBody public ResponseEntity search(@RequestBody MarriageRegistryRequest request, @ModelAttribute MarriageRegistrySearchCriteria criteria) { - int registryCount=registryRepository.getMarriageRegistryCount(criteria); + int registryCount=registryRepository.getMarriageRegistryCount(criteria); List marriageDetails = marriageService.searchRegistry(criteria); From e65e3e8eff62e8a83fa85e6413db9fd941d1678e Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Tue, 18 Apr 2023 14:37:56 +0530 Subject: [PATCH 218/420] Marriage correction search --- .../main/resources/marriage-correction.yml | 668 +----------------- .../MarriageApplicationConfiguration.java | 3 - .../web/enums/ErrorCodes.java | 3 +- .../MarriageCorrectionEnrichment.java | 14 +- .../MarriageCorrectionRepository.java | 39 +- .../CorrectionApplicationQueryBuilder.java | 54 ++ .../CorrectionApplicationRowMapper.java | 182 +++++ .../service/MarriageCorrectionService.java | 97 ++- .../MarriageCorrectionController.java | 36 +- .../web/model/CorrectionDocument.java | 4 + .../service/MarriageRegistryService.java | 50 +- .../marriage/workflow/WorkflowIntegrator.java | 2 +- .../src/main/resources/application.properties | 1 - 13 files changed, 419 insertions(+), 734 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/querybuilder/CorrectionApplicationQueryBuilder.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/rowmapper/CorrectionApplicationRowMapper.java diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 00961c85205..f1c156f0927 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -510,7 +510,6 @@ serviceMaps: fromTopic: correction-update-marriage-application-topic isTransaction: true queryMaps: - - query: INSERT INTO public.eg_marriage_details_audit SELECT * FROM public.eg_marriage_details WHERE id =? and tenantid=? AND applicationnumber = ? ; basePath: MarriageDetails.* @@ -522,7 +521,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.applicationNumber - query: UPDATE public.eg_marriage_details SET businessservice = ? ,action = ? , status = ? ,lastmodifiedtime = ? ,lastmodifiedby= ? - WHERE id = ? AND tenantid = ? AND applicationnumber = ? + WHERE id = ? AND tenantid = ? AND applicationnumber = ? ; basePath: MarriageDetails.* jsonMaps: @@ -543,671 +542,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.applicationNumber -# - version: 1.0 -# description: Persists save marriage details in marriage table -# fromTopic: update-marriage-application-topic -# isTransaction: true -# queryMaps: -# -# - query: INSERT INTO public.eg_marriage_details_audit SELECT * FROM public.eg_marriage_details WHERE id =? and tenantid=?; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# - query: UPDATE public.eg_marriage_details -# SET dateofmarriage=?, dateofreporting=?, districtid=?, lbtype=?, placetype=?, placeid=?, placename_en=?, -# placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, -# marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, -# registrationno=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? -# WHERE id=? and applicationnumber=? and tenantid=?; -# basePath: MarriageDetails.* -# jsonMaps: -# -# - jsonPath: $.MarriageDetails.*.marriageDOM -# -# - jsonPath: $.MarriageDetails.*.marriageDOR -# -# - jsonPath: $.MarriageDetails.*.marriageDistrictid -# -# - jsonPath: $.MarriageDetails.*.marriageLBtype -# -# - jsonPath: $.MarriageDetails.*.marriagePlacetype -# -# - jsonPath: $.MarriageDetails.*.placeid -# -# - jsonPath: $.MarriageDetails.*.marriagePlacenameEn -# -# - jsonPath: $.MarriageDetails.*.marriagePlacenameMl -# -# - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn -# -# - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl -# -# - jsonPath: $.MarriageDetails.*.marriageStreetEn -# -# - jsonPath: $.MarriageDetails.*.marriageStreetMl -# -# - jsonPath: $.MarriageDetails.*.marriageWardCode -# -# - jsonPath: $.MarriageDetails.*.marriageTalukID -# -# - jsonPath: $.MarriageDetails.*.marriageVillageName -# -# - jsonPath: $.MarriageDetails.*.marriageType -# -# - jsonPath: $.MarriageDetails.*.othMarriageType -# -# - jsonPath: $.MarriageDetails.*.marriageLandmark -# -# - jsonPath: $.MarriageDetails.*.marriageLocalityEn -# -# - jsonPath: $.MarriageDetails.*.marriageLocalityMl -# -# - jsonPath: $.MarriageDetails.*.applicationType -# -# - jsonPath: $.MarriageDetails.*.businessService -# -# - jsonPath: $.MarriageDetails.*.workflowCode -# -# - jsonPath: $.MarriageDetails.*.registrationno -# -# - jsonPath: $.MarriageDetails.*.registration_date -# -# - jsonPath: $.MarriageDetails.*.action -# -# - jsonPath: $.MarriageDetails.*.status -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.applicationNumber -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# -# - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'B'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# - query : UPDATE public.eg_marriage_bride_groom_details -# SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, -# middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, -# fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, -# maritalstatusid=?, is_spouse_living=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? -# WHERE marriageid=? and bride_groom= 'B' and tenantid=? ; -# -# basePath: MarriageDetails.*.BrideDetails -# jsonMaps: -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideAadharNo -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.bridePassportNo -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideSocialSecurityNo -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameMl -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameEn -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMiddlenameMl -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameEn -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideLastnameMl -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMobile -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideEmailid -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGender -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideDOB -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideAge -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameEn -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFathernameMl -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameEn -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMothernameMl -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideFatherAadharNo -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMotherAadharNo -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameEn -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMl -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardianAadharNo -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideIslivingSpouse -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# -# - query: INSERT INTO public.eg_marriage_bride_groom_details_audit SELECT * FROM public.eg_marriage_bride_groom_details WHERE marriageid = ? and tenantid=? and bride_groom= 'G'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# - query: UPDATE public.eg_marriage_bride_groom_details -# SET residentship=?, aadharno=?, passportno=?, socialsecurityno=?, firstname_en=?, firstname_ml=?, middlename_en=?, -# middlename_ml=?, lastname_en=?, lastname_ml=?, mobile=?, emailid=?, gender=?, dateofbirth=?, age=?, parent_guardian=?, fathername_en=?, -# fathername_ml=?, mothername_en=?, mothername_ml=?, father_aadharno=?, mother_aadharno=?, guardianname_en=?, guardianname_ml=?, guardian_aadharno=?, -# maritalstatusid=?, is_spouse_living=?, lastmodifiedtime=?, lastmodifiedby=?, no_of_spouse_living=? -# WHERE marriageid=? and bride_groom= 'G' and tenantid=?; -# -# basePath: MarriageDetails.*.GroomDetails -# jsonMaps: -# -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomAadharNo -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomPassportNo -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomSocialSecurityNo -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameMl -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameEn -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMiddlenameMl -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameEn -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomLastnameMl -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMobile -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomEmailid -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGender -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomDOB -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomAge -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameEn -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFathernameMl -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameEn -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMothernameMl -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomFatherAadharNo -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMotherAadharNo -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameEn -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMl -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardianAadharNo -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomIsSpouseLiving -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '1'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# - query : UPDATE public.eg_marriage_witness_details -# SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, -# lastmodifiedtime=?, lastmodifiedby=? -# WHERE marriageid=? and serial_no= '1' and tenantid=?; -# -# -# basePath: MarriageDetails.*.WitnessDetails -# jsonMaps: -# -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AadharNo -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameEn -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Age -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1AddresSEn -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1NameMl -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Mobile -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness1Esigned -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# - query: INSERT INTO public.eg_marriage_witness_details_audit SELECT * FROM public.eg_marriage_witness_details WHERE marriageid = ? and tenantid=? and serial_no= '2'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# - query: UPDATE public.eg_marriage_witness_details -# SET aadharno=?, name_en=?, name_ml=?, age=?, address_en=?, address_ml=?, mobile=?, is_esigned=?, -# lastmodifiedtime=?, lastmodifiedby=? -# WHERE marriageid=? and serial_no= '2' and tenantid=?; -# -# -# basePath: MarriageDetails.*.WitnessDetails -# jsonMaps: -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AadharNo -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameEn -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2NameMl -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Age -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddresSEn -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2AddressMl -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Mobile -# -# - jsonPath: $.MarriageDetails.*.WitnessDetails.witness2Esigned -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.marriageTenantid -# -# - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName -# -# -# - query : UPDATE public.eg_marriage_present_address_details -# SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, -# locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, -# lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, -# ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? -# WHERE marriageid=? and bride_groom='B' and tenantid=?; -# -# -# basePath: MarriageDetails.*.BrideAddressDetails -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaVillage -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaTaluk -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaTaluk -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentWardNo -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.isPermanentAddress -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeEn -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEn -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMl -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressEnB -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOutSideIndiaProvinceEn -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaProvinceMl -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePresent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeMl -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePresent -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName -# -# -# -# -# - query: INSERT INTO public.eg_marriage_present_address_details_audit SELECT * FROM public.eg_marriage_present_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName -# -# -# - query : UPDATE public.eg_marriage_present_address_details -# SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, -# locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, -# lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, -# ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? -# WHERE marriageid=? and bride_groom='G' and tenantid=?; -# -# basePath: MarriageDetails.*.GroomAddressDetails -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaVillage -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaTaluk -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaTaluk -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentWardNo -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.isPermanentAddress -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeEn -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEn -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMl -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressEnB -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOutSideIndiaProvinceEn -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaProvinceMl -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePresent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeMl -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent -# -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName -# -# -# -# - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='B'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName -# -# - query: UPDATE public.eg_marriage_permanent_address_details -# SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, -# ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, -# pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?,poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, -# ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? -# WHERE marriageid=? and bride_groom='B' and tenantid=?; -# basePath: MarriageDetails.*.BrideAddressDetails -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoEnPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityMlPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameEnPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.streetNameMlPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrVillage -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodepermanent -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName -# -# -# -# - query: INSERT INTO public.eg_marriage_permanent_address_details_audit SELECT * FROM public.eg_marriage_permanent_address_details WHERE marriageid = ? and tenantid=? and bride_groom='G'; -# -# basePath: MarriageDetails.* -# jsonMaps: -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName -# -# - query : UPDATE public.eg_marriage_permanent_address_details -# SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, -# ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, -# pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, -# poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, -# ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? -# WHERE bride_groom='G' AND marriageid=? and tenantid=?; -# -# -# basePath: MarriageDetails.*.GroomAddressDetails -# jsonMaps: -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoEnPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrVillage -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityMlPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameEnPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.streetNameMlPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedTime -# -# - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneMl -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoEn -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrVillage -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodepermanent -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent -# -# - jsonPath: $.MarriageDetails.*.id -# -# - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName -# - - - - version: 1.0 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index caea8301c83..f1a0094e830 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -117,9 +117,6 @@ public class MarriageApplicationConfiguration { @Value("${persister.save.marriage.correction.topic}") private String saveMarriageCorrectionTopic; - @Value("${persister.update.marriage.correction.topic}") - private String updateMarriageCorrectionTopic; - @Value("${persister.update.marriage.registry.correction.topic}") private String updateMarriageRegistryCorrectionTopic; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java index a9fd46dfca1..3da25cee56d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java @@ -16,7 +16,8 @@ public enum ErrorCodes { MDMS_DATA_ERROR("MDMS_DATA_ERROR"), INVALID_SEARCH("INVALID_SEARCH"), // Idgen Service - IDGEN_ERROR("IDGEN_ERROR"); + IDGEN_ERROR("IDGEN_ERROR"), + ROW_MAPPER_ERROR("ROW-MAPPER_ERROR"); private String code; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index 9f4ae00b3e1..b6650d6234e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -526,8 +526,16 @@ public void enrichRegistryUpdate(MarriageRegistryRequest request) { .forEach(personal -> personal.setAuditDetails(auditDetails)); } - public void enrichUpdate(MarriageCorrectionRequest request) { + public void enrichUpdate(MarriageCorrectionRequest request,List searchResult) { - - } + searchResult.get(0).setBusinessservice(request.getMarriageCorrectionDetails().get(0).getBusinessservice()); + searchResult.get(0).setAction(request.getMarriageCorrectionDetails().get(0).getAction()); + searchResult.get(0).setStatus(request.getMarriageCorrectionDetails().get(0).getStatus()); + RequestInfo requestInfo = request.getRequestInfo(); + User userInfo = requestInfo.getUserInfo(); + + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); + searchResult.forEach(details -> details.setAuditDetails(auditDetails)); + + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java index 06003c57724..81803be2c2c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/MarriageCorrectionRepository.java @@ -9,6 +9,9 @@ import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriagecorrection.repository.querybuilder.CorrectionApplicationQueryBuilder; +import org.ksmart.marriage.marriagecorrection.repository.rowmapper.CorrectionApplicationRowMapper; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.springframework.jdbc.core.JdbcTemplate; @@ -28,8 +31,10 @@ public class MarriageCorrectionRepository { private final MarriageApplicationQueryBuilder marriageQueryBuilder; private final JdbcTemplate jdbcTemplate; private final MarriageApplicationRowMapper marriageApplicationRowMapper; + private final CorrectionApplicationQueryBuilder correctionApplicationQueryBuilder; + private final CorrectionApplicationRowMapper correctionApplicationRowMapper; - public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator, MarriageApplicationQueryBuilder marriageQueryBuilder, JdbcTemplate jdbcTemplate, MarriageApplicationRowMapper marriageApplicationRowMapper) { + public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator, MarriageApplicationQueryBuilder marriageQueryBuilder, JdbcTemplate jdbcTemplate, MarriageApplicationRowMapper marriageApplicationRowMapper, CorrectionApplicationQueryBuilder correctionApplicationQueryBuilder, CorrectionApplicationRowMapper correctionApplicationRowMapper) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.util = util; @@ -37,6 +42,8 @@ public MarriageCorrectionRepository(MarriageProducer producer, MarriageApplicati this.marriageQueryBuilder = marriageQueryBuilder; this.jdbcTemplate = jdbcTemplate; this.marriageApplicationRowMapper = marriageApplicationRowMapper; + this.correctionApplicationQueryBuilder = correctionApplicationQueryBuilder; + this.correctionApplicationRowMapper = correctionApplicationRowMapper; } @@ -50,20 +57,28 @@ public List saveCorrectionDetails(MarriageCorrection return request.getMarriageDetails(); } +// +// +// public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { +// List preparedStmtValues = new ArrayList<>(); +// String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); +// List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); +// +// return result; +// } +// public List searchMarriageCorrectionApplnDetails(MarriageApplicationSearchCriteria criteria) { +// List preparedStmtValues = new ArrayList<>(); +// String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); +// List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); +// +// return result; +// } - public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { - List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); - - return result; - } - - public List searchMarriageCorrectionApplnDetails(MarriageApplicationSearchCriteria criteria) { + public List searchCorrectionDetails(String marriageid) { List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + String query = correctionApplicationQueryBuilder.getMarriageCorrectionSearchQueryByMarriageId(marriageid, preparedStmtValues, Boolean.FALSE); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), correctionApplicationRowMapper); return result; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/querybuilder/CorrectionApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/querybuilder/CorrectionApplicationQueryBuilder.java new file mode 100644 index 00000000000..126044fdecd --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/querybuilder/CorrectionApplicationQueryBuilder.java @@ -0,0 +1,54 @@ +package org.ksmart.marriage.marriagecorrection.repository.querybuilder; + +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.marriageapplication.repository.querybuilder.BaseMarriageQueryBuilder; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; +import org.springframework.stereotype.Component; + +import javax.validation.constraints.NotNull; +import java.util.List; + +@Component +public class CorrectionApplicationQueryBuilder extends BaseMarriageQueryBuilder{ + + private static final String CORRECTION_QUERY = new StringBuilder() + .append("select md.id as md_id, md.tenantid as md_tenantid,md.applicationtype as md_applicationtype, md.businessservice as md_businessservice, md.workflowcode as md_workflowcode, md.applicationnumber as md_applicationnumber, md.registrationno as md_registrationno, md.registration_date as md_registration_date, md.action as md_action, md.status as md_status,md.createdtime as md_createdtime, md.createdby as md_createdby, md.lastmodifiedtime as md_lastmodifiedtime, md.lastmodifiedby as md_lastmodifiedby, ") + .append("cor.id as cor_id, cor.marriageid as cor_marriageid, cor.correction_field_name as cor_correction_field_name, cor.condition_code as cor_condition_code, cor.specific_condition as cor_specific_condition, ") + .append("corch.id as ch_id, corch.marriageid as ch_marriageid, corch.correctionid as ch_correctionid, corch.correction_field_name as ch_correction_field_name, corch.table_name as ch_table_name, corch.column_name as ch_column_name, corch.old_value as ch_old_value, corch.new_value as ch_new_value, corch.column_ as ch_column_, ") + .append("cordoc.id as doc_id, cordoc.document_name as doc_document_name, cordoc.document_type as doc_document_type, cordoc.document_description as doc_document_description, cordoc.filestoreid as doc_filestoreid, cordoc.document_link as doc_document_link, cordoc.marriageid as doc_marriageid, cordoc.active as doc_active, cordoc.correction_id as doc_correction_id, cordoc.correction_field_name as doc_correction_field_name ") + .append("FROM public.eg_marriage_details md ") + .append("inner join public.eg_marriage_correction cor on md.id = cor.marriageid ") + .append("inner join public.eg_marriage_correction_child corch on cor.id = corch.correctionid ") + .append("inner join public.eg_marriage_document cordoc on cor.id= cordoc.correction_id ") + .toString(); + + + public String getMarriageCorrectionSearchQueryByMarriageId(@NotNull String marriageid, + @NotNull List preparedStmtValues, Boolean isCount) { + + StringBuilder query = new StringBuilder(CORRECTION_QUERY); + StringBuilder orderBy = new StringBuilder(); + addFilter("cor.marriageid", marriageid, query, preparedStmtValues); + return query.toString(); + + } + + void addFilter(String column, String value, StringBuilder query, List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("=? "); + paramValues.add(value); + } + } + void addWhereClause(List values, StringBuilder query) { + if (CollectionUtils.isEmpty(values)) { + query.append(" WHERE "); + } else { + query.append(" AND "); + } + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/rowmapper/CorrectionApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/rowmapper/CorrectionApplicationRowMapper.java new file mode 100644 index 00000000000..a5eedb8d49c --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/rowmapper/CorrectionApplicationRowMapper.java @@ -0,0 +1,182 @@ +package org.ksmart.marriage.marriagecorrection.repository.rowmapper; + +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriagecorrection.web.model.CorrectionDocument; +import org.ksmart.marriage.marriagecorrection.web.model.CorrectionField; +import org.ksmart.marriage.marriagecorrection.web.model.CorrectionFieldValue; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ResultSetExtractor; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Component +public class CorrectionApplicationRowMapper implements ResultSetExtractor> { + + @Override + public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null + Map applicationMap = new HashMap<>(); + while (rs.next()) { + String currentid = rs.getString("md_id"); + MarriageCorrectionDetails currentApplication = applicationMap.get(currentid); + AuditDetails auditDetails = null; + if (null == currentApplication) { + auditDetails = AuditDetails.builder() + .createdBy(rs.getString("md_createdby")) + .createdTime(rs.getLong("md_createdtime")) + .lastModifiedBy(rs.getString("md_lastmodifiedby")) + .lastModifiedTime(rs.getLong("md_lastmodifiedtime")).build(); + + currentApplication = MarriageCorrectionDetails.builder() + .id(rs.getString("md_id")) + .tenantid(rs.getString("md_tenantid")) + .applicationtype(rs.getString("md_applicationtype")) + .businessservice(rs.getString("md_businessservice")) + .businessservice(rs.getString("md_workflowcode")) + .applicationNo(rs.getString("md_applicationnumber")) + .registrationno(rs.getString("md_registrationno")) + .registrationDate(rs.getLong("md_registration_date")) + .action(rs.getString("md_action")) + .status(rs.getString("md_status")) + .auditDetails(auditDetails) + .correctionField(new ArrayList()) + .build(); + + } + addChildrenToCorrectionApplication(rs, currentApplication, auditDetails); + applicationMap.put(currentid, currentApplication); + } + return new ArrayList<>(applicationMap.values()); + } + +// public void addChildrenToCorrectionApplication(ResultSet rs, CorrectionApplication currentApplication, AuditDetails auditDetails ) { +// setCorrectionField(rs, currentApplication,auditDetails); +// } + + public void addChildrenToCorrectionApplication(ResultSet rs, MarriageCorrectionDetails currentApplication, AuditDetails auditDetails) { + try { + List correctionFields = new ArrayList<>(); + List applications = new ArrayList<>(); + applications.add(currentApplication); + if (CollectionUtils.isEmpty(currentApplication.getCorrectionField())) + correctionFields = new ArrayList(); + else + correctionFields = currentApplication.getCorrectionField(); + + List ids = correctionFields.stream().map(CorrectionField::getId).collect(Collectors.toList()); + + if (!StringUtils.isEmpty(rs.getString("cor_id")) && (!ids.contains(rs.getString("cor_id")))) { + CorrectionField correctionField = CorrectionField.builder() + .id(rs.getString("cor_id")) + .marriageId(rs.getString("cor_marriageid")) + .correctionFieldName(rs.getString("cor_correction_field_name")) + .conditionCode(rs.getString("cor_condition_code")) + .specificCondition(rs.getString("cor_specific_condition")) + .correctionFieldValue(new ArrayList()) + .correctionDocument(new ArrayList()) + .auditDetails(auditDetails).build(); + correctionFields.add(correctionField); + + } + + currentApplication.setCorrectionField(correctionFields); + currentApplication.getCorrectionField().forEach(child -> { + try { + if (child.getId().contains(rs.getString("cor_id"))) { + addFieldValueToCorrectionField(rs, child, child.getId()); + addDocumentToCorrectionField(rs, child, child.getId()); + } + } catch (SQLException e) { + throw new RuntimeException(e); + } + }); + } catch (Exception e) { + throw new CustomException(ErrorCodes.ROW_MAPPER_ERROR.getCode(), + "Error in row mapper while mapping CorrectionField."); + } + } + +// public void addFieldValueToCorrectionField(ResultSet rs, CorrectionField correctionField, String id) { +// setCorrectionFieldValue(rs, correctionField, id); +// } + + public void addFieldValueToCorrectionField(ResultSet rs, CorrectionField correctionField, String id) { + + List correctionFieldValues = new ArrayList<>(); + + if (CollectionUtils.isEmpty(correctionField.getCorrectionFieldValue())) + correctionFieldValues = new ArrayList(); + else + correctionFieldValues = correctionField.getCorrectionFieldValue(); + + List idChilds = correctionFieldValues.stream().map(CorrectionFieldValue::getId).collect(Collectors.toList()); + try { + if(id.contains(rs.getString("ch_correctionid"))) { + if (!StringUtils.isEmpty(rs.getString("ch_id")) && !idChilds.contains(rs.getString("ch_id"))) { + CorrectionFieldValue correctionFieldValue= CorrectionFieldValue.builder() + .id(rs.getString("ch_id")) + .marriageId(rs.getString("ch_marriageid")) + .correctionId(rs.getString("ch_correctionid")) + .field(rs.getString("ch_column_name")) + .correctionFieldName(rs.getString("ch_correction_field_name")) + .tableName(rs.getString("ch_table_name")) + .columnName(rs.getString("ch_column_")) + .newValue(rs.getString("ch_new_value")) + .oldValue(rs.getString("ch_old_value")) + .build(); + correctionFieldValues.add(correctionFieldValue); + } + } + } catch (SQLException e) { + throw new CustomException(ErrorCodes.ROW_MAPPER_ERROR.getCode(), + "Error in row mapper while mapping CorrectionFieldValue."); + } + correctionField.setCorrectionFieldValue(correctionFieldValues); + } + +// public void addDocumentToCorrectionField(ResultSet rs, CorrectionField correctionField, String id) { +// setCorrectionDocument(rs, correctionField, id); +// } + public void addDocumentToCorrectionField(ResultSet rs, CorrectionField correctionField, String id) { + + List correctionDocuments = new ArrayList<>(); + + if (CollectionUtils.isEmpty(correctionField.getCorrectionDocument())) + correctionDocuments = new ArrayList(); + else + correctionDocuments = correctionField.getCorrectionDocument(); + + List idChilds = correctionDocuments.stream().map(CorrectionDocument::getId).collect(Collectors.toList()); + try { + if(id.contains(rs.getString("doc_correction_id"))) { + if (!StringUtils.isEmpty(rs.getString("doc_id")) && !idChilds.contains(rs.getString("doc_id"))) { + CorrectionDocument ch = CorrectionDocument.builder() + .id(rs.getString("doc_id")) + .marriageId(rs.getString("doc_marriageid")) + .correctionId(rs.getString("doc_correction_id")) + .correctionFieldName(rs.getString("doc_correction_field_name")) + .documentType(rs.getString("doc_document_type")) + .fileStoreId(rs.getString("doc_filestoreid")) + .active(rs.getBoolean("doc_active")).build(); + correctionDocuments.add(ch); + } + } + } catch (SQLException e) { + throw new CustomException(ErrorCodes.ROW_MAPPER_ERROR.getCode(), + "Error in row mapper while mapping CorrectionDocument."); + } + correctionField.setCorrectionDocument(correctionDocuments); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 9797a2d4bf1..7ea1a57fe07 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -5,10 +5,12 @@ import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; import org.ksmart.marriage.marriageapplication.validator.MarriageApplicationValidator; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; +import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; @@ -25,6 +27,7 @@ import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; +import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.stereotype.Service; @@ -39,7 +42,7 @@ public class MarriageCorrectionService { private final MarriageCorrectionRepository correctionRepository; - + private final MarriageApplicationRepository applicationRepository; private final MarriageRegistryRepository registryRepository; private final MarriageCorrectionEnrichment marriageCorrectionEnrichment; @@ -47,7 +50,7 @@ public class MarriageCorrectionService { private final RegistryToApplicationMapper RegistryToApplicationMapper; private final MarriageApplicationService MarriageService; - + private final MarriageApplicationValidator validatorService; private final MarriageProducer producer; private final MarriageApplicationConfiguration marriageApplicationConfiguration; private final MarriageMdmsUtil util; @@ -57,26 +60,28 @@ public class MarriageCorrectionService { private final MarriageApplicationValidator applnvalidatorService; private final WorkflowIntegrator workflowIntegrator; private final MarriageCorrectionValidator correctionValidatorService ; - private final MarriageCorrectionApplnValidator marriageCorrectionApplnValidator; private final MarriageCorrectionMDMSValidator marriageCorrectionMDMSValidator; + private final MarriageDetailsEnrichment marriageDetailsEnrichment; - public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageRegistryRepository registryRepository, + public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageApplicationRepository applicationRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, - MarriageApplicationService marriageService, MarriageProducer producer, + MarriageApplicationService marriageService, MarriageApplicationValidator validatorService, MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator, CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper, MarriageApplicationRepository applnRepository, MarriageApplicationValidator applnvalidatorService, WorkflowIntegrator workflowIntegrator, - MarriageCorrectionValidator correctionValidatorService, MarriageCorrectionApplnValidator marriageCorrectionApplnValidator, MarriageCorrectionMDMSValidator marriageCorrectionMDMSValidator) { + MarriageCorrectionValidator correctionValidatorService, MarriageCorrectionApplnValidator marriageCorrectionApplnValidator, MarriageCorrectionMDMSValidator marriageCorrectionMDMSValidator, MarriageDetailsEnrichment marriageDetailsEnrichment) { this.correctionRepository = correctionRepository; + this.applicationRepository = applicationRepository; this.registryRepository = registryRepository; this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; RegistryToApplicationMapper = registryToApplicationMapper; MarriageService = marriageService; + this.validatorService = validatorService; this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.util = util; @@ -88,10 +93,12 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito this.correctionValidatorService = correctionValidatorService; this.marriageCorrectionApplnValidator = marriageCorrectionApplnValidator; this.marriageCorrectionMDMSValidator = marriageCorrectionMDMSValidator; + this.marriageDetailsEnrichment = marriageDetailsEnrichment; } //req for testing public List createCorrection(MarriageCorrectionRequest request) { + //WorkFlowCheck wfc = new WorkFlowCheck(); marriageCorrectionApplnValidator.validateCorrectionCreate(request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageCorrectionDetails().get(0).getTenantid()); marriageCorrectionMDMSValidator.validateMarriageCorrectionMDMSData(request,mdmsData); @@ -110,8 +117,24 @@ public List createCorrection(MarriageCorrectionReques MarriageDetailsRequest marriageDetailsRequest=new MarriageDetailsRequest(); marriageDetailsRequest.setMarriageDetails(marriageApplicationDetailsList); mdmsValidator.validateMarriageMDMSData(marriageDetailsRequest,mdmsData); + //validatorService.ruleEngineMarriage(marriageDetailsRequest, wfc, mdmsData); producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); + + /*if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ + workflowIntegrator.callCorrectionWorkFlow(request); + } + request.getMarriageDetails().forEach(marriage->{ + if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + List demands = new ArrayList<>(); + Demand demand = new Demand(); + demand.setTenantId(marriage.getTenantid()); + demand.setConsumerCode(marriage.getApplicationNumber()); + demands.add(demand); + marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + } + });*/ + }else{ throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Marriage registration(s) not found in database."); @@ -125,38 +148,46 @@ private List searchRegistry(MarriageRegistrySearchCrite } //req for testing - public List updateMarriageRegistry(MarriageCorrectionRequest request) { - MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); - criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); - criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria); - - if (!marriageRegistryDetails.isEmpty()) { - MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); - aplnCriteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); - aplnCriteria.setApplicationNo(request.getMarriageCorrectionDetails().get(0).getApplicationNo()); - aplnCriteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - - List marriageAplnDetails = correctionRepository.searchMarriageDetails(aplnCriteria, request.getRequestInfo()); - - if(!marriageAplnDetails.isEmpty()) { - MarriageRegistryRequest marriageRegistryRequest = correctionApplicationToRegistryMapper.convert(marriageRegistryDetails, marriageAplnDetails); - marriageRegistryRequest.setRequestInfo(request.getRequestInfo()); - marriageCorrectionEnrichment.enrichRegistryUpdate(marriageRegistryRequest); - producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryCorrectionTopic(), marriageRegistryRequest); - } - } - return request.getMarriageCorrectionDetails(); - } +// public List updateMarriageRegistry(MarriageCorrectionRequest request) { +// MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); +// criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); +// criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); +// List marriageRegistryDetails = searchRegistry(criteria); +// +// if (!marriageRegistryDetails.isEmpty()) { +// MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); +// aplnCriteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); +// aplnCriteria.setApplicationNo(request.getMarriageCorrectionDetails().get(0).getApplicationNo()); +// aplnCriteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); +// +// List marriageAplnDetails = correctionRepository.searchMarriageDetails(aplnCriteria, request.getRequestInfo()); +// +// if(!marriageAplnDetails.isEmpty()) { +// MarriageRegistryRequest marriageRegistryRequest = correctionApplicationToRegistryMapper.convert(marriageRegistryDetails, marriageAplnDetails); +// marriageRegistryRequest.setRequestInfo(request.getRequestInfo()); +// marriageCorrectionEnrichment.enrichRegistryUpdate(marriageRegistryRequest); +// producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryCorrectionTopic(), marriageRegistryRequest); +// } +// } +// return request.getMarriageCorrectionDetails(); +// } //Jasmine 15.04.2023 public List updateMarriageCorrectionDetails(MarriageCorrectionRequest request) { + marriageCorrectionApplnValidator.validateCorrectionUpdate(request); + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageCorrectionDetails().get(0).getTenantid()); + marriageCorrectionMDMSValidator.validateMarriageCorrectionMDMSData(request,mdmsData); + String applicationNumber = request.getMarriageCorrectionDetails().get(0).getApplicationNo(); MarriageApplicationSearchCriteria criteria = (MarriageApplicationSearchCriteria.builder() .applicationNo(applicationNumber) .build()); List searchResult = applnRepository.getMarriageApplication(criteria, request.getRequestInfo()); correctionValidatorService.validateCorrectionUpdate(request, searchResult); + + marriageCorrectionEnrichment.enrichUpdate(request, searchResult); + request.setMarriageDetails(searchResult); + if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()) { workflowIntegrator.callCorrectionWorkFlow(request); } @@ -174,7 +205,11 @@ public List updateMarriageCorrectionDetails(MarriageC // }); return request.getMarriageCorrectionDetails(); } - public List searchCorrectionDetails(MarriageCorrectionRequest request,MarriageApplicationSearchCriteria criteria) { - return correctionRepository.searchMarriageCorrectionApplnDetails(criteria); + public List searchCorrectionApplinDetails(MarriageCorrectionRequest request,MarriageApplicationSearchCriteria criteria) { + return applicationRepository.getMarriageApplication(criteria,request.getRequestInfo()); + } + + public List searchCorrectionDetails(String marriageId) { + return correctionRepository.searchCorrectionDetails(marriageId); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index 3e87627d3d0..671cab70846 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -1,6 +1,5 @@ package org.ksmart.marriage.marriagecorrection.web.controller; -import com.google.gson.Gson; import lombok.extern.slf4j.Slf4j; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; @@ -8,15 +7,15 @@ import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionResponse; import org.ksmart.marriage.marriagecorrection.service.MarriageCorrectionService; -import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; +import org.ksmart.marriage.marriageregistry.service.MarriageRegistryService; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.ResponseInfoFactory; -import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.List; @Slf4j @@ -27,10 +26,13 @@ public class MarriageCorrectionController { private final MarriageCorrectionService marriageCorrectionService; + private final MarriageRegistryService marriageRegistryService; + private final ResponseInfoFactory responseInfoFactory; - public MarriageCorrectionController(MarriageCorrectionService marriageCorrectionService, ResponseInfoFactory responseInfoFactory) { + public MarriageCorrectionController(MarriageCorrectionService marriageCorrectionService, MarriageRegistryService marriageRegistryService, ResponseInfoFactory responseInfoFactory) { this.marriageCorrectionService = marriageCorrectionService; + this.marriageRegistryService = marriageRegistryService; this.responseInfoFactory = responseInfoFactory; } @@ -56,7 +58,7 @@ public ResponseEntity registryUpdate(@RequestBody Ma //Updating Marriage registry if Registrar Approved if(request.getMarriageCorrectionDetails().get(0).getStatus().equals(MarriageConstants.WORKFLOW_STATUS_APPROVED) && (request.getMarriageCorrectionDetails().get(0).getApplicationtype().equals(MarriageConstants.APPLICATION_CORRECTION))) { - List marriageCorrectionDetailsList = marriageCorrectionService.updateMarriageRegistry(request); + List marriageCorrectionDetailsList = marriageRegistryService.updateMarriageRegistry(request); } MarriageCorrectionResponse response = MarriageCorrectionResponse @@ -68,13 +70,19 @@ public ResponseEntity registryUpdate(@RequestBody Ma } -// @PostMapping(value = {"/searchmarriagecorrection"}) -// public ResponseEntity searchKsmartBirth(@RequestBody MarriageCorrectionRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { -// List marriageCorrectionAplnDetails=marriageCorrectionService.searchCorrectionDetails(request, criteria); -// MarriageCorrectionResponse response=MarriageCorrectionResponse.builder() -// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) -// .marriageDetails(marriageCorrectionAplnDetails) -// .build(); -// return ResponseEntity.ok(response); -// } + @PostMapping(value = {"/searchmarriagecorrection"}) + public ResponseEntity searchKsmartBirth(@RequestBody MarriageCorrectionRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { + List marriageCorrectionAplnDetails=marriageCorrectionService.searchCorrectionApplinDetails(request, criteria); + List marriageCorrectionDetails =new ArrayList<>(); + if(marriageCorrectionAplnDetails.size()==1) { + String marriageId = marriageCorrectionAplnDetails.get(0).getId(); + marriageCorrectionDetails = marriageCorrectionService.searchCorrectionDetails(marriageId); + } + MarriageCorrectionResponse response=MarriageCorrectionResponse.builder() + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) + .marriageDetails(marriageCorrectionAplnDetails) + .marriageCorrectionDetails(marriageCorrectionDetails) + .build(); + return ResponseEntity.ok(response); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java index 80333a58e41..969b5eb3af6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/CorrectionDocument.java @@ -28,6 +28,10 @@ public class CorrectionDocument { @SafeHtml @JsonProperty("id") private String id; + @Size(max=64) + @SafeHtml + @JsonProperty("marriageId") + private String marriageId; @JsonProperty("correctionId") private String correctionId; @JsonProperty("correctionFieldName") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index cbc269bce98..75c32d0c06b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -5,6 +5,13 @@ import org.apache.commons.lang3.StringUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriagecorrection.enrichment.MarriageCorrectionEnrichment; +import org.ksmart.marriage.marriagecorrection.mapper.CorrectionApplicationToRegistryMapper; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriageregistry.enrichment.MarriageCertificateEnrichment; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; @@ -23,6 +30,9 @@ import java.util.Arrays; import java.util.Calendar; import java.util.List; + +import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_CREATE; + /** * Created by Jasmine * on 24.03.2023 @@ -35,16 +45,22 @@ public class MarriageRegistryService { private final MarriageRegistryEnrichment marriageRegistryEnrichment; private final MarriageRegistryRepository repository; private final MarriageCertificateEnrichment marriageCertificateEnrichment; + private final MarriageCorrectionEnrichment marriageCorrectionEnrichment; + private final MarriageApplicationRepository marriageApplicationRepository; + private final CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper; public MarriageRegistryService(MarriageRegistryRepository repository, MarriageRegistryEnrichment marriageRegistryEnrichment, MarriageProducer producer, - MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageCertificateEnrichment marriageCertificateEnrichment) { + MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageCertificateEnrichment marriageCertificateEnrichment, MarriageCorrectionEnrichment marriageCorrectionEnrichment, MarriageApplicationRepository marriageApplicationRepository, CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.marriageRegistryEnrichment = marriageRegistryEnrichment; this.repository = repository; this.marriageCertificateEnrichment = marriageCertificateEnrichment; + this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; + this.marriageApplicationRepository = marriageApplicationRepository; + this.correctionApplicationToRegistryMapper = correctionApplicationToRegistryMapper; } // private final MarriageApplicationConfiguration marriageApplicationConfiguration; public List createRegistry(MarriageRegistryRequest request) { @@ -151,4 +167,36 @@ public List searchCertificate(MarriageRegistrySearchCriteri throw new CustomException("MARRIAGE REGISTRY DATA NOT FOUND", " Marriage Registry data not found"); } } + + + + public List updateMarriageRegistry(MarriageCorrectionRequest request) { + MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); + criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); + criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); + List marriageRegistryDetails = searchRegistry(criteria); + + if (!marriageRegistryDetails.isEmpty()) { + MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); + aplnCriteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); + aplnCriteria.setApplicationNo(request.getMarriageCorrectionDetails().get(0).getApplicationNo()); + aplnCriteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); + + List marriageAplnDetails = marriageApplicationRepository.getMarriageApplication(aplnCriteria, request.getRequestInfo()); + + if(!marriageAplnDetails.isEmpty()) { + MarriageRegistryRequest marriageRegistryRequest = correctionApplicationToRegistryMapper.convert(marriageRegistryDetails, marriageAplnDetails); + marriageRegistryRequest.setRequestInfo(request.getRequestInfo()); + marriageCorrectionEnrichment.enrichRegistryUpdate(marriageRegistryRequest); + producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryCorrectionTopic(), marriageRegistryRequest); + }else{ + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Marriage Application(s) not found in database."); + } + }else{ + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Marriage registration(s) not found in database."); + } + return request.getMarriageCorrectionDetails(); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java index 7d27540525e..64fe8d06728 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -195,7 +195,7 @@ public void callCorrectionWorkFlow(MarriageCorrectionRequest request) { if (businessServiceFromMDMS == null) { businessServiceFromMDMS = MarriageConstants.BUSINESS_SERVICE_BND; } - if (businessServiceFromMDMS.equals(MarriageConstants.BUSINESS_SERVICE_BND) || !request.getMarriageDetails() + if (businessServiceFromMDMS.equals(MarriageConstants.BUSINESS_SERVICE_BND) || !request.getMarriageCorrectionDetails() .get(0).getAction().equalsIgnoreCase(MarriageConstants.TRIGGER_NOWORKFLOW)) { JSONObject obj = new JSONObject(); diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index af59efa6fe1..a2071bce3c4 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -158,6 +158,5 @@ egov.payment.search.endpoint=/collection-services/payments/_search #Marriage correction topics persister.save.marriage.correction.topic=save-marriage-correction-topic -persister.update.marriage.correction.topic=update-marriage-correction-topic persister.update.marriage.registry.correction.topic=correction-update-marriage-registry-topic persister.update.marriage.application.correction.topic=correction-update-marriage-application-topic \ No newline at end of file From edc1991edbcfa669377ed073fdb1bbb1aacf53bb Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 18 Apr 2023 15:20:42 +0530 Subject: [PATCH 219/420] registry to application Mapper --- .../mapper/RegistryToApplicationMapper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 408cfa42340..2218463d7c0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -133,7 +133,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName()); marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriageApplicationDetails.getBrideAddressDetails().setPermanentAddrVillageId(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrVillage()); marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaWardNo()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); @@ -162,7 +162,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName()); marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriageApplicationDetails.getGroomAddressDetails().setPermanentAddrVillageId(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrVillage()); marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaWardNo()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); From 82d01858eca398bc16a44fbfcbf3edc6d80a1098 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 18 Apr 2023 16:14:39 +0530 Subject: [PATCH 220/420] application search updation --- .../querybuilder/MarriageApplicationQueryBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index e6fe4b973dd..0e0b48e7bf3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -153,7 +153,7 @@ else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.applic else if (criteria.getSortBy() == MarriageApplicationSearchCriteria.SortBy.tenantId) addOrderByColumns("MD.tenantid",criteria.getSortOrder().toString(), orderBy); addOrderToQuery(orderBy, query); - //addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); + addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); return query.toString(); From dd7b0589d1ac41ceb6ebd52536061104ff36ca0b Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Tue, 18 Apr 2023 16:16:38 +0530 Subject: [PATCH 221/420] marriage correction aplnno --- .../enrichment/MarriageCorrectionEnrichment.java | 1 + .../validator/MarriageCorrectionApplnValidator.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index b6650d6234e..7a60cce0449 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -75,6 +75,7 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp correction.setMarriageId(marriageApplicationDetails.getId()); setApplicationNumbers(correctionRequest, marriageApplicationDetails); + correction.setApplicationNo(marriageApplicationDetails.getApplicationNumber()); Map marriageApplnDetailsFieldMap = getJsonFieldNames(MarriageApplicationDetails.class.getDeclaredFields()); Map brideDetailsFieldMap = getJsonFieldNames(BrideDetails.class.getDeclaredFields()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java index ddde2c46118..f747e86f721 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java @@ -40,6 +40,10 @@ public void validateCorrectionCreate(MarriageCorrectionRequest request) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Tenant id is required for create correction request."); } + if (CollectionUtils.isEmpty(correctionApplications.get(0).getCorrectionField())) { + throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), + "Marriage Correction Details is required."); + } } public void validateCorrectionUpdate(MarriageCorrectionRequest request) { From 37d996192799d8be385dc1b6e8bef629bdc2c274 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 19 Apr 2023 11:30:20 +0530 Subject: [PATCH 222/420] MarriageRegistryEnrichment --- .../MarriageRegistryEnrichment.java | 38 +++++++++++-------- .../model/BrideRegistryAddressDetails.java | 12 ++++++ .../model/GroomRegistryAddressDetails.java | 13 +++++++ 3 files changed, 48 insertions(+), 15 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 6ed4dcc3d50..e4b6a8028e4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -532,10 +532,9 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg StringBuilder groomAddressBuilder = new StringBuilder(); if (registryDetails.getGroomAddressDetails() != null) { - - if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != null && registryDetails.getGroomAddressDetails().getPermtaddressStateName() != null) { - if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { - if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { +// if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != null && registryDetails.getGroomAddressDetails().getPermtaddressStateName() != null) { + if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE) || (registryDetails.getGroomAddressDetails().getPermtaddressCountry() == null)) { + if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL) || (registryDetails.getGroomAddressDetails().getPermtaddressStateName().isEmpty())) { Object mdmsGroomAddressData = util.mDMSCallGetAddress(req @@ -560,7 +559,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); registryDetails.getGroomAddressDetails().setPoNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); -// + appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(), groomAddressBuilder, true); @@ -571,13 +570,25 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent(), groomAddressBuilder, true); // appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), groomAddressBuilder, true); + if(!(MarriageConstants.DISTRICT).isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getGroomAddressDetails().getDistrictName(), groomAddressBuilder, true); + } + if(!(MarriageConstants.STATE).isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getGroomAddressDetails().getStateName(), groomAddressBuilder, true); + } + if(!(MarriageConstants.COUNTRY).isEmpty()) { - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); - + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getGroomAddressDetails().getCountryName(), groomAddressBuilder, true); + } appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); } @@ -623,7 +634,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg } } - } +// } } else { Object mdmsGroomAddressData = util.mDMSCallGetAddress(req @@ -668,13 +679,10 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg StringBuilder brideAddressBuilder = new StringBuilder(); if (registryDetails.getBrideAddressDetails() != null) { - - if (registryDetails.getBrideAddressDetails().getPermtaddressCountry() != null && registryDetails.getBrideAddressDetails().getPermtaddressStateName() != null) { if (registryDetails.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { if (registryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - Object mdmsBrideAddressData = util.mDMSCallGetAddress(req , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java index 72e5d0529a0..81a38d08892 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java @@ -425,6 +425,18 @@ public class BrideRegistryAddressDetails { @Size(max = 10) @JsonProperty("presentOutSideIndiaPostCode") private String presentOutSideIndiaPostCode; + + @Size(max = 1000) + @JsonProperty("stateName") + private String stateName; + + @Size(max = 1000) + @JsonProperty("districtName") + private String districtName; + + @Size(max = 1000) + @JsonProperty("countryName") + private String countryName; ////Db Fields////// @Size(max = 64) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java index 5b6883e50dc..88cac52f68a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java @@ -425,6 +425,19 @@ public class GroomRegistryAddressDetails { @Size(max = 10) @JsonProperty("presentOutSideIndiaPostCode") private String presentOutSideIndiaPostCode; + + @Size(max = 1000) + @JsonProperty("stateName") + private String stateName; + + @Size(max = 1000) + @JsonProperty("districtName") + private String districtName; + + @Size(max = 1000) + @JsonProperty("countryName") + private String countryName; + ////Db Fields////// @Size(max = 64) From b6145f0bd44c01ff8b931a320d4d94ca7206c738 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 19 Apr 2023 11:39:25 +0530 Subject: [PATCH 223/420] MarriageRegistryEnrichment --- .../MarriageRegistryEnrichment.java | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index e4b6a8028e4..05c631b25b9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -533,8 +533,8 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg if (registryDetails.getGroomAddressDetails() != null) { // if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != null && registryDetails.getGroomAddressDetails().getPermtaddressStateName() != null) { - if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE) || (registryDetails.getGroomAddressDetails().getPermtaddressCountry() == null)) { - if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL) || (registryDetails.getGroomAddressDetails().getPermtaddressStateName().isEmpty())) { + if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { Object mdmsGroomAddressData = util.mDMSCallGetAddress(req @@ -570,25 +570,12 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent(), groomAddressBuilder, true); // appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), groomAddressBuilder, true); - if(!(MarriageConstants.DISTRICT).isEmpty()){ - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); - } - else{ - appendIfNotBlank(registryDetails.getGroomAddressDetails().getDistrictName(), groomAddressBuilder, true); - } - if(!(MarriageConstants.STATE).isEmpty()){ - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); - } - else{ - appendIfNotBlank(registryDetails.getGroomAddressDetails().getStateName(), groomAddressBuilder, true); - } - if(!(MarriageConstants.COUNTRY).isEmpty()) { + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); + + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); - } - else{ - appendIfNotBlank(registryDetails.getGroomAddressDetails().getCountryName(), groomAddressBuilder, true); - } appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); } From 981fe0318306e8610a5b55ceb44ec479923292aa Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 19 Apr 2023 12:49:14 +0530 Subject: [PATCH 224/420] RowMapper Change --- .../BrideAddressDetailsRowMapper.java | 25 +++++++++++++++++-- .../GroomAddressDetailsRowMapper.java | 25 +++++++++++++++++-- .../model/marriage/BrideAddressDetails.java | 1 + 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 44357b503f7..dcc7fe05013 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -13,7 +13,18 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce // PRESENT - + .countryIdPresent(rs.getString("BPSA_countryid")) + .stateIdPresent(rs.getString("BPSA_stateid")) + .districtIdPresent(rs.getString("BPSA_districtid")) + .poNoPresent(rs.getString("BPSA_poid")) + .presentaddressCountry(rs.getString("GPMA_countryid")) + .localityEnPresent(rs.getString("BPSA_locality_en")) + .localityMlPresent(rs.getString("BPSA_locality_ml")) + .streetNameEnPresent(rs.getString("BPSA_street_name_en")) + .streetNameMlPresent(rs.getString("BPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("BPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("BPSA_housename_ml")) + .villageNamePresent(rs.getString("BPSA_village_name")) .presentUuid(rs.getString("BPSA_id")) .presentaddressCountry(rs.getString("BPSA_countryid")) .presentaddressStateName(rs.getString("BPSA_stateid")) @@ -53,7 +64,17 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce // PERMANENT - + .countryIdPermanent(rs.getString("BPMA_countryid")) + .stateIdPermanent(rs.getString("BPMA_stateid")) + .districtIdPermanent(rs.getString("BPMA_districtid")) + .poNoPermanent(rs.getString("BPMA_poid")) + .localityEnPermanent(rs.getString("BPMA_locality_en")) + .localityMlPermanent(rs.getString("BPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) + .villageNamePermanent(rs.getString("BPMA_village_name")) .permanentUuid(rs.getString("BPMA_id")) .permtaddressCountry(rs.getString("BPMA_countryid")) .permtaddressStateName(rs.getString("BPMA_stateid")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index edc0ffbcbe6..33ca73c531d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -13,7 +13,18 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw return GroomAddressDetails.builder() // PRESENT - + .countryIdPresent(rs.getString("GPSA_countryid")) + .stateIdPresent(rs.getString("GPSA_stateid")) + .districtIdPresent(rs.getString("GPSA_districtid")) + .poNoPresent(rs.getString("GPSA_poid")) + .presentaddressCountry(rs.getString("GPMA_countryid")) + .localityEnPresent(rs.getString("GPSA_locality_en")) + .localityMlPresent(rs.getString("GPSA_locality_ml")) + .streetNameEnPresent(rs.getString("GPSA_street_name_en")) + .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) + .villageNamePresent(rs.getString("GPSA_village_name")) .presentUuid(rs.getString("GPSA_id")) .presentaddressCountry(rs.getString("GPSA_countryid")) .presentaddressStateName(rs.getString("GPSA_stateid")) @@ -56,7 +67,17 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw // PERMANENT - + .countryIdPermanent(rs.getString("GPMA_countryid")) + .stateIdPermanent(rs.getString("GPMA_stateid")) + .districtIdPermanent(rs.getString("GPMA_districtid")) + .poNoPermanent(rs.getString("GPMA_poid")) + .localityEnPermanent(rs.getString("GPMA_locality_en")) + .localityMlPermanent(rs.getString("GPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) + .villageNamePermanent(rs.getString("GPMA_village_name")) .permanentUuid(rs.getString("GPMA_id")) .permtaddressCountry(rs.getString("GPMA_countryid")) .permtaddressStateName(rs.getString("GPMA_stateid")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 65be467b495..23d708007a0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -436,6 +436,7 @@ public class BrideAddressDetails { @JsonProperty("PermanentAddrVillageId") private String permanentAddrVillageId ; @Size(max = 64) + @JsonProperty("countryIdPermanent") private String countryIdPermanent; From eb8b7ab6a2b931b5885bca0924ab10d5c353e25d Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 19 Apr 2023 15:03:49 +0530 Subject: [PATCH 225/420] RowMapper Change --- .../MarriageRegistryEnrichment.java | 94 ++++++++++++++----- .../BrideRegistryAddressRowMapper.java | 38 ++++++-- .../GroomRegistryAddressRowMapper.java | 31 +++++- 3 files changed, 130 insertions(+), 33 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 05c631b25b9..38d2e24f9c9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -568,13 +568,25 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent(), groomAddressBuilder, true); + if(!registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict().isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else { + appendIfNotBlank(registryDetails.getGroomAddressDetails().getDistrictName(), groomAddressBuilder, true); -// appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + } + if(!registryDetails.getGroomAddressDetails().getPermtaddressStateName().isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getGroomAddressDetails().getStateName(), groomAddressBuilder, true); + } + if(!registryDetails.getGroomAddressDetails().getPermtaddressCountry().isEmpty() ){ + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getGroomAddressDetails().getCountryName(), groomAddressBuilder, true); + } appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); } @@ -610,11 +622,25 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthPostOfficeEn(), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); + if(!registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict().isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else { + appendIfNotBlank(registryDetails.getGroomAddressDetails().getDistrictName(), groomAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + } + if(!registryDetails.getGroomAddressDetails().getPermtaddressStateName().isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getGroomAddressDetails().getStateName(), groomAddressBuilder, true); + } + if(!registryDetails.getGroomAddressDetails().getPermtaddressCountry().isEmpty() ){ + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getGroomAddressDetails().getCountryName(), groomAddressBuilder, true); + } appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); @@ -700,14 +726,25 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPoNoPermanent(), brideAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); + if(!registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict().isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); + } + else { + appendIfNotBlank(registryDetails.getBrideAddressDetails().getDistrictName(), brideAddressBuilder, true); + } + if(!registryDetails.getBrideAddressDetails().getPermtaddressStateName().isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getBrideAddressDetails().getStateName(), brideAddressBuilder, true); + } + if(!registryDetails.getBrideAddressDetails().getPermtaddressCountry().isEmpty() ){ + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getBrideAddressDetails().getCountryName(), brideAddressBuilder, true); + } appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); } @@ -742,12 +779,25 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(), brideAddressBuilder, true); - appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); -// - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); + if(!registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict().isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); + } + else { + appendIfNotBlank(registryDetails.getBrideAddressDetails().getDistrictName(), brideAddressBuilder, true); + } + if(!registryDetails.getBrideAddressDetails().getPermtaddressStateName().isEmpty()){ + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getBrideAddressDetails().getStateName(), brideAddressBuilder, true); + } + if(!registryDetails.getBrideAddressDetails().getPermtaddressCountry().isEmpty() ){ + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); + } + else{ + appendIfNotBlank(registryDetails.getBrideAddressDetails().getCountryName(), brideAddressBuilder, true); + } appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java index 7f389adb430..f27ed10e48f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java @@ -15,7 +15,18 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws // PRESENT - + .countryIdPresent(rs.getString("BPSA_countryid")) + .stateIdPresent(rs.getString("BPSA_stateid")) + .districtIdPresent(rs.getString("BPSA_districtid")) + .poNoPresent(rs.getString("BPSA_poid")) + .presentaddressCountry(rs.getString("GPMA_countryid")) + .localityEnPresent(rs.getString("BPSA_locality_en")) + .localityMlPresent(rs.getString("BPSA_locality_ml")) + .streetNameEnPresent(rs.getString("BPSA_street_name_en")) + .streetNameMlPresent(rs.getString("BPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("BPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("BPSA_housename_ml")) + .villageNamePresent(rs.getString("BPSA_village_name")) .presentUuid(rs.getString("BPSA_id")) .presentaddressCountry(rs.getString("BPSA_countryid")) .presentaddressStateName(rs.getString("BPSA_stateid")) @@ -34,7 +45,7 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws .presentWardNo(rs.getString("BPSA_ward_code")) .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) - // .presentOutsideKeralaCityVilgeEn(rs.getString("BPSA_village_name ")) + // .presentOutsideKeralaCityVilgeEn(rs.getString("BPSA_village_name ")) .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) @@ -52,15 +63,26 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) .brideGroomPresent(rs.getString("BPSA_bride_groom")) -// PERMANENT +// PERMANENT + .countryIdPermanent(rs.getString("BPMA_countryid")) + .stateIdPermanent(rs.getString("BPMA_stateid")) + .districtIdPermanent(rs.getString("BPMA_districtid")) + .poNoPermanent(rs.getString("BPMA_poid")) + .localityEnPermanent(rs.getString("BPMA_locality_en")) + .localityMlPermanent(rs.getString("BPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) + .villageNamePermanent(rs.getString("BPMA_village_name")) .permanentUuid(rs.getString("BPMA_id")) .permtaddressCountry(rs.getString("BPMA_countryid")) .permtaddressStateName(rs.getString("BPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) .permntInKeralaAdrDistrict(rs.getString("BPMA_districtid")) - // .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name ")) + // .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name ")) .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) .permntInKeralaAdrLocalityNameEn(rs.getString("BPMA_locality_en")) @@ -74,7 +96,7 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) .permntOutsideKeralaDistrict(rs.getString("BPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) - .permntOutsideKeralaVillage(rs.getString("BPMA_village_name")) + //.permntOutsideKeralaVillage(rs.getString("BPMA_village_name")) .permntOutsideKeralaPincode(rs.getString("BPMA_pinno")) .permntOutsideKeralaLocalityNameEn(rs.getString("BPMA_locality_en")) .permntOutsideKeralaStreetNameEn(rs.getString("BPMA_street_name_en")) @@ -88,12 +110,14 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws .permntOutsideIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) .permntOutsideIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) .permntOutsideIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) - // .permntOutsideIndiaVillage(rs.getString("")) - // .permntOutsideIndiaCityTown(rs.getString("")) + // .permntOutsideIndiaVillage(rs.getString("")) + // .permntOutsideIndiaCityTown(rs.getString("")) .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) .permntOutSideIndiaProvinceMl(rs.getString("BPMA_ot_state_region_province_ml")) .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) .brideGroomPermanent(rs.getString("BPMA_bride_groom")) + + // .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java index 5f45c7ee214..6d5861771d1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -11,7 +11,18 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws return GroomRegistryAddressDetails.builder() // PRESENT - + .countryIdPresent(rs.getString("GPSA_countryid")) + .stateIdPresent(rs.getString("GPSA_stateid")) + .districtIdPresent(rs.getString("GPSA_districtid")) + .poNoPresent(rs.getString("GPSA_poid")) + .presentaddressCountry(rs.getString("GPMA_countryid")) + .localityEnPresent(rs.getString("GPSA_locality_en")) + .localityMlPresent(rs.getString("GPSA_locality_ml")) + .streetNameEnPresent(rs.getString("GPSA_street_name_en")) + .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) + .villageNamePresent(rs.getString("GPSA_village_name")) .presentUuid(rs.getString("GPSA_id")) .presentaddressCountry(rs.getString("GPSA_countryid")) .presentaddressStateName(rs.getString("GPSA_stateid")) @@ -30,7 +41,7 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws .presentWardNo(rs.getString("GPSA_ward_code")) .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) - //.presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name ")) +// .presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name ")) .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) @@ -51,15 +62,26 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws -// PERMANENT +// PERMANENT + .countryIdPermanent(rs.getString("GPMA_countryid")) + .stateIdPermanent(rs.getString("GPMA_stateid")) + .districtIdPermanent(rs.getString("GPMA_districtid")) + .poNoPermanent(rs.getString("GPMA_poid")) + .localityEnPermanent(rs.getString("GPMA_locality_en")) + .localityMlPermanent(rs.getString("GPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) + .villageNamePermanent(rs.getString("GPMA_village_name")) .permanentUuid(rs.getString("GPMA_id")) .permtaddressCountry(rs.getString("GPMA_countryid")) .permtaddressStateName(rs.getString("GPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) .permntInKeralaAdrDistrict(rs.getString("GPMA_districtid")) - // .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name ")) + //.permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name ")) .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) .permntInKeralaAdrLocalityNameEn(rs.getString("GPMA_locality_en")) @@ -93,6 +115,7 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) .brideGroomPermanent(rs.getString("GPMA_bride_groom")) + // .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) .build(); From 4cf9dda280b26d0316a0189b807851128f6adb69 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 19 Apr 2023 16:34:53 +0530 Subject: [PATCH 226/420] workflow --- .../MarriageApplicationConfiguration.java | 5 ++ .../MarriageApplicationRepository.java | 1 - .../service/MarriageApplicationService.java | 35 ++++++----- .../MarriageApplicationValidator.java | 6 +- .../MarriageApplicationController.java | 3 + .../controller/CommonController.java | 43 ++++++++++++++ .../marriagecommon/model/SMSRequest.java | 15 +++++ .../marriagecommon/model/WorkFlowCheck.java | 17 ++++++ .../model/common/CommonPay.java | 29 ++++++++++ .../model/common/CommonPayRequest.java | 32 ++++++++++ .../model/common/CommonPayResponse.java | 25 ++++++++ .../repoisitory/CommonRepository.java | 35 +++++++++++ .../services/CommonService.java | 58 +++++++++++++++++++ .../services/CommonValidationFromMdms.java | 46 +++++++++++++++ .../mapper/RegistryToApplicationMapper.java | 2 - .../service/MarriageCorrectionService.java | 1 - .../MarriageRegistryEnrichment.java | 31 +--------- .../MarriageRegistryRepository.java | 5 +- .../MarriageRegistryQueryBuilder.java | 7 +-- .../model/MarriageRegistrySearchCriteria.java | 36 +----------- ...0419145000__marriage_amount_insert_dll.sql | 5 ++ 21 files changed, 342 insertions(+), 95 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/controller/CommonController.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/SMSRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/WorkFlowCheck.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPayRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPayResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/repoisitory/CommonRepository.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonService.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonValidationFromMdms.java create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230419145000__marriage_amount_insert_dll.sql diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index f1a0094e830..a74a56fda05 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -126,4 +126,9 @@ public class MarriageApplicationConfiguration { @Value("${egov.marriage.image.startPoint}") private String imageURLStartPath; + @Value("${persister.update.marriage.demand.topic}") + private String updateDemandTopic; + + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 26b59738593..191f97cdd26 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -120,7 +120,6 @@ public int getMarriageCount(MarriageApplicationSearchCriteria criteria) { List preparedStmtList = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageCountQuery(criteria, preparedStmtList, Boolean.FALSE); int MarriageCount = jdbcTemplate.queryForObject(query,preparedStmtList.toArray(),Integer.class); - // System.out.println("Marriagecountquery"+query); return MarriageCount; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index a020ee312b9..553765bc426 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -57,8 +57,6 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication public List saveMarriageDetails(MarriageDetailsRequest request) { - - //System.out.println("Workflowtesting"+request.getMarriageDetails().get(0).getIsWorkflow()); WorkFlowCheck wfc = new WorkFlowCheck(); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); validatorService.ruleEngineMarriage(request, wfc, mdmsData); @@ -66,23 +64,24 @@ public List saveMarriageDetails(MarriageDetailsReque mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - - - // System.out.println("CheckWorkFlow"+request.getMarriageDetails().get(0).isWorkflow()); if (request.getMarriageDetails().get(0).getIsWorkflow()){ workflowIntegrator.callWorkFlow(request); } - request.getMarriageDetails().forEach(marriage->{ + + request.getMarriageDetails().forEach(marriage->{ + + System.out.println("workflowstatus"+marriage.getStatus() ); if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); Demand demand = new Demand(); demand.setTenantId(marriage.getTenantid()); demand.setConsumerCode(marriage.getApplicationNumber()); demands.add(demand); - marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); } }); - return request.getMarriageDetails(); + // producer.push(marriageApplicationConfiguration.getUpdateDemandTopic(), request); + return request.getMarriageDetails(); } public List updateMarriageDetails(MarriageDetailsRequest request) { @@ -101,16 +100,16 @@ public List updateMarriageDetails(MarriageDetailsReq workflowIntegrator.callWorkFlow(request); } producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); - request.getMarriageDetails().forEach(marriage->{ - if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - List demands = new ArrayList<>(); - Demand demand = new Demand(); - demand.setTenantId(marriage.getTenantid()); - demand.setConsumerCode(marriage.getApplicationNumber()); - demands.add(demand); - marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); - } - }); + // request.getMarriageDetails().forEach(marriage->{ + // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + // List demands = new ArrayList<>(); + // Demand demand = new Demand(); + // demand.setTenantId(marriage.getTenantid()); + // demand.setConsumerCode(marriage.getApplicationNumber()); + // demands.add(demand); + // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + // } + // }); return request.getMarriageDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 72c5b29eea2..54e22715e8c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -105,13 +105,13 @@ public int getDaysDiff(Date dateToCheck) private void validateDoM(Long dateOfMarriage, String wfCode, String applicationType,Object mdmsData, WorkFlowCheck wfc) { Calendar calendar = Calendar.getInstance(); Long currentDate = calendar.getTimeInMillis(); - + System.out.println("wfCode"+wfCode); if (dateOfMarriage > currentDate) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Date of death should be less than or same as current date."); } else { wfc = checkValidation(mdmsData, dateOfMarriage, wfc); - + System.out.println("wfc"+wfc.getWorkflowCode()); if(!wfc.getWorkflowCode().equals(wfCode)) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Workflow code from the application request is wrong."); @@ -129,6 +129,7 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF Long currentDate = calendar.getTimeInMillis(); List> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); + //System.out.println("mdmswfcode"+wfLists); for (int n = 0; n < wfLists.size(); n++) { String startStr = wfLists.get(n).get("startdateperiod").toString(); String endStr = wfLists.get(n).get("enddateperiod").toString(); @@ -136,6 +137,7 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF Long end = Long.parseLong(endStr); if (end > 0L) { Long comp = currentDate - dateOfMarriage; + // System.out.println("datedifference"+comp); if (comp > start && comp <= end){ wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); wfc.setWorkflowCode(wfLists.get(n).get("WorkflowCode").toString()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index 5dbc8780e00..eb1432c10c0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -91,6 +91,7 @@ public ResponseEntity searchMarriageDetails(@Reques @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { int count=repository.getMarriageCount(criteria); + List marriageDetails = MarriageService.searchMarriageDetails(criteria, request.getRequestInfo()); // try { // ObjectMapper mapper = new ObjectMapper(); @@ -108,4 +109,6 @@ public ResponseEntity searchMarriageDetails(@Reques .build(); return ResponseEntity.ok(response); } + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/controller/CommonController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/controller/CommonController.java new file mode 100644 index 00000000000..18d98904658 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/controller/CommonController.java @@ -0,0 +1,43 @@ +package org.ksmart.marriage.marriagecommon.controller; + +import lombok.extern.slf4j.Slf4j; + +import org.ksmart.marriage.marriagecommon.model.common.CommonPay; +import org.ksmart.marriage.marriagecommon.model.common.CommonPayRequest; +import org.ksmart.marriage.marriagecommon.model.common.CommonPayResponse; +import org.ksmart.marriage.marriagecommon.services.CommonService; +import org.ksmart.marriage.utils.ResponseInfoFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Slf4j +@RestController +@RequestMapping("/cr/common") +public class CommonController { + private final CommonService commonService; + private final ResponseInfoFactory responseInfoFactory; + @Autowired + CommonController(CommonService commonService, ResponseInfoFactory responseInfoFactory){ + this.commonService = commonService; + this.responseInfoFactory = responseInfoFactory; + } + + @PostMapping(value = {"/updatepaywf"}) + public ResponseEntity updatePaymentWorkflow(@RequestBody CommonPayRequest request) { + List paymentDetails=commonService.updatePaymentWorkflow(request); + CommonPayResponse response= CommonPayResponse.builder() + .payments(paymentDetails) + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), + true)) + .build(); + return new ResponseEntity<>(response, HttpStatus.OK); + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/SMSRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/SMSRequest.java new file mode 100644 index 00000000000..3e038fc396b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/SMSRequest.java @@ -0,0 +1,15 @@ +package org.ksmart.marriage.marriagecommon.model; + +import lombok.*; + + +@Getter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ToString +public class SMSRequest { + private String mobileNumber; + private String message; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/WorkFlowCheck.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/WorkFlowCheck.java new file mode 100644 index 00000000000..10d289f94c7 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/WorkFlowCheck.java @@ -0,0 +1,17 @@ +package org.ksmart.marriage.marriagecommon.model; + +import lombok.*; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@EqualsAndHashCode +public class WorkFlowCheck { + private String WorkflowCode = null; + private String ApplicationType = null; + private Boolean payment = null; + private Integer amount = 0; + private Boolean active = null; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java new file mode 100644 index 00000000000..1cf366b23ce --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java @@ -0,0 +1,29 @@ +package org.ksmart.marriage.marriagecommon.model.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; + +import javax.validation.constraints.Size; +import java.math.BigDecimal; +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ToString +public class CommonPay { + @Size(max = 64) + @JsonProperty("applicationNumber") + private String applicationNo; + + private String action; + + private String applicationStatus; + + private Boolean hasPayment; + + @JsonProperty("isPaymentSuccess") + private Boolean isPaymentSuccess; + + private BigDecimal amount = BigDecimal.ZERO; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPayRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPayRequest.java new file mode 100644 index 00000000000..6ac0aabe7e8 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPayRequest.java @@ -0,0 +1,32 @@ +package org.ksmart.marriage.marriagecommon.model.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.request.RequestInfo; + +import javax.validation.Valid; +import javax.validation.constraints.Size; +import java.math.BigDecimal; +import java.util.List; + +@Getter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ToString +public class CommonPayRequest { + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + @JsonProperty("PaymentDetails") + @Valid + private List commonPays; + + public CommonPayRequest addPayment(CommonPay commonPay) { + if (commonPays == null) { + commonPays = null; + } + return this; + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPayResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPayResponse.java new file mode 100644 index 00000000000..2d3efe8b265 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPayResponse.java @@ -0,0 +1,25 @@ +package org.ksmart.marriage.marriagecommon.model.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.egov.common.contract.response.ResponseInfo; + +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class CommonPayResponse { + @JsonProperty("ResponseInfo") + @Valid + private ResponseInfo responseInfo; + + @JsonProperty("CommonPayRequest") + @Valid + private List payments = new ArrayList<>(); +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/repoisitory/CommonRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/repoisitory/CommonRepository.java new file mode 100644 index 00000000000..69ff72cbb85 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/repoisitory/CommonRepository.java @@ -0,0 +1,35 @@ +package org.ksmart.marriage.marriagecommon.repoisitory; + +import lombok.extern.slf4j.Slf4j; + +import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriagecommon.model.common.CommonPay; +import org.ksmart.marriage.marriagecommon.model.common.CommonPayRequest; +// import org.ksmart.birth.birthcommon.model.common.CommonPay; +// import org.ksmart.birth.birthcommon.model.common.CommonPayRequest; +// import org.ksmart.birth.common.producer.BndProducer; +// import org.ksmart.birth.config.BirthConfiguration; +// import org.ksmart.birth.web.model.newbirth.NewBirthApplication; +// import org.ksmart.birth.web.model.newbirth.NewBirthDetailRequest; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Slf4j +@Repository +public class CommonRepository { + private final MarriageProducer producer; + + private final MarriageApplicationConfiguration marriageConfiguration; + @Autowired + CommonRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageConfiguration){ + this.producer = producer; + this.marriageConfiguration = marriageConfiguration; + } + public List updatePaymentDetails(CommonPayRequest request) { + producer.push(marriageConfiguration.getUpdateDemandTopic(), request); + return request.getCommonPays(); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonService.java new file mode 100644 index 00000000000..b226b546855 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonService.java @@ -0,0 +1,58 @@ +package org.ksmart.marriage.marriagecommon.services; + +import lombok.extern.slf4j.Slf4j; + +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriagecommon.model.common.CommonPay; +import org.ksmart.marriage.marriagecommon.model.common.CommonPayRequest; +import org.ksmart.marriage.marriagecommon.repoisitory.CommonRepository; +// import org.ksmart.birth.birthcommon.model.WorkFlowCheck; +// import org.ksmart.birth.birthcommon.model.common.CommonPay; +// import org.ksmart.birth.birthcommon.model.common.CommonPayRequest; +// import org.ksmart.birth.birthcommon.repoisitory.CommonRepository; +// import org.ksmart.birth.config.BirthConfiguration; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +// import static org.ksmart.birth.utils.BirthConstants.STATUS_FOR_PAYMENT; +import static org.ksmart.marriage.utils.MarriageConstants.STATUS_FOR_PAYMENT; + +@Service +@Slf4j +public class CommonService { + + private final MarriageApplicationConfiguration config; + + private final CommonRepository repository; + + @Autowired + CommonService(MarriageApplicationConfiguration config, CommonRepository repository) { + this.config = config; + this.repository = repository; + } + + + public List updatePaymentWorkflow(CommonPayRequest request) { + List commonPays = request.getCommonPays(); + List commonPayList = new ArrayList<>(); + for (CommonPay birth : commonPays) { + if (birth.getApplicationStatus().equals(STATUS_FOR_PAYMENT) && birth.getIsPaymentSuccess()) { + birth.setAction("INITIATE"); + birth.setApplicationStatus("INITIATED"); + birth.setHasPayment(true); + birth.setAmount(new BigDecimal(10)); + commonPayList = repository.updatePaymentDetails(request); + } else if(birth.getApplicationStatus().equals(STATUS_FOR_PAYMENT) && !birth.getIsPaymentSuccess()){ + birth.setAction(""); + birth.setApplicationStatus("STATUS_FOR_PAYMENT"); + birth.setHasPayment(true); + birth.setAmount(new BigDecimal(0)); + } + } + return commonPayList; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonValidationFromMdms.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonValidationFromMdms.java new file mode 100644 index 00000000000..d6eab885ee6 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonValidationFromMdms.java @@ -0,0 +1,46 @@ +package org.ksmart.marriage.marriagecommon.services; + +import com.jayway.jsonpath.JsonPath; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WorkFlowCheck; +import org.ksmart.marriage.utils.MarriageConstants; +// import org.ksmart.birth.birthcommon.model.WorkFlowCheck; + +import org.springframework.stereotype.Service; + +import java.util.Calendar; +import java.util.LinkedHashMap; +import java.util.List; +@Service +public class CommonValidationFromMdms { + + public WorkFlowCheck checkValidation(Object mdmsData, String birthPlace, Long dob, WorkFlowCheck wfc) { + Calendar calendar = Calendar.getInstance(); + Long currentDate = calendar.getTimeInMillis(); + List> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); + for (int n = 0; n < wfLists.size(); n++) { + String startStr = wfLists.get(n).get("startdateperiod").toString(); + String endStr = wfLists.get(n).get("enddateperiod").toString(); + Long start = Long.parseLong(startStr); + Long end = Long.parseLong(endStr); + if (wfLists.get(n).get("BirtPlace").equals(birthPlace)) { + if (end > 0L) { + Long comp = currentDate - dob; + if (comp <= end && comp >= start) { + wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); + wfc.setWorkflowCode(wfLists.get(n).get("WorkflowCode").toString()); + if(wfLists.get(n).get("payment").toString().equals("true")) + wfc.setPayment(true); + else + wfc.setPayment(false); + wfc.setAmount(Integer.parseInt(wfLists.get(n).get("amount").toString())); + wfc.setActive(Boolean.getBoolean(wfLists.get(n).get("active").toString())); + } + } + } + } + return wfc; + } +} + + + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 2218463d7c0..7b73c12c343 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -23,7 +23,6 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.setBrideAddressDetails(new BrideAddressDetails()); marriageApplicationDetails.setGroomAddressDetails(new GroomAddressDetails()); - MarriageRegistryDetails marriageRegistryDetails=registry.get(0); marriageApplicationDetails.setDateofmarriage(marriageRegistryDetails.getDateofmarriage()); @@ -52,7 +51,6 @@ public MarriageApplicationDetails convert(List registry //marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukid()); //marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillage_name()); - //marriageApplicationDetails.getBrideDetails().setBrideId(marriageRegistryDetails.getBrideDetails().getBrideId()); marriageApplicationDetails.getBrideDetails().setBrideGroom(marriageRegistryDetails.getBrideDetails().getBrideGroom()); marriageApplicationDetails.getBrideDetails().setResidentship(marriageRegistryDetails.getBrideDetails().getResidentship()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 7ea1a57fe07..772cae80968 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -109,7 +109,6 @@ public List createCorrection(MarriageCorrectionReques if (!marriageRegistryDetails.isEmpty()) { MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); marriageCorrectionEnrichment.enrichCreate(request, marriageApplicationDetail); - List marriageApplicationDetailsList = new ArrayList<>(); marriageApplicationDetailsList.add(marriageApplicationDetail); request.setMarriageDetails(marriageApplicationDetailsList); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 6ed4dcc3d50..c29e23ffa65 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -296,18 +296,11 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - - - // } } - - - } }); - } public void setBridePresentAddress(MarriageRegistryRequest request) { @@ -402,22 +395,11 @@ public void setBridePresentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); - - - // } } - } - - - + } } - - }); - - - } private void setBridePermanentAddress(MarriageRegistryRequest request) { @@ -499,7 +481,6 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { // } } - } }); } @@ -521,23 +502,15 @@ private void validateFileCodes(List fileCodes, int count) { if (CollectionUtils.isEmpty(fileCodes)) { throw new CustomException(ErrorCodes.IDGEN_ERROR.getCode(), "No file code(s) returned from idgen service"); } - } - - public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { - - StringBuilder groomAddressBuilder = new StringBuilder(); if (registryDetails.getGroomAddressDetails() != null) { - if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != null && registryDetails.getGroomAddressDetails().getPermtaddressStateName() != null) { if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - - Object mdmsGroomAddressData = util.mDMSCallGetAddress(req , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() , registryDetails.getGroomAddressDetails().getDistrictIdPermanent() @@ -827,7 +800,7 @@ public void createCertificateNo(MarriageRegistryRequest marriageRegistryRequest) tenantId, config.getGetMarriageCertificateName(), e.getModuleCode(), - "CERT", 1); + "CER", 1); ListIterator itr = ackNoDetails.listIterator(); e.setCertificateNo(itr.next()); // e.setDateofIssue(currentTime); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 4b1b0a91e3c..525a96bc208 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -301,14 +301,17 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla // if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); // } +System.out.println("MarriageCertificatechecking"+marriageCertPDFRequest.getMarriageCertificate()); marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; + System.out.println("MarriageCertificateTenantId"+tenantId); String marriageCertPath = StringUtils.replace(marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(),"$tenantId", tenantId); String pdfFinalPath = uiHost + marriageCertPath; + System.out.println("pdfFinalPath"+pdfFinalPath); System.out.println(new Gson().toJson(req)); MarriageCertPdfResponse response = restTemplate.postForObject(pdfFinalPath, req, MarriageCertPdfResponse.class);//Creating PDF - + System.out.println("pdfResponse"+response); if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { throw new CustomException("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE", "No file store id found from pdf service"); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index fbf65ed5309..cce0020db85 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -6,7 +6,7 @@ import javax.validation.constraints.NotNull; import java.util.List; /** - * Created by Jasmine + * Created by Jasminezxx * on 24.03.2023 */ @Component @@ -113,9 +113,6 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("WD2.serial_no = 2 ") .toString(); - - - public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCriteria criteria, @NotNull List preparedStmtValues, Boolean isCount) { @@ -161,7 +158,6 @@ else if (criteria.getSortBy() == MarriageRegistrySearchCriteria.SortBy.tenantId) addOrderByColumns("MD.tenantid",criteria.getSortOrder().toString(), orderBy); addOrderToQuery(orderBy, query); addLimitAndOffset(criteria.getOffset(),criteria.getLimit(), query, preparedStmtValues); - return query.toString(); } @@ -198,7 +194,6 @@ public String getMarriageCertificateSearchQuery(String id, List prepared .append("WD2.serial_no = 2 ") .toString(); - public String getMarriageRegistryCountQuery(@NotNull MarriageRegistrySearchCriteria criteria, @NotNull List preparedStmtValues, Boolean isCount) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java index 24b22d59a82..efe42401a9d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java @@ -29,7 +29,6 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("certificateNo") private String certificateNo; - @JsonProperty("marriageDOM") private Long marriageDOM; @@ -38,24 +37,9 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("groomFirstnameEn") private String groomFirstnameEn; - // @JsonProperty("groomFirstnameMl") - // private String groomFirstnameMl; - - // @JsonProperty("groomMiddlenameEn") - // private String groomMiddlenameEn; - - // @JsonProperty("groomMiddlenameMl") - // private String groomMiddlenameMl; - - // @JsonProperty("groomLastnameEn") - // private String groomLastnameEn; - - // @JsonProperty("groomLastnameMl") - // private String groomLastnameMl; - @JsonProperty("groomAadharNo") private String groomAdharNo; - + //BRIDE @JsonProperty("brideAadharNo") private String brideAdharNo; @@ -63,21 +47,6 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("brideFirstnameEn") private String brideFirstnameEn; - // @JsonProperty("brideFirstnameMl") - // private String brideFirstnameMl; - - // @JsonProperty("brideMiddlenameEn") - // private String brideMiddlenameEn; - - // @JsonProperty("brideMiddlenameMl") - // private String brideMiddlenameMl; - - // @JsonProperty("brideLastnameEn") - // private String brideLastnameEn; - - // @JsonProperty("brideLastnameMl") - // private String brideLastnameMl; - @JsonProperty("sortBy") private SortBy sortBy; @@ -107,7 +76,6 @@ public enum SortOrder { @JsonProperty("toDate") private Long toDate; - public enum SourceEnum { sms("sms"), @@ -144,6 +112,4 @@ public static SourceEnum fromValue(String text) { } } private SourceEnum source; - - } diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230419145000__marriage_amount_insert_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230419145000__marriage_amount_insert_dll.sql new file mode 100644 index 00000000000..cc21ad00b1f --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230419145000__marriage_amount_insert_dll.sql @@ -0,0 +1,5 @@ +ALTER TABLE public.eg_marriage_details + ADD COLUMN IF NOT EXISTS amount BIGINT ; + + ALTER TABLE public.eg_marriage_details_audit + ADD COLUMN IF NOT EXISTS amount BIGINT ; \ No newline at end of file From e4dcb834e9494217bd4f818a5d5ed018e2343859 Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 19 Apr 2023 16:52:23 +0530 Subject: [PATCH 227/420] changes in marriage services --- .../MarriageRegistryRepository.java | 348 ++++++++++-------- .../web/model/MarriageRegistryDetails.java | 2 +- .../model/certmodel/MarriageCertificate.java | 3 + .../marriage/utils/MarriageMdmsUtil.java | 29 +- .../src/main/resources/application.properties | 4 +- 5 files changed, 219 insertions(+), 167 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 8633abaff55..ec4e22c4765 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -123,110 +123,128 @@ public List searchCertificateByMarriageId(String id) { public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marriageCertPDFRequest) { MarriageCertPdfResponse pdfResponse = new MarriageCertPdfResponse(); try { -// marriagecertpdfrequest.getmarriagecertificate().foreach(cert->{ -// string uihost = marriageapplicationconfiguration.getuiapphost(); -// string marriagecertpath = stringutils.replaceeach(marriageapplicationconfiguration.getmarriagecertlink(),new string[]{"$id","$tenantid","$regno","$marriagecertificateno"}, new string[]{cert.getid(),cert.gettenantid(),cert.getregistrationno(),cert.getmarriagecertificateno()}); -// cert.setembeddedurl(getshortenedurl(uihost+marriagecertpath)); -// -// -// -// }); - MarriageCertPDFRequest req = MarriageCertPDFRequest.builder().marriageCertificate(marriageCertPDFRequest.getMarriageCertificate()).requestInfo(marriageCertPDFRequest.getRequestInfo()).build(); - //TODO pdf data creation - StringBuilder groomFullName = new StringBuilder(); - groomFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en()); - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en())){ - groomFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en()); - } - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en())){ - groomFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en()); - } - req.getMarriageCertificate().get(0).setGroomFullName(groomFullName.toString()); - - StringBuilder brideFullName = new StringBuilder(); - brideFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getFirstname_en()); - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en())){ - brideFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en()); - } - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en())){ - brideFullName.append(" "+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en()); - } - req.getMarriageCertificate().get(0).setBrideFullName(brideFullName.toString()); - //Setting Marriage Place Address------------------------------------------------------------------------------------------ - StringBuilder marriageAddr = new StringBuilder(); - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype())) { - if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() - .equals(MarriageConstants.PLACE_TYPE_HOUSE)) { - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn()+","); + if (marriageCertPDFRequest != null && marriageCertPDFRequest.getMarriageCertificate() != null && marriageCertPDFRequest.getMarriageCertificate().size() > 0 + &&null!=marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails()) { + MarriageCertPDFRequest req = MarriageCertPDFRequest.builder().marriageCertificate(marriageCertPDFRequest.getMarriageCertificate()).requestInfo(marriageCertPDFRequest.getRequestInfo()).build(); + //TODO pdf data creation + if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails()&& StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en())) { + StringBuilder groomFullName = new StringBuilder(); + groomFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en()); + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en())) { + groomFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en()); } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en()+","); + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en())) { + groomFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en()); } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en()+","); + req.getMarriageCertificate().get(0).setGroomFullName(groomFullName.toString()); + }else{ + throw new CustomException("PDF_ERROR", "Groom Details not found!!!" ); + } + if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails()&& + StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getFirstname_en())) { + StringBuilder brideFullName = new StringBuilder(); + brideFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getFirstname_en()); + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en())) { + brideFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en()); } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark()+","); - } - Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); - util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); - System.out.println(marriageAddr); - }else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() - .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) - || req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() - .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) - { - if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid())) { - Object mdmsMarriagePlaceData1 = util.mDMSCallGetMandapamAddress(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); - System.out.println(mdmsMarriagePlaceData1); - if (null != mdmsMarriagePlaceData1) { - Map mdmsMap1 = util.getMandapamAttributeValues(mdmsMarriagePlaceData1); - if (null != mdmsMap1) { - util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_ADDRESS, mdmsMap1), marriageAddr, true); - util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_MAIN_PLACE, mdmsMap1), marriageAddr, true); - Object mdmsMarriagePlaceData = util.mDMSCallGetAddressFromIds(req.getRequestInfo() - , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_TENENT_CODE, mdmsMap1) - , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_DIST_ID, mdmsMap1) - , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_STATE_ID, mdmsMap1) - , null - , null - , null - , null); - if(null!=mdmsMarriagePlaceData) { - Map> mdmsMap = util.getMarriageMDMSData(req, mdmsMarriagePlaceData); - if(null!=mdmsMap) { - System.out.println(getValueFromMap(MarriageConstants.DISTRICT, mdmsMap)); - util.appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsMap), marriageAddr, true); - util.appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsMap), marriageAddr, true); - Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); - util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); - System.out.println(marriageAddr); - } - } - } - } + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en())) { + brideFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en()); } + req.getMarriageCertificate().get(0).setBrideFullName(brideFullName.toString()); + }else{ + throw new CustomException("PDF_ERROR", "Bride Details not found!!!" ); } + if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails()){ + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { - else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( - MarriageConstants.PLACE_TYPE_PRIVATE_PLACE) || - (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( - MarriageConstants.PLACE_TYPE_PUBLIC_PLACE))||(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( - MarriageConstants.PLACE_OTHER))) { - if (!StringUtils.isEmpty( - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn()+","); - } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en()+","); - } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en()+","); + //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath() + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); + }else{ + throw new CustomException("PDF_ERROR", "Groom Photo not found!!!" ); } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark()+","); + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { + //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); + }else{ + throw new CustomException("PDF_ERROR", "Bride Photo not found!!!" ); } + }else{ + throw new CustomException("PDF_ERROR", "Bride and Groom Photos not found!!!" ); + } + + if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype()) { + // Map> mdmsTenantMap = util.mDMSCallGetTenantData(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid()); + //req.getMarriageCertificate().get(0).setLbType(getValueFromMap(MarriageConstants.LBTYPE, mdmsTenantMap)); + //Setting Marriage Place Address------------------------------------------------------------------------------------------ + StringBuilder marriageAddr = new StringBuilder(); + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype())) { + if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_HOUSE)) { + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn() + ","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en() + ","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en() + ","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark() + ","); + } + Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); + System.out.println(marriageAddr); + } else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) + || req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() + .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) { + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid())) { + Object mdmsMarriagePlaceData1 = util.mDMSCallGetMandapamAddress(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); + System.out.println(mdmsMarriagePlaceData1); + if (null != mdmsMarriagePlaceData1) { + Map mdmsMap1 = util.getMandapamAttributeValues(mdmsMarriagePlaceData1); + if (null != mdmsMap1) { + util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_ADDRESS, mdmsMap1), marriageAddr, true); + util.appendIfNotBlank(getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_MAIN_PLACE, mdmsMap1), marriageAddr, true); + Object mdmsMarriagePlaceData = util.mDMSCallGetAddressFromIds(req.getRequestInfo() + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_TENENT_CODE, mdmsMap1) + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_DIST_ID, mdmsMap1) + , getValueFromMapOfStr(MarriageConstants.MARRIAGE_PLACE_STATE_ID, mdmsMap1) + , null + , null + , null + , null); + if (null != mdmsMarriagePlaceData) { + Map> mdmsMap = util.getMarriageMDMSData(req, mdmsMarriagePlaceData); + if (null != mdmsMap) { + System.out.println(getValueFromMap(MarriageConstants.DISTRICT, mdmsMap)); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsMap), marriageAddr, true); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsMap), marriageAddr, true); + Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); + System.out.println(marriageAddr); + } + } + } + } + } + } else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( + MarriageConstants.PLACE_TYPE_PRIVATE_PLACE) || + (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( + MarriageConstants.PLACE_TYPE_PUBLIC_PLACE)) || (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype().equals( + MarriageConstants.PLACE_OTHER))) { + if (!StringUtils.isEmpty( + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn() + ","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en() + ","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en() + ","); + } + if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark() + ","); + } // Object mdmsMarriagePlaceAddressData = util.mDMSCallGetAddress(req.getRequestInfo() // , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() @@ -236,61 +254,61 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla // , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() // , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() // , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); - util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); - System.out.println(marriageAddr); + Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); + util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); + System.out.println(marriageAddr); + } + req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(marriageAddr.toString()); + } + }else{ + throw new CustomException("PDF_ERROR"," Marriage Place Type is Empty"); } - req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(marriageAddr.toString()); - } - - StringBuilder groomAddr = new StringBuilder(); - //Setting Groom Address data from MDMS - Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(req,mdmsGroomAddressData); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS,mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT,mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE,mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); + StringBuilder groomAddr = new StringBuilder(); + //Setting Groom Address data from MDMS + Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsGroomAddressMap = util.getMarriageMDMSData(req, mdmsGroomAddressData); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsGroomAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsGroomAddressMap)); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().get).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName()).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKerala).append(", "); // groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); - req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); - req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); - //Setting groom NRI address - - //Setting bride address data from MDMS - Object mdmsBrideAddressData = util.mDMSCallGetAddress(req.getRequestInfo() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getDistrictIdPresent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getStateIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getCountryIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPoNoPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getVillageNamePermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsBrideAddressMap = util.getMarriageMDMSData(req,mdmsBrideAddressData); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS,mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT,mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE,mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY,mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE,mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsBrideAddressMap)); - - + req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + //Setting groom NRI address + + //Setting bride address data from MDMS + Object mdmsBrideAddressData = util.mDMSCallGetAddress(req.getRequestInfo() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getDistrictIdPresent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getStateIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getCountryIdPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPoNoPermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getVillageNamePermanent() + , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + Map> mdmsBrideAddressMap = util.getMarriageMDMSData(req, mdmsBrideAddressData); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsBrideAddressMap)); + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsBrideAddressMap)); // if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { @@ -300,27 +318,31 @@ else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPla // if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); // } - marriageCertPDFRequest.getMarriageCertificate().forEach(cert-> { - String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); - String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; - String marriageCertPath = StringUtils.replace(marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(),"$tenantId", tenantId); - String pdfFinalPath = uiHost + marriageCertPath; - System.out.println(new Gson().toJson(req)); - MarriageCertPdfResponse response = restTemplate.postForObject(pdfFinalPath, req, MarriageCertPdfResponse.class);//Creating PDF - - if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { - throw new CustomException("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE", - "No file store id found from pdf service"); - } - pdfResponse.setFilestoreIds(response.getFilestoreIds()); - }); + marriageCertPDFRequest.getMarriageCertificate().forEach(cert -> { + String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); + String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; + String marriageCertPath = StringUtils.replace(marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(), "$tenantId", tenantId); + String pdfFinalPath = uiHost + marriageCertPath; + System.out.println(new Gson().toJson(req)); + MarriageCertPdfResponse response = restTemplate.postForObject(pdfFinalPath, req, MarriageCertPdfResponse.class);//Creating PDF + + if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { + throw new CustomException("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE", + "No file store id found from pdf service"); + } + pdfResponse.setFilestoreIds(response.getFilestoreIds()); + }); + }else{ + throw new CustomException("PDF_ERROR", "Error in generating PDF. Marriage Registry Data is Empty" ); + } + + }catch(Exception e){ + e.printStackTrace(); + System.out.println(e.getMessage()); + throw new CustomException("PDF_ERROR", "Error in generating PDF" + e.getMessage()); + } + return pdfResponse; - }catch (Exception e){ - e.printStackTrace(); - System.out.println(e.getMessage()); - throw new CustomException("PDF_ERROR","Error in generating PDF"+e.getMessage()); - } - return pdfResponse; } public String getShortenedUrl(String url) { HashMap body=new HashMap<>(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java index 455a7e07154..d60d1122486 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java @@ -34,7 +34,7 @@ public class MarriageRegistryDetails { private String districtid; @Size(max = 64) - @JsonProperty("marriageLBtype") + @JsonProperty("marriageLBtype") private String lbtype; @Size(max = 64) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index 981fd417133..f3f8e230217 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -87,6 +87,9 @@ public class MarriageCertificate { @JsonProperty("groomNRIAddress") private String groomNRIAddress; + @JsonProperty("lbType") + private String lbType; + // // @Size(max = 64) // @JsonProperty("marriagePlacetype") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index dee45b4427a..e2f279946e2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -71,6 +71,17 @@ private MdmsCriteriaReq getMDMSRequest(RequestInfo requestInfo, String tenantId) .requestInfo(requestInfo).build(); return mdmsCriteriaReq; } + + private MdmsCriteriaReq getMDMSRequestForTenant(RequestInfo requestInfo, String tenantId) { + ModuleDetail tenantIdRequest = getTenantIdRequest(tenantId); + List moduleDetails = new LinkedList<>(); + moduleDetails.add(tenantIdRequest); + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) + .build(); + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + return mdmsCriteriaReq; + } public StringBuilder getMdmsSearchUrl() { return new StringBuilder().append(config.getMdmsHost()).append(config.getMdmsEndPoint()); } @@ -79,7 +90,7 @@ private ModuleDetail getTenantIdRequest(String tenantId) { // master details for Marriage module List marriageMasterDetails = new ArrayList<>(); // filter to only get code field from master data - final String filterCode = "$.[?(@.code=='"+tenantId+"')].*"; + final String filterCode = "$.[?(@.code=='"+tenantId+"')]"; // final String filterCode = "$.[?(@.active==true)].code"; marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.TENANTS).filter(filterCode).build()); @@ -737,6 +748,22 @@ public Map> mDMSCallGetCountry(RequestInfo requestInfo return null; } + + public Map> mDMSCallGetTenantData(RequestInfo requestInfo + , String tenantId) { + log.info("Inside mDMSCallGetTenant "+tenantId); + MdmsCriteriaReq mdmsCriteriaReq = getMDMSRequestForTenant(requestInfo, tenantId); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + log.info("result mDMSCallGetTenant "+result.toString()); + if(null!=result){ + List modulepaths = Arrays.asList( + MarriageConstants.COMMON_MASTER_JSONPATH, + MarriageConstants.TENANT_JSONPATH); + return getAttributeValuesForJsonPaths(result,modulepaths); + } + return null; + } + private MdmsCriteriaReq getMDMSRequestForAddressFromIds(RequestInfo requestInfo , String tenantId , String presentAddressDistrict diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index af59efa6fe1..58c0247c2c2 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -102,8 +102,8 @@ egov.pdf.birthcert.postendpoint=/egov-pdf/download/BIRTHDEATH/birth-certificate? egov.pdf.deathcert.postendpoint=/egov-pdf/download/BIRTHDEATH/death-certificate?tenantId=$tenantId #pdf service path config -# egov.pdfservice.host=http://localhost:8080/ -egov.pdfservice.host= https://ksmart-dev.lsgkerala.gov.in/ + egov.pdfservice.host=http://localhost:8080 +#egov.pdfservice.host= https://ksmart-dev.lsgkerala.gov.in egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certificate&tenantId=$tenantId egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId From 3955498d04425b8ab2cc6f0dd34e77c72ced39b3 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Wed, 19 Apr 2023 16:55:14 +0530 Subject: [PATCH 228/420] Marriage correction field changes --- .../main/resources/marriage-correction.yml | 186 +++++++++-------- .../MarriageCorrectionEnrichment.java | 197 +++++------------- ...CorrectionApplicationToRegistryMapper.java | 128 ++++++------ .../mapper/RegistryToApplicationMapper.java | 2 + .../service/MarriageCorrectionService.java | 6 +- .../MarriageCorrectionApplnValidator.java | 39 ++++ .../MarriageCorrectionMDMSValidator.java | 12 +- .../web/model/MarriageCorrectionDetails.java | 2 + 8 files changed, 274 insertions(+), 298 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index f1c156f0927..fd600a8f731 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -261,11 +261,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermanentAddrVillageId - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrTaluk - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk @@ -285,7 +285,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent @@ -303,7 +303,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn @@ -313,13 +313,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentOutsideIndiaPostCode - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent @@ -339,11 +339,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermanentAddrVillageId - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentAddrTalukId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrTaluk - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk @@ -381,7 +381,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthPostOfficeEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLineoneEn @@ -391,11 +391,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaprovinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOthrIndiaprovinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.outSideIndiaPostCodePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentOutsideIndiaPostCode - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl @@ -557,47 +557,49 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.registrationno - - query: UPDATE public.eg_register_marriage_details SET - dateofmarriage=?, districtid=?, talukid=?, village_name=?, lbtype=?, ward_code=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, - locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housenameno_en=?, housenameno_ml=?, landmark=?, lastmodifiedtime=?, - lastmodifiedby=? WHERE registrationno =? and id=? ; + - query: UPDATE public.eg_register_marriage_details SET dateofmarriage=?, lastmodifiedtime=?, lastmodifiedby=? WHERE registrationno =? and id=? ; + +# - query: UPDATE public.eg_register_marriage_details SET +# dateofmarriage=?, districtid=?, talukid=?, village_name=?, lbtype=?, ward_code=?, placetype=?, placeid=?, placename_en=?, placename_ml=?, +# locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housenameno_en=?, housenameno_ml=?, landmark=?, lastmodifiedtime=?, +# lastmodifiedby=? WHERE registrationno =? and id=? ; basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.marriageDOM - - jsonPath: $.MarriageDetails.*.marriageDistrictid + #- jsonPath: $.MarriageDetails.*.marriageDistrictid - - jsonPath: $.MarriageDetails.*.marriageTalukID + #- jsonPath: $.MarriageDetails.*.marriageTalukID - - jsonPath: $.MarriageDetails.*.marriageVillageName + #- jsonPath: $.MarriageDetails.*.marriageVillageName - - jsonPath: $.MarriageDetails.*.marriageLBtype + #- jsonPath: $.MarriageDetails.*.marriageLBtype - - jsonPath: $.MarriageDetails.*.marriageWardCode + #- jsonPath: $.MarriageDetails.*.marriageWardCode - - jsonPath: $.MarriageDetails.*.marriagePlacetype + #- jsonPath: $.MarriageDetails.*.marriagePlacetype - - jsonPath: $.MarriageDetails.*.placeid + #- jsonPath: $.MarriageDetails.*.placeid - - jsonPath: $.MarriageDetails.*.marriagePlacenameEn + #- jsonPath: $.MarriageDetails.*.marriagePlacenameEn - - jsonPath: $.MarriageDetails.*.marriagePlacenameMl + #- jsonPath: $.MarriageDetails.*.marriagePlacenameMl - - jsonPath: $.MarriageDetails.*.marriageLocalityEn + #- jsonPath: $.MarriageDetails.*.marriageLocalityEn - - jsonPath: $.MarriageDetails.*.marriageLocalityMl + #- jsonPath: $.MarriageDetails.*.marriageLocalityMl - - jsonPath: $.MarriageDetails.*.marriageStreetEn + #- jsonPath: $.MarriageDetails.*.marriageStreetEn - - jsonPath: $.MarriageDetails.*.marriageStreetMl + #- jsonPath: $.MarriageDetails.*.marriageStreetMl - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn + #- jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameEn - - jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl + #- jsonPath: $.MarriageDetails.*.marriageHouseNoAndNameMl - - jsonPath: $.MarriageDetails.*.marriageLandmark + #- jsonPath: $.MarriageDetails.*.marriageLandmark - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime @@ -616,13 +618,19 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - query: UPDATE public.eg_register_marriage_bride_groom_details SET - residentship=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, - dateofbirth=?, age=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, guardianname_en=?, guardianname_ml=?, - parent_guardian=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid=? and bride_groom= 'B' ; + firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, + dateofbirth=?, age=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, guardianname_en=?, guardianname_ml=?, + lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid=? and bride_groom= 'B' ; + +# - query: UPDATE public.eg_register_marriage_bride_groom_details SET +# residentship=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, +# dateofbirth=?, age=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, guardianname_en=?, guardianname_ml=?, +# parent_guardian=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid=? and bride_groom= 'B' ; + basePath: MarriageDetails.*.BrideDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip + #- jsonPath: $.MarriageDetails.*.BrideDetails.brideResidentShip - jsonPath: $.MarriageDetails.*.BrideDetails.brideFirstnameEn @@ -652,7 +660,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideGuardiannameMl - - jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian + #- jsonPath: $.MarriageDetails.*.BrideDetails.brideParentGuardian - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime @@ -668,13 +676,19 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - query: UPDATE public.eg_register_marriage_bride_groom_details SET - residentship=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, - dateofbirth=?, age=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, guardianname_en=?, guardianname_ml=?, - parent_guardian=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid=? and bride_groom= 'G' ; + firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, + dateofbirth=?, age=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, guardianname_en=?, guardianname_ml=?, + lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid=? and bride_groom= 'G' ; + +# - query: UPDATE public.eg_register_marriage_bride_groom_details SET +# residentship=?, firstname_en=?, firstname_ml=?, middlename_en=?, middlename_ml=?, lastname_en=?, lastname_ml=?, +# dateofbirth=?, age=?, fathername_en=?, fathername_ml=?, mothername_en=?, mothername_ml=?, guardianname_en=?, guardianname_ml=?, +# parent_guardian=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid=? and bride_groom= 'G' ; + basePath: MarriageDetails.*.GroomDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip + #- jsonPath: $.MarriageDetails.*.GroomDetails.groomResidentShip - jsonPath: $.MarriageDetails.*.GroomDetails.groomFirstnameEn @@ -704,7 +718,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomGuardiannameMl - - jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian + #- jsonPath: $.MarriageDetails.*.GroomDetails.groomParentGuardian - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime @@ -720,20 +734,24 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - query : UPDATE public.eg_register_marriage_permanent_address_details SET - countryid=?, stateid=?, districtid=?, poid=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housename_en=?, housename_ml=?, - village_name=?, pinno=?, tenantid=?, talukid=?, villageid=?, ward_code=?, taluk_name=?, poname_en=?, poname_ml=?, ot_address1_en=?, ot_address1_ml=?, - ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid = ? and bride_groom='B'; + locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housename_en=?, housename_ml=?, + ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, ot_address2_ml=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid = ? and bride_groom='B'; + +# - query : UPDATE public.eg_register_marriage_permanent_address_details SET +# countryid=?, stateid=?, districtid=?, poid=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housename_en=?, housename_ml=?, +# village_name=?, pinno=?, tenantid=?, talukid=?, villageid=?, ward_code=?, taluk_name=?, poname_en=?, poname_ml=?, ot_address1_en=?, ot_address1_ml=?, +# ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid = ? and bride_groom='B'; basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.districtIdPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.localityEnPermanent @@ -747,23 +765,23 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInsideKeralaVillage - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaWardNo - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn @@ -773,11 +791,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceEn + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentOutsideIndiaPostCode + #- jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentOutsideIndiaPostCode - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime @@ -793,20 +811,24 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.id - query : UPDATE public.eg_register_marriage_permanent_address_details SET - countryid=?, stateid=?, districtid=?, poid=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housename_en=?, housename_ml=?, - village_name=?, pinno=?, tenantid=?, talukid=?, villageid=?, ward_code=?, taluk_name=?, poname_en=?, poname_ml=?, ot_address1_en=?, ot_address1_ml=?, - ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid = ? and bride_groom='G'; + locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housename_en=?, housename_ml=?, + ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, ot_address2_ml=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid = ? and bride_groom='G'; + +# - query : UPDATE public.eg_register_marriage_permanent_address_details SET +# countryid=?, stateid=?, districtid=?, poid=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, housename_en=?, housename_ml=?, +# village_name=?, pinno=?, tenantid=?, talukid=?, villageid=?, ward_code=?, taluk_name=?, poname_en=?, poname_ml=?, ot_address1_en=?, ot_address1_ml=?, +# ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, lastmodifiedtime=?, lastmodifiedby=? WHERE marriageid = ? and bride_groom='G'; basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.stateIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.districtIdPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.localityEnPermanent @@ -820,23 +842,23 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInsideKeralaVillage - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaWardNo - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaTaluk - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLineoneEn @@ -846,11 +868,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceEn + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentOutsideIndiaPostCode + #- jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentOutsideIndiaPostCode - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index 7a60cce0449..e979e35d6f5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -67,6 +67,7 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp marriageApplicationDetails.setMarriageDocuments(documentList); marriageApplicationDetails.setTenantid(correction.getTenantid()); marriageApplicationDetails.setApplicationtype(correction.getApplicationtype()); + marriageApplicationDetails.setModuleCode(correction.getModuleCode()); marriageApplicationDetails.setBusinessservice(correction.getBusinessservice()); marriageApplicationDetails.setStatus(correction.getStatus()); marriageApplicationDetails.setAction(correction.getAction()); @@ -229,6 +230,8 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp setBridePermanentAddress(marriageApplicationDetails); setGroomPermanentAddress(marriageApplicationDetails); + + } private Map getJsonFieldNames(Field[] fields) { @@ -256,8 +259,8 @@ private void setApplicationNumbers(MarriageCorrectionRequest correctionRequest, List filecodes = getIds(requestInfo, tenantId, config.getMarriageApplNumberIdName(), - marriageApplicationDetails.getApplicationtype(), - "APPL", + marriageApplicationDetails.getModuleCode(), + "ACK", marriageCorrection.size()); validateFileCodes(filecodes, marriageCorrection.size()); @@ -287,101 +290,54 @@ private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { marriage.getGroomAddressDetails().setBrideGroomPermanent("G"); } - if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { - if (marriage.getGroomAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { - - marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrTalukId(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermanentAddrVillageId(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); - marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); - marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); - marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); - marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); - marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - marriage.getGroomAddressDetails().setPoNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - } else { - marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); - marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); - marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); - marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); - marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); - marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOthrTalukName(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); - marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - } - } else { - if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - } - } - }else if (marriage.getGroomAddressDetails().getCountryIdPermanent() != null && marriage.getGroomAddressDetails().getStateIdPermanent() != null) { + if (marriage.getGroomAddressDetails().getCountryIdPermanent() != null && marriage.getGroomAddressDetails().getStateIdPermanent() != null) { if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { if (marriage.getGroomAddressDetails().getStateIdPermanent().contains(MarriageConstants.STATE_CODE_SMALL)) { - setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent, marriage.getGroomAddressDetails().getPermtaddressCountry()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrTalukId,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrVillageId,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent,marriage.getGroomAddressDetails().getPermtaddressStateName()); - setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent, marriage.getGroomAddressDetails().getPermtaddressCountry()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrTalukId,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrVillageId,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + //setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent,marriage.getGroomAddressDetails().getPermtaddressStateName()); + //setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); setIfNotNull(marriage.getGroomAddressDetails()::setLocalityEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); setIfNotNull(marriage.getGroomAddressDetails()::setLocalityMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - setIfNotNull(marriage.getGroomAddressDetails()::setPoNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPoNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); } else { - setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent , marriage.getGroomAddressDetails().getPermtaddressCountry()); - setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent , marriage.getGroomAddressDetails().getPermtaddressStateName()); - setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); + //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent , marriage.getGroomAddressDetails().getPermtaddressCountry()); + //setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent , marriage.getGroomAddressDetails().getPermtaddressStateName()); + //setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + //setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); setIfNotNull(marriage.getGroomAddressDetails()::setLocalityEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); setIfNotNull(marriage.getGroomAddressDetails()::setLocalityMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrTalukName , marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthPostOfficeEn , marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + //setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrTalukName , marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthPostOfficeEn , marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); } } else { - if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { - setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPresent , marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); - setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + //if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { + //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPresent , marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + //setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + //setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLineoneEn , marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLineoneMl , marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoEn , marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoMl , marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceEn , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceMl , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setOutSideIndiaPostCodePermanent , marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceEn , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceMl , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + //setIfNotNull(marriage.getGroomAddressDetails()::setOutSideIndiaPostCodePermanent , marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - } + //} } } @@ -403,102 +359,53 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { marriage.getBrideAddressDetails().setBrideGroomPermanent("B"); } - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { - if (marriage.getBrideAddressDetails().getPermtaddressCountry().contains(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getBrideAddressDetails().getPermtaddressStateName().contains(MarriageConstants.STATE_CODE_SMALL)) { - - marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermanentAddrTalukId(marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getBrideAddressDetails().setPermanentAddrVillageId(marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); - marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); - marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); - marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); - marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); - marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - } else { - marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); - marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); - marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); - marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); - marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); - marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - - } - } else { - if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); - marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); - marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - - - } - } - }else if (marriage.getBrideAddressDetails().getCountryIdPermanent() != null && marriage.getBrideAddressDetails().getStateIdPermanent() != null) { + if (marriage.getBrideAddressDetails().getCountryIdPermanent() != null && marriage.getBrideAddressDetails().getStateIdPermanent() != null) { if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getStateIdPermanent().contains(MarriageConstants.STATE_CODE_SMALL)) { - setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); - setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); - setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrTalukId, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrVillageId, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); + //setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrTalukId, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrVillageId, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + //setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); setIfNotNull(marriage.getBrideAddressDetails()::setLocalityEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); setIfNotNull(marriage.getBrideAddressDetails()::setLocalityMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - setIfNotNull(marriage.getBrideAddressDetails()::setPoNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPoNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); } else { - setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); - setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); - setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); + //setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); + //setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); setIfNotNull(marriage.getBrideAddressDetails()::setLocalityEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); setIfNotNull(marriage.getBrideAddressDetails()::setLocalityMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); - setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrTalukName, marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); - setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthPostOfficeEn, marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + //setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrTalukName, marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthPostOfficeEn, marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); } } else { - if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { - setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPresent, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); - setIfNotNull(marriage.getBrideAddressDetails()::setTownOrVillagePermanent, marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + //if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPresent, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + //setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + //setIfNotNull(marriage.getBrideAddressDetails()::setTownOrVillagePermanent, marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLineoneEn, marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLineoneMl, marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLinetwoEn, marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaLinetwoMl, marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceEn, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); - setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceMl, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setOutSideIndiaPostCodePermanent, marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceEn, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceMl, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + //setIfNotNull(marriage.getBrideAddressDetails()::setOutSideIndiaPostCodePermanent, marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - } + //} } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java index 92b8127f65f..ae2ae9cae37 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java @@ -22,26 +22,26 @@ public MarriageRegistryRequest convert(List registryDet if (registryDetails.get(0) != null && aplnDetails.get(0) != null) { //Marriage Details registryDetails.get(0).setDateofmarriage(aplnDetails.get(0).getDateofmarriage()); - registryDetails.get(0).setDistrictid(aplnDetails.get(0).getDistrictid()); - registryDetails.get(0).setTalukid(aplnDetails.get(0).getTalukid()); - registryDetails.get(0).setVillage_name(aplnDetails.get(0).getVillageName()); - registryDetails.get(0).setLbtype(aplnDetails.get(0).getLbtype()); - registryDetails.get(0).setWard_code(aplnDetails.get(0).getWardCode()); - registryDetails.get(0).setPlacetype(aplnDetails.get(0).getPlacetype()); - registryDetails.get(0).setPlaceid(aplnDetails.get(0).getPlaceid()); - registryDetails.get(0).setPlacenameEn(aplnDetails.get(0).getPlacenameEn()); - registryDetails.get(0).setPlacenameMl(aplnDetails.get(0).getPlacenameMl()); - registryDetails.get(0).setLocality_en(aplnDetails.get(0).getLocalityEn()); - registryDetails.get(0).setLocality_ml(aplnDetails.get(0).getLocalityMl()); - registryDetails.get(0).setStreet_name_en(aplnDetails.get(0).getStreetNameEn()); - registryDetails.get(0).setStreet_name_ml(aplnDetails.get(0).getStreetNameMl()); - registryDetails.get(0).setMarriageHouseNoAndNameEn(aplnDetails.get(0).getMarriageHouseNoAndNameEn()); - registryDetails.get(0).setMarriageHouseNoAndNameMl(aplnDetails.get(0).getMarriageHouseNoAndNameMl()); - registryDetails.get(0).setLandmark(aplnDetails.get(0).getLandmark()); + //registryDetails.get(0).setDistrictid(aplnDetails.get(0).getDistrictid()); + //registryDetails.get(0).setTalukid(aplnDetails.get(0).getTalukid()); + //registryDetails.get(0).setVillage_name(aplnDetails.get(0).getVillageName()); + //registryDetails.get(0).setLbtype(aplnDetails.get(0).getLbtype()); + //registryDetails.get(0).setWard_code(aplnDetails.get(0).getWardCode()); + //registryDetails.get(0).setPlacetype(aplnDetails.get(0).getPlacetype()); + //registryDetails.get(0).setPlaceid(aplnDetails.get(0).getPlaceid()); + //registryDetails.get(0).setPlacenameEn(aplnDetails.get(0).getPlacenameEn()); + //registryDetails.get(0).setPlacenameMl(aplnDetails.get(0).getPlacenameMl()); + //registryDetails.get(0).setLocality_en(aplnDetails.get(0).getLocalityEn()); + //registryDetails.get(0).setLocality_ml(aplnDetails.get(0).getLocalityMl()); + //registryDetails.get(0).setStreet_name_en(aplnDetails.get(0).getStreetNameEn()); + //registryDetails.get(0).setStreet_name_ml(aplnDetails.get(0).getStreetNameMl()); + //registryDetails.get(0).setMarriageHouseNoAndNameEn(aplnDetails.get(0).getMarriageHouseNoAndNameEn()); + //registryDetails.get(0).setMarriageHouseNoAndNameMl(aplnDetails.get(0).getMarriageHouseNoAndNameMl()); + //registryDetails.get(0).setLandmark(aplnDetails.get(0).getLandmark()); //Marriage Bride Details - registryDetails.get(0).getBrideDetails().setResidentship(aplnDetails.get(0).getBrideDetails().getResidentship()); + //registryDetails.get(0).getBrideDetails().setResidentship(aplnDetails.get(0).getBrideDetails().getResidentship()); registryDetails.get(0).getBrideDetails().setFirstname_en(aplnDetails.get(0).getBrideDetails().getFirstnameEn()); registryDetails.get(0).getBrideDetails().setFirstname_ml(aplnDetails.get(0).getBrideDetails().getFirstnameMl()); registryDetails.get(0).getBrideDetails().setMiddlename_en(aplnDetails.get(0).getBrideDetails().getMiddlenameEn()); @@ -56,11 +56,11 @@ public MarriageRegistryRequest convert(List registryDet registryDetails.get(0).getBrideDetails().setMothername_ml(aplnDetails.get(0).getBrideDetails().getMothernameMl()); registryDetails.get(0).getBrideDetails().setGuardianname_en(aplnDetails.get(0).getBrideDetails().getGuardiannameEn()); registryDetails.get(0).getBrideDetails().setGuardianname_ml(aplnDetails.get(0).getBrideDetails().getGuardiannameMl()); - registryDetails.get(0).getBrideDetails().setParent_guardian(aplnDetails.get(0).getBrideDetails().getParentGuardian()); + //registryDetails.get(0).getBrideDetails().setParent_guardian(aplnDetails.get(0).getBrideDetails().getParentGuardian()); //Marriage Groom Details - registryDetails.get(0).getGroomDetails().setResidentship(aplnDetails.get(0).getGroomDetails().getResidentship()); + //registryDetails.get(0).getGroomDetails().setResidentship(aplnDetails.get(0).getGroomDetails().getResidentship()); registryDetails.get(0).getGroomDetails().setFirstname_en(aplnDetails.get(0).getGroomDetails().getFirstnameEn()); registryDetails.get(0).getGroomDetails().setFirstname_ml(aplnDetails.get(0).getGroomDetails().getFirstnameMl()); registryDetails.get(0).getGroomDetails().setMiddlename_en(aplnDetails.get(0).getGroomDetails().getMiddlenameEn()); @@ -75,69 +75,69 @@ public MarriageRegistryRequest convert(List registryDet registryDetails.get(0).getGroomDetails().setMothername_ml(aplnDetails.get(0).getGroomDetails().getMothernameMl()); registryDetails.get(0).getGroomDetails().setGuardianname_en(aplnDetails.get(0).getGroomDetails().getGuardiannameEn()); registryDetails.get(0).getGroomDetails().setGuardianname_ml(aplnDetails.get(0).getGroomDetails().getGuardiannameMl()); - registryDetails.get(0).getGroomDetails().setParent_guardian(aplnDetails.get(0).getGroomDetails().getParentGuardian()); + //registryDetails.get(0).getGroomDetails().setParent_guardian(aplnDetails.get(0).getGroomDetails().getParentGuardian()); //Bride Address details - registryDetails.get(0).getBrideAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getCountryIdPermanent()); - registryDetails.get(0).getBrideAddressDetails().setStateIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getStateIdPermanent()); - registryDetails.get(0).getBrideAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getDistrictIdPermanent()); - registryDetails.get(0).getBrideAddressDetails().setPoNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPoNoPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getCountryIdPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setStateIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getStateIdPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getDistrictIdPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setPoNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPoNoPermanent()); registryDetails.get(0).getBrideAddressDetails().setLocalityEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getLocalityEnPermanent()); registryDetails.get(0).getBrideAddressDetails().setLocalityMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getLocalityMlPermanent()); registryDetails.get(0).getBrideAddressDetails().setStreetNameEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getStreetNameEnPermanent()); registryDetails.get(0).getBrideAddressDetails().setStreetNameMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getStreetNameMlPermanent()); registryDetails.get(0).getBrideAddressDetails().setHouseNameNoEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getHouseNameNoEnPermanent()); registryDetails.get(0).getBrideAddressDetails().setHouseNameNoMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getHouseNameNoMlPermanent()); - registryDetails.get(0).getBrideAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getBrideAddressDetails().getVillageNamePermanent()); - registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPincode()); - registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName()); - registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage()); - registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaWardNo()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - registryDetails.get(0).getBrideAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - registryDetails.get(0).getBrideAddressDetails().setPinNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPinNoPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getBrideAddressDetails().getVillageNamePermanent()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPincode()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaWardNo()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + //registryDetails.get(0).getBrideAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + //registryDetails.get(0).getBrideAddressDetails().setPinNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPinNoPermanent()); //Groom Address details - registryDetails.get(0).getGroomAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getCountryIdPermanent()); - registryDetails.get(0).getGroomAddressDetails().setStateIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getStateIdPermanent()); - registryDetails.get(0).getGroomAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getDistrictIdPermanent()); - registryDetails.get(0).getGroomAddressDetails().setPoNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPoNoPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getCountryIdPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setStateIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getStateIdPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getDistrictIdPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setPoNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPoNoPermanent()); registryDetails.get(0).getGroomAddressDetails().setLocalityEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getLocalityEnPermanent()); registryDetails.get(0).getGroomAddressDetails().setLocalityMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getLocalityMlPermanent()); registryDetails.get(0).getGroomAddressDetails().setStreetNameEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getStreetNameEnPermanent()); registryDetails.get(0).getGroomAddressDetails().setStreetNameMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getStreetNameMlPermanent()); registryDetails.get(0).getGroomAddressDetails().setHouseNameNoEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getHouseNameNoEnPermanent()); registryDetails.get(0).getGroomAddressDetails().setHouseNameNoMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getHouseNameNoMlPermanent()); - registryDetails.get(0).getGroomAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getGroomAddressDetails().getVillageNamePermanent()); - registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPincode()); - registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrLBName()); - registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrVillage()); - registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaWardNo()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - registryDetails.get(0).getGroomAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - registryDetails.get(0).getGroomAddressDetails().setPinNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPinNoPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getGroomAddressDetails().getVillageNamePermanent()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPincode()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrLBName()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrVillage()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaWardNo()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + //registryDetails.get(0).getGroomAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + //registryDetails.get(0).getGroomAddressDetails().setPinNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPinNoPermanent()); marriageRegistryRequest.addMarriageDetails(registryDetails.get(0)); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 2218463d7c0..638f7ce4567 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -143,6 +143,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); marriageApplicationDetails.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); marriageApplicationDetails.getBrideAddressDetails().setPinNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPinNoPermanent()); @@ -172,6 +173,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriageApplicationDetails.getGroomAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); marriageApplicationDetails.getGroomAddressDetails().setPinNoPermanent(marriageRegistryDetails.getGroomAddressDetails().getPinNoPermanent()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 7ea1a57fe07..6a3b379b9ff 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -105,6 +105,8 @@ public List createCorrection(MarriageCorrectionReques MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); + criteria.setId(request.getMarriageCorrectionDetails().get(0).getRegisterId()); + criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); List marriageRegistryDetails = searchRegistry(criteria); if (!marriageRegistryDetails.isEmpty()) { MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); @@ -116,7 +118,9 @@ public List createCorrection(MarriageCorrectionReques MarriageDetailsRequest marriageDetailsRequest=new MarriageDetailsRequest(); marriageDetailsRequest.setMarriageDetails(marriageApplicationDetailsList); - mdmsValidator.validateMarriageMDMSData(marriageDetailsRequest,mdmsData); + marriageCorrectionApplnValidator.validateCommonFields(marriageDetailsRequest); + //validatorService.validateCommonFields( marriageDetailsRequest); + //mdmsValidator.validateMarriageMDMSData(marriageDetailsRequest,mdmsData); //validatorService.ruleEngineMarriage(marriageDetailsRequest, wfc, mdmsData); producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java index f747e86f721..6c8eb8c2263 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java @@ -2,6 +2,8 @@ import org.apache.commons.lang3.StringUtils; import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.springframework.stereotype.Component; @@ -44,6 +46,14 @@ public void validateCorrectionCreate(MarriageCorrectionRequest request) { throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), "Marriage Correction Details is required."); } + if (StringUtils.isBlank(correctionApplications.get(0).getApplicationtype())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Application Type is required for create correction request."); + } + if (StringUtils.isBlank(correctionApplications.get(0).getModuleCode())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Module Code is required for create correction request."); + } } public void validateCorrectionUpdate(MarriageCorrectionRequest request) { @@ -104,4 +114,33 @@ public void validateCorrectionUpdate(MarriageCorrectionRequest request) { } //mdmsValidator.validateMdmsData(request, mdmsData); } + + + public void validateCommonFields(MarriageDetailsRequest request) { + + List marriageApplication = request.getMarriageDetails(); + if (marriageApplication != null) { + marriageApplication + .forEach(marriagedtls -> { + if (marriagedtls.getDateofmarriage() <= 0) { + throw new CustomException(" DATE OF MARRIAGE INVALID ", + "The Date of marriage " + + marriagedtls.getDateofmarriage() + + " is invalid"); + } + if (marriagedtls.getBrideDetails().getDateofbirth() <= 0) { + throw new CustomException(" DATE OF BIRTH INVALID ", + "The Date of birth " + + marriagedtls.getBrideDetails().getDateofbirth() + + " is invalid"); + } + if (marriagedtls.getGroomDetails().getDateofbirth() <= 0) { + throw new CustomException(" DATE OF BIRTH INVALID ", + "The Date of birth " + + marriagedtls.getGroomDetails().getDateofbirth() + + " is invalid"); + } + }); + } + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java index 898a905a5e5..f6451c23e4d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java @@ -37,7 +37,7 @@ public void validateMarriageCorrectionMDMSData(MarriageCorrectionRequest correct correctionDtls.getCorrectionField().forEach(correctionField -> { correctionField.getCorrectionFieldValue().forEach(field -> { // MASTER DETAILS VALIDATION - if (field.getField().equalsIgnoreCase("marriagePlacetype")) { + /*if (field.getField().equalsIgnoreCase("marriagePlacetype")) { if (field.getNewValue() != null) { if (!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE).contains(field.getNewValue())) errorMap.put(" MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + @@ -67,10 +67,10 @@ public void validateMarriageCorrectionMDMSData(MarriageCorrectionRequest correct errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + field.getNewValue() + " is invalid"); } - } + }*/ //GROOM PERMANENT ADDRESS DETAILS VALIDATION - else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permtaddressCountry")) { + /*if (field.getField().equalsIgnoreCase("GroomAddressDetails.permtaddressCountry")) { if (field.getNewValue() != null) { if (!masterData.get(MarriageConstants.COUNTRY).contains(field.getNewValue())) errorMap.put("GROOM PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + @@ -118,10 +118,10 @@ else if (field.getField().equalsIgnoreCase("GroomAddressDetails.permtaddressCoun errorMap.put("GROOM PERMANENT ADDRESS: POST OFFICE INVALID", "groom post office inside kerala is invalid" + field.getNewValue() + " is invalid"); } - } + }*/ //BRIDE PERMANENT ADDRESS DETAILS VALIDATION - else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permtaddressCountry")) { + /*else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permtaddressCountry")) { if (field.getNewValue() != null) { if (!masterData.get(MarriageConstants.COUNTRY).contains(field.getNewValue())) errorMap.put("BRIDE PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of bride " + @@ -169,7 +169,7 @@ else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permtaddressCoun errorMap.put("BRIDE PERMANENT ADDRESS: POST OFFICE INVALID", "bride post office inside kerala " + field.getNewValue()+ " is invalid"); } - } + }*/ }); }); }); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java index b99448554da..b2b12f648fe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -30,6 +30,8 @@ public class MarriageCorrectionDetails { @Size(max = 64) @JsonProperty("applicationType") private String applicationtype; + @JsonProperty("moduleCode") + private String moduleCode; @Size(max = 64) @JsonProperty("applicationNumber") private String applicationNo; From e0ab3cc72e307d790711547f3a676312348f7ea4 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Wed, 19 Apr 2023 17:37:37 +0530 Subject: [PATCH 229/420] marriage correction address --- .../src/main/resources/marriage-correction.yml | 10 +++++----- .../mapper/RegistryToApplicationMapper.java | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index fd600a8f731..5c9c1669f4a 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -305,13 +305,13 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLinetwoMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceEn @@ -363,7 +363,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrPincode - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPermanent diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 638f7ce4567..75adaf349c7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -138,10 +138,10 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); marriageApplicationDetails.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); @@ -168,10 +168,10 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriageApplicationDetails.getGroomAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); From 8c07852cbe0e3fd3af3cc4eefe181df2f35d9e51 Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 19 Apr 2023 17:40:00 +0530 Subject: [PATCH 230/420] commented unused code --- .../MarriageRegistryRepository.java | 69 +++++++++---------- 1 file changed, 32 insertions(+), 37 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 6d63065f5fa..a335f62593e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -269,49 +269,44 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria StringBuilder groomAddr = new StringBuilder(); //Setting Groom Address data from MDMS - Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(req, mdmsGroomAddressData); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsGroomAddressMap)); -// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().get).append(", "); -// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); -// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName()).append(", "); -// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKerala).append(", "); -// groomAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaWardNo()).append(", "); +// Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); +// Map> mdmsGroomAddressMap = util.getMarriageMDMSData(req, mdmsGroomAddressData); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsGroomAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsGroomAddressMap)); req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); //Setting groom NRI address //Setting bride address data from MDMS - Object mdmsBrideAddressData = util.mDMSCallGetAddress(req.getRequestInfo() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getDistrictIdPresent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getStateIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getCountryIdPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPoNoPermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getVillageNamePermanent() - , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - Map> mdmsBrideAddressMap = util.getMarriageMDMSData(req, mdmsBrideAddressData); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsBrideAddressMap)); - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsBrideAddressMap)); +// Object mdmsBrideAddressData = util.mDMSCallGetAddress(req.getRequestInfo() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getDistrictIdPresent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getStateIdPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getCountryIdPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPoNoPermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getVillageNamePermanent() +// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk()); +// Map> mdmsBrideAddressMap = util.getMarriageMDMSData(req, mdmsBrideAddressData); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsBrideAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsBrideAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsBrideAddressMap)); +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsBrideAddressMap)); // if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { From fa2e3cf536750cb3fdee2fe8b9850444c05b48d4 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 19 Apr 2023 17:43:43 +0530 Subject: [PATCH 231/420] workflow --- .../service/MarriageRegistryRequestService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index 83c387957e6..d072d4c1ec3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -78,6 +78,8 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr private GroomRegistryAddressDetails groomAddressRegistryDetails(MarriageDetailsRequest marriageGroomAddressrequest) { GroomRegistryAddressDetails groomRegistryAddressDetails = new GroomRegistryAddressDetails(); + // permtaddressCountry + groomRegistryAddressDetails.setPermtaddressCountry(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry()); groomRegistryAddressDetails.setCountryIdPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPresent()); groomRegistryAddressDetails.setCountryIdPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent()); groomRegistryAddressDetails.setStateIdPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPresent()); @@ -127,6 +129,7 @@ private GroomRegistryAddressDetails groomAddressRegistryDetails(MarriageDetailsR private BrideRegistryAddressDetails brideAddressRegistryDetails(MarriageDetailsRequest marriageBrideAddressrequest) { BrideRegistryAddressDetails brideRegistryAddressDetails = new BrideRegistryAddressDetails(); + brideRegistryAddressDetails.setPermtaddressCountry(marriageBrideAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry()); brideRegistryAddressDetails.setCountryIdPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getCountryIdPresent()); brideRegistryAddressDetails.setCountryIdPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getCountryIdPermanent()); brideRegistryAddressDetails.setStateIdPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getStateIdPresent()); @@ -195,6 +198,8 @@ private WitnessRegistryDetails witnessRegistryDetails(MarriageDetailsRequest mar witnessRegistryDetails.setWitness2AadharNo(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2AadharNo()); witnessRegistryDetails.setWitness1Esigned(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness1Esigned()); witnessRegistryDetails.setWitness2Esigned(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getWitness2Esigned()); + witnessRegistryDetails.setBrideUrl(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getBrideUrl()); + witnessRegistryDetails.setGroomUrl(marriageWitnessrequest.getMarriageDetails().get(0).getWitnessDetails().getGroomUrl()); return witnessRegistryDetails; } From 8db0a759886fe3bf447b8487a3606d782d212832 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 19 Apr 2023 17:45:52 +0530 Subject: [PATCH 232/420] workflow --- .../src/main/resources/application.properties | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index a2071bce3c4..84b96db5af2 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -159,4 +159,6 @@ egov.payment.search.endpoint=/collection-services/payments/_search #Marriage correction topics persister.save.marriage.correction.topic=save-marriage-correction-topic persister.update.marriage.registry.correction.topic=correction-update-marriage-registry-topic -persister.update.marriage.application.correction.topic=correction-update-marriage-application-topic \ No newline at end of file +persister.update.marriage.application.correction.topic=correction-update-marriage-application-topic + +persister.update.marriage.demand.topic=update-demand-topic From 5c091203fefc4582492e6f477e760fe1d9ba2faa Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Wed, 19 Apr 2023 18:14:51 +0530 Subject: [PATCH 233/420] marriage correction change --- .../marriagecorrection/service/MarriageCorrectionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 7870cf7eb25..322db9b3a60 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -192,7 +192,7 @@ public List updateMarriageCorrectionDetails(MarriageC request.setMarriageDetails(searchResult); if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()) { - workflowIntegrator.callCorrectionWorkFlow(request); + //workflowIntegrator.callCorrectionWorkFlow(request); } producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationCorrectionTopic(), request); From 81dcb2c3a0d3867b54ab8568afa0d4a22809724f Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 20 Apr 2023 10:42:36 +0530 Subject: [PATCH 234/420] Marriage correction change --- .../src/main/resources/marriage-correction.yml | 7 +++---- .../mapper/RegistryToApplicationMapper.java | 5 ++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 5c9c1669f4a..c609a644628 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -145,7 +145,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideMaritalstatusID - - jsonPath: $.MarriageDetails.*.BrideDetails.brideIslivingSpouse + - jsonPath: $.MarriageDetails.*.BrideDetails.brideIsSpouseLiving - jsonPath: $.MarriageDetails.*.id @@ -161,7 +161,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.brideNoOfSpouse - - jsonPath: $.MarriageDetails.*.marriageTenantid + - jsonPath: $.MarriageDetails.*.BrideDetails.tenentId - query: INSERT INTO public.eg_marriage_bride_groom_details( @@ -228,7 +228,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideDetails.groomIsSpouseLiving - - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.GroomDetails.brideGroom @@ -243,7 +242,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomNoOfSpouse - - jsonPath: $.MarriageDetails.*.marriageTenantid + - jsonPath: $.MarriageDetails.*.GroomDetails.tenentId diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index a8d91acebb0..6d2c6daf9f9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -69,7 +69,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideDetails().setDateofbirth(marriageRegistryDetails.getBrideDetails().getDateofbirth()); marriageApplicationDetails.getBrideDetails().setAge(marriageRegistryDetails.getBrideDetails().getAge()); marriageApplicationDetails.getBrideDetails().setParentGuardian(marriageRegistryDetails.getBrideDetails().getParent_guardian()); - //marriageApplicationDetails.getBrideDetails().setBrideIsSpouseLiving(marriageRegistryDetails.getBrideDetails().getBrideIsSpouseLiving()); + marriageApplicationDetails.getBrideDetails().setBrideIsSpouseLiving(marriageRegistryDetails.getBrideDetails().getBrideIsSpouseLiving()); marriageApplicationDetails.getBrideDetails().setBrideNoOfSpouse(marriageRegistryDetails.getBrideDetails().getBrideNoOfSpouse()); marriageApplicationDetails.getBrideDetails().setFatherAadharno(marriageRegistryDetails.getBrideDetails().getFather_aadharno()); marriageApplicationDetails.getBrideDetails().setFathernameEn(marriageRegistryDetails.getBrideDetails().getFathername_en()); @@ -82,6 +82,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideDetails().setMotherAadharno(marriageRegistryDetails.getBrideDetails().getMother_aadharno()); marriageApplicationDetails.getBrideDetails().setMaritalstatusid(marriageRegistryDetails.getBrideDetails().getMaritalstatusid()); //marriageApplicationDetails.getBrideDetails().setMarriageid(marriageRegistryDetails.getBrideDetails().getMarriageid()); + marriageApplicationDetails.getBrideDetails().setTenentId(marriageRegistryDetails.getBrideDetails().getTenentId()); marriageApplicationDetails.getGroomDetails().setBrideGroom(marriageRegistryDetails.getGroomDetails().getBrideGroom()); @@ -114,6 +115,8 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getGroomDetails().setParentGuardian(marriageRegistryDetails.getGroomDetails().getParent_guardian()); marriageApplicationDetails.getGroomDetails().setPassportno(marriageRegistryDetails.getGroomDetails().getPassportno()); marriageApplicationDetails.getGroomDetails().setResidentship(marriageRegistryDetails.getGroomDetails().getResidentship()); + marriageApplicationDetails.getGroomDetails().setGroomIsSpouseLiving(marriageRegistryDetails.getGroomDetails().getGroomIsSpouseLiving()); + marriageApplicationDetails.getGroomDetails().setTenentId(marriageRegistryDetails.getGroomDetails().getTenentId()); marriageApplicationDetails.getBrideAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getCountryIdPermanent()); From 9d26e09a07f431eb0f007db4d323bfb0b3b31e04 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 20 Apr 2023 10:49:31 +0530 Subject: [PATCH 235/420] changes in search --- .../repository/querybuilder/MarriageRegistryQueryBuilder.java | 2 +- .../repository/rowmapper/MarriageRegistryRowMapper.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index fbf65ed5309..09ffc0ebf6f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -27,7 +27,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,MD.certificateno as MD_certificateno,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 603cfab0dcc..6c570c9c801 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -49,6 +49,7 @@ public List extractData(ResultSet rs) throws SQLExcepti .registrationno(rs.getString("MD_registrationno")) .status(rs.getString("MD_registration_status")) .moduleCode(rs.getString("MD_module_code")) + .certificateNo(rs.getString("MD_certificateno")) .brideDetails(getBrideDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomDetails(getGroomDetails(rs)) From bc0d29967410791b1a56d7cedc34905df01920ec Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 20 Apr 2023 11:37:55 +0530 Subject: [PATCH 236/420] demand --- .../enrichment/MarriageDetailsEnrichment.java | 4 ++ .../MarriageApplicationRepository.java | 1 + .../service/DemandService.java | 5 ++- .../service/MarriageApplicationService.java | 40 ++++++++++++++----- .../MarriageApplicationValidator.java | 4 +- .../web/model/MarriageApplicationDetails.java | 5 +++ 6 files changed, 44 insertions(+), 15 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index daef4ccf9cb..396a711ebff 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -697,10 +697,14 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { } //Jasmine 30.03.2023 public List saveDemand(RequestInfo requestInfo, List demands){ + System.out.println("hientersaveDemand"); StringBuilder url = new StringBuilder(config.getBillingHost()); url.append(config.getDemandCreateEndpoint()); DemandRequest request = new DemandRequest(requestInfo,demands); Object result = serviceRequestRepository.fetchResult(url,request); + + System.out.println("demands"+demands); + System.out.println("demandresult"+result); DemandResponse response = null; try{ response = mapper.convertValue(result,DemandResponse.class); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 191f97cdd26..7a2edede6f8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -119,6 +119,7 @@ public List getMarriageApplication(MarriageApplicati public int getMarriageCount(MarriageApplicationSearchCriteria criteria) { List preparedStmtList = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageCountQuery(criteria, preparedStmtList, Boolean.FALSE); + // System.out.println("searchQuery"+query); int MarriageCount = jdbcTemplate.queryForObject(query,preparedStmtList.toArray(),Integer.class); return MarriageCount; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java index fbacb56bcbe..2dfa450003d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java @@ -31,7 +31,7 @@ import com.jayway.jsonpath.JsonPath; /** * Creates DemandService - * RAkhi S on 28.03.2023 + * Jasmine on 10.04.2023 * */ @@ -53,6 +53,7 @@ public class DemandService { public List saveDemandDetails(List demands, RequestInfo requestInfo, WorkFlowCheck wfc) { demands.forEach(demand -> setDemandParamsLateFee(demand, requestInfo, wfc)); + System.out.println("hientersavedemand"); return enrichmentService.saveDemand(requestInfo,demands); } public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkFlowCheck wfc) { @@ -60,7 +61,7 @@ public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkF demand.setBusinessService("CR"); ArrayList demandDetails = new ArrayList<>(); DemandDetail demandDetail=new DemandDetail(); - demandDetail.setTaxHeadMasterCode("CRB_FEES"); + demandDetail.setTaxHeadMasterCode("CRM_FEES"); demandDetail.setTaxAmount(new BigDecimal(wfc.getAmount())); demandDetail.setTenantId(demand.getTenantId()); setGLCode(demandDetail, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 553765bc426..49396fab21f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -35,8 +35,9 @@ public class MarriageApplicationService { private final MarriageMdmsUtil util; private final MarriageMDMSValidator mdmsValidator; private final MarriageApplicationConfiguration marriageApplicationConfiguration; - private final MarriageApplicationValidator validatorService; + private final DemandService demandService; + public MarriageApplicationService(MarriageProducer producer, MarriageApplicationRepository repository , WorkflowIntegrator workflowIntegrator, @@ -44,7 +45,8 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication MarriageMdmsUtil util, MarriageMDMSValidator mdmsValidator, MarriageApplicationConfiguration marriageApplicationConfiguration, - MarriageApplicationValidator validatorService) { + MarriageApplicationValidator validatorService, + DemandService demandService) { this.repository = repository; this.workflowIntegrator = workflowIntegrator; this. marriageDetailsEnrichment= marriageDetailsEnrichment; @@ -53,6 +55,7 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; this.validatorService = validatorService; + this.demandService = demandService; } public List saveMarriageDetails(MarriageDetailsRequest request) { @@ -69,17 +72,32 @@ public List saveMarriageDetails(MarriageDetailsReque } request.getMarriageDetails().forEach(marriage->{ - - System.out.println("workflowstatus"+marriage.getStatus() ); - if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - List demands = new ArrayList<>(); - Demand demand = new Demand(); - demand.setTenantId(marriage.getTenantid()); - demand.setConsumerCode(marriage.getApplicationNumber()); - demands.add(demand); - marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + if(wfc.getPayment()!= null){ + if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + System.out.println("hienterpayment"); + List demands = new ArrayList<>(); + Demand demand = new Demand(); + demand.setTenantId(marriage.getTenantid()); + demand.setConsumerCode(marriage.getApplicationNumber()); + demands.add(demand); + marriage.setDemands(demandService.saveDemandDetails(demands,request.getRequestInfo(), wfc)); + // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + } } }); + + // request.getDeathCertificateDtls().forEach(death->{ + // if(wfc.getPayment()!= null){ + // if(death.getApplicationStatus().equals(DeathConstants.STATUS_FOR_PAYMENT)){ + // List demands = new ArrayList<>(); + // Demand demand = new Demand(); + // demand.setTenantId(death.getDeathBasicInfo().getTenantId()); + // demand.setConsumerCode(death.getDeathBasicInfo().getDeathACKNo()); + // demands.add(demand); + // death.setDemands(demandService.saveDemandDetails(demands,request.getRequestInfo(), wfc)); + // } + // } + // }); // producer.push(marriageApplicationConfiguration.getUpdateDemandTopic(), request); return request.getMarriageDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 54e22715e8c..e37d7b48530 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -129,7 +129,7 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF Long currentDate = calendar.getTimeInMillis(); List> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); - //System.out.println("mdmswfcode"+wfLists); + System.out.println("mdmswfcode"+wfLists); for (int n = 0; n < wfLists.size(); n++) { String startStr = wfLists.get(n).get("startdateperiod").toString(); String endStr = wfLists.get(n).get("enddateperiod").toString(); @@ -137,7 +137,7 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF Long end = Long.parseLong(endStr); if (end > 0L) { Long comp = currentDate - dateOfMarriage; - // System.out.println("datedifference"+comp); + System.out.println("datedifference"+comp); if (comp > start && comp <= end){ wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); wfc.setWorkflowCode(wfLists.get(n).get("WorkflowCode").toString()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index c5a1cf0ace8..05653979ef8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; import org.ksmart.marriage.marriageapplication.web.model.marriage.*; //import org.ksmart.marriage.common.model.AuditDetails; //import org.ksmart.marriage.common.model.Document; @@ -196,6 +197,10 @@ public class MarriageApplicationDetails { @Valid private List MarriageDocuments ; + + @JsonProperty("Demands") + private List demands; + private boolean wfnormalRegn ; private boolean wfdelayedWithinFiveYear ; private boolean wfdelayedAfterFiveYear ; From 9715c8c37e33121802f93cd1fdccd083a2da191f Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 20 Apr 2023 12:53:04 +0530 Subject: [PATCH 237/420] marriage correction endpoint change --- .../web/controller/MarriageCorrectionController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index 671cab70846..9bb694abcb5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -70,7 +70,7 @@ public ResponseEntity registryUpdate(@RequestBody Ma } - @PostMapping(value = {"/searchmarriagecorrection"}) + @PostMapping(value = {"/_searchmarriagecorrection"}) public ResponseEntity searchKsmartBirth(@RequestBody MarriageCorrectionRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { List marriageCorrectionAplnDetails=marriageCorrectionService.searchCorrectionApplinDetails(request, criteria); List marriageCorrectionDetails =new ArrayList<>(); From 704c50442e1ca98b39a58ebd2fd536099aecb64a Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 20 Apr 2023 13:02:51 +0530 Subject: [PATCH 238/420] added number to words in dateofissue --- .../service/MarriageRegistryService.java | 25 ++++- .../model/certmodel/MarriageCertificate.java | 2 + .../marriage/utils/NumToWordConverter.java | 97 +++++++++++++++++++ 3 files changed, 122 insertions(+), 2 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NumToWordConverter.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 75c32d0c06b..eaeb844e19a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -21,14 +21,20 @@ import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPdfResponse; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertRequest; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; +import org.ksmart.marriage.utils.NumToWordConverter; import org.springframework.stereotype.Service; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; import java.util.Arrays; import java.util.Calendar; +import java.util.Date; import java.util.List; import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_CREATE; @@ -124,8 +130,23 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req String marriageCertPath = StringUtils.replaceEach(marriageApplicationConfiguration.getMarriageCertLink(),new String[]{"$id","$tenantId","$regNo","$marriagecertificateno"}, new String[]{cert.getId(),cert.getMarriageRegistryDetails().getTenantid(),cert.getMarriageRegistryDetails().getRegistrationno(),cert.getMarriagecertificateno()}); cert.setEmbeddedUrl(repository.getShortenedUrl(uiHost+marriageCertPath)); }); - Calendar cal = Calendar.getInstance(); - marriageCertificate.setDateofissue(cal.getTimeInMillis()); + long currentDate=System.currentTimeMillis(); + marriageCertificate.setDateofissue(currentDate); + String strDate=null; + String dodInWords = null; + if(marriageCertificate.getDateofissue() != null){ + Date res = new Date(marriageCertificate.getDateofissue()) ; + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); + strDate= formatter.format(res); + String[] dobAry = strDate.split("/"); + try { + dodInWords = NumToWordConverter.convertNumber(Long.parseLong(dobAry[0])) + "/" + new SimpleDateFormat("MMMM").format(res) + "/" + NumToWordConverter.convertNumber(Long.parseLong(dobAry[2])); + + marriageCertificate.setDateOfIssueInWords(StringUtils.upperCase(StringUtils.isNotBlank(dodInWords)?dodInWords.trim():dodInWords)); + } catch(Exception e) { + } + } + marriageCertificate.setEmbeddedUrl(marriageCertPDFRequest.getMarriageCertificate().get(0).getEmbeddedUrl()); // marriageCertificateEnrichment.createCertificateNo(marriageCertRequest); //TODO check IdGenError MarriageCertPdfResponse pdfResp = repository.saveMarriageCertPdf(marriageCertPDFRequest); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index f3f8e230217..651e04b6d96 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -236,6 +236,8 @@ public class MarriageCertificate { private String year; @JsonProperty("dateOfIssue") private Long dateofissue; + @JsonProperty("dateOfIssueInWords") + private String dateOfIssueInWords; @JsonProperty("certificateStatus") private StatusEnum certificateStatus = null; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NumToWordConverter.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NumToWordConverter.java new file mode 100644 index 00000000000..0ec47cac4f3 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NumToWordConverter.java @@ -0,0 +1,97 @@ +package org.ksmart.marriage.utils; + +import lombok.Getter; +import org.springframework.stereotype.Component; + +@Component +@Getter +public class NumToWordConverter { + private static final String[] units = { + "", + " one", + " two", + " three", + " four", + " five", + " six", + " seven", + " eight", + " nine" + }; + private static final String[] twoDigits = { + " ten", + " eleven", + " twelve", + " thirteen", + " fourteen", + " fifteen", + " sixteen", + " seventeen", + " eighteen", + " nineteen" + }; + private static final String[] tenMultiples = { + "", + "", + " twenty", + " thirty", + " forty", + " fifty", + " sixty", + " seventy", + " eighty", + " ninety" + }; + private static final String[] placeValues = { + " ", + " thousand", + " million", + " billion", + " trillion" + }; + + public static String convertNumber(long number) { + String word = ""; + int index = 0; + do { + // take 3 digits in each iteration + int num = (int)(number % 1000); + if (num != 0){ + String str = ConversionForUptoThreeDigits(num); + word = str + placeValues[index] + word; + } + index++; + // next 3 digits + number = number/1000; + } while (number > 0); + return word; + } + + private static String ConversionForUptoThreeDigits(int number) { + String word = ""; + int num = number % 100; + if(num < 10){ + word = word + units[num]; + } + else if(num < 20){ + word = word + twoDigits[num%10]; + }else{ + word = tenMultiples[num/10] + units[num%10]; + } + + word = (number/100 > 0)? units[number/100] + " hundred" + word : word; + return word; + } + +// public static void main(String[] args) { +// System.out.println("1234123456789- " + convertNumber(1234123456789L)); +// System.out.println("123456789- " + convertNumber(123456789)); +// System.out.println("37565820- " + convertNumber(37565820)); +// System.out.println("9341947- " + convertNumber(9341947)); +// System.out.println("37000- " + convertNumber(37000)); +// System.out.println("1387- " + convertNumber(1387)); +// System.out.println("10- " + convertNumber(10)); +// System.out.println("41- " + convertNumber(41)); +// } + +} From a5e875ad71b4ae7ff1e27be8cab7092fd03f92c4 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 20 Apr 2023 15:32:27 +0530 Subject: [PATCH 239/420] changes in marriage certificate table --- .../src/main/resources/marriage-registry.yml | 7 +++-- .../MarriageRegistryRepository.java | 7 +++++ .../MarriageRegistryQueryBuilder.java | 2 +- .../MarriageCertificateRowMapper.java | 1 + .../service/MarriageRegistryService.java | 6 +--- .../MarriageRegistryController.java | 28 ++++++++++++------- .../model/certmodel/MarriageCertificate.java | 3 ++ ...2800__addNewfieldInCertificate_new_dll.sql | 2 ++ 8 files changed, 38 insertions(+), 18 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 3f04ed5a1a9..25082fb7f80 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -670,7 +670,7 @@ serviceMaps: isTransaction: true queryMaps: - query: INSERT INTO public.eg_marriage_certificate - (id, registrationno, registrydetailsid, filestoreid, status,embeddedurl, dateofissue, tenantid, createdtime, createdby, lastmodifiedtime, lastmodifiedby) + (id, registrationno, registrydetailsid, filestoreid, status,embeddedurl, dateofissue, tenantid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, count) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: marriageCertificate jsonMaps: @@ -697,6 +697,7 @@ serviceMaps: - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedTime - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedBy + - jsonPath: $.marriageCertificate.count - version: 1.0 description: Persists update marriage certificate details in marriage certificate table @@ -704,7 +705,7 @@ serviceMaps: isTransaction: true queryMaps: - query: UPDATE public.eg_marriage_certificate - set filestoreid=? , embeddedurl=?, dateofissue=?, lastmodifiedtime=?, lastmodifiedby=? where id=? and registrydetailsid=?; + set filestoreid=? , embeddedurl=?, dateofissue=?, lastmodifiedtime=?, lastmodifiedby=? , count=? where id=? and registrydetailsid=?; basePath: marriageCertificate jsonMaps: - jsonPath: $.marriageCertificate.filestoreid @@ -717,6 +718,8 @@ serviceMaps: - jsonPath: $.marriageCertificate.AuditDetails.lastModifiedBy + - jsonPath: $.marriageCertificate.count + - jsonPath: $.marriageCertificate.id - jsonPath: $.marriageCertificate.marriageRegistryId diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index a335f62593e..b1187b68cf1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -316,6 +316,13 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria // if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); // } + marriageCertPDFRequest.getMarriageCertificate().forEach(cert->{ + String uiHost = marriageApplicationConfiguration.getUiAppHost(); + String marriageCertPath = StringUtils.replaceEach(marriageApplicationConfiguration.getMarriageCertLink(), + new String[]{"$id","$tenantId","$regNo","$marriagecertificateno"}, + new String[]{cert.getId(),cert.getMarriageRegistryDetails().getTenantid(),cert.getMarriageRegistryDetails().getRegistrationno(),cert.getMarriagecertificateno()}); + cert.setEmbeddedUrl(getShortenedUrl(uiHost+marriageCertPath)); + }); marriageCertPDFRequest.getMarriageCertificate().forEach(cert -> { String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 9d75dd28f18..28e02b98a25 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -14,7 +14,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { // @Autowired // CommonQueryBuilder commonQueryBuilder; private static final String CERTIFICATE_QUERY = new StringBuilder() - .append(" SELECT MC.id as MC_ID, MC.registrationno as MC_registrationno, MC.registrydetailsid as MC_registrydetailsid, MC.filestoreid as MC_filestoreid, MC.status as MC_status, MC.additionaldetail as MC_additionaldetail, MC.embeddedurl as MC_embeddedurl, MC.dateofissue as MC_dateofissue, MC.tenantid as MC_tenantid, " ) + .append(" SELECT MC.id as MC_ID, MC.registrationno as MC_registrationno, MC.registrydetailsid as MC_registrydetailsid, MC.filestoreid as MC_filestoreid, MC.status as MC_status, MC.additionaldetail as MC_additionaldetail, MC.embeddedurl as MC_embeddedurl, MC.dateofissue as MC_dateofissue, MC.tenantid as MC_tenantid,MC.count as MC_count, " ) .append(" MC.createdtime as MC_createdtime, MC.lastmodifiedtime as MC_lastmodifiedtime, MC.createdby as MC_createdby, MC.lastmodifiedby as MC_lastmodifiedby FROM public.eg_marriage_certificate MC").toString(); //Jasmine 26.03.2023 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java index 76a053a046a..7aca6133ccc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageCertificateRowMapper.java @@ -24,6 +24,7 @@ public List extractData(ResultSet rs) throws SQLException, .registrationno(rs.getString("MC_registrationno")) .marriageRegId(rs.getString("MC_registrydetailsid")) .filestoreid(rs.getString("MC_filestoreid")) + .count(rs.getInt("MC_count")) .marriageRegistryDetails(MarriageRegistryDetails.builder().id(rs.getString("MC_registrydetailsid")).tenantid(rs.getString("MC_tenantid")).build()) // .ackNo(rs.getString("ack_no")) .build()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index eaeb844e19a..85de427ba2d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -125,11 +125,6 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req // marriageDtls.add(marriageCertificate); // } MarriageCertPDFRequest marriageCertPDFRequest = MarriageCertPDFRequest.builder().requestInfo(requestInfo).marriageCertificate(Arrays.asList(marriageCertificate)).build(); - marriageCertPDFRequest.getMarriageCertificate().forEach(cert->{ - String uiHost = marriageApplicationConfiguration.getUiAppHost(); - String marriageCertPath = StringUtils.replaceEach(marriageApplicationConfiguration.getMarriageCertLink(),new String[]{"$id","$tenantId","$regNo","$marriagecertificateno"}, new String[]{cert.getId(),cert.getMarriageRegistryDetails().getTenantid(),cert.getMarriageRegistryDetails().getRegistrationno(),cert.getMarriagecertificateno()}); - cert.setEmbeddedUrl(repository.getShortenedUrl(uiHost+marriageCertPath)); - }); long currentDate=System.currentTimeMillis(); marriageCertificate.setDateofissue(currentDate); String strDate=null; @@ -153,6 +148,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req // marriageCertificate.setDateofissue(marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getRegistrationDate()); marriageCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); marriageCertificate.setCertificateStatus(MarriageCertificate.StatusEnum.FREE_DOWNLOAD); + marriageCertificate.setCount(1);//If 1 download from filestoreId, If 0, need to regenerate certificate // } marriageCertificate.setMarriagecertificateno(marriageRegistryDetailsList.get(0).getCertificateNo()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index 82c0698237a..241fdd0339a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -74,15 +74,23 @@ public ResponseEntity certificateDownload(@RequestBody Ma @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria) { List marriageCertResponseList = marriageService.searchCertificate(criteria); MarriageCertResponse response; -// if(null!=marriageCertResponseList&&!marriageCertResponseList.isEmpty()){ -// response = MarriageCertResponse -// .builder() -// .filestoreId(marriageCertResponseList.get(0).getFilestoreid()) -// .tenantId(marriageCertResponseList.get(0).getMarriageRegistryDetails().getTenantid()) -// .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) -// .build(); -// return ResponseEntity.ok(response); -// }else{ + + + + if(null!=marriageCertResponseList&&!marriageCertResponseList.isEmpty()&&marriageCertResponseList.get(0).getCount()>0){ + + + response = MarriageCertResponse + .builder() + .filestoreId(marriageCertResponseList.get(0).getFilestoreid()) + .tenantId(marriageCertResponseList.get(0).getMarriageRegistryDetails().getTenantid()) + .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) + .build(); + return ResponseEntity.ok(response); + }else{ + + + MarriageCertificate marriageCertificate = marriageService.download(criteria,request.getRequestInfo()); response = MarriageCertResponse @@ -90,7 +98,7 @@ public ResponseEntity certificateDownload(@RequestBody Ma .filestoreId(marriageCertificate.getFilestoreid()) .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), true)) .build(); -// } + } return ResponseEntity.ok(response); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index 651e04b6d96..f9fb09ce94e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -191,6 +191,9 @@ public class MarriageCertificate { @JsonProperty("placeid") private String placeid; + @JsonProperty("count") + private int count; + // @Size(max = 2500) // @JsonProperty("marriageHouseNoAndNameEn") // private String marriageHouseNoAndNameEn; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql new file mode 100644 index 00000000000..81f173e49dc --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql @@ -0,0 +1,2 @@ +ALTER TABLE public.eg_marriage_certificate +ADD COLUMN count int4; \ No newline at end of file From 8ad17eba0806069997f7d31d99c519387c364e09 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 20 Apr 2023 16:27:54 +0530 Subject: [PATCH 240/420] zonaloffice and migration --- .../src/main/resources/marriage-registry.yml | 7 +- .../src/main/resources/marriage.yml | 10 ++- .../MarriageApplicationQueryBuilder.java | 2 +- .../MarriageApplicationRowMapper.java | 1 + .../web/model/MarriageApplicationDetails.java | 4 + .../MarriageRegistryQueryBuilder.java | 2 +- .../rowmapper/MarriageRegistryRowMapper.java | 3 +- .../web/model/MarriageRegistryDetails.java | 4 + .../src/main/resources/application.properties | 4 +- ...20105826__newFieldAdd_services_new_dll.sql | 23 ++++++ ...20111227__newFieldAdd_services_new_dll.sql | 28 +++++++ ...20111628__newFieldAdd_services_new_dll.sql | 13 ++++ ...22__operationAndStamp_deletion_new_dll.sql | 39 ++++++++++ ...20113301__Foreignkey_deletions_new_dll.sql | 3 + .../V20230420113405__addNewfeild_new_dll.sql | 19 +++++ .../V20230420141409__addNewfeild_new_dll.sql | 11 +++ ...2800__addNewfieldInCertificate_new_dll.sql | 2 + ...04111526__newFieldAdd_services_new_dll.sql | 46 +++++------ ...04131927__newFieldAdd_services_new_dll.sql | 62 +++++++-------- ...04124328__newFieldAdd_services_new_dll.sql | 26 +++---- ...22__operationAndStamp_deletion_new_dll.sql | 78 +++++++++---------- ...04103301__Foreignkey_deletions_new_dll.sql | 6 +- .../V20231804131005__addNewfeild_new_dll.sql | 38 ++++----- ...2800__addNewfieldInCertificate_new_dll.sql | 4 +- 24 files changed, 295 insertions(+), 140 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420105826__newFieldAdd_services_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111227__newFieldAdd_services_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111628__newFieldAdd_services_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111822__operationAndStamp_deletion_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113301__Foreignkey_deletions_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113405__addNewfeild_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420141409__addNewfeild_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420152800__addNewfieldInCertificate_new_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 25082fb7f80..d792ac70704 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, housenameno_en, housenameno_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationnumber, registrationno, registration_date, registration_status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward,certificateno) - VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?,? ,?); + lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward,certificateno,zonal_office) + VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?,? ,?, ?); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -99,8 +99,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.groomExpired - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + - jsonPath: $.MarriageDetails.*.certificateNo + - jsonPath: $.MarriageDetails.*.zonalOffice + - query: UPDATE eg_marriage_details SET registrationno = ? ,registration_date = ? WHERE applicationnumber = ? AND tenantid = ? diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 8f8c4f4e640..0c55bb57ee0 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationNo, registration_date, action, status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,? ,?, ?, ?, ? ); + lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward,zonal_office) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,? ,?, ?, ?, ?,? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -100,6 +100,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + - jsonPath: $.MarriageDetails.*.zonalOffice + - query: INSERT INTO public.eg_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, @@ -714,7 +716,7 @@ serviceMaps: placename_ml=?, houseno_and_name_en=?, houseno_and_name_ml=?, street_name_en=?, street_name_ml=?, ward_code=?, talukid=?, village_name=?, marriage_type=?, oth_marriage_type=?, landmark=?, locality_en=?, locality_ml=?, applicationtype=?, businessservice=?, workflowcode=?, registrationNo=?, registration_date=?, action=?, status=?, lastmodifiedtime=?, lastmodifiedby=? , module_code=?,brideurl=?, groomurl=?, - imageuuid=?, bride_filestoreid=?, groom_filestoreid=?, bride_expired=?, groom_expired=?, is_backward=? + imageuuid=?, bride_filestoreid=?, groom_filestoreid=?, bride_expired=?, groom_expired=?, is_backward=?,zonal_office=? WHERE id=? and applicationnumber=? and tenantid=?; basePath: MarriageDetails.* jsonMaps: @@ -795,6 +797,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + - jsonPath: $.MarriageDetails.*.zonalOffice + - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.applicationNumber diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 0e0b48e7bf3..4566671a43f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -22,7 +22,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date ,") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationNumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code, MD.zonal_office as MD_zonal_office,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 11d0aef9a54..eb7e9ae0528 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -43,6 +43,7 @@ public List extractData(ResultSet rs) throws SQLExce .registrationDate(rs.getLong("MD_registration_date")) .registrationNo(rs.getString("MD_registrationno")) .moduleCode(rs.getString("MD_module_code")) + .zonalOffice(rs.getString("MD_zonal_office")) // .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 05653979ef8..7584cf82d13 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -169,6 +169,10 @@ public class MarriageApplicationDetails { @JsonProperty("moduleCode") private String moduleCode; + @Size(max = 64) + @JsonProperty("zonalOffice") + private String zonalOffice; + @NotNull @Size(max = 64) @JsonProperty("businessService") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 28e02b98a25..d568c1a66fc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -27,7 +27,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,MD.certificateno as MD_certificateno,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,MD.certificateno as MD_certificateno,MD.zonal_office as MD_zonal_office,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 6c570c9c801..17043d07c6f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -49,7 +49,8 @@ public List extractData(ResultSet rs) throws SQLExcepti .registrationno(rs.getString("MD_registrationno")) .status(rs.getString("MD_registration_status")) .moduleCode(rs.getString("MD_module_code")) - .certificateNo(rs.getString("MD_certificateno")) + .certificateNo(rs.getString("MD_certificateno")) + .zonalOffice(rs.getString("MD_zonal_office")) .brideDetails(getBrideDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomDetails(getGroomDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java index d60d1122486..b522f6d71d4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java @@ -149,6 +149,10 @@ public class MarriageRegistryDetails { @JsonProperty("marriageHouseNoAndNameMl") private String marriageHouseNoAndNameMl; + @Size(max = 64) + @JsonProperty("zonalOffice") + private String zonalOffice; + // @Size(max = 1000) // @JsonProperty("marriageReligiousInstitutionOther") // private String marriageReligiousInstitutionOther; diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 92c0132fdf3..1dfcbc5bdc5 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=ikm +spring.datasource.password=123 ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=ikm +spring.flyway.password=123 spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420105826__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420105826__newFieldAdd_services_new_dll.sql new file mode 100644 index 00000000000..217df082f61 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420105826__newFieldAdd_services_new_dll.sql @@ -0,0 +1,23 @@ +ALTER TABLE public.eg_marriage_details +ADD COLUMN IF NOT EXISTS bride_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS groom_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS bride_expired boolean, +ADD COLUMN IF NOT EXISTS groom_expired boolean; + +ALTER TABLE public.eg_marriage_details_audit +ADD COLUMN IF NOT EXISTS bride_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS groom_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS bride_expired boolean, +ADD COLUMN IF NOT EXISTS groom_expired boolean; + +ALTER TABLE public.eg_register_marriage_details +ADD COLUMN IF NOT EXISTS bride_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS groom_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS bride_expired boolean, +ADD COLUMN IF NOT EXISTS groom_expired boolean; + +ALTER TABLE public.eg_register_marriage_details_audit +ADD COLUMN IF NOT EXISTS bride_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS groom_filestoreid character varying(256) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS bride_expired boolean, +ADD COLUMN IF NOT EXISTS groom_expired boolean; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111227__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111227__newFieldAdd_services_new_dll.sql new file mode 100644 index 00000000000..9158c22366a --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111227__newFieldAdd_services_new_dll.sql @@ -0,0 +1,28 @@ +ALTER TABLE public.eg_marriage_details + ADD COLUMN IF NOT EXISTS module_code character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_details_audit + ADD COLUMN IF NOT EXISTS module_code character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN IF NOT EXISTS module_code character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN IF NOT EXISTS module_code character varying(64) COLLATE pg_catalog."default"; + + ALTER TABLE public.eg_marriage_bride_groom_details ALTER COLUMN father_aadharno TYPE VARCHAR(200); + ALTER TABLE public.eg_marriage_bride_groom_details ALTER COLUMN mother_aadharno TYPE VARCHAR(200); + ALTER TABLE public.eg_marriage_bride_groom_details ALTER COLUMN guardian_aadharno TYPE VARCHAR(200); + + ALTER TABLE public.eg_marriage_bride_groom_details_audit ALTER COLUMN father_aadharno TYPE VARCHAR(200); + ALTER TABLE public.eg_marriage_bride_groom_details_audit ALTER COLUMN mother_aadharno TYPE VARCHAR(200); + ALTER TABLE public.eg_marriage_bride_groom_details_audit ALTER COLUMN guardian_aadharno TYPE VARCHAR(200); + + ALTER TABLE public.eg_register_marriage_bride_groom_details ALTER COLUMN father_aadharno TYPE VARCHAR(200); + ALTER TABLE public.eg_register_marriage_bride_groom_details ALTER COLUMN mother_aadharno TYPE VARCHAR(200); + ALTER TABLE public.eg_register_marriage_bride_groom_details ALTER COLUMN guardian_aadharno TYPE VARCHAR(200); + + ALTER TABLE public.eg_register_marriage_bride_groom_details_audit ALTER COLUMN father_aadharno TYPE VARCHAR(200); + ALTER TABLE public.eg_register_marriage_bride_groom_details_audit ALTER COLUMN mother_aadharno TYPE VARCHAR(200); + ALTER TABLE public.eg_register_marriage_bride_groom_details_audit ALTER COLUMN guardian_aadharno TYPE VARCHAR(200); + diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111628__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111628__newFieldAdd_services_new_dll.sql new file mode 100644 index 00000000000..ba38bfc2657 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111628__newFieldAdd_services_new_dll.sql @@ -0,0 +1,13 @@ +ALTER TABLE public.eg_marriage_details + ADD COLUMN IF NOT EXISTS is_backward boolean; + +ALTER TABLE public.eg_marriage_details_audit + ADD COLUMN IF NOT EXISTS is_backward boolean; + +ALTER TABLE public.eg_register_marriage_details + ADD COLUMN IF NOT EXISTS is_backward boolean, + ADD COLUMN IF NOT EXISTS certificatenumber character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details_audit + ADD COLUMN IF NOT EXISTS is_backward boolean, + ADD COLUMN IF NOT EXISTS certificatenumber character varying(64) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111822__operationAndStamp_deletion_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111822__operationAndStamp_deletion_new_dll.sql new file mode 100644 index 00000000000..9d19fbb1ce4 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111822__operationAndStamp_deletion_new_dll.sql @@ -0,0 +1,39 @@ + + +ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS stamp; + + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS stamp; + + + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS stamp; + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS stamp; + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS stamp; + + + + +ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS operation; + +ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS stamp; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113301__Foreignkey_deletions_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113301__Foreignkey_deletions_new_dll.sql new file mode 100644 index 00000000000..9723a13e64f --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113301__Foreignkey_deletions_new_dll.sql @@ -0,0 +1,3 @@ + +ALTER table eg_marriage_document + DROP CONSTRAINT IF EXISTS eg_marriage_document_document_fkey; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113405__addNewfeild_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113405__addNewfeild_new_dll.sql new file mode 100644 index 00000000000..840a529c1df --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113405__addNewfeild_new_dll.sql @@ -0,0 +1,19 @@ +ALTER TABLE public.eg_marriage_permanent_address_details +ADD COLUMN IF NOT EXISTS state_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS district_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS country_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_permanent_address_details_audit +ADD COLUMN IF NOT EXISTS state_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS district_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS country_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_permanent_address_details +ADD COLUMN IF NOT EXISTS state_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS district_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS country_name character varying(1000) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_permanent_address_details_audit +ADD COLUMN IF NOT EXISTS state_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS district_name character varying(1000) COLLATE pg_catalog."default", +ADD COLUMN IF NOT EXISTS country_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420141409__addNewfeild_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420141409__addNewfeild_new_dll.sql new file mode 100644 index 00000000000..53c4ee3d3f5 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420141409__addNewfeild_new_dll.sql @@ -0,0 +1,11 @@ +ALTER TABLE public.eg_marriage_details +ADD COLUMN IF NOT EXISTS zonal_office character varying(100) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_details_audit +ADD COLUMN IF NOT EXISTS zonal_office character varying(100) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details +ADD COLUMN IF NOT EXISTS zonal_office character varying(100) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_details_audit +ADD COLUMN IF NOT EXISTS zonal_office character varying(100) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420152800__addNewfieldInCertificate_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420152800__addNewfieldInCertificate_new_dll.sql new file mode 100644 index 00000000000..c6373ee5d51 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420152800__addNewfieldInCertificate_new_dll.sql @@ -0,0 +1,2 @@ +ALTER TABLE public.eg_marriage_certificate +ADD COLUMN IF NOT EXISTS count int4; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql index 02c154d33c8..21a5a777c2a 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql @@ -1,23 +1,23 @@ -ALTER TABLE public.eg_marriage_details -ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN bride_expired boolean, -ADD COLUMN groom_expired boolean; - -ALTER TABLE public.eg_marriage_details_audit -ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN bride_expired boolean, -ADD COLUMN groom_expired boolean; - -ALTER TABLE public.eg_register_marriage_details -ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN bride_expired boolean, -ADD COLUMN groom_expired boolean; - -ALTER TABLE public.eg_register_marriage_details_audit -ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN bride_expired boolean, -ADD COLUMN groom_expired boolean; \ No newline at end of file +--ALTER TABLE public.eg_marriage_details +--ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", +--ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", +--ADD COLUMN bride_expired boolean, +--ADD COLUMN groom_expired boolean; +-- +--ALTER TABLE public.eg_marriage_details_audit +--ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", +--ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", +--ADD COLUMN bride_expired boolean, +--ADD COLUMN groom_expired boolean; +-- +--ALTER TABLE public.eg_register_marriage_details +--ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", +--ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", +--ADD COLUMN bride_expired boolean, +--ADD COLUMN groom_expired boolean; +-- +--ALTER TABLE public.eg_register_marriage_details_audit +--ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", +--ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", +--ADD COLUMN bride_expired boolean, +--ADD COLUMN groom_expired boolean; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql index 9fd3e3529ef..10aa0b63ddf 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql @@ -1,31 +1,31 @@ -ALTER TABLE public.eg_marriage_details - ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_details_audit - ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details - ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details_audit - ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_bride_groom_details - ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", - ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", - ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_bride_groom_details_audit - ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", - ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", - ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_bride_groom_details - ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", - ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", - ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_bride_groom_details_audit - ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", - ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", - ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; \ No newline at end of file +--ALTER TABLE public.eg_marriage_details +-- ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_marriage_details_audit +-- ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_register_marriage_details +-- ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_register_marriage_details_audit +-- ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_marriage_bride_groom_details +-- ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", +-- ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", +-- ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_marriage_bride_groom_details_audit +-- ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", +-- ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", +-- ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_register_marriage_bride_groom_details +-- ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", +-- ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", +-- ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_register_marriage_bride_groom_details_audit +-- ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", +-- ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", +-- ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql index 25d3bf1924c..ab3079449ce 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql @@ -1,13 +1,13 @@ -ALTER TABLE public.eg_marriage_details - ADD COLUMN is_backward boolean; - -ALTER TABLE public.eg_marriage_details_audit - ADD COLUMN is_backward boolean; - -ALTER TABLE public.eg_register_marriage_details - ADD COLUMN is_backward boolean, - ADD COLUMN certificatenumber character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details_audit - ADD COLUMN is_backward boolean, - ADD COLUMN certificatenumber character varying(64) COLLATE pg_catalog."default"; +--ALTER TABLE public.eg_marriage_details +-- ADD COLUMN is_backward boolean; +-- +--ALTER TABLE public.eg_marriage_details_audit +-- ADD COLUMN is_backward boolean; +-- +--ALTER TABLE public.eg_register_marriage_details +-- ADD COLUMN is_backward boolean, +-- ADD COLUMN certificatenumber character varying(64) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_register_marriage_details_audit +-- ADD COLUMN is_backward boolean, +-- ADD COLUMN certificatenumber character varying(64) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql index 9d19fbb1ce4..0ce322a7f88 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql @@ -1,39 +1,39 @@ - - -ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS stamp; - - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS stamp; - - - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS stamp; - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS stamp; - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS stamp; - - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS stamp; \ No newline at end of file +-- +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS operation; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS stamp; +-- +-- +-- +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS operation; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS stamp; +-- +-- +-- +-- +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS operation; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS stamp; +-- +-- +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS operation; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS stamp; +-- +-- +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS operation; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS stamp; +-- +-- +-- +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS operation; +-- +--ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS stamp; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql index 9723a13e64f..530e0a1a817 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql @@ -1,3 +1,3 @@ - -ALTER table eg_marriage_document - DROP CONSTRAINT IF EXISTS eg_marriage_document_document_fkey; \ No newline at end of file +-- +--ALTER table eg_marriage_document +-- DROP CONSTRAINT IF EXISTS eg_marriage_document_document_fkey; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql index 686013b1a47..f0b201f628c 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql @@ -1,19 +1,19 @@ -ALTER TABLE public.eg_marriage_permanent_address_details -ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_permanent_address_details_audit -ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_permanent_address_details -ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_permanent_address_details_audit -ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file +--ALTER TABLE public.eg_marriage_permanent_address_details +--ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", +--ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", +--ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_marriage_permanent_address_details_audit +--ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", +--ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", +--ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_register_marriage_permanent_address_details +--ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", +--ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", +--ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; +-- +--ALTER TABLE public.eg_register_marriage_permanent_address_details_audit +--ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", +--ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", +--ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql index 81f173e49dc..51ed043b6aa 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql @@ -1,2 +1,2 @@ -ALTER TABLE public.eg_marriage_certificate -ADD COLUMN count int4; \ No newline at end of file +--ALTER TABLE public.eg_marriage_certificate +--ADD COLUMN IF NOT EXISTS count int4; \ No newline at end of file From 5a8f9546bb0260c2925cdbc0da65a792beadd4eb Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 20 Apr 2023 16:31:52 +0530 Subject: [PATCH 241/420] zonaloffice and migration --- .../src/main/resources/application.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 1dfcbc5bdc5..92c0132fdf3 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -7,13 +7,13 @@ app.timezone=UTC spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/marriage1 spring.datasource.username=postgres -spring.datasource.password=123 +spring.datasource.password=ikm ##----------------------------- FLYWAY CONFIGURATIONS ------------------------------# spring.flyway.url=jdbc:postgresql://localhost:5432/marriage1 spring.flyway.user=postgres -spring.flyway.password=123 +spring.flyway.password=ikm spring.flyway.table=public spring.flyway.baseline-on-migrate=true spring.flyway.outOfOrder=true From 4590e8b6423aa25a878381a128dcfef26a0a2042 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 20 Apr 2023 16:39:18 +0530 Subject: [PATCH 242/420] changes in certificate download --- .../marriageregistry/service/MarriageRegistryService.java | 2 +- .../main/V20232004152800__addNewfieldInCertificate_new_dll.sql | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 85de427ba2d..3ca9e7589c7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -152,7 +152,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req // } marriageCertificate.setMarriagecertificateno(marriageRegistryDetailsList.get(0).getCertificateNo()); - List marriageCertSearch = repository.searchCertificateByMarriageId(marriageCertRequest.getMarriageCertificate().getId()); + List marriageCertSearch = repository.searchCertificateByMarriageId(marriageCertRequest.getMarriageCertificate().getMarriageRegId()); if (null != marriageCertSearch && !marriageCertSearch.isEmpty()) { marriageCertRequest.getMarriageCertificate().setId(marriageCertSearch.get(0).getId()); repository.updateMarriageCertificate(marriageCertRequest); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql index 81f173e49dc..76be5234acc 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql @@ -1,2 +1,3 @@ ALTER TABLE public.eg_marriage_certificate -ADD COLUMN count int4; \ No newline at end of file +ADD COLUMN count int4; +ALTER TABLE public.eg_marriage_certificate ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; From cdfe55159e6d272a350240153182297a75f9e3d2 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 20 Apr 2023 16:40:34 +0530 Subject: [PATCH 243/420] changes in certificate table added count field --- .../egov-persister/src/main/resources/marriage-registry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 25082fb7f80..e8d41dba384 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -671,7 +671,7 @@ serviceMaps: queryMaps: - query: INSERT INTO public.eg_marriage_certificate (id, registrationno, registrydetailsid, filestoreid, status,embeddedurl, dateofissue, tenantid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, count) - VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); + VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?,?); basePath: marriageCertificate jsonMaps: - jsonPath: $.marriageCertificate.id From 5f0d9ae7a290c1731b11d8399e3b0001cc8bf0ae Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 20 Apr 2023 18:17:04 +0530 Subject: [PATCH 244/420] application search by type --- .../querybuilder/MarriageApplicationQueryBuilder.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 4566671a43f..681d825f7a2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -125,6 +125,7 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri addFilter("MD.id", criteria.getId(), query, preparedStmtValues); addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD.applicationNumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("MD.applicationType", criteria.getApplicationType(), query, preparedStmtValues); addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); @@ -216,6 +217,7 @@ public String getMarriageCountQuery(MarriageApplicationSearchCriteria criteria , addFilter("MD.id", criteria.getId(), query, preparedStmtValues); addFilter("MD.tenantid", criteria.getTenantId(), query, preparedStmtValues); addFilter("MD.applicationNumber", criteria.getApplicationNo(), query, preparedStmtValues); + addFilter("MD.applicationType", criteria.getApplicationType(), query, preparedStmtValues); addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); From e0cb188bf4a1530a337b88b1edac6ee604bdac33 Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 21 Apr 2023 10:52:47 +0530 Subject: [PATCH 245/420] removed unused imports --- .../enrichment/MarriageCertificateEnrichment.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java index 2ee48c8ca62..6834feda9a1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageCertificateEnrichment.java @@ -6,15 +6,11 @@ import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertPDFRequest; import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertRequest; -import org.ksmart.marriage.marriageregistry.web.model.certmodel.MarriageCertificate; import org.ksmart.marriage.utils.IDGenerator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import java.util.List; -import java.util.ListIterator; import java.util.UUID; @Component From 36ad5ba81adf33ab5da725eeb60e8f6684b5c58a Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 21 Apr 2023 12:09:58 +0530 Subject: [PATCH 246/420] changes in migration script --- .../V20230421120700__addNewfieldInCertificateTable_dll.sql | 3 +++ .../V20232004152800__addNewfieldInCertificate_new_dll.sql | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421120700__addNewfieldInCertificateTable_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421120700__addNewfieldInCertificateTable_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421120700__addNewfieldInCertificateTable_dll.sql new file mode 100644 index 00000000000..12276b01c66 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421120700__addNewfieldInCertificateTable_dll.sql @@ -0,0 +1,3 @@ +ALTER TABLE public.eg_marriage_certificate ADD COLUMN IF NOT EXISTS count int4; +ALTER TABLE public.eg_marriage_certificate ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; + diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql index fb94cd8e704..bd187458e5e 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql @@ -1,4 +1,4 @@ -ALTER TABLE public.eg_marriage_certificate -ADD COLUMN count int4; -ALTER TABLE public.eg_marriage_certificate ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; +--ALTER TABLE public.eg_marriage_certificate +--ADD COLUMN count int4; +--ALTER TABLE public.eg_marriage_certificate ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; From 291edc3320acdd54db978ef0b46809a9ab8ee5f5 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 21 Apr 2023 12:52:38 +0530 Subject: [PATCH 247/420] demand --- .../service/MarriageApplicationService.java | 8 +++++--- .../web/controller/MarriageApplicationController.java | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 49396fab21f..d420a4a0274 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -1,3 +1,4 @@ + package org.ksmart.marriage.marriageapplication.service; import lombok.extern.slf4j.Slf4j; @@ -70,9 +71,10 @@ public List saveMarriageDetails(MarriageDetailsReque if (request.getMarriageDetails().get(0).getIsWorkflow()){ workflowIntegrator.callWorkFlow(request); } - request.getMarriageDetails().forEach(marriage->{ - if(wfc.getPayment()!= null){ + System.out.println("JSONStatus"+marriage.getStatus()); + System.out.println("ConstStatus"+MarriageConstants.STATUS_FOR_PAYMENT); + // if(wfc.getPayment()!= null){ if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ System.out.println("hienterpayment"); List demands = new ArrayList<>(); @@ -83,7 +85,7 @@ public List saveMarriageDetails(MarriageDetailsReque marriage.setDemands(demandService.saveDemandDetails(demands,request.getRequestInfo(), wfc)); // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); } - } + // } }); // request.getDeathCertificateDtls().forEach(death->{ diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index eb1432c10c0..1cb448bafe1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -89,7 +89,7 @@ public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsReque @PostMapping(value = { "/_searchmarriage"}) public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { - + System.out.println("SearchCriteria"+criteria); int count=repository.getMarriageCount(criteria); List marriageDetails = MarriageService.searchMarriageDetails(criteria, request.getRequestInfo()); From 9690a852568537d9d88f5cf87d3797a8ec8d75b6 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 21 Apr 2023 12:53:32 +0530 Subject: [PATCH 248/420] demand --- .../src/main/resources/marriage-registry.yml | 1 + .../src/main/resources/marriage.yml | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 3f04ed5a1a9..a29ad76d473 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -99,6 +99,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.WitnessDetails.groomExpired - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + - jsonPath: $.MarriageDetails.*.certificateNo - query: UPDATE eg_marriage_details SET registrationno = ? ,registration_date = ? diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 8f8c4f4e640..cc2479fed5a 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -1438,6 +1438,26 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.applicationType + - version: 1.0 + description: Persists update workflow details in marriage table + fromTopic: update-demand-topic + isTransaction: true + queryMaps: + + - query: UPDATE public.eg_marriage_details SET action = ?, status = ?, amount = ? + WHERE applicationnumber = ? ; + basePath: PaymentDetails.* + jsonMaps: + + - jsonPath: $.PaymentDetails.*.action + + - jsonPath: $.PaymentDetails.*.applicationStatus + + - jsonPath: $.PaymentDetails.*.amount + + - jsonPath: $.PaymentDetails.*.applicationNumber + + From 196d5d630cb4065b9ba92c415839d9e75242ef57 Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 21 Apr 2023 13:10:56 +0530 Subject: [PATCH 249/420] src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql --- ...V20230421130601__addNewfieldInCertificateAuditTable_dll.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql new file mode 100644 index 00000000000..12276b01c66 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql @@ -0,0 +1,3 @@ +ALTER TABLE public.eg_marriage_certificate ADD COLUMN IF NOT EXISTS count int4; +ALTER TABLE public.eg_marriage_certificate ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; + From edfa340bcfcce8f71cefc73679823ac285564158 Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 21 Apr 2023 13:15:57 +0530 Subject: [PATCH 250/420] changes in scripts --- .../src/main/resources/marriage-correction.yml | 16 ++++++++++++++++ .../src/main/resources/marriage-registry.yml | 5 +++++ ...1__addNewfieldInCertificateAuditTable_dll.sql | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index c609a644628..ca654f7356e 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -877,4 +877,20 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.id + + - query: INSERT INTO public.eg_marriage_certificate_audit SELECT * FROM public.eg_marriage_certificate WHERE registrydetailsid = ?; + + basePath: MarriageDetails.* + jsonMaps: + - jsonPath: $.MarriageDetails.*.id + + - query: UPDATE public.eg_marriage_certificate + set lastmodifiedtime=?, lastmodifiedby=? , count=0 where registrydetailsid=?; + basePath: marriageCertificate + jsonMaps: + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime + + - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.id \ No newline at end of file diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index 9f5439313aa..dca5544511c 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -707,6 +707,11 @@ serviceMaps: fromTopic: update-marriagecertificate-topic isTransaction: true queryMaps: + - query: INSERT INTO public.eg_marriage_certificate_audit SELECT * FROM public.eg_marriage_certificate WHERE registrydetailsid = ?; + basePath: marriageCertificate + jsonMaps: + - jsonPath: $.marriageCertificate.marriageRegistryDetails.id + - query: UPDATE public.eg_marriage_certificate set filestoreid=? , embeddedurl=?, dateofissue=?, lastmodifiedtime=?, lastmodifiedby=? , count=? where id=? and registrydetailsid=?; basePath: marriageCertificate diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql index 12276b01c66..f9be1a5b39a 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql @@ -1,3 +1,3 @@ -ALTER TABLE public.eg_marriage_certificate ADD COLUMN IF NOT EXISTS count int4; -ALTER TABLE public.eg_marriage_certificate ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; +ALTER TABLE public.eg_marriage_certificate_audit ADD COLUMN IF NOT EXISTS count int4; +ALTER TABLE public.eg_marriage_certificate_audit ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; From f9f9efca5e59fc0da9cfec7ccc8389f39e217b37 Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 21 Apr 2023 13:21:36 +0530 Subject: [PATCH 251/420] changes in scripts --- ...20230421130601__addNewfieldInCertificateAuditTable_dll.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql index f9be1a5b39a..95507a63b77 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql @@ -1,3 +1,3 @@ -ALTER TABLE public.eg_marriage_certificate_audit ADD COLUMN IF NOT EXISTS count int4; -ALTER TABLE public.eg_marriage_certificate_audit ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; +ALTER TABLE IF EXISTS public.eg_marriage_certificate_audit ADD COLUMN IF NOT EXISTS count int4; +ALTER TABLE IF EXISTS public.eg_marriage_certificate_audit ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; From ee124723cf1c6870a1c7ab5d9e861b3743c9b0ae Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 21 Apr 2023 17:04:18 +0530 Subject: [PATCH 252/420] changes in address added a whitespace --- .../marriageregistry/enrichment/MarriageRegistryEnrichment.java | 2 +- .../marriageregistry/repository/MarriageRegistryRepository.java | 2 +- .../main/V20230421155505__removefieldInCertificate_dll.sql | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421155505__removefieldInCertificate_dll.sql diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 41cb9564a56..dfe9ced8c35 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -820,7 +820,7 @@ private StringBuilder appendIfNotBlank(String v,StringBuilder s,boolean addSemic if(StringUtils.isNotBlank(v)){ s.append(v); if(addSemicolon){ - s.append(","); + s.append(", "); } } return s; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index b1187b68cf1..59fb380a99f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -267,7 +267,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria throw new CustomException("PDF_ERROR"," Marriage Place Type is Empty"); } - StringBuilder groomAddr = new StringBuilder(); +// StringBuilder groomAddr = new StringBuilder(); //Setting Groom Address data from MDMS // Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() // , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421155505__removefieldInCertificate_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421155505__removefieldInCertificate_dll.sql new file mode 100644 index 00000000000..ae3680fc06e --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421155505__removefieldInCertificate_dll.sql @@ -0,0 +1,2 @@ +ALTER TABLE IF EXISTS public.eg_marriage_certificate_audit DROP COLUMN IF EXISTS operation; +ALTER TABLE IF EXISTS public.eg_marriage_certificate_audit DROP COLUMN IF EXISTS stamp; \ No newline at end of file From 1b1b723d8fc93214667bb7ddb70f590f8285b7c4 Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 21 Apr 2023 17:17:22 +0530 Subject: [PATCH 253/420] changes in correction yml --- .../egov-persister/src/main/resources/marriage-correction.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index ca654f7356e..1450c1b1348 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -887,7 +887,7 @@ serviceMaps: - query: UPDATE public.eg_marriage_certificate set lastmodifiedtime=?, lastmodifiedby=? , count=0 where registrydetailsid=?; - basePath: marriageCertificate + basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.AuditDetails.lastModifiedTime From 4818529fc0df0ab04602aea0de156177a2c1e474 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Fri, 21 Apr 2023 17:21:53 +0530 Subject: [PATCH 254/420] Marriage correction validations changes --- .../MarriageCorrectionEnrichment.java | 8 +-- .../service/MarriageCorrectionService.java | 66 +++++++++-------- .../MarriageCorrectionApplnValidator.java | 72 +++++++++++++------ .../MarriageCorrectionMDMSValidator.java | 16 ++--- .../service/MarriageRegistryService.java | 44 +++++------- 5 files changed, 110 insertions(+), 96 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index e979e35d6f5..3857130c3cb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -291,8 +291,8 @@ private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { } if (marriage.getGroomAddressDetails().getCountryIdPermanent() != null && marriage.getGroomAddressDetails().getStateIdPermanent() != null) { - if (marriage.getGroomAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getStateIdPermanent().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getGroomAddressDetails().getCountryIdPermanent().equalsIgnoreCase(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getStateIdPermanent().equalsIgnoreCase(MarriageConstants.STATE_CODE_SMALL)) { //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent, marriage.getGroomAddressDetails().getPermtaddressCountry()); //setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrTalukId,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); @@ -360,8 +360,8 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { } if (marriage.getBrideAddressDetails().getCountryIdPermanent() != null && marriage.getBrideAddressDetails().getStateIdPermanent() != null) { - if (marriage.getBrideAddressDetails().getCountryIdPermanent().contains(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getBrideAddressDetails().getStateIdPermanent().contains(MarriageConstants.STATE_CODE_SMALL)) { + if (marriage.getBrideAddressDetails().getCountryIdPermanent().equalsIgnoreCase(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getStateIdPermanent().equalsIgnoreCase(MarriageConstants.STATE_CODE_SMALL)) { //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); //setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 322db9b3a60..391077bd852 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -95,7 +95,7 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito this.marriageCorrectionMDMSValidator = marriageCorrectionMDMSValidator; this.marriageDetailsEnrichment = marriageDetailsEnrichment; } -//req for testing + //req for testing public List createCorrection(MarriageCorrectionRequest request) { //WorkFlowCheck wfc = new WorkFlowCheck(); @@ -108,40 +108,38 @@ public List createCorrection(MarriageCorrectionReques criteria.setId(request.getMarriageCorrectionDetails().get(0).getRegisterId()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); List marriageRegistryDetails = searchRegistry(criteria); - if (!marriageRegistryDetails.isEmpty()) { - MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); - marriageCorrectionEnrichment.enrichCreate(request, marriageApplicationDetail); - List marriageApplicationDetailsList = new ArrayList<>(); - marriageApplicationDetailsList.add(marriageApplicationDetail); - request.setMarriageDetails(marriageApplicationDetailsList); - - MarriageDetailsRequest marriageDetailsRequest=new MarriageDetailsRequest(); - marriageDetailsRequest.setMarriageDetails(marriageApplicationDetailsList); - marriageCorrectionApplnValidator.validateCommonFields(marriageDetailsRequest); - //validatorService.validateCommonFields( marriageDetailsRequest); - //mdmsValidator.validateMarriageMDMSData(marriageDetailsRequest,mdmsData); - //validatorService.ruleEngineMarriage(marriageDetailsRequest, wfc, mdmsData); - - producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); - - /*if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ - workflowIntegrator.callCorrectionWorkFlow(request); - } - request.getMarriageDetails().forEach(marriage->{ - if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - List demands = new ArrayList<>(); - Demand demand = new Demand(); - demand.setTenantId(marriage.getTenantid()); - demand.setConsumerCode(marriage.getApplicationNumber()); - demands.add(demand); - marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); - } - });*/ - - }else{ - throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), - "Marriage registration(s) not found in database."); + marriageCorrectionApplnValidator.validateCorrectionRegistrySearch(marriageRegistryDetails); + + MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); + marriageCorrectionEnrichment.enrichCreate(request, marriageApplicationDetail); + List marriageApplicationDetailsList = new ArrayList<>(); + marriageApplicationDetailsList.add(marriageApplicationDetail); + request.setMarriageDetails(marriageApplicationDetailsList); + + MarriageDetailsRequest marriageDetailsRequest=new MarriageDetailsRequest(); + marriageDetailsRequest.setMarriageDetails(marriageApplicationDetailsList); + marriageCorrectionApplnValidator.validateCommonFields(marriageDetailsRequest); + //validatorService.validateCommonFields( marriageDetailsRequest); + //mdmsValidator.validateMarriageMDMSData(marriageDetailsRequest,mdmsData); + //validatorService.ruleEngineMarriage(marriageDetailsRequest, wfc, mdmsData); + + producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); + + /*if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ + workflowIntegrator.callCorrectionWorkFlow(request); } + request.getMarriageDetails().forEach(marriage->{ + if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + List demands = new ArrayList<>(); + Demand demand = new Demand(); + demand.setTenantId(marriage.getTenantid()); + demand.setConsumerCode(marriage.getApplicationNumber()); + demands.add(demand); + marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + } + });*/ + + return request.getMarriageCorrectionDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java index 6c8eb8c2263..9eddc09aac1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java @@ -6,6 +6,7 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; +import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; @@ -23,24 +24,21 @@ public void validateCorrectionCreate(MarriageCorrectionRequest request) { throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), "Marriage Correction Details is required."); } - if (correctionApplications.size() > 1) { // NOPMD throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), "Supports only single Marriage correction application create request."); } if (StringUtils.isBlank(correctionApplications.get(0).getRegisterId())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), - "Register id is required for create correction request."); + "Register Id is required for create correction request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getRegistrationno())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), - "Registration number is required for create correction request."); + "Registration Number is required for create correction request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getTenantid())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), - "Tenant id is required for create correction request."); + "Tenant Id is required for create correction request."); } if (CollectionUtils.isEmpty(correctionApplications.get(0).getCorrectionField())) { throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), @@ -54,6 +52,18 @@ public void validateCorrectionCreate(MarriageCorrectionRequest request) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Module Code is required for create correction request."); } + if (StringUtils.isBlank(correctionApplications.get(0).getWorkflowcode())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Workflow Code is required for create correction request."); + } + if (StringUtils.isBlank(correctionApplications.get(0).getBusinessservice())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), + "Business Service is required for create correction request."); + } + if (StringUtils.isBlank(correctionApplications.get(0).getStatus())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Application Status is required for create correction request."); + } } public void validateCorrectionUpdate(MarriageCorrectionRequest request) { @@ -62,56 +72,50 @@ public void validateCorrectionUpdate(MarriageCorrectionRequest request) { throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), "Marriage details is required."); } - if (correctionApplications.size() > 1) { throw new CustomException(MARRIAGE_DETAILS_REQUIRED.getCode(), "Supports only single application update request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getRegisterId())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Register id is required for update correction request."); + "Register Id is required for update correction request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getRegistrationno())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), "Registration number is required for update correction request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getTenantid())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Tenant id is required for update request."); + "Tenant Id is required for update request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getId())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Application id is required for update request."); + "Application Id is required for update request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getApplicationtype())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Application type is required for update request."); + "Application Type is required for update request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getBusinessservice())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Bussiness service is required for update request."); + "Bussiness Service is required for update request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getApplicationNo())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Application number is required for update request."); + "Application Number is required for update request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getWorkflowcode())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Workflow code is required for update request."); + "Workflow Code is required for update request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getAction())) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), "Workflow action is required for update request."); } + if (StringUtils.isBlank(correctionApplications.get(0).getStatus())) { + throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), + "Application Status is required for update request."); + } //mdmsValidator.validateMdmsData(request, mdmsData); } @@ -143,4 +147,26 @@ public void validateCommonFields(MarriageDetailsRequest request) { }); } } + + public void validateCorrectionApplnSearch(List applicationDetails) { + if (applicationDetails.isEmpty()) { + throw new CustomException(MARRIAGE_DETAILS_NOT_FOUND.getCode(), + "Marriage Correction Application(s) not found in database."); + } + if (applicationDetails.size() > 1) { + throw new CustomException(MARRIAGE_DETAILS_NOT_FOUND.getCode(), + "Supports only single Marriage Application(s) for correction."); + } + } + + public void validateCorrectionRegistrySearch(List registryDetails) { + if (registryDetails.isEmpty()) { + throw new CustomException(MARRIAGE_DETAILS_NOT_FOUND.getCode(), + "Marriage registration(s) not found in database."); + } + if (registryDetails.size() > 1) { + throw new CustomException(MARRIAGE_DETAILS_NOT_FOUND.getCode(), + "Supports only single Marriage registration(s) for correction."); + } + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java index f6451c23e4d..cdb45a09f71 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java @@ -33,11 +33,11 @@ public void validateMarriageCorrectionMDMSData(MarriageCorrectionRequest correct errorMap.put("INVALID TENAND ID", "The tenand id " + correctionRequest.getMarriageCorrectionDetails().get(0).getTenantid() + " does not exists"); - correctionRequest.getMarriageCorrectionDetails().forEach(correctionDtls -> { + /*correctionRequest.getMarriageCorrectionDetails().forEach(correctionDtls -> { correctionDtls.getCorrectionField().forEach(correctionField -> { correctionField.getCorrectionFieldValue().forEach(field -> { // MASTER DETAILS VALIDATION - /*if (field.getField().equalsIgnoreCase("marriagePlacetype")) { + *//*if (field.getField().equalsIgnoreCase("marriagePlacetype")) { if (field.getNewValue() != null) { if (!masterData.get(MarriageConstants.MARRIAGE_PLACE_TYPE).contains(field.getNewValue())) errorMap.put(" MARRIAGE PLACE TYPE INVALID ", "The marriage place type " + @@ -67,10 +67,10 @@ public void validateMarriageCorrectionMDMSData(MarriageCorrectionRequest correct errorMap.put(" LBTYPE INVALID", "The LBTYpe of marriage place " + field.getNewValue() + " is invalid"); } - }*/ + }*//* //GROOM PERMANENT ADDRESS DETAILS VALIDATION - /*if (field.getField().equalsIgnoreCase("GroomAddressDetails.permtaddressCountry")) { + *//*if (field.getField().equalsIgnoreCase("GroomAddressDetails.permtaddressCountry")) { if (field.getNewValue() != null) { if (!masterData.get(MarriageConstants.COUNTRY).contains(field.getNewValue())) errorMap.put("GROOM PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of groom " + @@ -118,10 +118,10 @@ public void validateMarriageCorrectionMDMSData(MarriageCorrectionRequest correct errorMap.put("GROOM PERMANENT ADDRESS: POST OFFICE INVALID", "groom post office inside kerala is invalid" + field.getNewValue() + " is invalid"); } - }*/ + }*//* //BRIDE PERMANENT ADDRESS DETAILS VALIDATION - /*else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permtaddressCountry")) { + *//*else if (field.getField().equalsIgnoreCase("BrideAddressDetails.permtaddressCountry")) { if (field.getNewValue() != null) { if (!masterData.get(MarriageConstants.COUNTRY).contains(field.getNewValue())) errorMap.put("BRIDE PERMANENT ADDRESS: COUNTRY NAME INVALID", "The country name of bride " + @@ -169,10 +169,10 @@ public void validateMarriageCorrectionMDMSData(MarriageCorrectionRequest correct errorMap.put("BRIDE PERMANENT ADDRESS: POST OFFICE INVALID", "bride post office inside kerala " + field.getNewValue()+ " is invalid"); } - }*/ + }*//* }); }); - }); + });*/ if (!CollectionUtils.isEmpty(errorMap)) throw new CustomException(errorMap); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 3ca9e7589c7..98e9c9b6621 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -10,6 +10,7 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriagecorrection.enrichment.MarriageCorrectionEnrichment; import org.ksmart.marriage.marriagecorrection.mapper.CorrectionApplicationToRegistryMapper; +import org.ksmart.marriage.marriagecorrection.validator.MarriageCorrectionApplnValidator; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriageregistry.enrichment.MarriageCertificateEnrichment; @@ -28,12 +29,7 @@ import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; import java.text.SimpleDateFormat; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; import java.util.Arrays; -import java.util.Calendar; import java.util.Date; import java.util.List; @@ -54,10 +50,11 @@ public class MarriageRegistryService { private final MarriageCorrectionEnrichment marriageCorrectionEnrichment; private final MarriageApplicationRepository marriageApplicationRepository; private final CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper; + private final MarriageCorrectionApplnValidator marriageCorrectionApplnValidator; public MarriageRegistryService(MarriageRegistryRepository repository, MarriageRegistryEnrichment marriageRegistryEnrichment, MarriageProducer producer, - MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageCertificateEnrichment marriageCertificateEnrichment, MarriageCorrectionEnrichment marriageCorrectionEnrichment, MarriageApplicationRepository marriageApplicationRepository, CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper) { + MarriageApplicationConfiguration marriageApplicationConfiguration, MarriageCertificateEnrichment marriageCertificateEnrichment, MarriageCorrectionEnrichment marriageCorrectionEnrichment, MarriageApplicationRepository marriageApplicationRepository, CorrectionApplicationToRegistryMapper correctionApplicationToRegistryMapper, MarriageCorrectionApplnValidator marriageCorrectionApplnValidator) { this.producer = producer; this.marriageApplicationConfiguration = marriageApplicationConfiguration; @@ -67,6 +64,7 @@ public MarriageRegistryService(MarriageRegistryRepository repository, MarriageRe this.marriageCorrectionEnrichment = marriageCorrectionEnrichment; this.marriageApplicationRepository = marriageApplicationRepository; this.correctionApplicationToRegistryMapper = correctionApplicationToRegistryMapper; + this.marriageCorrectionApplnValidator = marriageCorrectionApplnValidator; } // private final MarriageApplicationConfiguration marriageApplicationConfiguration; public List createRegistry(MarriageRegistryRequest request) { @@ -192,28 +190,20 @@ public List updateMarriageRegistry(MarriageCorrection criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); List marriageRegistryDetails = searchRegistry(criteria); + marriageCorrectionApplnValidator.validateCorrectionRegistrySearch(marriageRegistryDetails); + + MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); + aplnCriteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); + aplnCriteria.setApplicationNo(request.getMarriageCorrectionDetails().get(0).getApplicationNo()); + aplnCriteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); + List marriageAplnDetails = marriageApplicationRepository.getMarriageApplication(aplnCriteria, request.getRequestInfo()); + marriageCorrectionApplnValidator.validateCorrectionApplnSearch(marriageAplnDetails); + + MarriageRegistryRequest marriageRegistryRequest = correctionApplicationToRegistryMapper.convert(marriageRegistryDetails, marriageAplnDetails); + marriageRegistryRequest.setRequestInfo(request.getRequestInfo()); + marriageCorrectionEnrichment.enrichRegistryUpdate(marriageRegistryRequest); + producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryCorrectionTopic(), marriageRegistryRequest); - if (!marriageRegistryDetails.isEmpty()) { - MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); - aplnCriteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); - aplnCriteria.setApplicationNo(request.getMarriageCorrectionDetails().get(0).getApplicationNo()); - aplnCriteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - - List marriageAplnDetails = marriageApplicationRepository.getMarriageApplication(aplnCriteria, request.getRequestInfo()); - - if(!marriageAplnDetails.isEmpty()) { - MarriageRegistryRequest marriageRegistryRequest = correctionApplicationToRegistryMapper.convert(marriageRegistryDetails, marriageAplnDetails); - marriageRegistryRequest.setRequestInfo(request.getRequestInfo()); - marriageCorrectionEnrichment.enrichRegistryUpdate(marriageRegistryRequest); - producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryCorrectionTopic(), marriageRegistryRequest); - }else{ - throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), - "Marriage Application(s) not found in database."); - } - }else{ - throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), - "Marriage registration(s) not found in database."); - } return request.getMarriageCorrectionDetails(); } } From 3ba02ee867bc48dc2792fcca9a2baa2c97c92c3b Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 25 Apr 2023 14:52:44 +0530 Subject: [PATCH 255/420] demand --- .../rowmapper/DocumentRowMapper.java | 2 +- .../rowmapper/MarriageDocumentRowMapper.java | 2 +- .../service/DemandService.java | 2 +- .../MarriageApplicationSearchCriteria.java | 4 +- .../web/model/marriage/MarriageDocument.java | 4 +- .../web/model/marriage/WitnessDetails.java | 4 +- .../web/model/WitnessRegistryDetails.java | 4 +- ...30323034512__marriage_services_new_dll.sql | 35 ----------------- ...25124600__Marriage_table_type_updation.sql | 9 +++++ ...04111526__newFieldAdd_services_new_dll.sql | 23 ----------- ...04131927__newFieldAdd_services_new_dll.sql | 31 --------------- ...04124328__newFieldAdd_services_new_dll.sql | 13 ------- ...22__operationAndStamp_deletion_new_dll.sql | 39 ------------------- ...04103301__Foreignkey_deletions_new_dll.sql | 3 -- .../V20231804131005__addNewfeild_new_dll.sql | 19 --------- 15 files changed, 20 insertions(+), 174 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230425124600__Marriage_table_type_updation.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java index 1fcdc67e8e5..c144f59c85c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/DocumentRowMapper.java @@ -18,7 +18,7 @@ default List getMarriageDocument(ResultSet rs) throws SQLExcep .documentName(rs.getString("document_name")) .documentType(rs.getString("document_type")) .fileStoreId(rs.getString("filestoreid")) - .documentlink(rs.getString("document_link")) + .fileURL(rs.getString("document_link")) .marriageId(rs.getString("marriageid")) .documentOwner(rs.getString("bride_groom")) .active(rs.getBoolean("active")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java index 7c3c21b80c0..e5a65564bab 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageDocumentRowMapper.java @@ -24,7 +24,7 @@ public List extractData(ResultSet rs) throws SQLException, Dat .documentName(rs.getString("document_name")) .documentType(rs.getString("document_type")) .fileStoreId(rs.getString("filestoreid")) - // .documentlink(rs.getString("document_link")) + .fileURL(rs.getString("document_link")) .marriageId(rs.getString("marriageid")) .documentOwner(rs.getString("bride_groom")) .active(rs.getBoolean("active")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java index 2dfa450003d..71bce4e1303 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java @@ -61,7 +61,7 @@ public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkF demand.setBusinessService("CR"); ArrayList demandDetails = new ArrayList<>(); DemandDetail demandDetail=new DemandDetail(); - demandDetail.setTaxHeadMasterCode("CRM_FEES"); + demandDetail.setTaxHeadMasterCode("140130400"); demandDetail.setTaxAmount(new BigDecimal(wfc.getAmount())); demandDetail.setTenantId(demand.getTenantId()); setGLCode(demandDetail, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java index f710bd60540..8600abb0152 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java @@ -84,8 +84,8 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("documentOwner") private String documentOwner ; - @JsonProperty("documentlink") - private String documentlink; + @JsonProperty("fileURL") + private String fileURL; @JsonProperty("applicationType") private String applicationType; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java index a5a5cd4fd4e..92412c6ffad 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageDocument.java @@ -42,8 +42,8 @@ public class MarriageDocument { @JsonProperty("documentOwner") private String documentOwner ; - @JsonProperty("documentlink") - private String documentlink; + @JsonProperty("fileURL") + private String fileURL; @JsonProperty("applicationNumber") private String applicationNumber ; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java index ada923c6a31..b19d03b9c71 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java @@ -97,11 +97,11 @@ public class WitnessDetails { private Boolean witness2Esigned; //Jasmine 06.04.2023 - @Size(max = 200) + @Size(max = 2000) @JsonProperty("brideUrl") private String brideUrl; - @Size(max = 200) + @Size(max = 2000) @JsonProperty("groomUrl") private String groomUrl; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java index 843a1f291d2..7e845f7481c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java @@ -100,11 +100,11 @@ public class WitnessRegistryDetails { @JsonProperty("witness2Esigned") private Boolean witness2Esigned; - @Size(max = 200) + @Size(max = 2000) @JsonProperty("brideUrl") private String brideUrl; - @Size(max = 200) + @Size(max = 2000) @JsonProperty("groomUrl") private String groomUrl; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql deleted file mode 100644 index 65ff8ebedd5..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323034512__marriage_services_new_dll.sql +++ /dev/null @@ -1,35 +0,0 @@ -DROP TABLE IF EXISTS public.eg_marriage_details CASCADE; -DROP INDEX IF EXISTS public.idx_eg_marriage_details_tenantid; -DROP TABLE IF EXISTS public.eg_marriage_details_audit; -DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details; -DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details_audit; -DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details; -DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details_audit; -DROP TABLE IF EXISTS public.eg_marriage_present_address_details; -DROP TABLE IF EXISTS public.eg_marriage_present_address_details_audit; -DROP TABLE IF EXISTS public.eg_marriage_witness_details; -DROP TABLE IF EXISTS public.eg_marriage_witness_details_audit; -DROP TABLE IF EXISTS public.eg_marriage_certificate; -DROP TABLE IF EXISTS public.eg_marriage_certificate_audit; -DROP TABLE IF EXISTS public.eg_register_marriage_document; -DROP TABLE IF EXISTS public.eg_register_marriage_document_audit; -DROP TABLE IF EXISTS public.eg_register_marriage_details CASCADE; -DROP TABLE IF EXISTS public.eg_register_marriage_details_audit; -DROP TABLE IF EXISTS public.eg_register_marriage_bride_groom_details; -DROP TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit; -DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit; -DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details; -DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit; -DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; -DROP TABLE IF EXISTS public.eg_register_marriage_witness_details_audit; -DROP TABLE IF EXISTS public.eg_register_marriage_document; -DROP TABLE IF EXISTS public.eg_register_marriage_document_audit; -DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; - - -DROP FUNCTION IF EXISTS public.process_eg_marriage_bride_details_audit(); -DROP FUNCTION IF EXISTS public.process_eg_marriage_details_audit(); -DROP FUNCTION IF EXISTS public.process_eg_marriage_groom_details_audit(); -DROP FUNCTION IF EXISTS public.process_eg_marriage_permanent_address_details_audit(); -DROP FUNCTION IF EXISTS public.process_eg_marriage_present_address_details_audit(); -DROP FUNCTION IF EXISTS public.process_eg_marriage_witness_details_audit(); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230425124600__Marriage_table_type_updation.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230425124600__Marriage_table_type_updation.sql new file mode 100644 index 00000000000..e8188610ea9 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230425124600__Marriage_table_type_updation.sql @@ -0,0 +1,9 @@ + ALTER TABLE eg_marriage_details ALTER COLUMN brideurl TYPE VARCHAR(2000); + ALTER TABLE eg_marriage_details ALTER COLUMN groomurl TYPE VARCHAR(2000); + ALTER TABLE eg_marriage_details_audit ALTER COLUMN brideurl TYPE VARCHAR(2000); + ALTER TABLE eg_marriage_details_audit ALTER COLUMN groomurl TYPE VARCHAR(2000); + + ALTER TABLE eg_register_marriage_details ALTER COLUMN brideurl TYPE VARCHAR(2000); + ALTER TABLE eg_register_marriage_details ALTER COLUMN groomurl TYPE VARCHAR(2000); + ALTER TABLE eg_register_marriage_details_audit ALTER COLUMN brideurl TYPE VARCHAR(2000); + ALTER TABLE eg_register_marriage_details_audit ALTER COLUMN groomurl TYPE VARCHAR(2000); \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql deleted file mode 100644 index 21a5a777c2a..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230504111526__newFieldAdd_services_new_dll.sql +++ /dev/null @@ -1,23 +0,0 @@ ---ALTER TABLE public.eg_marriage_details ---ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", ---ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", ---ADD COLUMN bride_expired boolean, ---ADD COLUMN groom_expired boolean; --- ---ALTER TABLE public.eg_marriage_details_audit ---ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", ---ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", ---ADD COLUMN bride_expired boolean, ---ADD COLUMN groom_expired boolean; --- ---ALTER TABLE public.eg_register_marriage_details ---ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", ---ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", ---ADD COLUMN bride_expired boolean, ---ADD COLUMN groom_expired boolean; --- ---ALTER TABLE public.eg_register_marriage_details_audit ---ADD COLUMN bride_filestoreid character varying(256) COLLATE pg_catalog."default", ---ADD COLUMN groom_filestoreid character varying(256) COLLATE pg_catalog."default", ---ADD COLUMN bride_expired boolean, ---ADD COLUMN groom_expired boolean; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql deleted file mode 100644 index 10aa0b63ddf..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230604131927__newFieldAdd_services_new_dll.sql +++ /dev/null @@ -1,31 +0,0 @@ ---ALTER TABLE public.eg_marriage_details --- ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_marriage_details_audit --- ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_register_marriage_details --- ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_register_marriage_details_audit --- ADD COLUMN module_code character varying(64) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_marriage_bride_groom_details --- ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", --- ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", --- ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_marriage_bride_groom_details_audit --- ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", --- ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", --- ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_register_marriage_bride_groom_details --- ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", --- ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", --- ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_register_marriage_bride_groom_details_audit --- ALTER COLUMN father_aadharno TYPE character varying(200) COLLATE pg_catalog."default", --- ALTER COLUMN mother_aadharno TYPE character varying(200) COLLATE pg_catalog."default", --- ALTER COLUMN guardian_aadharno TYPE character varying(200) COLLATE pg_catalog."default"; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql deleted file mode 100644 index ab3079449ce..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230804124328__newFieldAdd_services_new_dll.sql +++ /dev/null @@ -1,13 +0,0 @@ ---ALTER TABLE public.eg_marriage_details --- ADD COLUMN is_backward boolean; --- ---ALTER TABLE public.eg_marriage_details_audit --- ADD COLUMN is_backward boolean; --- ---ALTER TABLE public.eg_register_marriage_details --- ADD COLUMN is_backward boolean, --- ADD COLUMN certificatenumber character varying(64) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_register_marriage_details_audit --- ADD COLUMN is_backward boolean, --- ADD COLUMN certificatenumber character varying(64) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql deleted file mode 100644 index 0ce322a7f88..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231204215122__operationAndStamp_deletion_new_dll.sql +++ /dev/null @@ -1,39 +0,0 @@ --- --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS operation; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS stamp; --- --- --- --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS operation; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS stamp; --- --- --- --- --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS operation; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS stamp; --- --- --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS operation; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS stamp; --- --- --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS operation; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS stamp; --- --- --- --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS operation; --- ---ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS stamp; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql deleted file mode 100644 index 530e0a1a817..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231304103301__Foreignkey_deletions_new_dll.sql +++ /dev/null @@ -1,3 +0,0 @@ --- ---ALTER table eg_marriage_document --- DROP CONSTRAINT IF EXISTS eg_marriage_document_document_fkey; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql deleted file mode 100644 index f0b201f628c..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20231804131005__addNewfeild_new_dll.sql +++ /dev/null @@ -1,19 +0,0 @@ ---ALTER TABLE public.eg_marriage_permanent_address_details ---ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", ---ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", ---ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_marriage_permanent_address_details_audit ---ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", ---ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", ---ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_register_marriage_permanent_address_details ---ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", ---ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", ---ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; --- ---ALTER TABLE public.eg_register_marriage_permanent_address_details_audit ---ADD COLUMN state_name character varying(1000) COLLATE pg_catalog."default", ---ADD COLUMN district_name character varying(1000) COLLATE pg_catalog."default", ---ADD COLUMN country_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file From 377b9b1d547de79098339f199dce72757857b185 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 25 Apr 2023 15:05:47 +0530 Subject: [PATCH 256/420] certificate no and rule engine --- .../V20232004152800__addNewfieldInCertificate_new_dll.sql | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql deleted file mode 100644 index bd187458e5e..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20232004152800__addNewfieldInCertificate_new_dll.sql +++ /dev/null @@ -1,4 +0,0 @@ ---ALTER TABLE public.eg_marriage_certificate ---ADD COLUMN count int4; ---ALTER TABLE public.eg_marriage_certificate ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; - From 98344411de37a893a19e7ae4b43b9b736b9c181f Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 26 Apr 2023 11:47:58 +0530 Subject: [PATCH 257/420] bugfix in address null check --- .../enrichment/MarriageRegistryEnrichment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index dfe9ced8c35..bb2c9cd5ef1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -509,8 +509,8 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg if (registryDetails.getGroomAddressDetails() != null) { // if (registryDetails.getGroomAddressDetails().getPermtaddressCountry() != null && registryDetails.getGroomAddressDetails().getPermtaddressStateName() != null) { - if (registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { - if (registryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { + if (StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry())&®istryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName())&®istryDetails.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { Object mdmsGroomAddressData = util.mDMSCallGetAddress(req , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() , registryDetails.getGroomAddressDetails().getDistrictIdPermanent() @@ -667,8 +667,8 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg StringBuilder brideAddressBuilder = new StringBuilder(); if (registryDetails.getBrideAddressDetails() != null) { if (registryDetails.getBrideAddressDetails().getPermtaddressCountry() != null && registryDetails.getBrideAddressDetails().getPermtaddressStateName() != null) { - if (registryDetails.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { - if (registryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())&®istryDetails.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName())&®istryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { Object mdmsBrideAddressData = util.mDMSCallGetAddress(req , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() From fe381965f2004793ecd79b0ec933e42c9fb4a896 Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 26 Apr 2023 16:42:46 +0530 Subject: [PATCH 258/420] changes in image url, added base path --- .../repository/MarriageRegistryRepository.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 59fb380a99f..5c20d4ee60a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -309,13 +309,13 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsBrideAddressMap)); -// if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); -// -// } -// if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); -// } + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); + + } + if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); + } marriageCertPDFRequest.getMarriageCertificate().forEach(cert->{ String uiHost = marriageApplicationConfiguration.getUiAppHost(); String marriageCertPath = StringUtils.replaceEach(marriageApplicationConfiguration.getMarriageCertLink(), From ca659f6bb8d2f58c5fb45aef2e7de16efb7426d9 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 27 Apr 2023 10:23:57 +0530 Subject: [PATCH 259/420] Marriage correction change --- .../mapper/RegistryToApplicationMapper.java | 19 ++++++++----------- .../service/MarriageCorrectionService.java | 6 +++--- .../MarriageRegistryQueryBuilder.java | 4 ++-- .../rowmapper/MarriageRegistryRowMapper.java | 1 + 4 files changed, 14 insertions(+), 16 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 6d2c6daf9f9..17b7822f70f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -22,11 +22,10 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.setGroomDetails(new GroomDetails()); marriageApplicationDetails.setBrideAddressDetails(new BrideAddressDetails()); marriageApplicationDetails.setGroomAddressDetails(new GroomAddressDetails()); - MarriageRegistryDetails marriageRegistryDetails=registry.get(0); + //MARRIAGE DETAILS marriageApplicationDetails.setDateofmarriage(marriageRegistryDetails.getDateofmarriage()); - //marriageApplicationDetails.setDateofreporting(marriageRegistryDetails.getDateofreporting()); marriageApplicationDetails.setDistrictid(marriageRegistryDetails.getDistrictid()); marriageApplicationDetails.setLbtype(marriageRegistryDetails.getLbtype()); marriageApplicationDetails.setTenantid(marriageRegistryDetails.getTenantid()); @@ -43,15 +42,16 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.setTalukid(marriageRegistryDetails.getTalukid()); marriageApplicationDetails.setVillageName(marriageRegistryDetails.getVillage_name()); marriageApplicationDetails.setMarriageType(marriageRegistryDetails.getMarriage_type()); + marriageApplicationDetails.setOthMarriageType(marriageRegistryDetails.getOth_marriage_type()); marriageApplicationDetails.setLandmark(marriageRegistryDetails.getLandmark()); marriageApplicationDetails.setLocalityEn(marriageRegistryDetails.getLocality_en()); marriageApplicationDetails.setLocalityMl(marriageRegistryDetails.getLocality_ml()); marriageApplicationDetails.setRegistrationDate(marriageRegistryDetails.getRegistrationDate()); marriageApplicationDetails.setRegistrationNo(marriageRegistryDetails.getRegistrationno()); - //marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukid()); - //marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillage_name()); + marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukid()); + marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillage_name()); - //marriageApplicationDetails.getBrideDetails().setBrideId(marriageRegistryDetails.getBrideDetails().getBrideId()); + //BRIDE DETAILS marriageApplicationDetails.getBrideDetails().setBrideGroom(marriageRegistryDetails.getBrideDetails().getBrideGroom()); marriageApplicationDetails.getBrideDetails().setResidentship(marriageRegistryDetails.getBrideDetails().getResidentship()); marriageApplicationDetails.getBrideDetails().setPassportno(marriageRegistryDetails.getBrideDetails().getPassportno()); @@ -81,10 +81,9 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideDetails().setMothernameMl(marriageRegistryDetails.getBrideDetails().getMothername_ml()); marriageApplicationDetails.getBrideDetails().setMotherAadharno(marriageRegistryDetails.getBrideDetails().getMother_aadharno()); marriageApplicationDetails.getBrideDetails().setMaritalstatusid(marriageRegistryDetails.getBrideDetails().getMaritalstatusid()); - //marriageApplicationDetails.getBrideDetails().setMarriageid(marriageRegistryDetails.getBrideDetails().getMarriageid()); marriageApplicationDetails.getBrideDetails().setTenentId(marriageRegistryDetails.getBrideDetails().getTenentId()); - + //GROOM DETAILS marriageApplicationDetails.getGroomDetails().setBrideGroom(marriageRegistryDetails.getGroomDetails().getBrideGroom()); marriageApplicationDetails.getGroomDetails().setDateofbirth(marriageRegistryDetails.getGroomDetails().getDateofbirth()); marriageApplicationDetails.getGroomDetails().setFirstnameEn(marriageRegistryDetails.getGroomDetails().getFirstname_en()); @@ -111,14 +110,12 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getGroomDetails().setMotherAadharno(marriageRegistryDetails.getGroomDetails().getMother_aadharno()); marriageApplicationDetails.getGroomDetails().setGender(marriageRegistryDetails.getGroomDetails().getGender()); marriageApplicationDetails.getGroomDetails().setMaritalstatusid(marriageRegistryDetails.getGroomDetails().getMaritalstatusid()); - //marriageApplicationDetails.getGroomDetails().setMarriageid(marriageRegistryDetails.getGroomDetails().getMarriageid()); marriageApplicationDetails.getGroomDetails().setParentGuardian(marriageRegistryDetails.getGroomDetails().getParent_guardian()); marriageApplicationDetails.getGroomDetails().setPassportno(marriageRegistryDetails.getGroomDetails().getPassportno()); marriageApplicationDetails.getGroomDetails().setResidentship(marriageRegistryDetails.getGroomDetails().getResidentship()); - marriageApplicationDetails.getGroomDetails().setGroomIsSpouseLiving(marriageRegistryDetails.getGroomDetails().getGroomIsSpouseLiving()); marriageApplicationDetails.getGroomDetails().setTenentId(marriageRegistryDetails.getGroomDetails().getTenentId()); - + //BRIDE ADDRESS DETAILS marriageApplicationDetails.getBrideAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getCountryIdPermanent()); marriageApplicationDetails.getBrideAddressDetails().setStateIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getStateIdPermanent()); marriageApplicationDetails.getBrideAddressDetails().setDistrictIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getDistrictIdPermanent()); @@ -148,7 +145,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); marriageApplicationDetails.getBrideAddressDetails().setPinNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPinNoPermanent()); - + //GROOM ADDRESS DETAILS marriageApplicationDetails.getGroomAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getCountryIdPermanent()); marriageApplicationDetails.getGroomAddressDetails().setStateIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getStateIdPermanent()); marriageApplicationDetails.getGroomAddressDetails().setDistrictIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getDistrictIdPermanent()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 391077bd852..7345579c46a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -125,10 +125,10 @@ public List createCorrection(MarriageCorrectionReques producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); - /*if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ + if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ workflowIntegrator.callCorrectionWorkFlow(request); } - request.getMarriageDetails().forEach(marriage->{ + /*request.getMarriageDetails().forEach(marriage->{ if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); Demand demand = new Demand(); @@ -190,7 +190,7 @@ public List updateMarriageCorrectionDetails(MarriageC request.setMarriageDetails(searchResult); if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()) { - //workflowIntegrator.callCorrectionWorkFlow(request); + workflowIntegrator.callCorrectionWorkFlow(request); } producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationCorrectionTopic(), request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index d568c1a66fc..f5ee52f0a78 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -23,7 +23,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.housenameno_en as MD_housenameno_en , MD.housenameno_ml as MD_housenameno_ml ,") .append("MD.locality_en as MD_locality_en , MD.locality_ml as MD_locality_ml , MD.street_name_en as MD_street_name_en , MD.street_name_ml as MD_street_name_ml , ") - .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") + .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,MD.oth_marriage_type as MD_oth_marriage_type,") .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") @@ -51,7 +51,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") - .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 17043d07c6f..637d6306bc6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -41,6 +41,7 @@ public List extractData(ResultSet rs) throws SQLExcepti .talukid(rs.getString("MD_talukid")) .village_name(rs.getString("MD_village_name")) .marriage_type(rs.getString("MD_marriage_type")) + .oth_marriage_type(rs.getString("MD_oth_marriage_type")) .landmark(rs.getString("MD_landmark")) .locality_en(rs.getString("MD_locality_en")) .locality_ml(rs.getString("MD_locality_ml")) From 3c3360cf2e9df395632c6e1af671544891823bff Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 27 Apr 2023 16:18:34 +0530 Subject: [PATCH 260/420] Marriage correction workflow --- .../src/main/resources/marriage-correction.yml | 2 +- .../service/MarriageCorrectionService.java | 6 +++--- .../MarriageCorrectionApplnValidator.java | 16 ++++++++-------- .../controller/MarriageCorrectionController.java | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 1450c1b1348..909946b0299 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -226,7 +226,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomDetails.groomMaritalstatusID - - jsonPath: $.MarriageDetails.*.BrideDetails.groomIsSpouseLiving + - jsonPath: $.MarriageDetails.*.GroomDetails.groomIsSpouseLiving - jsonPath: $.MarriageDetails.*.id diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 7345579c46a..cbe3b8d7f21 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -186,12 +186,12 @@ public List updateMarriageCorrectionDetails(MarriageC List searchResult = applnRepository.getMarriageApplication(criteria, request.getRequestInfo()); correctionValidatorService.validateCorrectionUpdate(request, searchResult); - marriageCorrectionEnrichment.enrichUpdate(request, searchResult); - request.setMarriageDetails(searchResult); - if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()) { workflowIntegrator.callCorrectionWorkFlow(request); } + + marriageCorrectionEnrichment.enrichUpdate(request, searchResult); + request.setMarriageDetails(searchResult); producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationCorrectionTopic(), request); // request.getMarriageDetails().forEach(marriage->{ diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java index 9eddc09aac1..d4c97ae2c23 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionApplnValidator.java @@ -60,10 +60,10 @@ public void validateCorrectionCreate(MarriageCorrectionRequest request) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Business Service is required for create correction request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getStatus())) { - throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Application Status is required for create correction request."); - } +// if (StringUtils.isBlank(correctionApplications.get(0).getStatus())) { +// throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), +// "Application Status is required for create correction request."); +// } } public void validateCorrectionUpdate(MarriageCorrectionRequest request) { @@ -112,10 +112,10 @@ public void validateCorrectionUpdate(MarriageCorrectionRequest request) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), "Workflow action is required for update request."); } - if (StringUtils.isBlank(correctionApplications.get(0).getStatus())) { - throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Application Status is required for update request."); - } +// if (StringUtils.isBlank(correctionApplications.get(0).getStatus())) { +// throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), +// "Application Status is required for update request."); +// } //mdmsValidator.validateMdmsData(request, mdmsData); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index 9bb694abcb5..d4fe4c9ec1a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -56,7 +56,7 @@ public ResponseEntity registryUpdate(@RequestBody Ma List marriageapplnDetails = marriageCorrectionService.updateMarriageCorrectionDetails(request); //Updating Marriage registry if Registrar Approved - if(request.getMarriageCorrectionDetails().get(0).getStatus().equals(MarriageConstants.WORKFLOW_STATUS_APPROVED) && (request.getMarriageCorrectionDetails().get(0).getApplicationtype().equals(MarriageConstants.APPLICATION_CORRECTION))) { + if(marriageapplnDetails.get(0).getStatus().equals(MarriageConstants.WORKFLOW_STATUS_APPROVED) && (marriageapplnDetails.get(0).getApplicationtype().equals(MarriageConstants.APPLICATION_CORRECTION))) { List marriageCorrectionDetailsList = marriageRegistryService.updateMarriageRegistry(request); From a7ff90bc6b74028d07226fd6e96119e45ac11635 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 27 Apr 2023 18:36:47 +0530 Subject: [PATCH 261/420] Marriage correction search method --- .../service/MarriageCorrectionService.java | 95 +++++++------------ .../MarriageCorrectionController.java | 6 +- 2 files changed, 39 insertions(+), 62 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index cbe3b8d7f21..108f932a674 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -119,25 +119,25 @@ public List createCorrection(MarriageCorrectionReques MarriageDetailsRequest marriageDetailsRequest=new MarriageDetailsRequest(); marriageDetailsRequest.setMarriageDetails(marriageApplicationDetailsList); marriageCorrectionApplnValidator.validateCommonFields(marriageDetailsRequest); - //validatorService.validateCommonFields( marriageDetailsRequest); + //mdmsValidator.validateMarriageMDMSData(marriageDetailsRequest,mdmsData); //validatorService.ruleEngineMarriage(marriageDetailsRequest, wfc, mdmsData); - producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); - if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ workflowIntegrator.callCorrectionWorkFlow(request); } - /*request.getMarriageDetails().forEach(marriage->{ + producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); + + request.getMarriageCorrectionDetails().forEach(marriage->{ if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ List demands = new ArrayList<>(); Demand demand = new Demand(); demand.setTenantId(marriage.getTenantid()); - demand.setConsumerCode(marriage.getApplicationNumber()); + demand.setConsumerCode(marriage.getApplicationNo()); demands.add(demand); marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); } - });*/ + }); return request.getMarriageCorrectionDetails(); @@ -148,64 +148,41 @@ private List searchRegistry(MarriageRegistrySearchCrite return registryRepository.searchMarriageRegistry(criteria); } -//req for testing -// public List updateMarriageRegistry(MarriageCorrectionRequest request) { -// MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); -// criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); -// criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); -// List marriageRegistryDetails = searchRegistry(criteria); -// -// if (!marriageRegistryDetails.isEmpty()) { -// MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); -// aplnCriteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); -// aplnCriteria.setApplicationNo(request.getMarriageCorrectionDetails().get(0).getApplicationNo()); -// aplnCriteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); -// -// List marriageAplnDetails = correctionRepository.searchMarriageDetails(aplnCriteria, request.getRequestInfo()); -// -// if(!marriageAplnDetails.isEmpty()) { -// MarriageRegistryRequest marriageRegistryRequest = correctionApplicationToRegistryMapper.convert(marriageRegistryDetails, marriageAplnDetails); -// marriageRegistryRequest.setRequestInfo(request.getRequestInfo()); -// marriageCorrectionEnrichment.enrichRegistryUpdate(marriageRegistryRequest); -// producer.push(marriageApplicationConfiguration.getUpdateMarriageRegistryCorrectionTopic(), marriageRegistryRequest); -// } -// } -// return request.getMarriageCorrectionDetails(); -// } + //Jasmine 15.04.2023 -public List updateMarriageCorrectionDetails(MarriageCorrectionRequest request) { + public List updateMarriageCorrectionDetails(MarriageCorrectionRequest request) { + + marriageCorrectionApplnValidator.validateCorrectionUpdate(request); + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageCorrectionDetails().get(0).getTenantid()); + marriageCorrectionMDMSValidator.validateMarriageCorrectionMDMSData(request,mdmsData); - marriageCorrectionApplnValidator.validateCorrectionUpdate(request); - Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageCorrectionDetails().get(0).getTenantid()); - marriageCorrectionMDMSValidator.validateMarriageCorrectionMDMSData(request,mdmsData); + String applicationNumber = request.getMarriageCorrectionDetails().get(0).getApplicationNo(); + MarriageApplicationSearchCriteria criteria = (MarriageApplicationSearchCriteria.builder() + .applicationNo(applicationNumber) + .build()); + List searchResult = applnRepository.getMarriageApplication(criteria, request.getRequestInfo()); + correctionValidatorService.validateCorrectionUpdate(request, searchResult); - String applicationNumber = request.getMarriageCorrectionDetails().get(0).getApplicationNo(); - MarriageApplicationSearchCriteria criteria = (MarriageApplicationSearchCriteria.builder() - .applicationNo(applicationNumber) - .build()); - List searchResult = applnRepository.getMarriageApplication(criteria, request.getRequestInfo()); - correctionValidatorService.validateCorrectionUpdate(request, searchResult); + if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()) { + workflowIntegrator.callCorrectionWorkFlow(request); + } - if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()) { - workflowIntegrator.callCorrectionWorkFlow(request); + marriageCorrectionEnrichment.enrichUpdate(request, searchResult); + request.setMarriageDetails(searchResult); + producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationCorrectionTopic(), request); + + // request.getMarriageDetails().forEach(marriage->{ + // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + // List demands = new ArrayList<>(); + // Demand demand = new Demand(); + // demand.setTenantId(marriage.getTenantid()); + // demand.setConsumerCode(marriage.getApplicationNumber()); + // demands.add(demand); + // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + // } + // }); + return request.getMarriageCorrectionDetails(); } - - marriageCorrectionEnrichment.enrichUpdate(request, searchResult); - request.setMarriageDetails(searchResult); - producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationCorrectionTopic(), request); - - // request.getMarriageDetails().forEach(marriage->{ - // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - // List demands = new ArrayList<>(); - // Demand demand = new Demand(); - // demand.setTenantId(marriage.getTenantid()); - // demand.setConsumerCode(marriage.getApplicationNumber()); - // demands.add(demand); - // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); - // } - // }); - return request.getMarriageCorrectionDetails(); -} public List searchCorrectionApplinDetails(MarriageCorrectionRequest request,MarriageApplicationSearchCriteria criteria) { return applicationRepository.getMarriageApplication(criteria,request.getRequestInfo()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index d4fe4c9ec1a..5285b85ef2a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -37,7 +37,7 @@ public MarriageCorrectionController(MarriageCorrectionService marriageCorrection } @PostMapping("/_createmarriagecorrection") - public ResponseEntity create(@RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { + public ResponseEntity createCorrection(@RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { List marriageCorrectionDetailsList = marriageCorrectionService.createCorrection(request); MarriageCorrectionResponse response = MarriageCorrectionResponse @@ -51,7 +51,7 @@ public ResponseEntity create(@RequestBody MarriageCo @PostMapping(value = { "/_updatemarriagecorrection"}) - public ResponseEntity registryUpdate(@RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { + public ResponseEntity updateCorrection(@RequestBody MarriageCorrectionRequest request) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { List marriageapplnDetails = marriageCorrectionService.updateMarriageCorrectionDetails(request); @@ -71,7 +71,7 @@ public ResponseEntity registryUpdate(@RequestBody Ma @PostMapping(value = {"/_searchmarriagecorrection"}) - public ResponseEntity searchKsmartBirth(@RequestBody MarriageCorrectionRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { + public ResponseEntity searchCorrection(@RequestBody MarriageCorrectionRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { List marriageCorrectionAplnDetails=marriageCorrectionService.searchCorrectionApplinDetails(request, criteria); List marriageCorrectionDetails =new ArrayList<>(); if(marriageCorrectionAplnDetails.size()==1) { From 62a51b853fe8d69d5808e4021e27b4c24b8dd79f Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Fri, 28 Apr 2023 12:36:01 +0530 Subject: [PATCH 262/420] Marriage correction demand first --- .../service/MarriageCorrectionService.java | 30 +++++++++++++------ .../MarriageCorrectionValidator.java | 6 ++-- .../web/model/MarriageCorrectionDetails.java | 3 ++ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 108f932a674..5652e64bee0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -2,11 +2,11 @@ import lombok.extern.slf4j.Slf4j; -import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; +import org.ksmart.marriage.marriageapplication.service.DemandService; import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; import org.ksmart.marriage.marriageapplication.validator.MarriageApplicationValidator; import org.ksmart.marriage.marriageapplication.validator.MarriageMDMSValidator; @@ -14,6 +14,7 @@ import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WorkFlowCheck; import org.ksmart.marriage.marriagecorrection.enrichment.MarriageCorrectionEnrichment; import org.ksmart.marriage.marriagecorrection.mapper.CorrectionApplicationToRegistryMapper; import org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper; @@ -25,7 +26,6 @@ import org.ksmart.marriage.marriagecorrection.validator.MarriageCorrectionValidator; import org.ksmart.marriage.marriageregistry.repository.MarriageRegistryRepository; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; -import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryRequest; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.utils.MarriageMdmsUtil; @@ -35,8 +35,6 @@ import java.util.ArrayList; import java.util.List; -import static org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes.MARRIAGE_DETAILS_INVALID_CREATE; - @Slf4j @Service public class MarriageCorrectionService { @@ -63,7 +61,7 @@ public class MarriageCorrectionService { private final MarriageCorrectionApplnValidator marriageCorrectionApplnValidator; private final MarriageCorrectionMDMSValidator marriageCorrectionMDMSValidator; private final MarriageDetailsEnrichment marriageDetailsEnrichment; - + private final DemandService demandService; public MarriageCorrectionService(MarriageCorrectionRepository correctionRepository, MarriageApplicationRepository applicationRepository, MarriageRegistryRepository registryRepository, MarriageCorrectionEnrichment marriageCorrectionEnrichment, org.ksmart.marriage.marriagecorrection.mapper.RegistryToApplicationMapper registryToApplicationMapper, @@ -74,7 +72,7 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito MarriageApplicationRepository applnRepository, MarriageApplicationValidator applnvalidatorService, WorkflowIntegrator workflowIntegrator, - MarriageCorrectionValidator correctionValidatorService, MarriageCorrectionApplnValidator marriageCorrectionApplnValidator, MarriageCorrectionMDMSValidator marriageCorrectionMDMSValidator, MarriageDetailsEnrichment marriageDetailsEnrichment) { + MarriageCorrectionValidator correctionValidatorService, MarriageCorrectionApplnValidator marriageCorrectionApplnValidator, MarriageCorrectionMDMSValidator marriageCorrectionMDMSValidator, MarriageDetailsEnrichment marriageDetailsEnrichment, DemandService demandService) { this.correctionRepository = correctionRepository; this.applicationRepository = applicationRepository; this.registryRepository = registryRepository; @@ -94,11 +92,12 @@ public MarriageCorrectionService(MarriageCorrectionRepository correctionReposito this.marriageCorrectionApplnValidator = marriageCorrectionApplnValidator; this.marriageCorrectionMDMSValidator = marriageCorrectionMDMSValidator; this.marriageDetailsEnrichment = marriageDetailsEnrichment; + this.demandService = demandService; } //req for testing public List createCorrection(MarriageCorrectionRequest request) { - //WorkFlowCheck wfc = new WorkFlowCheck(); + WorkFlowCheck wfc = new WorkFlowCheck(); marriageCorrectionApplnValidator.validateCorrectionCreate(request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageCorrectionDetails().get(0).getTenantid()); marriageCorrectionMDMSValidator.validateMarriageCorrectionMDMSData(request,mdmsData); @@ -129,16 +128,29 @@ public List createCorrection(MarriageCorrectionReques producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); request.getMarriageCorrectionDetails().forEach(marriage->{ - if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ + if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + System.out.println("hienterpayment"); List demands = new ArrayList<>(); Demand demand = new Demand(); demand.setTenantId(marriage.getTenantid()); demand.setConsumerCode(marriage.getApplicationNo()); demands.add(demand); - marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + marriage.setDemands(demandService.saveDemandDetails(demands,request.getRequestInfo(), wfc)); + // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); } }); + /*request.getMarriageCorrectionDetails().forEach(marriage->{ + if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + List demands = new ArrayList<>(); + Demand demand = new Demand(); + demand.setTenantId(marriage.getTenantid()); + demand.setConsumerCode(marriage.getApplicationNo()); + demands.add(demand); + marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + } + });*/ + return request.getMarriageCorrectionDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java index a0c2418fa5f..0858e730e7c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionValidator.java @@ -33,17 +33,17 @@ public void validateCorrectionUpdate(MarriageCorrectionRequest request, List 1) { // NOPMD throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Supports only single Marriage registration update request."); + "Supports only single Marriage Correction Application update request."); } if (marriageDetails.size() != searchResult.size()) { throw new CustomException(MARRIAGE_DETAILS_INVALID_UPDATE.getCode(), - "Marriage registration(s) not found in database."); + "Marriage Correction Application(s) not found in database."); } // IMP:Have to enable after URI submission // validateCommonFields(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java index b2b12f648fe..a500370b24a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; import org.springframework.validation.annotation.Validated; import javax.swing.text.Document; @@ -74,4 +75,6 @@ public class MarriageCorrectionDetails { private Boolean isWorkflow; + @JsonProperty("Demands") + private List demands; } From ccd724989f1594511a635823d78e5a94cec85104 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Fri, 28 Apr 2023 15:05:30 +0530 Subject: [PATCH 263/420] correction search change --- .../controller/MarriageCorrectionController.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java index 5285b85ef2a..6c0e2d01cbc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/controller/MarriageCorrectionController.java @@ -3,6 +3,7 @@ import lombok.extern.slf4j.Slf4j; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriagecorrection.validator.MarriageCorrectionApplnValidator; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionDetails; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionResponse; @@ -29,11 +30,13 @@ public class MarriageCorrectionController { private final MarriageRegistryService marriageRegistryService; private final ResponseInfoFactory responseInfoFactory; + private final MarriageCorrectionApplnValidator marriageCorrectionApplnValidator; - public MarriageCorrectionController(MarriageCorrectionService marriageCorrectionService, MarriageRegistryService marriageRegistryService, ResponseInfoFactory responseInfoFactory) { + public MarriageCorrectionController(MarriageCorrectionService marriageCorrectionService, MarriageRegistryService marriageRegistryService, ResponseInfoFactory responseInfoFactory, MarriageCorrectionApplnValidator marriageCorrectionApplnValidator) { this.marriageCorrectionService = marriageCorrectionService; this.marriageRegistryService = marriageRegistryService; this.responseInfoFactory = responseInfoFactory; + this.marriageCorrectionApplnValidator = marriageCorrectionApplnValidator; } @PostMapping("/_createmarriagecorrection") @@ -73,11 +76,10 @@ public ResponseEntity updateCorrection(@RequestBody @PostMapping(value = {"/_searchmarriagecorrection"}) public ResponseEntity searchCorrection(@RequestBody MarriageCorrectionRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { List marriageCorrectionAplnDetails=marriageCorrectionService.searchCorrectionApplinDetails(request, criteria); - List marriageCorrectionDetails =new ArrayList<>(); - if(marriageCorrectionAplnDetails.size()==1) { - String marriageId = marriageCorrectionAplnDetails.get(0).getId(); - marriageCorrectionDetails = marriageCorrectionService.searchCorrectionDetails(marriageId); - } + marriageCorrectionApplnValidator.validateCorrectionApplnSearch(marriageCorrectionAplnDetails); + String marriageId = marriageCorrectionAplnDetails.get(0).getId(); + List marriageCorrectionDetails = marriageCorrectionService.searchCorrectionDetails(marriageId); + MarriageCorrectionResponse response=MarriageCorrectionResponse.builder() .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), Boolean.TRUE)) .marriageDetails(marriageCorrectionAplnDetails) From 7d18854d90bd09418aaca51aa9b7e8fde64b9a89 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 2 May 2023 09:55:30 +0530 Subject: [PATCH 264/420] validation changes --- .../MarriageApplicationValidator.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index e37d7b48530..9aca8072562 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -326,22 +326,22 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriagedtls.getPlacenameMl() + " is invalid"); } - // if (StringUtils.isEmpty( - // marriagedtls.getLocalityEn())) { - // throw new CustomException( - // " LOCALITY NAME ENGLISH IS INVALID ", - // "The Locality Name English " + - // marriagedtls.getLocalityEn() - // + " is invalid"); - // } - // if (StringUtils.isEmpty( - // marriagedtls.getLocalityMl())) { - // throw new CustomException( - // " LOCALITY NAME MALAYALAM IS INVALID ", - // "The Locality Name Malayalam" + - // marriagedtls.getLocalityMl() - // + " is invalid"); - // } + if (StringUtils.isEmpty( + marriagedtls.getLocalityEn())) { + throw new CustomException( + " LOCALITY NAME ENGLISH IS INVALID ", + "The Locality Name English " + + marriagedtls.getLocalityEn() + + " is invalid"); + } + if (StringUtils.isEmpty( + marriagedtls.getLocalityMl())) { + throw new CustomException( + " LOCALITY NAME MALAYALAM IS INVALID ", + "The Locality Name Malayalam" + + marriagedtls.getLocalityMl() + + " is invalid"); + } } } From 24dadc2da4dec255cb2684ce93cc0d7d67671062 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 2 May 2023 16:24:31 +0530 Subject: [PATCH 265/420] search --- .../common/services/MdmsTenantService.java | 28 +++++++ .../NewMarriageResponseEnrichment.java | 54 ++++++++++++ .../MarriageApplicationRepository.java | 82 ++++++++++--------- .../service/MdmsForNewMarriageService.java | 9 ++ .../web/enums/ErrorCodes.java | 10 ++- .../web/model/MarriageApplicationDetails.java | 16 ++++ .../marriage/utils/MarriageConstants.java | 8 +- 7 files changed, 167 insertions(+), 40 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MdmsForNewMarriageService.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsTenantService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsTenantService.java index e92c5f69838..54da3d616dc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsTenantService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/MdmsTenantService.java @@ -146,4 +146,32 @@ public String getTenantLetterCode(Object mdmsData, String tenantId) { // int index = tenants.indexOf(code); // return JsonPath.read(mdmsData, BirthConstants.CR_MDMS_COUNTRY_JSONPATH+"["+index+"].namelocal"); // } + private List getMarriageType(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGETYPE_CODE_JSONPATH); +} + private List getPlaceTypes(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACETYPE_CODE_JSONPATH); + } +//localized values + public String getMarriageTypesEn(Object mdmsData, String code) { + List lists = getMarriageType(mdmsData); + int index = lists.indexOf(code); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TYPE_JSONPATH + "[" + index + "].name"); + } + public String getMarriageTypesMl(Object mdmsData, String code) { + List lists = getMarriageType(mdmsData); + int index = lists.indexOf(code); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TYPE_JSONPATH + "[" + index + "].namelocal"); + } + + public String getplaceTypesEn(Object mdmsData, String code) { + List lists = getPlaceTypes(mdmsData); + int index = lists.indexOf(code); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACE_TYPE_JSONPATH + "[" + index + "].name"); + } + public String getplaceTypesMl(Object mdmsData, String code) { + List lists = getPlaceTypes(mdmsData); + int index = lists.indexOf(code); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACE_TYPE_JSONPATH + "[" + index + "].namelocal"); + } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java new file mode 100644 index 00000000000..ebd4ca5ccaa --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java @@ -0,0 +1,54 @@ +package org.ksmart.marriage.marriageapplication.enrichment; + +import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.services.MdmsTenantService; +import org.ksmart.marriage.marriageapplication.service.MdmsForNewMarriageService; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.utils.MarriageMdmsUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; + +import java.util.List; + +@Slf4j +@Component +public class NewMarriageResponseEnrichment { + private final MarriageMdmsUtil mdmsUtil; + private final MdmsForNewMarriageService mdmsMarriageService; + private final MdmsTenantService mdmsTenantService; + + @Autowired + NewMarriageResponseEnrichment(MdmsTenantService mdmsTenantService, MarriageMdmsUtil mdmsUtil, MarriageMdmsUtil mdmsUtil1, MdmsForNewMarriageService mdmsMarriageService, MarriageMdmsUtil mdmsUtil2, MdmsForNewMarriageService mdmsMarriageService1, MdmsTenantService mdmsTenantService1) { + + this.mdmsUtil = mdmsUtil2; + this.mdmsMarriageService = mdmsMarriageService1; + this.mdmsTenantService = mdmsTenantService1; + } + + public void setNewMarriageRequestData(RequestInfo requestInfo, List result) { + Object mdmsData = mdmsUtil.mdmsCall(requestInfo); + if (result.size() == 0) { + throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); + } + else if(result.size() >= 1) { + result.forEach(marriage -> { + marriage.setIsWorkflow(true); + if(marriage.getMarriageType()!=null){ + marriage.setMarriageTypeEn(mdmsTenantService.getMarriageTypesEn(mdmsData, marriage.getMarriageType())); + marriage.setMarriageTypeMl(mdmsTenantService.getMarriageTypesMl(mdmsData, marriage.getMarriageType())); + } + if(marriage.getPlacetype()!=null){ + marriage.setPlacetypeEn(mdmsTenantService.getplaceTypesEn(mdmsData,marriage.getPlacetype())); + marriage.setPlacetypeMl(mdmsTenantService.getplaceTypesMl(mdmsData,marriage.getPlacetype())); + + } + + + }); + + } + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 7a2edede6f8..da46b632509 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -4,15 +4,16 @@ //import org.ksmart.marriage.common.producer.BndProducer; import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.contract.EncryptionDecryptionUtil; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; //import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; +import org.ksmart.marriage.marriageapplication.enrichment.NewMarriageResponseEnrichment; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; -import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import org.ksmart.marriage.utils.MarriageConstants; @@ -23,6 +24,7 @@ import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; import java.util.ArrayList; import java.util.List; @@ -35,64 +37,70 @@ public class MarriageApplicationRepository { private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; private final MarriageDocumentRowMapper marriagedocumentRowMapper; + private final NewMarriageResponseEnrichment responseEnrichment; @Autowired EncryptionDecryptionUtil encryptionDecryptionUtil; @Autowired public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, - JdbcTemplate jdbcTemplate, + JdbcTemplate jdbcTemplate, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, - MarriageDocumentRowMapper marriagedocumentRowMapper) { + MarriageDocumentRowMapper marriagedocumentRowMapper, NewMarriageResponseEnrichment responseEnrichment) { this.producer = producer; this.jdbcTemplate = jdbcTemplate; this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; this.marriagedocumentRowMapper = marriagedocumentRowMapper; + this.responseEnrichment = responseEnrichment; } //Jasmine 31.03.2023 public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); - - if(result != null) { - result.forEach(marriage -> { - GroomDetails groomDetails =marriage.getGroomDetails(); - GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); - groomDetails.setAadharno(groomDetailsDec.getAadharno()); - if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ - groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - } - else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ - groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); - } - BrideDetails brideDetails =marriage.getBrideDetails(); - BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); - brideDetails.setAadharno(brideDetailsDec.getAadharno()); - if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ - brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - } - else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ - brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); - } - WitnessDetails witnessDetails =marriage.getWitnessDetails(); - WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); - witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); - witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); + if (preparedStmtValues.size() == 0) { + throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); + } else { + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + responseEnrichment.setNewMarriageRequestData(requestInfo, result); + + if (result != null) { + result.forEach(marriage -> { + GroomDetails groomDetails = marriage.getGroomDetails(); + GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { + groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + } else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { + groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + } + BrideDetails brideDetails = marriage.getBrideDetails(); + BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); + brideDetails.setAadharno(brideDetailsDec.getAadharno()); + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { + brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { + brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + } + WitnessDetails witnessDetails = marriage.getWitnessDetails(); + WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); + witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); - criteria.setApplicationType(marriage.getApplicationtype()); - criteria.setApplicationNo(marriage.getApplicationNumber()); - criteria.setTenantId(marriage.getTenantid()); - List completeDocumentDetails = getDocumentSearchDetails( criteria, requestInfo); - marriage.setMarriageDocuments(completeDocumentDetails); + criteria.setApplicationType(marriage.getApplicationtype()); + criteria.setApplicationNo(marriage.getApplicationNumber()); + criteria.setTenantId(marriage.getTenantid()); + List completeDocumentDetails = getDocumentSearchDetails(criteria, requestInfo); + marriage.setMarriageDocuments(completeDocumentDetails); }); + } + + return result; } - return result; } public List getDocumentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MdmsForNewMarriageService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MdmsForNewMarriageService.java new file mode 100644 index 00000000000..3b897713934 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MdmsForNewMarriageService.java @@ -0,0 +1,9 @@ +package org.ksmart.marriage.marriageapplication.service; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +@Slf4j +@Service +public class MdmsForNewMarriageService { +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java index 3da25cee56d..de9d379c45d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/enums/ErrorCodes.java @@ -7,7 +7,7 @@ @AllArgsConstructor public enum ErrorCodes { - // Birth Details + // marriage Details MARRIAGE_DETAILS_REQUIRED("REQUIRED"), MARRIAGE_DETAILS_NOT_FOUND("NOT_FOUND"), MARRIAGE_DETAILS_INVALID_SEARCH_CRITERIA("INVALID_CRITERIA"), @@ -17,9 +17,15 @@ public enum ErrorCodes { INVALID_SEARCH("INVALID_SEARCH"), // Idgen Service IDGEN_ERROR("IDGEN_ERROR"), - ROW_MAPPER_ERROR("ROW-MAPPER_ERROR"); + ROW_MAPPER_ERROR("ROW-MAPPER_ERROR"), + //common + NOT_FOUND("NOT_FOUND"); private String code; + + + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 7584cf82d13..ae28c471081 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -50,6 +50,14 @@ public class MarriageApplicationDetails { @JsonProperty("marriagePlacetype") private String placetype; + @Size(max = 200) + @JsonProperty("placetypeEn") + private String placetypeEn; + + @Size(max = 200) + @JsonProperty("placetypeMl") + private String placetypeMl; + @Size(max = 1000) @JsonProperty("marriagePlacenameEn") private String placenameEn; @@ -94,6 +102,14 @@ public class MarriageApplicationDetails { @JsonProperty("marriageType") private String marriageType; + @Size(max = 200) + @JsonProperty("marriageTypeEn") + private String marriageTypeEn; + + @Size(max = 200) + @JsonProperty("marriageTypeMl") + private String marriageTypeMl; + @Size(max = 200) @JsonProperty("othMarriageType") private String othMarriageType; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index dbbbd40aa35..0b507e05ff4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -6,7 +6,13 @@ public class MarriageConstants { public static final String GENDERTYPE = "GenderType"; public static final String COMMON_MASTER_MODULE_NAME = "common-masters"; - //mdms path codes + public static final String CR_MDMS_MARRIAGETYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.MarriagePlaceType[*].code"; + public static final String CR_MDMS_MARRIAGE_TYPE_JSONPATH = "$.MdmsRes.birth-death-service.MarriagePlaceType"; + + public static final String CR_MDMS_PLACETYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.TypeOfMarriage[*].code"; + public static final String CR_MDMS_PLACE_TYPE_JSONPATH = "$.MdmsRes.birth-death-service.TypeOfMarriage"; + + //mdms path codes public static final String COMMON_MASTER_JSONPATH = "$.MdmsRes.common-masters"; public static final String TENANT_JSONPATH = "$.MdmsRes.tenant"; public static final String BND_LIST_JSONPATH = "$.MdmsRes.birth-death-service"; From fb6b181de0cf059dfa45fce1e3faa07e6c7f6090 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 2 May 2023 16:28:29 +0530 Subject: [PATCH 266/420] search --- .../enrichment/NewMarriageResponseEnrichment.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java index ebd4ca5ccaa..4ee5f77dcc2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java @@ -21,11 +21,10 @@ public class NewMarriageResponseEnrichment { private final MdmsTenantService mdmsTenantService; @Autowired - NewMarriageResponseEnrichment(MdmsTenantService mdmsTenantService, MarriageMdmsUtil mdmsUtil, MarriageMdmsUtil mdmsUtil1, MdmsForNewMarriageService mdmsMarriageService, MarriageMdmsUtil mdmsUtil2, MdmsForNewMarriageService mdmsMarriageService1, MdmsTenantService mdmsTenantService1) { - - this.mdmsUtil = mdmsUtil2; - this.mdmsMarriageService = mdmsMarriageService1; - this.mdmsTenantService = mdmsTenantService1; + NewMarriageResponseEnrichment(MarriageMdmsUtil mdmsUtil, MdmsForNewMarriageService mdmsMarriageService, MdmsTenantService mdmsTenantService) { + this.mdmsUtil = mdmsUtil; + this.mdmsMarriageService = mdmsMarriageService; + this.mdmsTenantService = mdmsTenantService; } public void setNewMarriageRequestData(RequestInfo requestInfo, List result) { From 8770005343e4c5bff1dcd79b02c56cb7d1492295 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 3 May 2023 11:36:48 +0530 Subject: [PATCH 267/420] search changed --- .../NewMarriageResponseEnrichment.java | 106 +++++++++--------- .../MarriageApplicationRepository.java | 18 +-- .../service/MdmsForNewMarriageService.java | 18 +-- .../marriage/utils/MarriageConstants.java | 3 +- 4 files changed, 73 insertions(+), 72 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java index 4ee5f77dcc2..650d1549251 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java @@ -1,53 +1,53 @@ -package org.ksmart.marriage.marriageapplication.enrichment; - -import lombok.extern.slf4j.Slf4j; -import org.egov.common.contract.request.RequestInfo; -import org.egov.tracer.model.CustomException; -import org.ksmart.marriage.common.services.MdmsTenantService; -import org.ksmart.marriage.marriageapplication.service.MdmsForNewMarriageService; -import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; -import org.ksmart.marriage.utils.MarriageMdmsUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; - -import java.util.List; - -@Slf4j -@Component -public class NewMarriageResponseEnrichment { - private final MarriageMdmsUtil mdmsUtil; - private final MdmsForNewMarriageService mdmsMarriageService; - private final MdmsTenantService mdmsTenantService; - - @Autowired - NewMarriageResponseEnrichment(MarriageMdmsUtil mdmsUtil, MdmsForNewMarriageService mdmsMarriageService, MdmsTenantService mdmsTenantService) { - this.mdmsUtil = mdmsUtil; - this.mdmsMarriageService = mdmsMarriageService; - this.mdmsTenantService = mdmsTenantService; - } - - public void setNewMarriageRequestData(RequestInfo requestInfo, List result) { - Object mdmsData = mdmsUtil.mdmsCall(requestInfo); - if (result.size() == 0) { - throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); - } - else if(result.size() >= 1) { - result.forEach(marriage -> { - marriage.setIsWorkflow(true); - if(marriage.getMarriageType()!=null){ - marriage.setMarriageTypeEn(mdmsTenantService.getMarriageTypesEn(mdmsData, marriage.getMarriageType())); - marriage.setMarriageTypeMl(mdmsTenantService.getMarriageTypesMl(mdmsData, marriage.getMarriageType())); - } - if(marriage.getPlacetype()!=null){ - marriage.setPlacetypeEn(mdmsTenantService.getplaceTypesEn(mdmsData,marriage.getPlacetype())); - marriage.setPlacetypeMl(mdmsTenantService.getplaceTypesMl(mdmsData,marriage.getPlacetype())); - - } - - - }); - - } - } -} +//package org.ksmart.marriage.marriageapplication.enrichment; +// +//import lombok.extern.slf4j.Slf4j; +//import org.egov.common.contract.request.RequestInfo; +//import org.egov.tracer.model.CustomException; +//import org.ksmart.marriage.common.services.MdmsTenantService; +//import org.ksmart.marriage.marriageapplication.service.MdmsForNewMarriageService; +//import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +//import org.ksmart.marriage.utils.MarriageMdmsUtil; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.stereotype.Component; +//import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; +// +//import java.util.List; +// +//@Slf4j +//@Component +//public class NewMarriageResponseEnrichment { +// private final MarriageMdmsUtil mdmsUtil; +// private final MdmsForNewMarriageService mdmsMarriageService; +// private final MdmsTenantService mdmsTenantService; +// +// @Autowired +// NewMarriageResponseEnrichment(MarriageMdmsUtil mdmsUtil, MdmsForNewMarriageService mdmsMarriageService, MdmsTenantService mdmsTenantService) { +// this.mdmsUtil = mdmsUtil; +// this.mdmsMarriageService = mdmsMarriageService; +// this.mdmsTenantService = mdmsTenantService; +// } +// +// public void setNewMarriageRequestData(RequestInfo requestInfo, List result) { +// Object mdmsData = mdmsUtil.mdmsCall(requestInfo); +// if (result.size() == 0) { +// throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); +// } +// else if(result.size() >= 1) { +// result.forEach(marriage -> { +// marriage.setIsWorkflow(true); +// if(marriage.getMarriageType()!=null){ +// marriage.setMarriageTypeEn(mdmsTenantService.getMarriageTypesEn(mdmsData, marriage.getMarriageType())); +// marriage.setMarriageTypeMl(mdmsTenantService.getMarriageTypesMl(mdmsData, marriage.getMarriageType())); +// } +// if(marriage.getPlacetype()!=null){ +// marriage.setPlacetypeEn(mdmsTenantService.getplaceTypesEn(mdmsData,marriage.getPlacetype())); +// marriage.setPlacetypeMl(mdmsTenantService.getplaceTypesMl(mdmsData,marriage.getPlacetype())); +// +// } +// +// +// }); +// +// } +// } +//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index da46b632509..6f3e0b62e77 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -9,7 +9,7 @@ import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; //import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; -import org.ksmart.marriage.marriageapplication.enrichment.NewMarriageResponseEnrichment; +//import org.ksmart.marriage.marriageapplication.enrichment.NewMarriageResponseEnrichment; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; @@ -37,7 +37,7 @@ public class MarriageApplicationRepository { private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; private final MarriageDocumentRowMapper marriagedocumentRowMapper; - private final NewMarriageResponseEnrichment responseEnrichment; +// private final NewMarriageResponseEnrichment responseEnrichment; @Autowired EncryptionDecryptionUtil encryptionDecryptionUtil; @@ -47,24 +47,24 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat JdbcTemplate jdbcTemplate, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, - MarriageDocumentRowMapper marriagedocumentRowMapper, NewMarriageResponseEnrichment responseEnrichment) { + MarriageDocumentRowMapper marriagedocumentRowMapper) { this.producer = producer; this.jdbcTemplate = jdbcTemplate; this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; this.marriagedocumentRowMapper = marriagedocumentRowMapper; - this.responseEnrichment = responseEnrichment; +// this.responseEnrichment = responseEnrichment; } //Jasmine 31.03.2023 public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - if (preparedStmtValues.size() == 0) { - throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); - } else { +// if (preparedStmtValues.size() == 0) { +// throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); +// } else { List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); - responseEnrichment.setNewMarriageRequestData(requestInfo, result); +// responseEnrichment.setNewMarriageRequestData(requestInfo, result); if (result != null) { result.forEach(marriage -> { @@ -100,7 +100,7 @@ public List searchMarriageDetails(MarriageApplicatio } return result; - } +// } } public List getDocumentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MdmsForNewMarriageService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MdmsForNewMarriageService.java index 3b897713934..e853238b3f1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MdmsForNewMarriageService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MdmsForNewMarriageService.java @@ -1,9 +1,9 @@ -package org.ksmart.marriage.marriageapplication.service; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -@Slf4j -@Service -public class MdmsForNewMarriageService { -} +//package org.ksmart.marriage.marriageapplication.service; +// +//import lombok.extern.slf4j.Slf4j; +//import org.springframework.stereotype.Service; +// +//@Slf4j +//@Service +//public class MdmsForNewMarriageService { +//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 0b507e05ff4..3b97f2d1ebf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -2,7 +2,8 @@ public class MarriageConstants { public static final String TENANTS = "tenants"; - public static final String TENANT_MODULE_NAME = "tenant"; + public static final String TENANT_MODULE_NAME = "tenant"; + public static final String CR_MDMS_MARRIAGETYPE = "MarriagePlaceType"; public static final String GENDERTYPE = "GenderType"; public static final String COMMON_MASTER_MODULE_NAME = "common-masters"; From fddfabecd614f11a2ca755b363a5a7a1b573b9b0 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 3 May 2023 12:55:45 +0530 Subject: [PATCH 268/420] seach --- .../MarriageApplicationRepository.java | 128 +++++++----- .../service/DemandService.java | 2 +- .../model/marriage/BrideAddressDetails.java | 141 ++++++++++++- .../model/marriage/GroomAddressDetails.java | 139 +++++++++++++ .../marriage/utils/MarriageConstants.java | 22 +++ .../marriage/utils/MarriageMdmsUtil.java | 185 ++++++++++++++++++ 6 files changed, 571 insertions(+), 46 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 6f3e0b62e77..fc880dc0e87 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -4,19 +4,19 @@ //import org.ksmart.marriage.common.producer.BndProducer; import org.egov.common.contract.request.RequestInfo; -import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.contract.EncryptionDecryptionUtil; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; //import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; -//import org.ksmart.marriage.marriageapplication.enrichment.NewMarriageResponseEnrichment; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDocument; import org.ksmart.marriage.marriageapplication.web.model.marriage.WitnessDetails; import org.ksmart.marriage.utils.MarriageConstants; +import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageDocumentRowMapper; @@ -24,7 +24,6 @@ import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; import lombok.extern.slf4j.Slf4j; -import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; import java.util.ArrayList; import java.util.List; @@ -37,14 +36,16 @@ public class MarriageApplicationRepository { private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; private final MarriageDocumentRowMapper marriagedocumentRowMapper; -// private final NewMarriageResponseEnrichment responseEnrichment; @Autowired EncryptionDecryptionUtil encryptionDecryptionUtil; + + @Autowired + MarriageMdmsUtil util; @Autowired public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, - JdbcTemplate jdbcTemplate, + JdbcTemplate jdbcTemplate, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, MarriageDocumentRowMapper marriagedocumentRowMapper) { @@ -53,54 +54,93 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; this.marriagedocumentRowMapper = marriagedocumentRowMapper; -// this.responseEnrichment = responseEnrichment; } //Jasmine 31.03.2023 public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); -// if (preparedStmtValues.size() == 0) { -// throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); -// } else { - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); -// responseEnrichment.setNewMarriageRequestData(requestInfo, result); + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + + if(result != null) { + result.forEach(marriage -> { + //Jasmine 03.05.2023 + //MDMS for Summery Page + Object mdmsData = util.mDMSSearch(requestInfo, marriage.getTenantid()); + if(marriage.getBrideAddressDetails().getPermtaddressCountry() != null){ + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //presentaddressCountry + if(marriage.getBrideAddressDetails().getPresentaddressCountry() != null){ + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + } + //presentOutSideCountry + if(marriage.getBrideAddressDetails().getPresentOutSideCountry() != null){ + String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); + + String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); + } + //permtaddressCountry + if(marriage.getBrideAddressDetails().getPermtaddressCountry() != null){ + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //permntOutsideIndiaCountry + if(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null){ + String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + + String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + } + // - if (result != null) { - result.forEach(marriage -> { - GroomDetails groomDetails = marriage.getGroomDetails(); - GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); - groomDetails.setAadharno(groomDetailsDec.getAadharno()); - if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { - groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - } else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { - groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); - } - BrideDetails brideDetails = marriage.getBrideDetails(); - BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); - brideDetails.setAadharno(brideDetailsDec.getAadharno()); - if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { - brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { - brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); - } - WitnessDetails witnessDetails = marriage.getWitnessDetails(); - WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); - witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); - witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); + GroomDetails groomDetails =marriage.getGroomDetails(); + GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + } + else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + } + BrideDetails brideDetails =marriage.getBrideDetails(); + BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); + brideDetails.setAadharno(brideDetailsDec.getAadharno()); + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + } + else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + } + WitnessDetails witnessDetails =marriage.getWitnessDetails(); + WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); + witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); - criteria.setApplicationType(marriage.getApplicationtype()); - criteria.setApplicationNo(marriage.getApplicationNumber()); - criteria.setTenantId(marriage.getTenantid()); - List completeDocumentDetails = getDocumentSearchDetails(criteria, requestInfo); - marriage.setMarriageDocuments(completeDocumentDetails); + criteria.setApplicationType(marriage.getApplicationtype()); + criteria.setApplicationNo(marriage.getApplicationNumber()); + criteria.setTenantId(marriage.getTenantid()); + List completeDocumentDetails = getDocumentSearchDetails( criteria, requestInfo); + marriage.setMarriageDocuments(completeDocumentDetails); }); - } - - return result; -// } + } + return result; } public List getDocumentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java index 71bce4e1303..d30ce0ab6f3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java @@ -70,7 +70,7 @@ public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkF demand.setPayer(requestInfo.getUserInfo()); demand.setTaxPeriodFrom(System.currentTimeMillis()); demand.setTaxPeriodTo(System.currentTimeMillis()+86400000); - demand.setMinimumAmountPayable(new BigDecimal(12)); + demand.setMinimumAmountPayable(new BigDecimal(10)); } private ModuleDetail getGLCodeRequest() { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 23d708007a0..6d2306c0fbb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -523,11 +523,150 @@ public class BrideAddressDetails { @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; - @JsonProperty("outSideIndiaPostCodePermanent") private String outSideIndiaPostCodePermanent; @JsonProperty("PermanentAddrCityOrVillageEn") private String permanentAddrCityOrVillageEn ; + //Jasmine 03.05.2023 + + @JsonProperty("permanentAddrCountryNameEn") + private String permanentAddrCountryNameEn ; + + @JsonProperty("permanentAddrCountryNameMl") + private String permanentAddrCountryNameMl ; + + @JsonProperty("presentaddressCountryNameEn") + private String presentaddressCountryNameEn ; + + @JsonProperty("presentaddressCountryNameMl") + private String presentaddressCountryNameMl ; + + @JsonProperty("presentOutSideCountryNameEn") + private String presentOutSideCountryNameEn ; + + @JsonProperty("presentOutSideCountryNameMl") + private String presentOutSideCountryNameMl ; + + @JsonProperty("permanentOutSideCountryNameEn") + private String permanentOutSideCountryNameEn ; + + @JsonProperty("permanentOutSideCountryNameMl") + private String permanentOutSideCountryNameMl ; + + @JsonProperty("presentaddressStateNameEn") + private String presentaddressStateNameEn; + + @JsonProperty("presentaddressStateNameMl") + private String presentaddressStateNameMl; + + @JsonProperty("permtaddressStateNameEn") + private String permtaddressStateNameEn; + + @JsonProperty("permtaddressStateNameMl") + private String permtaddressStateNameMl; + + @JsonProperty("presentInsideKeralaDistrictEn") + private String presentInsideKeralaDistrictEn; + + @JsonProperty("presentInsideKeralaDistrictMl") + private String presentInsideKeralaDistrictMl; + + @JsonProperty("presentOutsideKeralaDistrictEn") + private String presentOutsideKeralaDistrictEn; + + @JsonProperty("presentOutsideKeralaDistrictMl") + private String presentOutsideKeralaDistrictMl; + + @JsonProperty("permntInKeralaAdrDistrictEn") + private String permntInKeralaAdrDistrictEn; + + @JsonProperty("permntInKeralaAdrDistrictMl") + private String permntInKeralaAdrDistrictMl; + + @JsonProperty("permntOutsideKeralaDistrictEn") + private String permntOutsideKeralaDistrictEn; + + @JsonProperty("permntOutsideKeralaDistrictMl") + private String permntOutsideKeralaDistrictMl; + + @JsonProperty("presentInsideKeralaTalukEn") + private String presentInsideKeralaTalukEn; + + @JsonProperty("presentInsideKeralaTalukMl") + private String presentInsideKeralaTalukMl; + + @JsonProperty("presentOutsideKeralaTalukEn") + private String presentOutsideKeralaTalukEn; + + @JsonProperty("presentOutsideKeralaTalukMl") + private String presentOutsideKeralaTalukMl; + + @JsonProperty("permntInKeralaAdrTalukEn") + private String permntInKeralaAdrTalukEn; + + @JsonProperty("permntInKeralaAdrTalukMl") + private String permntInKeralaAdrTalukMl; + + @JsonProperty("permntOutsideKeralaTalukEn") + private String permntOutsideKeralaTalukEn; + + @JsonProperty("permntOutsideKeralaTalukMl") + private String permntOutsideKeralaTalukMl; + + @JsonProperty("presentInsideKeralaVillageEn") + private String presentInsideKeralaVillageEn; + + @JsonProperty("presentInsideKeralaVillageMl") + private String presentInsideKeralaVillageMl; + + @JsonProperty("presentOutsideKeralaVillageEn") + private String presentOutsideKeralaVillageEn; + + @JsonProperty("presentOutsideKeralaVillageMl") + private String presentOutsideKeralaVillageMl; + + @JsonProperty("permntInKeralaAdrVillageEn") + private String permntInKeralaAdrVillageEn; + + @JsonProperty("permntInKeralaAdrVillageMl") + private String permntInKeralaAdrVillageMl; + + @JsonProperty("permntOutsideKeralaVillageEn") + private String permntOutsideKeralaVillageEn; + + @JsonProperty("permntOutsideKeralaVillageMl") + private String permntOutsideKeralaVillageMl; + + @JsonProperty("presentInsideKeralaPostOfficeEn") + private String presentInsideKeralaPostOfficeEn; + + @JsonProperty("presentInsideKeralaPostOfficeMl") + private String presentInsideKeralaPostOfficeMl; + + @JsonProperty("permntInKeralaAdrPostOfficeEn") + private String permntInKeralaAdrPostOfficeEn; + + @JsonProperty("permntInKeralaAdrPostOfficeMl") + private String permntInKeralaAdrPostOfficeMl; + + @JsonProperty("presentWardNoEn") + private String presentWardNoEn; + + @JsonProperty("presentWardNoMl") + private String presentWardNoMl; + + @JsonProperty("prmttWardNoEn") + private String prmttWardNoEn; + + @JsonProperty("prmttWardNoMl") + private String prmttWardNoMl; + + @JsonProperty("presentInsideKeralaLBNameEn") + private String presentInsideKeralaLBNameEn; + + @JsonProperty("presentInsideKeralaLBNameMl") + private String presentInsideKeralaLBNameMl; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 26420a3b201..9f7459a7146 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -526,4 +526,143 @@ public class GroomAddressDetails { @JsonProperty("outSideIndiaPostCodePermanent") private String outSideIndiaPostCodePermanent; + //Jasmine 03.05.2023 + + @JsonProperty("permanentAddrCountryNameEn") + private String permanentAddrCountryNameEn ; + + @JsonProperty("permanentAddrCountryNameMl") + private String permanentAddrCountryNameMl ; + + @JsonProperty("presentaddressCountryNameEn") + private String presentaddressCountryNameEn ; + + @JsonProperty("presentaddressCountryNameMl") + private String presentaddressCountryNameMl ; + + @JsonProperty("presentOutSideCountryNameEn") + private String presentOutSideCountryNameEn ; + + @JsonProperty("presentOutSideCountryNameMl") + private String presentOutSideCountryNameMl ; + + @JsonProperty("permanentOutSideCountryNameEn") + private String permanentOutSideCountryNameEn ; + + @JsonProperty("permanentOutSideCountryNameMl") + private String permanentOutSideCountryNameMl ; + + @JsonProperty("presentaddressStateNameEn") + private String presentaddressStateNameEn; + + @JsonProperty("presentaddressStateNameMl") + private String presentaddressStateNameMl; + + @JsonProperty("permtaddressStateNameEn") + private String permtaddressStateNameEn; + + @JsonProperty("permtaddressStateNameMl") + private String permtaddressStateNameMl; + + @JsonProperty("presentInsideKeralaDistrictEn") + private String presentInsideKeralaDistrictEn; + + @JsonProperty("presentInsideKeralaDistrictMl") + private String presentInsideKeralaDistrictMl; + + @JsonProperty("presentOutsideKeralaDistrictEn") + private String presentOutsideKeralaDistrictEn; + + @JsonProperty("presentOutsideKeralaDistrictMl") + private String presentOutsideKeralaDistrictMl; + + @JsonProperty("permntInKeralaAdrDistrictEn") + private String permntInKeralaAdrDistrictEn; + + @JsonProperty("permntInKeralaAdrDistrictMl") + private String permntInKeralaAdrDistrictMl; + + @JsonProperty("permntOutsideKeralaDistrictEn") + private String permntOutsideKeralaDistrictEn; + + @JsonProperty("permntOutsideKeralaDistrictMl") + private String permntOutsideKeralaDistrictMl; + + @JsonProperty("presentInsideKeralaTalukEn") + private String presentInsideKeralaTalukEn; + + @JsonProperty("presentInsideKeralaTalukMl") + private String presentInsideKeralaTalukMl; + + @JsonProperty("presentOutsideKeralaTalukEn") + private String presentOutsideKeralaTalukEn; + + @JsonProperty("presentOutsideKeralaTalukMl") + private String presentOutsideKeralaTalukMl; + + @JsonProperty("permntInKeralaAdrTalukEn") + private String permntInKeralaAdrTalukEn; + + @JsonProperty("permntInKeralaAdrTalukMl") + private String permntInKeralaAdrTalukMl; + + @JsonProperty("permntOutsideKeralaTalukEn") + private String permntOutsideKeralaTalukEn; + + @JsonProperty("permntOutsideKeralaTalukMl") + private String permntOutsideKeralaTalukMl; + + @JsonProperty("presentInsideKeralaVillageEn") + private String presentInsideKeralaVillageEn; + + @JsonProperty("presentInsideKeralaVillageMl") + private String presentInsideKeralaVillageMl; + + @JsonProperty("presentOutsideKeralaVillageEn") + private String presentOutsideKeralaVillageEn; + + @JsonProperty("presentOutsideKeralaVillageMl") + private String presentOutsideKeralaVillageMl; + + @JsonProperty("permntInKeralaAdrVillageEn") + private String permntInKeralaAdrVillageEn; + + @JsonProperty("permntInKeralaAdrVillageMl") + private String permntInKeralaAdrVillageMl; + + @JsonProperty("permntOutsideKeralaVillageEn") + private String permntOutsideKeralaVillageEn; + + @JsonProperty("permntOutsideKeralaVillageMl") + private String permntOutsideKeralaVillageMl; + + @JsonProperty("presentInsideKeralaPostOfficeEn") + private String presentInsideKeralaPostOfficeEn; + + @JsonProperty("presentInsideKeralaPostOfficeMl") + private String presentInsideKeralaPostOfficeMl; + + @JsonProperty("permntInKeralaAdrPostOfficeEn") + private String permntInKeralaAdrPostOfficeEn; + + @JsonProperty("permntInKeralaAdrPostOfficeMl") + private String permntInKeralaAdrPostOfficeMl; + + @JsonProperty("presentWardNoEn") + private String presentWardNoEn; + + @JsonProperty("presentWardNoMl") + private String presentWardNoMl; + + @JsonProperty("prmttWardNoEn") + private String prmttWardNoEn; + + @JsonProperty("prmttWardNoMl") + private String prmttWardNoMl; + + @JsonProperty("presentInsideKeralaLBNameEn") + private String presentInsideKeralaLBNameEn; + + @JsonProperty("presentInsideKeralaLBNameMl") + private String presentInsideKeralaLBNameMl; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 3b97f2d1ebf..9eb7108fbd7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -175,4 +175,26 @@ public class MarriageConstants { public static final String MARRIAGE_PLACE_STATE_ID = "stateid"; public static final String MARRIAGE_PLACE_TENENT_CODE = "tenentCode"; public static final String BILLING_SERVICE = "BillingService"; + + //03.05.2023 + public static final String CR_MDMS_COUNTRY_CODE_JSONPATH = "$.MdmsRes.common-masters.Country[*].code"; + public static final String CR_MDMS_COUNTRY_CODES_JSONPATH = "$.MdmsRes.common-masters.Country"; + + public static final String CR_MDMS_STATE_CODE_JSONPATH = "$.MdmsRes.common-masters.State[*].code"; + public static final String CR_MDMS_STATE_JSONPATH = "$.MdmsRes.common-masters.State"; + + public static final String CR_MDMS_DISTRICT_CODE_JSONPATH = "$.MdmsRes.common-masters.District[*].code"; + public static final String CR_MDMS_DISTRICT_JSONPATH = "$.MdmsRes.common-masters.District"; + + public static final String CR_MDMS_TALUK_CODE_JSONPATH = "$.MdmsRes.common-masters.Taluk[*].code"; + public static final String CR_MDMS_TALUK_JSONPATH = "$.MdmsRes.common-masters.Taluk"; + + public static final String CR_MDMS_VILLAGE_CODE_JSONPATH = "$.MdmsRes.common-masters.Village[*].code"; + public static final String CR_MDMS_VILLAGE_JSONPATH = "$.MdmsRes.common-masters.Village"; + + public static final String CR_MDMS_POSTOFFICE_CODE_JSONPATH = "$.MdmsRes.common-masters.PostOffice[*].code"; + public static final String CR_MDMS_POSTOFFICE_JSONPATH = "$.MdmsRes.common-masters.PostOffice"; + + public static final String CR_MDMS_MARRIAGE_TENANT_CODE_JSONPATH = "$.MdmsRes.tenant.tenants.city[*].code"; + public static final String CR_MDMS_MARRIAGE_TENANT_JSONPATH = "$.MdmsRes.tenant.tenants.city"; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index e2f279946e2..c2c27e91533 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -812,4 +812,189 @@ public Object mDMSCallGetAddressFromIds(RequestInfo requestInfo Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); return result; } + //Jasmine 03.05.2023 + public Object mDMSSearch(RequestInfo requestInfo, String tenantId) { + MdmsCriteriaReq mdmsCriteriaReq = getMDMSSearchRequest(requestInfo, tenantId); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + return result; + } + private MdmsCriteriaReq getMDMSSearchRequest(RequestInfo requestInfo, String tenantId) { + ModuleDetail tenantIdRequest = getTenantDetails(tenantId); + ModuleDetail commomMasterRequest = getCommonMastersSearch(); + List BNDListRequest = getBNDSearch(); + + List moduleDetails = new LinkedList<>(); + moduleDetails.add(tenantIdRequest); + moduleDetails.add(commomMasterRequest); + moduleDetails.addAll(BNDListRequest); + + MdmsCriteria mdmsCriteria = MdmsCriteria.builder().moduleDetails(moduleDetails).tenantId(config.getEgovStateLevelTenant()) + .build(); + + MdmsCriteriaReq mdmsCriteriaReq = MdmsCriteriaReq.builder().mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo).build(); + return mdmsCriteriaReq; + } + private ModuleDetail getTenantDetails(String tenantId) { + + // master details for crDeath module + List crMarriageMasterDetails = new ArrayList<>(); + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.TENANTS).build()); + + ModuleDetail crMarriageModuleDtls = ModuleDetail.builder().masterDetails(crMarriageMasterDetails) + .moduleName(MarriageConstants.TENANT_MODULE_NAME).build(); + + return crMarriageModuleDtls; + } + + private ModuleDetail getCommonMastersSearch() { + + List crMarriageMasterDetails = new ArrayList<>(); + //Gender + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.GENDERTYPE) + .build()); + //District + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.DISTRICT) + .build()); + //State + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.STATE) + .build()); + //Country + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.COUNTRY) + .build()); + //Religion + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.RELIGION) + .build()); + //PostOffice + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE) + .build()); + + //Taluk + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.TALUK) + .build()); + //VILLAGE + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.VILLAGE) + .build()); + + ModuleDetail crMarriageModuleDtls = ModuleDetail.builder().masterDetails(crMarriageMasterDetails) + .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); + + return crMarriageModuleDtls; + } + + private List getBNDSearch() { + + List crMarriageMasterDetails = new ArrayList<>(); + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.MARITAL_STATUS) + .build()); + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.MARRIAGE_PLACE_TYPE) + .build()); + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.MARRIAGE_TYPE) + .build()); + // Add Module workflow + crMarriageMasterDetails.add(MasterDetail.builder() + .name(MarriageConstants.CR_MDMS_WORKFLOW_NEW) + .build()); + + ModuleDetail crMarriageModuleDtls = ModuleDetail.builder().masterDetails(crMarriageMasterDetails) + .moduleName(MarriageConstants.BND_MODULE_NAME).build(); + + + return Arrays.asList(crMarriageModuleDtls); + } + + public String getCountryNameEn(Object mdmsData, String CountryId) { + List countries = getCountryCode(mdmsData); + int index = countries.indexOf(CountryId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_COUNTRY_CODES_JSONPATH+"["+index+"].name"); + } + public String getCountryNameMl(Object mdmsData, String CountryId) { + List countries = getCountryCode(mdmsData); + int index = countries.indexOf(CountryId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_COUNTRY_CODES_JSONPATH+"["+index+"].namelocal"); + } + public String getStateNameEn(Object mdmsData, String StateId) { + List states = getStateCode(mdmsData); + int index = states.indexOf(StateId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_STATE_JSONPATH+"["+index+"].name"); + } + public String getStateNameMl(Object mdmsData, String StateId) { + List states = getStateCode(mdmsData); + int index = states.indexOf(StateId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_STATE_JSONPATH+"["+index+"].namelocal"); + } + public String getDistrictNameEn(Object mdmsData, String DistrictId) { + List districts = getDistrictCode(mdmsData); + int index = districts.indexOf(DistrictId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_DISTRICT_JSONPATH+"["+index+"].name"); + } + public String getDistrictNameMl(Object mdmsData, String DistrictId) { + List districts = getDistrictCode(mdmsData); + int index = districts.indexOf(DistrictId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_DISTRICT_JSONPATH+"["+index+"].namelocal"); + } + public String getTalukNameEn(Object mdmsData, String TalukId) { + List taluks = getTalukCode(mdmsData); + int index = taluks.indexOf(TalukId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TALUK_JSONPATH+"["+index+"].name"); + } + public String getTalukNameMl(Object mdmsData, String TalukId) { + List taluks = getTalukCode(mdmsData); + int index = taluks.indexOf(TalukId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TALUK_JSONPATH+"["+index+"].namelocal"); + } + public String getVillageNameEn(Object mdmsData, String VillageId) { + List villages = getVillageCode(mdmsData); + int index = villages.indexOf(VillageId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_VILLAGE_JSONPATH+"["+index+"].name"); + } + public String getVillageNameMl(Object mdmsData, String VillageId) { + List villages = getVillageCode(mdmsData); + int index = villages.indexOf(VillageId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_VILLAGE_JSONPATH+"["+index+"].namelocal"); + } + public String getPONameEn(Object mdmsData, String POId) { + List po = getPOCode(mdmsData); + int index = po.indexOf(POId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].name"); + } + public String getPONameMl(Object mdmsData, String POId) { + List po = getPOCode(mdmsData); + int index = po.indexOf(POId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].namelocal"); + } + + private List getCountryCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_COUNTRY_CODE_JSONPATH); + } + private List getStateCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_STATE_CODE_JSONPATH); + } + private List getDistrictCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_DISTRICT_CODE_JSONPATH); + } + private List getTalukCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TALUK_CODE_JSONPATH); + } + private List getVillageCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_VILLAGE_CODE_JSONPATH); + } + private List getPOCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_CODE_JSONPATH); + } + private List getLBCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TENANT_CODE_JSONPATH); + } } \ No newline at end of file From fb5ca7ce60d0518148b3c3fbe41fd79d7d0b45fb Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 3 May 2023 13:58:12 +0530 Subject: [PATCH 269/420] seach --- .../MarriageApplicationRepository.java | 363 ++++++++++++++++-- 1 file changed, 328 insertions(+), 35 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index fc880dc0e87..f1b15fe9b91 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -64,9 +64,10 @@ public List searchMarriageDetails(MarriageApplicatio if(result != null) { result.forEach(marriage -> { - //Jasmine 03.05.2023 - //MDMS for Summery Page + //Jasmine 03.05.2023 - MDMS for Summery Page + Object mdmsData = util.mDMSSearch(requestInfo, marriage.getTenantid()); + if(marriage.getBrideAddressDetails().getPermtaddressCountry() != null){ String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); @@ -106,39 +107,331 @@ public List searchMarriageDetails(MarriageApplicatio String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); } - // - - GroomDetails groomDetails =marriage.getGroomDetails(); - GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); - groomDetails.setAadharno(groomDetailsDec.getAadharno()); - if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ - groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - } - else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ - groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); - } - BrideDetails brideDetails =marriage.getBrideDetails(); - BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); - brideDetails.setAadharno(brideDetailsDec.getAadharno()); - if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ - brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - } - else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ - brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); - } - WitnessDetails witnessDetails =marriage.getWitnessDetails(); - WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); - witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); - witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); - - criteria.setApplicationType(marriage.getApplicationtype()); - criteria.setApplicationNo(marriage.getApplicationNumber()); - criteria.setTenantId(marriage.getTenantid()); - List completeDocumentDetails = getDocumentSearchDetails( criteria, requestInfo); - marriage.setMarriageDocuments(completeDocumentDetails); - }); + //presentaddressStateName + if(marriage.getBrideAddressDetails().getPresentaddressStateName() != null){ + String presentaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentaddressStateName()); + marriage.getBrideAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentaddressStateName()); + marriage.getBrideAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + } + //permtaddressStateName + if(marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ + String permtaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); + } + if(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict() != null){ + String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); + + String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); + } + //presentOutsideKeralaDistrict + if(marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict() != null){ + String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); + + String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); + } + //permntInKeralaAdrDistrict + if(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null){ + String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); + + String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); + } + //permntOutsideKeralaDistrict + if(marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null){ + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + } + //presentInsideKeralaTaluk + if(marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk() != null){ + String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); + + String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); + } + //presentOutsideKeralaTaluk + if(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName() != null){ + String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukEn(presentOutsideKeralaTalukEn); + + String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukMl(presentOutsideKeralaTalukMl); + } + //permntInKeralaAdrTaluk + if(marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null){ + String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); + + String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); + } + //permntOutsideKeralaTaluk + if(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk() != null){ + String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukEn(prmtOutKeralaTalukEn); + + String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukMl(prmtOutKeralaTalukMl); + } + //presentInsideKeralaVillage + if(marriage.getBrideAddressDetails().getPresentInsideKeralaVillage() != null){ + String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukEn(presntInsKeralaVillageEn); + + String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukMl(presntInsKeralaVillageMl); + } + //presentOutsideKeralaVillage + if(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName() != null){ + String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageEn(presntOutKeralaVillageEn); + + String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageMl(presntOutKeralaVillageMl); + } + //permntInKeralaAdrVillage + if(marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage() != null){ + String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); + + String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); + } + //permntOutsideKeralaVillage + if(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage() != null){ + String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageEn(permntOutsideKeralaVillageEn); + + String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageMl(permntOutsideKeralaVillageMl); + } + //presentInsideKeralaPostOffice + if(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice() != null){ + String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getBrideAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); + + String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getBrideAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); + } + //permntInKeralaAdrPostOffice + if(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null){ + String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); + + String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); + } + //GROOM DETAILS + if(marriage.getGroomAddressDetails().getPermtaddressCountry() != null){ + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //presentaddressCountry + if(marriage.getGroomAddressDetails().getPresentaddressCountry() != null){ + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + } + //presentOutSideCountry + if(marriage.getGroomAddressDetails().getPresentOutSideCountry() != null){ + String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutSideCountry()); + marriage.getGroomAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); + + String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutSideCountry()); + marriage.getGroomAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); + } + //permtaddressCountry + if(marriage.getGroomAddressDetails().getPermtaddressCountry() != null){ + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //permntOutsideIndiaCountry + if(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null){ + String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + + String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + } + //presentaddressStateName + if(marriage.getGroomAddressDetails().getPresentaddressStateName() != null){ + String presentaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + } + //permtaddressStateName + if(marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ + String permtaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); + } + if(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null){ + String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); + + String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); + } + //presentOutsideKeralaDistrict + if(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null){ + String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); + + String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); + } + //permntInKeralaAdrDistrict + if(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null){ + String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); + + String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); + } + //permntOutsideKeralaDistrict + if(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null){ + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + } + //presentInsideKeralaTaluk + if(marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null){ + String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); + + String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); + } + //presentOutsideKeralaTaluk + if(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null){ + String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukEn(presentOutsideKeralaTalukEn); + + String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukMl(presentOutsideKeralaTalukMl); + } + //permntInKeralaAdrTaluk + if(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null){ + String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); + + String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); + } + //permntOutsideKeralaTaluk + if(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null){ + String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(prmtOutKeralaTalukEn); + + String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(prmtOutKeralaTalukMl); + } + //presentInsideKeralaVillage + if(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null){ + String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(presntInsKeralaVillageEn); + + String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(presntInsKeralaVillageMl); + } + //presentOutsideKeralaVillage + if(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null){ + String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageEn(presntOutKeralaVillageEn); + + String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageMl(presntOutKeralaVillageMl); + } + //permntInKeralaAdrVillage + if(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null){ + String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); + + String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); + } + //permntOutsideKeralaVillage + if(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage() != null){ + String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageEn(permntOutsideKeralaVillageEn); + + String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageMl(permntOutsideKeralaVillageMl); + } + //presentInsideKeralaPostOffice + if(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null){ + String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); + + String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); + } + //permntInKeralaAdrPostOffice + if(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null){ + String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); + + String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); + } + + GroomDetails groomDetails =marriage.getGroomDetails(); + GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + } + else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + } + BrideDetails brideDetails =marriage.getBrideDetails(); + BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); + brideDetails.setAadharno(brideDetailsDec.getAadharno()); + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + } + else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + } + WitnessDetails witnessDetails =marriage.getWitnessDetails(); + WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); + witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); + criteria.setApplicationType(marriage.getApplicationtype()); + criteria.setApplicationNo(marriage.getApplicationNumber()); + criteria.setTenantId(marriage.getTenantid()); + List completeDocumentDetails = getDocumentSearchDetails( criteria, requestInfo); + marriage.setMarriageDocuments(completeDocumentDetails); + }); } return result; } From d2834ff7508280c7214a588df2187478d48eaf95 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 3 May 2023 13:51:01 +0530 Subject: [PATCH 270/420] Registry search --- .../service/MarriageCorrectionService.java | 7 +- .../MarriageRegistryRepository.java | 52 +- .../service/MarriageRegistryService.java | 14 +- .../MarriageRegistryController.java | 4 +- .../model/BrideRegistryAddressDetails.java | 521 ++++-------------- 5 files changed, 181 insertions(+), 417 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 5652e64bee0..0125ea595b5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -2,6 +2,7 @@ import lombok.extern.slf4j.Slf4j; +import org.egov.common.contract.request.RequestInfo; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; @@ -106,7 +107,7 @@ public List createCorrection(MarriageCorrectionReques criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setId(request.getMarriageCorrectionDetails().get(0).getRegisterId()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria); + List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); marriageCorrectionApplnValidator.validateCorrectionRegistrySearch(marriageRegistryDetails); MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); @@ -156,8 +157,8 @@ public List createCorrection(MarriageCorrectionReques } //req For Testing - private List searchRegistry(MarriageRegistrySearchCriteria criteria) { - return registryRepository.searchMarriageRegistry(criteria); + private List searchRegistry(MarriageRegistrySearchCriteria criteria , RequestInfo requestInfo) { + return registryRepository.searchMarriageRegistry(criteria,requestInfo); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 5c20d4ee60a..c0644579caf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -86,13 +86,59 @@ public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnr // return result.getMarriageDetails(); // } - public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { + public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = queryBuilder.getMarriageRegistrySearchQuery(criteria, preparedStmtValues, Boolean.FALSE); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); + + if(result != null) { + result.forEach(marriage -> { + //Neenu 03.05.2023 + //MDMS for Summery Page + Object mdmsData = util.mDMSSearch(requestInfo, marriage.getTenantid()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //presentaddressCountry + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + } + //presentOutSideCountry + if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { + String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); + + String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); + } + //permtaddressCountry + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //permntOutsideIndiaCountry + if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + + String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + } + // // // System.out.println("Groom address -------"); // String address=marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req, result.get(0)); @@ -100,8 +146,10 @@ public List searchMarriageRegistry(MarriageRegistrySear // // System.out.println(address); // System.out.println(address2); + }); + } - return result; + return result; } public int getMarriageRegistryCount(MarriageRegistrySearchCriteria criteria) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 98e9c9b6621..4e5265926fe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -83,13 +83,13 @@ public List createRegistry(MarriageRegistryRequest requ } - public List searchRegistry(MarriageRegistrySearchCriteria criteria) { + public List searchRegistry(MarriageRegistrySearchCriteria criteria,RequestInfo requestInfo) { - return repository.searchMarriageRegistry(criteria); + return repository.searchMarriageRegistry(criteria,requestInfo); } public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { - List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria); + List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria,requestInfo); if (marriageRegistryDetailsList != null && !marriageRegistryDetailsList.isEmpty()) { // List marriageCertificateList = repository.searchCertificateByMarriageId(marriageRegistryDetailsList.get(0).getId()); try { @@ -99,7 +99,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req MarriageCertRequest marriageCertRequest = MarriageCertRequest.builder().marriageCertificate(marriageCertificate).requestInfo(requestInfo).build(); marriageCertificate.setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); marriageCertificate.setRegistrationno(marriageRegistryDetailsList.get(0).getRegistrationno()); - List marriageDtls = searchCertificate(criteria); + List marriageDtls = searchCertificate(criteria,requestInfo); if (null!=marriageDtls && marriageDtls.size() > 1) { throw new CustomException("Invalid_Input", "Error in processing data"); } @@ -174,8 +174,8 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req } - public List searchCertificate(MarriageRegistrySearchCriteria criteria) { - List obj = repository.searchMarriageRegistry(criteria); + public List searchCertificate(MarriageRegistrySearchCriteria criteria,RequestInfo requestInfo) { + List obj = repository.searchMarriageRegistry(criteria,requestInfo); if(null!=obj&&obj.size()>0) { return repository.searchCertificateByMarriageId(obj.get(0).getId()); }else{ @@ -189,7 +189,7 @@ public List updateMarriageRegistry(MarriageCorrection MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria); + List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); marriageCorrectionApplnValidator.validateCorrectionRegistrySearch(marriageRegistryDetails); MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index 241fdd0339a..af914e7d9c8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -58,7 +58,7 @@ public ResponseEntity search(@RequestBody MarriageReg @ModelAttribute MarriageRegistrySearchCriteria criteria) { int registryCount=registryRepository.getMarriageRegistryCount(criteria); - List marriageDetails = marriageService.searchRegistry(criteria); + List marriageDetails = marriageService.searchRegistry(criteria,request.getRequestInfo()); MarriageRegistryResponse response = MarriageRegistryResponse .builder() @@ -72,7 +72,7 @@ public ResponseEntity search(@RequestBody MarriageReg @PostMapping("_certificate") public ResponseEntity certificateDownload(@RequestBody MarriageRegistryRequest request, @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria) { - List marriageCertResponseList = marriageService.searchCertificate(criteria); + List marriageCertResponseList = marriageService.searchCertificate(criteria,request.getRequestInfo()); MarriageCertResponse response; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java index 81a38d08892..e41ccc58958 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java @@ -167,7 +167,21 @@ public class BrideRegistryAddressDetails { @Size(max = 64) @JsonProperty("presentOutSideIndiaadrsCityTown") private String presentOutSideIndiaadrsCityTown; + @Size(max = 10) + @JsonProperty("presentOutSideIndiaPostCode") + private String presentOutSideIndiaPostCode; + + @Size(max = 1000) + @JsonProperty("stateName") + private String stateName; + + @Size(max = 1000) + @JsonProperty("districtName") + private String districtName; + @Size(max = 1000) + @JsonProperty("countryName") + private String countryName; ////Db Fields////// @@ -261,7 +275,6 @@ public class BrideRegistryAddressDetails { @JsonProperty("presentOthrIndiaProvinceMl") private String presentOthrIndiaProvinceMl; - @Size(max = 10) @JsonProperty("outSideIndiaPostCodePresent") private String outSideIndiaPostCodePresent; @@ -410,11 +423,11 @@ public class BrideRegistryAddressDetails { @JsonProperty("permntOutsideIndiaVillage") private String permntOutsideIndiaVillage; - @Size(max = 64) + @Size(max = 1000) @JsonProperty("permntOutsideIndiaCityTown") private String permntOutsideIndiaCityTown; - @Size(max = 10) + @JsonProperty("permanentOutsideIndiaPostCode") private String permanentOutsideIndiaPostCode; @@ -422,21 +435,7 @@ public class BrideRegistryAddressDetails { @JsonProperty("permntOutsideIndiaCountry") private String permntOutsideIndiaCountry; - @Size(max = 10) - @JsonProperty("presentOutSideIndiaPostCode") - private String presentOutSideIndiaPostCode; - - @Size(max = 1000) - @JsonProperty("stateName") - private String stateName; - - @Size(max = 1000) - @JsonProperty("districtName") - private String districtName; - @Size(max = 1000) - @JsonProperty("countryName") - private String countryName; ////Db Fields////// @Size(max = 64) @@ -446,7 +445,14 @@ public class BrideRegistryAddressDetails { @JsonProperty("isPermanentAddressInt") private Integer isPermanentAddressInt; + @JsonProperty("PermanentAddrTalukId") + private String permanentAddrTalukId ; + + + @JsonProperty("PermanentAddrVillageId") + private String permanentAddrVillageId ; @Size(max = 64) + @JsonProperty("countryIdPermanent") private String countryIdPermanent; @@ -533,442 +539,151 @@ public class BrideRegistryAddressDetails { @JsonProperty("brideGroomPermanent") private String brideGroomPermanent; - - @Size(max = 10) @JsonProperty("outSideIndiaPostCodePermanent") private String outSideIndiaPostCodePermanent; - // @Size(max = 64) - // @JsonProperty("presentaddressCountry") - // private String presentaddressCountry; - - // @Size(max = 64) - // @JsonProperty("presentaddressStateName") - // private String presentaddressStateName; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaLBName") - // private String presentInsideKeralaLBName; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaDistrict") - // private String presentInsideKeralaDistrict; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaTaluk") - // private String presentInsideKeralaTaluk; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaVillage") - // private String presentInsideKeralaVillage; - - // @Size(max = 1000) - // @JsonProperty("presentInsideKeralaLocalityNameEn") - // private String presentInsideKeralaLocalityNameEn; - - // @Size(max = 2000) - // @JsonProperty("presentInsideKeralaStreetNameEn") - // private String presentInsideKeralaStreetNameEn; - - // @Size(max = 2500) - // @JsonProperty("presentInsideKeralaHouseNameEn") - // private String presentInsideKeralaHouseNameEn; - - // @Size(max = 1000) - // @JsonProperty("presentInsideKeralaLocalityNameMl") - // private String presentInsideKeralaLocalityNameMl; - - // @Size(max = 2000) - // @JsonProperty("presentInsideKeralaStreetNameMl") - // private String presentInsideKeralaStreetNameMl; - - // @Size(max = 2500) - // @JsonProperty("presentInsideKeralaHouseNameMl") - // private String presentInsideKeralaHouseNameMl; - - // @Size(max = 10) - // @JsonProperty("presentInsideKeralaPincode") - // private String presentInsideKeralaPincode; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaPostOffice") - // private String presentInsideKeralaPostOffice; - - // @Size(max = 64) - // @JsonProperty("presentWardNo") - // private String presentWardNo; - - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaDistrict") - // private String presentOutsideKeralaDistrict; - - // @Size(max = 1000) - // @JsonProperty("presentOutsideKeralaTaluk") - // private String presentOutsideKeralaTalukName; - - // @Size(max = 1000) - // @JsonProperty("presentOutsideKeralaVillage") - // private String presentOutsideKeralaVillageName; - - - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaCityVilgeEn") - // private String presentOutsideKeralaCityVilgeEn; - - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaPincode") - // private String presentOutsideKeralaPincode; - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaPostOfficeEn") - // private String presentOutsideKeralaPostOfficeEn; - - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaPostOfficeMl") - // private String presentOutsideKeralaPostOfficeMl; - - // @Size(max = 1000) - // @JsonProperty("presentOutsideKeralaLocalityNameEn") - // private String presentOutsideKeralaLocalityNameEn; - - // @Size(max = 2000) - // @JsonProperty("presentOutsideKeralaStreetNameEn") - // private String presentOutsideKeralaStreetNameEn; - - // @Size(max = 2500) - // @JsonProperty("presentOutsideKeralaHouseNameEn") - // private String presentOutsideKeralaHouseNameEn; - - // @Size(max = 1000) - // @JsonProperty("presentOutsideKeralaLocalityNameMl") - // private String presentOutsideKeralaLocalityNameMl; - - // @Size(max = 2000) - // @JsonProperty("presentOutsideKeralaStreetNameMl") - // private String presentOutsideKeralaStreetNameMl; - - - // @Size(max = 2500) - // @JsonProperty("presentOutsideKeralaHouseNameMl") - // private String presentOutsideKeralaHouseNameMl; - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaAdressEn") - // private String presentOutSideIndiaAdressEn; - - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaAdressMl") - // private String presentOutSideIndiaAdressMl; - - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaAdressEnB") - // private String presentOutSideIndiaAdressEnB; - - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaAdressMlB") - // private String presentOutSideIndiaAdressMlB; - - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaProvinceEn") - // private String presentOutSideIndiaProvinceEn; - - - // @Size(max = 1000) - // @JsonProperty("presentOutSideIndiaLocalityMl") - // private String presentOutSideIndiaLocalityMl; - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaProvinceMl") - // private String presentOutSideIndiaProvinceMl; - - // @Size(max = 64) - // @JsonProperty("presentOutSideCountry") - // private String presentOutSideCountry; - - // @JsonProperty("isPrsentAddress") - // private Boolean isPrsentAddress; - // @Size(max = 1000) - // @JsonProperty("presentOutSideIndiaadrsVillage") - // private String presentOutSideIndiaadrsVillage; + @JsonProperty("PermanentAddrCityOrVillageEn") + private String permanentAddrCityOrVillageEn ; - // @Size(max = 64) - // @JsonProperty("presentOutSideIndiaadrsCityTown") - // private String presentOutSideIndiaadrsCityTown; + //Jasmine 03.05.2023 - // ////Db Fields////// + @JsonProperty("permanentAddrCountryNameEn") + private String permanentAddrCountryNameEn ; - // @JsonProperty("isPrsentAddressInt") - // private Integer isPrsentAddressInt; - // @Size(max = 64) - // @JsonProperty("presentUuid") - // private String presentUuid; + @JsonProperty("permanentAddrCountryNameMl") + private String permanentAddrCountryNameMl ; - // @Size(max = 64) - // @JsonProperty("countryIdPresent") - // private String countryIdPresent; + @JsonProperty("presentaddressCountryNameEn") + private String presentaddressCountryNameEn ; - // @Size(max = 64) - // @JsonProperty("stateIdPresent") - // private String stateIdPresent; + @JsonProperty("presentaddressCountryNameMl") + private String presentaddressCountryNameMl ; - // @Size(max = 64) - // @JsonProperty("districtIdPresent") - // private String districtIdPresent; + @JsonProperty("presentOutSideCountryNameEn") + private String presentOutSideCountryNameEn ; - // @Size(max = 64) - // @JsonProperty("pinNoPresent") - // private String pinNoPresent; + @JsonProperty("presentOutSideCountryNameMl") + private String presentOutSideCountryNameMl ; - // @Size(max = 1000) - // @JsonProperty("localityEnPresent") - // private String localityEnPresent; + @JsonProperty("permanentOutSideCountryNameEn") + private String permanentOutSideCountryNameEn ; - // @Size(max = 1000) - // @JsonProperty("localityMlPresent") - // private String localityMlPresent; + @JsonProperty("permanentOutSideCountryNameMl") + private String permanentOutSideCountryNameMl ; - // @Size(max = 1000) - // @JsonProperty("streetNameEnPresent") - // private String streetNameEnPresent; + @JsonProperty("presentaddressStateNameEn") + private String presentaddressStateNameEn; - // @Size(max = 1000) - // @JsonProperty("streetNameMlPresent") - // private String streetNameMlPresent; + @JsonProperty("presentaddressStateNameMl") + private String presentaddressStateNameMl; - // @Size(max = 1000) - // @JsonProperty("houseNameNoEnPresent") - // private String houseNameNoEnPresent; + @JsonProperty("permtaddressStateNameEn") + private String permtaddressStateNameEn; - // @Size(max = 1000) - // @JsonProperty("houseNameNoMlPresent") - // private String houseNameNoMlPresent; + @JsonProperty("permtaddressStateNameMl") + private String permtaddressStateNameMl; - // @Size(max = 1000) - // @JsonProperty("villageNamePresent") - // private String villageNamePresent; + @JsonProperty("presentInsideKeralaDistrictEn") + private String presentInsideKeralaDistrictEn; - // @Size(max = 1000) - // @JsonProperty("villageIdPresent") - // private String villageIdPresent; + @JsonProperty("presentInsideKeralaDistrictMl") + private String presentInsideKeralaDistrictMl; - // @Size(max = 10) - // @JsonProperty("poNoPresent") - // private String poNoPresent; + @JsonProperty("presentOutsideKeralaDistrictEn") + private String presentOutsideKeralaDistrictEn; - // @Size(max = 64) - // @JsonProperty("brideGroomPresent") - // private String brideGroomPresent; - // ////Permanant - // @Size(max = 1000) - // @JsonProperty("permtaddressCountry") - // private String permtaddressCountry; + @JsonProperty("presentOutsideKeralaDistrictMl") + private String presentOutsideKeralaDistrictMl; - // @Size(max = 64) - // @JsonProperty("permtaddressStateName") - // private String permtaddressStateName; + @JsonProperty("permntInKeralaAdrDistrictEn") + private String permntInKeralaAdrDistrictEn; - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrLBName") - // private String permntInKeralaAdrLBName; + @JsonProperty("permntInKeralaAdrDistrictMl") + private String permntInKeralaAdrDistrictMl; - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrDistrict") - // private String permntInKeralaAdrDistrict; - - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaCityVilgeEn") - // private String permntOutsideKeralaCityVilgeEn; - - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrTaluk") - // private String permntInKeralaAdrTaluk; - - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrVillage") - // private String permntInKeralaAdrVillage; - - // @Size(max = 1000) - // @JsonProperty("permntInKeralaAdrLocalityNameEn") - // private String permntInKeralaAdrLocalityNameEn; - - // @Size(max = 2000) - // @JsonProperty("permntInKeralaAdrStreetNameEn") - // private String permntInKeralaAdrStreetNameEn; - - // @Size(max = 2500) - // @JsonProperty("permntInKeralaAdrHouseNameEn") - // private String permntInKeralaAdrHouseNameEn; - // @Size(max = 2500) - // @JsonProperty("permntInKeralaAdrLocalityNameMl") - // private String permntInKeralaAdrLocalityNameMl; - - // @Size(max = 2500) - // @JsonProperty("permntInKeralaAdrStreetNameMl") - // private String permntInKeralaAdrStreetNameMl; - - // @Size(max = 2500) - // @JsonProperty("permntInKeralaAdrHouseNameMl") - // private String permntInKeralaAdrHouseNameMl; + @JsonProperty("permntOutsideKeralaDistrictEn") + private String permntOutsideKeralaDistrictEn; - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrPincode") - // private String permntInKeralaAdrPincode; - - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrPostOffice") - // private String permntInKeralaAdrPostOffice; - - // @Size(max = 64) - // @JsonProperty("permntInKeralaWardNo") - // private String permntInKeralaWardNo; - - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaDistrict") - // private String permntOutsideKeralaDistrict; - - // @Size(max = 1000) - // @JsonProperty("permntOutsideKeralaTaluk") - // private String permntOutsideKeralaTaluk; - - // @Size(max = 1000) - // @JsonProperty("permntOutsideKeralaVillage") - // private String permntOutsideKeralaVillage; - - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaPincode") - // private String permntOutsideKeralaPincode; - - // @Size(max = 1000) - // @JsonProperty("permntOutsideKeralaLocalityNameEn") - // private String permntOutsideKeralaLocalityNameEn; - - // @Size(max = 2000) - // @JsonProperty("permntOutsideKeralaStreetNameEn") - // private String permntOutsideKeralaStreetNameEn; - - // @Size(max = 2500) - // @JsonProperty("permntOutsideKeralaHouseNameEn") - // private String permntOutsideKeralaHouseNameEn; - - // @Size(max = 1000) - // @JsonProperty("permntOutsideKeralaLocalityNameMl") - // private String permntOutsideKeralaLocalityNameMl; - - // @Size(max = 2000) - // @JsonProperty("permntOutsideKeralaStreetNameMl") - // private String permntOutsideKeralaStreetNameMl; - - // @Size(max = 2500) - // @JsonProperty("permntOutsideKeralaHouseNameMl") - // private String permntOutsideKeralaHouseNameMl; + @JsonProperty("permntOutsideKeralaDistrictMl") + private String permntOutsideKeralaDistrictMl; - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaPostOfficeEn") - // private String permntOutsideKeralaPostOfficeEn; + @JsonProperty("presentInsideKeralaTalukEn") + private String presentInsideKeralaTalukEn; - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaPostOfficeMl") - // private String permntOutsideKeralaPostOfficeMl; + @JsonProperty("presentInsideKeralaTalukMl") + private String presentInsideKeralaTalukMl; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaLineoneEn") - // private String permntOutsideIndiaLineoneEn; + @JsonProperty("presentOutsideKeralaTalukEn") + private String presentOutsideKeralaTalukEn; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaLineoneMl") - // private String permntOutsideIndiaLineoneMl; + @JsonProperty("presentOutsideKeralaTalukMl") + private String presentOutsideKeralaTalukMl; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaLinetwoEn") - // private String permntOutsideIndiaLinetwoEn; + @JsonProperty("permntInKeralaAdrTalukEn") + private String permntInKeralaAdrTalukEn; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaLinetwoMl") - // private String permntOutsideIndiaLinetwoMl; + @JsonProperty("permntInKeralaAdrTalukMl") + private String permntInKeralaAdrTalukMl; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaprovinceEn") - // private String permntOutsideIndiaprovinceEn; + @JsonProperty("permntOutsideKeralaTalukEn") + private String permntOutsideKeralaTalukEn; - // @Size(max = 1000) - // @JsonProperty("permntOutsideIndiaVillage") - // private String permntOutsideIndiaVillage; + @JsonProperty("permntOutsideKeralaTalukMl") + private String permntOutsideKeralaTalukMl; - // @Size(max = 64) - // @JsonProperty("permntOutsideIndiaCityTown") - // private String permntOutsideIndiaCityTown; + @JsonProperty("presentInsideKeralaVillageEn") + private String presentInsideKeralaVillageEn; - // @Size(max = 10) - // @JsonProperty("permanentOutsideIndiaPostCode") - // private String permanentOutsideIndiaPostCode; + @JsonProperty("presentInsideKeralaVillageMl") + private String presentInsideKeralaVillageMl; - // @Size(max = 64) - // @JsonProperty("permntOutsideIndiaCountry") - // private String permntOutsideIndiaCountry; + @JsonProperty("presentOutsideKeralaVillageEn") + private String presentOutsideKeralaVillageEn; + @JsonProperty("presentOutsideKeralaVillageMl") + private String presentOutsideKeralaVillageMl; - // ////Db Fields////// + @JsonProperty("permntInKeralaAdrVillageEn") + private String permntInKeralaAdrVillageEn; - // @Size(max = 64) - // @JsonProperty("permanentUuid") - // private String permanentUuid; - // @Size(max = 64) - // @JsonProperty("countryIdPermanent") - // private String countryIdPermanent; + @JsonProperty("permntInKeralaAdrVillageMl") + private String permntInKeralaAdrVillageMl; - // @Size(max = 64) - // @JsonProperty("stateIdPermanent") - // private String stateIdPermanent; + @JsonProperty("permntOutsideKeralaVillageEn") + private String permntOutsideKeralaVillageEn; - // @Size(max = 64) - // @JsonProperty("districtIdPermanent") - // private String districtIdPermanent; + @JsonProperty("permntOutsideKeralaVillageMl") + private String permntOutsideKeralaVillageMl; - // @Size(max = 64) - // @JsonProperty("pinNoPermanent") - // private String pinNoPermanent; + @JsonProperty("presentInsideKeralaPostOfficeEn") + private String presentInsideKeralaPostOfficeEn; - // @Size(max = 1000) - // @JsonProperty("localityEnPermanent") - // private String localityEnPermanent; + @JsonProperty("presentInsideKeralaPostOfficeMl") + private String presentInsideKeralaPostOfficeMl; - // @Size(max = 1000) - // @JsonProperty("localityMlPermanent") - // private String localityMlPermanent; + @JsonProperty("permntInKeralaAdrPostOfficeEn") + private String permntInKeralaAdrPostOfficeEn; - // @Size(max = 1000) - // @JsonProperty("streetNameEnPermanent") - // private String streetNameEnPermanent; + @JsonProperty("permntInKeralaAdrPostOfficeMl") + private String permntInKeralaAdrPostOfficeMl; - // @Size(max = 1000) - // @JsonProperty("streetNameMlPermanent") - // private String streetNameMlPermanent; + @JsonProperty("presentWardNoEn") + private String presentWardNoEn; - // @Size(max = 1000) - // @JsonProperty("houseNameNoEnPermanent") - // private String houseNameNoEnPermanent; + @JsonProperty("presentWardNoMl") + private String presentWardNoMl; - // @Size(max = 1000) - // @JsonProperty("houseNameNoMlPermanent") - // private String houseNameNoMlPermanent; + @JsonProperty("prmttWardNoEn") + private String prmttWardNoEn; - // @Size(max = 1000) - // @JsonProperty("villageNamePermanent") - // private String villageNamePermanent; + @JsonProperty("prmttWardNoMl") + private String prmttWardNoMl; - // @Size(max = 1000) - // @JsonProperty("villageIdPermanent") - // private String villageIdPermanent; + @JsonProperty("presentInsideKeralaLBNameEn") + private String presentInsideKeralaLBNameEn; - // @Size(max = 10) - // @JsonProperty("poNoPermanent") - // private String poNoPermanent; + @JsonProperty("presentInsideKeralaLBNameMl") + private String presentInsideKeralaLBNameMl; - // @Size(max = 64) - // @JsonProperty("brideGroomPermanent") - // private String brideGroomPermanent; } From e2b5fe6cbc729ff795149a65294e7a93b209fc22 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 3 May 2023 14:52:17 +0530 Subject: [PATCH 271/420] Registry search --- .../MarriageRegistryRepository.java | 136 ++++- .../model/GroomRegistryAddressDetails.java | 499 ++++-------------- 2 files changed, 238 insertions(+), 397 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index c0644579caf..7fbdc9fc84c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -138,7 +138,141 @@ public List searchMarriageRegistry(MarriageRegistrySear String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); } - // + //permntOutsideIndiaCountry + if(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null){ + String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + + String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + } + //presentaddressStateName + if(marriage.getGroomAddressDetails().getPresentaddressStateName() != null){ + String presentaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + } + //permtaddressStateName + if(marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ + String permtaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); + } + if(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null){ + String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); + + String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); + } + //presentOutsideKeralaDistrict + if(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null){ + String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); + + String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); + } + //permntInKeralaAdrDistrict + if(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null){ + String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); + + String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); + } + //permntOutsideKeralaDistrict + if(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null){ + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + } + //presentInsideKeralaTaluk + if(marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null){ + String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); + + String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); + } + //presentOutsideKeralaTaluk + if(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null){ + String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukEn(presentOutsideKeralaTalukEn); + + String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukMl(presentOutsideKeralaTalukMl); + } + //permntInKeralaAdrTaluk + if(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null){ + String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); + + String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); + } + //permntOutsideKeralaTaluk + if(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null){ + String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(prmtOutKeralaTalukEn); + + String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(prmtOutKeralaTalukMl); + } + //presentInsideKeralaVillage + if(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null){ + String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(presntInsKeralaVillageEn); + + String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(presntInsKeralaVillageMl); + } + //presentOutsideKeralaVillage + if(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null){ + String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageEn(presntOutKeralaVillageEn); + + String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageMl(presntOutKeralaVillageMl); + } + //permntInKeralaAdrVillage + if(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null){ + String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); + + String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); + } + //permntOutsideKeralaVillage + if(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage() != null){ + String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageEn(permntOutsideKeralaVillageEn); + + String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageMl(permntOutsideKeralaVillageMl); + } + //presentInsideKeralaPostOffice + if(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null){ + String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); + + String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); + } + //permntInKeralaAdrPostOffice + if(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); + + String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); + } // // System.out.println("Groom address -------"); // String address=marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req, result.get(0)); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java index 88cac52f68a..d2e2e05c516 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java @@ -167,7 +167,9 @@ public class GroomRegistryAddressDetails { @Size(max = 64) @JsonProperty("presentOutSideIndiaadrsCityTown") private String presentOutSideIndiaadrsCityTown; - + @Size(max = 10) + @JsonProperty("presentOutSideIndiaPostCode") + private String presentOutSideIndiaPostCode; ////Db Fields////// @@ -260,11 +262,11 @@ public class GroomRegistryAddressDetails { @Size(max = 2500) @JsonProperty("presentOthrIndiaProvinceMl") private String presentOthrIndiaProvinceMl; - @Size(max = 10) @JsonProperty("outSideIndiaPostCodePresent") private String outSideIndiaPostCodePresent; + ////Permanant @JsonProperty("isPermanentAddress") @@ -410,7 +412,7 @@ public class GroomRegistryAddressDetails { @JsonProperty("permntOutsideIndiaVillage") private String permntOutsideIndiaVillage; - @Size(max = 64) + @Size(max = 1000) @JsonProperty("permntOutsideIndiaCityTown") private String permntOutsideIndiaCityTown; @@ -422,10 +424,6 @@ public class GroomRegistryAddressDetails { @JsonProperty("permntOutsideIndiaCountry") private String permntOutsideIndiaCountry; - @Size(max = 10) - @JsonProperty("presentOutSideIndiaPostCode") - private String presentOutSideIndiaPostCode; - @Size(max = 1000) @JsonProperty("stateName") private String stateName; @@ -446,7 +444,12 @@ public class GroomRegistryAddressDetails { @JsonProperty("isPermanentAddressInt") private Integer isPermanentAddressInt; + @JsonProperty("PermanentAddrTalukId") + private String permanentAddrTalukId ; + + @JsonProperty("PermanentAddrVillageId") + private String permanentAddrVillageId ; @Size(max = 64) @JsonProperty("countryIdPermanent") private String countryIdPermanent; @@ -538,440 +541,144 @@ public class GroomRegistryAddressDetails { @JsonProperty("outSideIndiaPostCodePermanent") private String outSideIndiaPostCodePermanent; + //Jasmine 03.05.2023 + @JsonProperty("permanentAddrCountryNameEn") + private String permanentAddrCountryNameEn ; - // @Size(max = 64) - // @JsonProperty("presentaddressCountry") - // private String presentaddressCountry; - - // @Size(max = 64) - // @JsonProperty("presentaddressStateName") - // private String presentaddressStateName; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaLBName") - // private String presentInsideKeralaLBName; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaDistrict") - // private String presentInsideKeralaDistrict; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaTaluk") - // private String presentInsideKeralaTaluk; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaVillage") - // private String presentInsideKeralaVillage; - - // @Size(max = 1000) - // @JsonProperty("presentInsideKeralaLocalityNameEn") - // private String presentInsideKeralaLocalityNameEn; - - // @Size(max = 2000) - // @JsonProperty("presentInsideKeralaStreetNameEn") - // private String presentInsideKeralaStreetNameEn; - - // @Size(max = 2500) - // @JsonProperty("presentInsideKeralaHouseNameEn") - // private String presentInsideKeralaHouseNameEn; - - // @Size(max = 1000) - // @JsonProperty("presentInsideKeralaLocalityNameMl") - // private String presentInsideKeralaLocalityNameMl; - - // @Size(max = 2000) - // @JsonProperty("presentInsideKeralaStreetNameMl") - // private String presentInsideKeralaStreetNameMl; - - // @Size(max = 2500) - // @JsonProperty("presentInsideKeralaHouseNameMl") - // private String presentInsideKeralaHouseNameMl; - - // @Size(max = 10) - // @JsonProperty("presentInsideKeralaPincode") - // private String presentInsideKeralaPincode; - - // @Size(max = 64) - // @JsonProperty("presentInsideKeralaPostOffice") - // private String presentInsideKeralaPostOffice; - - // @Size(max = 64) - // @JsonProperty("presentWardNo") - // private String presentWardNo; - - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaDistrict") - // private String presentOutsideKeralaDistrict; - - // @Size(max = 1000) - // @JsonProperty("presentOutsideKeralaTaluk") - // private String presentOutsideKeralaTalukName; - - // @Size(max = 1000) - // @JsonProperty("presentOutsideKeralaVillage") - // private String presentOutsideKeralaVillageName; - - - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaCityVilgeEn") - // private String presentOutsideKeralaCityVilgeEn; - - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaPincode") - // private String presentOutsideKeralaPincode; - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaPostOfficeEn") - // private String presentOutsideKeralaPostOfficeEn; - - // @Size(max = 64) - // @JsonProperty("presentOutsideKeralaPostOfficeMl") - // private String presentOutsideKeralaPostOfficeMl; - - // @Size(max = 1000) - // @JsonProperty("presentOutsideKeralaLocalityNameEn") - // private String presentOutsideKeralaLocalityNameEn; - - // @Size(max = 2000) - // @JsonProperty("presentOutsideKeralaStreetNameEn") - // private String presentOutsideKeralaStreetNameEn; - - // @Size(max = 2500) - // @JsonProperty("presentOutsideKeralaHouseNameEn") - // private String presentOutsideKeralaHouseNameEn; - - // @Size(max = 1000) - // @JsonProperty("presentOutsideKeralaLocalityNameMl") - // private String presentOutsideKeralaLocalityNameMl; - - // @Size(max = 2000) - // @JsonProperty("presentOutsideKeralaStreetNameMl") - // private String presentOutsideKeralaStreetNameMl; - - - // @Size(max = 2500) - // @JsonProperty("presentOutsideKeralaHouseNameMl") - // private String presentOutsideKeralaHouseNameMl; - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaAdressEn") - // private String presentOutSideIndiaAdressEn; - - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaAdressMl") - // private String presentOutSideIndiaAdressMl; - - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaAdressEnB") - // private String presentOutSideIndiaAdressEnB; - - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaAdressMlB") - // private String presentOutSideIndiaAdressMlB; - - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaProvinceEn") - // private String presentOutSideIndiaProvinceEn; - - - // @Size(max = 1000) - // @JsonProperty("presentOutSideIndiaLocalityMl") - // private String presentOutSideIndiaLocalityMl; - - // @Size(max = 2500) - // @JsonProperty("presentOutSideIndiaProvinceMl") - // private String presentOutSideIndiaProvinceMl; - - // @Size(max = 64) - // @JsonProperty("presentOutSideCountry") - // private String presentOutSideCountry; - - // @JsonProperty("isPrsentAddress") - // private Boolean isPrsentAddress; - - // @Size(max = 1000) - // @JsonProperty("presentOutSideIndiaadrsVillage") - // private String presentOutSideIndiaadrsVillage; - - // @Size(max = 64) - // @JsonProperty("presentOutSideIndiaadrsCityTown") - // private String presentOutSideIndiaadrsCityTown; - - // ////Db Fields////// - - // @JsonProperty("isPrsentAddressInt") - // private Integer isPrsentAddressInt; - // @Size(max = 64) - // @JsonProperty("presentUuid") - // private String presentUuid; - - // @Size(max = 64) - // @JsonProperty("countryIdPresent") - // private String countryIdPresent; + @JsonProperty("permanentAddrCountryNameMl") + private String permanentAddrCountryNameMl ; - // @Size(max = 64) - // @JsonProperty("stateIdPresent") - // private String stateIdPresent; + @JsonProperty("presentaddressCountryNameEn") + private String presentaddressCountryNameEn ; - // @Size(max = 64) - // @JsonProperty("districtIdPresent") - // private String districtIdPresent; + @JsonProperty("presentaddressCountryNameMl") + private String presentaddressCountryNameMl ; - // @Size(max = 64) - // @JsonProperty("pinNoPresent") - // private String pinNoPresent; + @JsonProperty("presentOutSideCountryNameEn") + private String presentOutSideCountryNameEn ; - // @Size(max = 1000) - // @JsonProperty("localityEnPresent") - // private String localityEnPresent; + @JsonProperty("presentOutSideCountryNameMl") + private String presentOutSideCountryNameMl ; - // @Size(max = 1000) - // @JsonProperty("localityMlPresent") - // private String localityMlPresent; + @JsonProperty("permanentOutSideCountryNameEn") + private String permanentOutSideCountryNameEn ; - // @Size(max = 1000) - // @JsonProperty("streetNameEnPresent") - // private String streetNameEnPresent; + @JsonProperty("permanentOutSideCountryNameMl") + private String permanentOutSideCountryNameMl ; - // @Size(max = 1000) - // @JsonProperty("streetNameMlPresent") - // private String streetNameMlPresent; + @JsonProperty("presentaddressStateNameEn") + private String presentaddressStateNameEn; - // @Size(max = 1000) - // @JsonProperty("houseNameNoEnPresent") - // private String houseNameNoEnPresent; + @JsonProperty("presentaddressStateNameMl") + private String presentaddressStateNameMl; - // @Size(max = 1000) - // @JsonProperty("houseNameNoMlPresent") - // private String houseNameNoMlPresent; + @JsonProperty("permtaddressStateNameEn") + private String permtaddressStateNameEn; - // @Size(max = 1000) - // @JsonProperty("villageNamePresent") - // private String villageNamePresent; + @JsonProperty("permtaddressStateNameMl") + private String permtaddressStateNameMl; - // @Size(max = 1000) - // @JsonProperty("villageIdPresent") - // private String villageIdPresent; + @JsonProperty("presentInsideKeralaDistrictEn") + private String presentInsideKeralaDistrictEn; - // @Size(max = 10) - // @JsonProperty("poNoPresent") - // private String poNoPresent; + @JsonProperty("presentInsideKeralaDistrictMl") + private String presentInsideKeralaDistrictMl; - // @Size(max = 64) - // @JsonProperty("brideGroomPresent") - // private String brideGroomPresent; - // ////Permanant - // @Size(max = 1000) - // @JsonProperty("permtaddressCountry") - // private String permtaddressCountry; + @JsonProperty("presentOutsideKeralaDistrictEn") + private String presentOutsideKeralaDistrictEn; - // @Size(max = 64) - // @JsonProperty("permtaddressStateName") - // private String permtaddressStateName; + @JsonProperty("presentOutsideKeralaDistrictMl") + private String presentOutsideKeralaDistrictMl; - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrLBName") - // private String permntInKeralaAdrLBName; + @JsonProperty("permntInKeralaAdrDistrictEn") + private String permntInKeralaAdrDistrictEn; - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrDistrict") - // private String permntInKeralaAdrDistrict; - - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaCityVilgeEn") - // private String permntOutsideKeralaCityVilgeEn; - - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrTaluk") - // private String permntInKeralaAdrTaluk; - - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrVillage") - // private String permntInKeralaAdrVillage; - - // @Size(max = 1000) - // @JsonProperty("permntInKeralaAdrLocalityNameEn") - // private String permntInKeralaAdrLocalityNameEn; - - // @Size(max = 2000) - // @JsonProperty("permntInKeralaAdrStreetNameEn") - // private String permntInKeralaAdrStreetNameEn; - - // @Size(max = 2500) - // @JsonProperty("permntInKeralaAdrHouseNameEn") - // private String permntInKeralaAdrHouseNameEn; - // @Size(max = 2500) - // @JsonProperty("permntInKeralaAdrLocalityNameMl") - // private String permntInKeralaAdrLocalityNameMl; - - // @Size(max = 2500) - // @JsonProperty("permntInKeralaAdrStreetNameMl") - // private String permntInKeralaAdrStreetNameMl; - - // @Size(max = 2500) - // @JsonProperty("permntInKeralaAdrHouseNameMl") - // private String permntInKeralaAdrHouseNameMl; + @JsonProperty("permntInKeralaAdrDistrictMl") + private String permntInKeralaAdrDistrictMl; - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrPincode") - // private String permntInKeralaAdrPincode; - - // @Size(max = 64) - // @JsonProperty("permntInKeralaAdrPostOffice") - // private String permntInKeralaAdrPostOffice; - - // @Size(max = 64) - // @JsonProperty("permntInKeralaWardNo") - // private String permntInKeralaWardNo; - - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaDistrict") - // private String permntOutsideKeralaDistrict; - - // @Size(max = 1000) - // @JsonProperty("permntOutsideKeralaTaluk") - // private String permntOutsideKeralaTaluk; - - // @Size(max = 1000) - // @JsonProperty("permntOutsideKeralaVillage") - // private String permntOutsideKeralaVillage; - - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaPincode") - // private String permntOutsideKeralaPincode; - - // @Size(max = 1000) - // @JsonProperty("permntOutsideKeralaLocalityNameEn") - // private String permntOutsideKeralaLocalityNameEn; - - // @Size(max = 2000) - // @JsonProperty("permntOutsideKeralaStreetNameEn") - // private String permntOutsideKeralaStreetNameEn; - - // @Size(max = 2500) - // @JsonProperty("permntOutsideKeralaHouseNameEn") - // private String permntOutsideKeralaHouseNameEn; - - // @Size(max = 1000) - // @JsonProperty("permntOutsideKeralaLocalityNameMl") - // private String permntOutsideKeralaLocalityNameMl; - - // @Size(max = 2000) - // @JsonProperty("permntOutsideKeralaStreetNameMl") - // private String permntOutsideKeralaStreetNameMl; - - // @Size(max = 2500) - // @JsonProperty("permntOutsideKeralaHouseNameMl") - // private String permntOutsideKeralaHouseNameMl; + @JsonProperty("permntOutsideKeralaDistrictEn") + private String permntOutsideKeralaDistrictEn; - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaPostOfficeEn") - // private String permntOutsideKeralaPostOfficeEn; + @JsonProperty("permntOutsideKeralaDistrictMl") + private String permntOutsideKeralaDistrictMl; - // @Size(max = 64) - // @JsonProperty("permntOutsideKeralaPostOfficeMl") - // private String permntOutsideKeralaPostOfficeMl; + @JsonProperty("presentInsideKeralaTalukEn") + private String presentInsideKeralaTalukEn; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaLineoneEn") - // private String permntOutsideIndiaLineoneEn; + @JsonProperty("presentInsideKeralaTalukMl") + private String presentInsideKeralaTalukMl; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaLineoneMl") - // private String permntOutsideIndiaLineoneMl; + @JsonProperty("presentOutsideKeralaTalukEn") + private String presentOutsideKeralaTalukEn; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaLinetwoEn") - // private String permntOutsideIndiaLinetwoEn; + @JsonProperty("presentOutsideKeralaTalukMl") + private String presentOutsideKeralaTalukMl; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaLinetwoMl") - // private String permntOutsideIndiaLinetwoMl; + @JsonProperty("permntInKeralaAdrTalukEn") + private String permntInKeralaAdrTalukEn; - // @Size(max = 2500) - // @JsonProperty("permntOutsideIndiaprovinceEn") - // private String permntOutsideIndiaprovinceEn; + @JsonProperty("permntInKeralaAdrTalukMl") + private String permntInKeralaAdrTalukMl; - // @Size(max = 1000) - // @JsonProperty("permntOutsideIndiaVillage") - // private String permntOutsideIndiaVillage; + @JsonProperty("permntOutsideKeralaTalukEn") + private String permntOutsideKeralaTalukEn; - // @Size(max = 64) - // @JsonProperty("permntOutsideIndiaCityTown") - // private String permntOutsideIndiaCityTown; + @JsonProperty("permntOutsideKeralaTalukMl") + private String permntOutsideKeralaTalukMl; - // @Size(max = 10) - // @JsonProperty("permanentOutsideIndiaPostCode") - // private String permanentOutsideIndiaPostCode; + @JsonProperty("presentInsideKeralaVillageEn") + private String presentInsideKeralaVillageEn; - // @Size(max = 64) - // @JsonProperty("permntOutsideIndiaCountry") - // private String permntOutsideIndiaCountry; + @JsonProperty("presentInsideKeralaVillageMl") + private String presentInsideKeralaVillageMl; + @JsonProperty("presentOutsideKeralaVillageEn") + private String presentOutsideKeralaVillageEn; - // ////Db Fields////// + @JsonProperty("presentOutsideKeralaVillageMl") + private String presentOutsideKeralaVillageMl; - // @Size(max = 64) - // @JsonProperty("permanentUuid") - // private String permanentUuid; - // @Size(max = 64) - // @JsonProperty("countryIdPermanent") - // private String countryIdPermanent; + @JsonProperty("permntInKeralaAdrVillageEn") + private String permntInKeralaAdrVillageEn; - // @Size(max = 64) - // @JsonProperty("stateIdPermanent") - // private String stateIdPermanent; + @JsonProperty("permntInKeralaAdrVillageMl") + private String permntInKeralaAdrVillageMl; - // @Size(max = 64) - // @JsonProperty("districtIdPermanent") - // private String districtIdPermanent; + @JsonProperty("permntOutsideKeralaVillageEn") + private String permntOutsideKeralaVillageEn; - // @Size(max = 64) - // @JsonProperty("pinNoPermanent") - // private String pinNoPermanent; + @JsonProperty("permntOutsideKeralaVillageMl") + private String permntOutsideKeralaVillageMl; - // @Size(max = 1000) - // @JsonProperty("localityEnPermanent") - // private String localityEnPermanent; + @JsonProperty("presentInsideKeralaPostOfficeEn") + private String presentInsideKeralaPostOfficeEn; - // @Size(max = 1000) - // @JsonProperty("localityMlPermanent") - // private String localityMlPermanent; + @JsonProperty("presentInsideKeralaPostOfficeMl") + private String presentInsideKeralaPostOfficeMl; - // @Size(max = 1000) - // @JsonProperty("streetNameEnPermanent") - // private String streetNameEnPermanent; + @JsonProperty("permntInKeralaAdrPostOfficeEn") + private String permntInKeralaAdrPostOfficeEn; - // @Size(max = 1000) - // @JsonProperty("streetNameMlPermanent") - // private String streetNameMlPermanent; + @JsonProperty("permntInKeralaAdrPostOfficeMl") + private String permntInKeralaAdrPostOfficeMl; - // @Size(max = 1000) - // @JsonProperty("houseNameNoEnPermanent") - // private String houseNameNoEnPermanent; + @JsonProperty("presentWardNoEn") + private String presentWardNoEn; - // @Size(max = 1000) - // @JsonProperty("houseNameNoMlPermanent") - // private String houseNameNoMlPermanent; + @JsonProperty("presentWardNoMl") + private String presentWardNoMl; - // @Size(max = 1000) - // @JsonProperty("villageNamePermanent") - // private String villageNamePermanent; + @JsonProperty("prmttWardNoEn") + private String prmttWardNoEn; - // @Size(max = 1000) - // @JsonProperty("villageIdPermanent") - // private String villageIdPermanent; + @JsonProperty("prmttWardNoMl") + private String prmttWardNoMl; - // @Size(max = 10) - // @JsonProperty("poNoPermanent") - // private String poNoPermanent; + @JsonProperty("presentInsideKeralaLBNameEn") + private String presentInsideKeralaLBNameEn; - // @Size(max = 64) - // @JsonProperty("brideGroomPermanent") - // private String brideGroomPermanent; + @JsonProperty("presentInsideKeralaLBNameMl") + private String presentInsideKeralaLBNameMl; } From ac2224b9a1734b92b025b2d1207fea0f73964f3d Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 3 May 2023 16:26:25 +0530 Subject: [PATCH 272/420] Registry search --- .../MarriageRegistryRepository.java | 23 +++++++++++++------ .../web/model/BrideRegistryDetails.java | 9 ++++++++ .../web/model/GroomRegistryDetails.java | 8 +++++++ .../marriage/utils/MarriageConstants.java | 4 ++++ .../marriage/utils/MarriageMdmsUtil.java | 23 +++++++++++++++++-- 5 files changed, 58 insertions(+), 9 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 7fbdc9fc84c..f4e47629380 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -273,13 +273,22 @@ public List searchMarriageRegistry(MarriageRegistrySear String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); } -// -// System.out.println("Groom address -------"); -// String address=marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req, result.get(0)); -// String address2=marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req, result.get(0)); -// -// System.out.println(address); -// System.out.println(address2); + //groom Maritalstatusid + if(marriage.getGroomDetails().getMaritalstatusid() != null){ + String groomMaritalstatusidEn = util.getMaritalStatusEn(mdmsData,marriage.getGroomDetails().getMaritalstatusid()); + marriage.getGroomDetails().setGroomMaritalstatusidEn(groomMaritalstatusidEn); + + String groomMaritalstatusidMl = util.getMaritalStatusEn(mdmsData,marriage.getGroomDetails().getMaritalstatusid()); + marriage.getGroomDetails().setGroomMaritalstatusidMl(groomMaritalstatusidMl); + } + //bride Maritalstatusid + if(marriage.getBrideDetails().getMaritalstatusid() != null){ + String brideMaritalstatusidEn = util.getMaritalStatusEn(mdmsData,marriage.getGroomDetails().getMaritalstatusid()); + marriage.getBrideDetails().setBrideMaritalstatusidEn(brideMaritalstatusidEn); + + String brideMaritalstatusidMl = util.getMaritalStatusEn(mdmsData,marriage.getGroomDetails().getMaritalstatusid()); + marriage.getBrideDetails().setBrideMaritalstatusidMl(brideMaritalstatusidMl); + } }); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryDetails.java index 4d3d0fa191d..846b0bda214 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryDetails.java @@ -139,6 +139,15 @@ public class BrideRegistryDetails { @JsonProperty("brideMaritalstatusID") private String maritalstatusid; + + @Size(max = 64) + @JsonProperty("brideMaritalstatusidMl") + private String brideMaritalstatusidMl; + + @Size(max = 64) + @JsonProperty("brideMaritalstatusidEn") + private String brideMaritalstatusidEn; + @JsonProperty("brideIsSpouseLiving") private Boolean brideIsSpouseLiving; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryDetails.java index 5ce37b5a337..73670b34dcb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryDetails.java @@ -138,6 +138,14 @@ public class GroomRegistryDetails { @JsonProperty("groomMaritalstatusID") private String maritalstatusid; + @Size(max = 64) + @JsonProperty("groomMaritalstatusidEn") + private String groomMaritalstatusidEn; + + @Size(max = 64) + @JsonProperty("groomMaritalstatusidMl") + private String groomMaritalstatusidMl; + @JsonProperty("groomIsSpouseLiving") private Boolean groomIsSpouseLiving; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 9eb7108fbd7..8f3068a1341 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -195,6 +195,10 @@ public class MarriageConstants { public static final String CR_MDMS_POSTOFFICE_CODE_JSONPATH = "$.MdmsRes.common-masters.PostOffice[*].code"; public static final String CR_MDMS_POSTOFFICE_JSONPATH = "$.MdmsRes.common-masters.PostOffice"; + public static final String CR_MDMS_MARITALSTATUS_JSONPATH = "$.MdmsRes.birth-death-service.MaritalStatus"; + + public static final String CR_MDMS_GENDER_JSONPATH = "$.MdmsRes.common-masters.GenderType"; + public static final String CR_MDMS_MARRIAGE_TENANT_CODE_JSONPATH = "$.MdmsRes.tenant.tenants.city[*].code"; public static final String CR_MDMS_MARRIAGE_TENANT_JSONPATH = "$.MdmsRes.tenant.tenants.city"; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index c2c27e91533..3b26e768191 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -974,8 +974,27 @@ public String getPONameMl(Object mdmsData, String POId) { List po = getPOCode(mdmsData); int index = po.indexOf(POId); return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].namelocal"); - } - + } + public String getMaritalStatusEn(Object mdmsData, String POId) { + List po = getPOCode(mdmsData); + int index = po.indexOf(POId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARITALSTATUS_JSONPATH+"["+index+"].name"); + } + public String getMaritalStatusMl(Object mdmsData, String POId) { + List po = getPOCode(mdmsData); + int index = po.indexOf(POId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARITALSTATUS_JSONPATH+"["+index+"].namelocal"); + } +// public String getGenderEn(Object mdmsData, String POId) { +// List po = getPOCode(mdmsData); +// int index = po.indexOf(POId); +// return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_GENDER_JSONPATH+"["+index+"].name"); +// } +// public String getGenderMl(Object mdmsData, String POId) { +// List po = getPOCode(mdmsData); +// int index = po.indexOf(POId); +// return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_GENDER_JSONPATH+"["+index+"].namelocal"); +// } private List getCountryCode(Object mdmsData) { return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_COUNTRY_CODE_JSONPATH); } From cf288d1f088baa885c5cccb735abc0e4f1cbadf6 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 3 May 2023 17:48:30 +0530 Subject: [PATCH 273/420] seach --- .../MarriageApplicationRepository.java | 89 ++++++++++++++++++- .../web/model/MarriageApplicationDetails.java | 29 +++++- .../marriage/utils/MarriageConstants.java | 5 ++ .../marriage/utils/MarriageMdmsUtil.java | 76 ++++++++++++++++ 4 files changed, 192 insertions(+), 7 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index f1b15fe9b91..84f4d74cde4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -401,10 +401,93 @@ public List searchMarriageDetails(MarriageApplicatio String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); } + + // Marriage Details + // Marriage DistrictId + if(marriage.getDistrictid() != null){ + String marriageDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getDistrictid()); + marriage.setMarriageDistrictEn(marriageDistNameEn); + + String marriageDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getDistrictid()); + marriage.setMarriageDistrictMl(marriageDistNameMl); + } + //Marriage Village + if(marriage.getVillageId() != null){ + String marriageVillageEn = util.getVillageNameEn(mdmsData,marriage.getVillageId()); + marriage.setMarriageVillageNameEn(marriageVillageEn); + + String marriageVillageMl = util.getVillageNameMl(mdmsData,marriage.getVillageId()); + marriage.setMarriageVillageNameMl(marriageVillageMl); + } + if(marriage.getVillageName() != null){ + String marriageVillageEn = util.getVillageNameEn(mdmsData,marriage.getVillageName()); + marriage.setMarriageVillageNameEn(marriageVillageEn); + + String marriageVillageMl = util.getVillageNameMl(mdmsData,marriage.getVillageName()); + marriage.setMarriageVillageNameMl(marriageVillageMl); + } + //Marriage Taluk + if(marriage.getTalukid()!= null){ + String marriageTalukNameEn = util.getTalukNameEn(mdmsData,marriage.getTalukid()); + marriage.setMarriageTalukNameEn(marriageTalukNameEn); + + String marriageTalukNameMl = util.getTalukNameMl(mdmsData,marriage.getTalukid()); + marriage.setMarriageTalukNameMl(marriageTalukNameMl); + } + //WARD DETAILS-MDMS Location Call + Object mdmsDataLocation = util.mdmsCallForLocation(requestInfo, marriage.getTenantid()); + //presentWardNo + if(marriage.getBrideAddressDetails().getPresentWardNo() != null){ + String presentWardNoEn = util.getWardNameEn(mdmsDataLocation,marriage.getBrideAddressDetails().getPresentWardNo()); + marriage.getBrideAddressDetails().setPresentWardNoEn(presentWardNoEn); + + String presentWardNoMl = util.getWardNameMl(mdmsDataLocation,marriage.getBrideAddressDetails().getPresentWardNo()); + marriage.getBrideAddressDetails().setPresentWardNoMl(presentWardNoMl); + } + //permntInKeralaWardNo + if(marriage.getBrideAddressDetails().getPermntInKeralaWardNo() != null){ + String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation,marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriage.getBrideAddressDetails().setPrmttWardNoEn(prmttWardNoEn); + + String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation,marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriage.getBrideAddressDetails().setPrmttWardNoMl(prmttWardNoMl); + } + //Marriage WardCode + if(marriage.getWardCode() != null){ + String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation,marriage.getWardCode()); + marriage.getBrideAddressDetails().setPresentWardNoEn(marriageWardCodeEn); + + String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation,marriage.getWardCode()); + marriage.getBrideAddressDetails().setPresentWardNoMl(marriageWardCodeMl); + } + if(marriage.getGroomAddressDetails().getPresentWardNo() != null){ + String presentWardNoEn = util.getWardNameEn(mdmsDataLocation,marriage.getGroomAddressDetails().getPresentWardNo()); + marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); - GroomDetails groomDetails =marriage.getGroomDetails(); - GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); - groomDetails.setAadharno(groomDetailsDec.getAadharno()); + String presentWardNoMl = util.getWardNameMl(mdmsDataLocation,marriage.getGroomAddressDetails().getPresentWardNo()); + marriage.getGroomAddressDetails().setPresentWardNoMl(presentWardNoMl); + } + //permntInKeralaWardNo + if(marriage.getGroomAddressDetails().getPermntInKeralaWardNo() != null){ + String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation,marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); + marriage.getGroomAddressDetails().setPrmttWardNoEn(prmttWardNoEn); + + String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation,marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); + marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); + } + //Marriage WardCode + if(marriage.getWardCode() != null){ + String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation,marriage.getWardCode()); + marriage.getGroomAddressDetails().setPresentWardNoEn(marriageWardCodeEn); + + String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation,marriage.getWardCode()); + marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); + } + + + GroomDetails groomDetails =marriage.getGroomDetails(); + GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index ae28c471081..9ff9b24d3a1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -32,7 +32,6 @@ public class MarriageApplicationDetails { @JsonProperty("marriageDOR") private Long dateofreporting; - @Size(max = 64) @JsonProperty("marriageDistrictid") private String districtid; @@ -41,7 +40,6 @@ public class MarriageApplicationDetails { @JsonProperty("marriageLBtype") private String lbtype; - @Size(max = 64) @JsonProperty("marriageTenantid") private String tenantid; @@ -225,9 +223,32 @@ public class MarriageApplicationDetails { private boolean wfdelayedWithinFiveYear ; private boolean wfdelayedAfterFiveYear ; +//Jasmine 03.05.2023 + +@JsonProperty("marriageDistrictEn") +private String marriageDistrictEn; + +@JsonProperty("marriageDistrictMl") +private String marriageDistrictMl; + +@JsonProperty("marriageLBtypeEn") +private String marriageLBtypeEn; + +@JsonProperty("marriageLBtypeMl") +private String marriageLBtypeMl; + +@JsonProperty("marriageVillageNameEn") +private String marriageVillageNameEn; + +@JsonProperty("marriageVillageNameMl") +private String marriageVillageNameMl; + +@JsonProperty("marriageTalukNameEn") +private String marriageTalukNameEn; + +@JsonProperty("marriageTalukNameMl") +private String marriageTalukNameMl; - // public void setStatus(String s) { - // } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 9eb7108fbd7..29f891cb0e9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -197,4 +197,9 @@ public class MarriageConstants { public static final String CR_MDMS_MARRIAGE_TENANT_CODE_JSONPATH = "$.MdmsRes.tenant.tenants.city[*].code"; public static final String CR_MDMS_MARRIAGE_TENANT_JSONPATH = "$.MdmsRes.tenant.tenants.city"; + + public static final String LOCATION_MDMS_BOUNDARY = "TenantBoundary"; + + public static final String CR_MDMS_BOUNDARY_CODE_JSONPATH = "$.MdmsRes.egov-location.TenantBoundary[*].boundary.children[*].children[*].code"; + public static final String CR_MDMS_BOUNDARY_CODES_JSONPATH = "$.MdmsRes.egov-location.TenantBoundary[*].boundary.children[*].children[*]"; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index c2c27e91533..eba62a31bd1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -997,4 +997,80 @@ private List getPOCode(Object mdmsData) { private List getLBCode(Object mdmsData) { return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TENANT_CODE_JSONPATH); } + + public Object mdmsCallForLocation (RequestInfo requestInfo, String tenantId) { + // Call MDMS microservice with MdmsCriteriaReq as params + MdmsCriteriaReq mdmsCriteriaReq = getLocRequest(requestInfo, tenantId); + Object result = serviceRequestRepository.fetchResult(getMdmsSearchUrl(), mdmsCriteriaReq); + return result; + } + private MdmsCriteriaReq getLocRequest(RequestInfo requestInfo, String tenantId) { + + List moduleDetails = new LinkedList<>(); + + moduleDetails.addAll(getBoundaryDetails()); + + //Prepare MDMS Criteria wih all modules in birth-death services and common services + + MdmsCriteria mdmsCriteria = MdmsCriteria.builder() + .moduleDetails(moduleDetails) + .tenantId(tenantId) + .build(); + //Return MDMS criteria request for calling MDMS microservice + return MdmsCriteriaReq.builder() + .mdmsCriteria(mdmsCriteria) + .requestInfo(requestInfo) + .build(); + } + + public List getBoundaryDetails() { + // master details for Boundary + + List crMasterDetails = new LinkedList<>(); + + // List masterHospital = Collections.singletonList(MasterDetail.builder() + // .name(MarriageConstants.LOCATION_MDMS_HOSPITAL) + // .build()); + // crMasterDetails.addAll(masterHospital); + + // List masterInstitution = Collections.singletonList(MasterDetail.builder() + // .name(DeathConstants.INSTITUTION_NAME) + // .build()); + // crMasterDetails.addAll(masterInstitution); + + List masterBoundary = Collections.singletonList(MasterDetail.builder() + .name(MarriageConstants.LOCATION_MDMS_BOUNDARY) + .build()); + crMasterDetails.addAll(masterBoundary); + + ModuleDetail crModuleDetail = ModuleDetail.builder() + .masterDetails(crMasterDetails) + .moduleName(MarriageConstants.TENANT_EGOV_LOCATION) + .build(); + + return Collections.singletonList(crModuleDetail); + + } + private List getBoundaryCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODE_JSONPATH); + } + // private List getAgeUnitCode(Object mdmsData) { + // return JsonPath.read(mdmsData, DeathConstants.CR_MDMS_DEATH_AGE_UNIT_CODE_JSONPATH); + // } + // private List getPublicPlaceCode(Object mdmsData) { + // return JsonPath.read(mdmsData, DeathConstants.CR_MDMS_DEATH_OTHER_PLACE_CODE_JSONPATH); + // } + public String getWardNameEn(Object mdmsData, String WardId) { + List tenants = getBoundaryCode(mdmsData); + int index = tenants.indexOf(WardId); + ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".name"); + return names.get(index); + } + + public String getWardNameMl(Object mdmsData, String WardId) { + List tenants = getBoundaryCode(mdmsData); + int index = tenants.indexOf(WardId); + ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".localname"); + return names.get(index); + } } \ No newline at end of file From b8acbb9e5eb5aa29ded51daffd1f8224ff0b392e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 4 May 2023 11:35:30 +0530 Subject: [PATCH 274/420] seach --- .../MarriageApplicationRepository.java | 8 +++++++- .../web/model/MarriageApplicationDetails.java | 6 ++++++ .../marriage/utils/MarriageMdmsUtil.java | 20 +++++++++++++++++-- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 84f4d74cde4..a5d2337056b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -483,7 +483,13 @@ public List searchMarriageDetails(MarriageApplicatio String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation,marriage.getWardCode()); marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); } - + // if(marriage.getPlacetype() != null){ + // String MarriagePlaceTypeNameEn = util.getPlaceTypeNameEn(mdmsData,marriage.getPlacetype()); + // marriage.setMarriagePlaceTypenameEn(MarriagePlaceTypeNameEn); + + // String MarriagePlaceTypeNameMl = util.getPlaceTypeNameMl(mdmsData, marriage.getPlacetype()); + // marriage.setMarriagePlaceTypenameMl(MarriagePlaceTypeNameMl); + // } GroomDetails groomDetails =marriage.getGroomDetails(); GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 9ff9b24d3a1..8ef257656c7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -59,6 +59,7 @@ public class MarriageApplicationDetails { @Size(max = 1000) @JsonProperty("marriagePlacenameEn") private String placenameEn; + @Size(max = 1000) @JsonProperty("marriagePlacenameMl") private String placenameMl; @@ -249,6 +250,11 @@ public class MarriageApplicationDetails { @JsonProperty("marriageTalukNameMl") private String marriageTalukNameMl; +@JsonProperty("marriagePlaceTypenameEn") +private String marriagePlaceTypenameEn; + +@JsonProperty("marriagePlaceTypenameMl") +private String marriagePlaceTypenameMl; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index db2e1012866..199c835465d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -976,8 +976,8 @@ public String getPONameMl(Object mdmsData, String POId) { return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].namelocal"); } public String getMaritalStatusEn(Object mdmsData, String POId) { - List po = getPOCode(mdmsData); - int index = po.indexOf(POId); + List maritalStatus = getMaritalStatusCode(mdmsData); + int index = maritalStatus.indexOf(POId); return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARITALSTATUS_JSONPATH+"["+index+"].name"); } public String getMaritalStatusMl(Object mdmsData, String POId) { @@ -1013,6 +1013,9 @@ private List getVillageCode(Object mdmsData) { private List getPOCode(Object mdmsData) { return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_CODE_JSONPATH); } + private List getMaritalStatusCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARITALSTATUS_JSONPATH); + } private List getLBCode(Object mdmsData) { return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TENANT_CODE_JSONPATH); } @@ -1092,4 +1095,17 @@ public String getWardNameMl(Object mdmsData, String WardId) { ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".localname"); return names.get(index); } + + public String getPlaceTypeNameEn(Object mdmsData, String WardId) { + List tenants = getBoundaryCode(mdmsData); + int index = tenants.indexOf(WardId); + ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".localname"); + return names.get(index); + } + public String getPlaceTypeNameMl(Object mdmsData, String WardId) { + List tenants = getBoundaryCode(mdmsData); + int index = tenants.indexOf(WardId); + ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".localname"); + return names.get(index); + } } \ No newline at end of file From 3e1fcb4f3f357666d09138b8d3e1fe7bcaef94f6 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 4 May 2023 13:35:29 +0530 Subject: [PATCH 275/420] seach --- .../MarriageApplicationQueryBuilder.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 681d825f7a2..6f71b8374bc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -30,7 +30,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") - .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo,GD.is_spouse_living as GD_is_spouse_living , GD.bride_groom GD_bride_groom ,") + .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo,GD.is_spouse_living as GD_is_spouse_living , GD.bride_groom as GD_bride_groom ,") .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") @@ -40,13 +40,13 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.is_spouse_living as BD_is_spouse_living , BD.bride_groom as BD_bride_groom,") - .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") - .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") - .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") - .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") - .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") - .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") - .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + // .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") + // .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") + // .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") + // .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") + // .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") + // .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") + // .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") .append("GPMA.id as GPMA_id ,GPMA.housename_no_en as GPMA_housename_en,GPMA.housename_no_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") From 1a8b66d468c39dfe338d31d729c3f5412e926787 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 4 May 2023 13:36:22 +0530 Subject: [PATCH 276/420] search registry --- .../service/MarriageCorrectionService.java | 6 +- .../MarriageRegistryRepository.java | 197 +----------------- .../service/MarriageRegistryService.java | 14 +- .../MarriageRegistryController.java | 4 +- 4 files changed, 13 insertions(+), 208 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 0125ea595b5..4c49a40fbe3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -107,7 +107,7 @@ public List createCorrection(MarriageCorrectionReques criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setId(request.getMarriageCorrectionDetails().get(0).getRegisterId()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); + List marriageRegistryDetails = searchRegistry(criteria); marriageCorrectionApplnValidator.validateCorrectionRegistrySearch(marriageRegistryDetails); MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); @@ -157,8 +157,8 @@ public List createCorrection(MarriageCorrectionReques } //req For Testing - private List searchRegistry(MarriageRegistrySearchCriteria criteria , RequestInfo requestInfo) { - return registryRepository.searchMarriageRegistry(criteria,requestInfo); + private List searchRegistry(MarriageRegistrySearchCriteria criteria) { + return registryRepository.searchMarriageRegistry(criteria); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index f4e47629380..444926d6107 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -86,7 +86,7 @@ public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnr // return result.getMarriageDetails(); // } - public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { + public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { List preparedStmtValues = new ArrayList<>(); @@ -94,203 +94,8 @@ public List searchMarriageRegistry(MarriageRegistrySear List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); - if(result != null) { - result.forEach(marriage -> { - //Neenu 03.05.2023 - //MDMS for Summery Page - Object mdmsData = util.mDMSSearch(requestInfo, marriage.getTenantid()); - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //presentaddressCountry - if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { - String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - - String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); - } - //presentOutSideCountry - if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { - String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); - marriage.getBrideAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); - - String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); - marriage.getBrideAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); - } - //permtaddressCountry - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //permntOutsideIndiaCountry - if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { - String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); - - String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); - } - //permntOutsideIndiaCountry - if(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null){ - String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getGroomAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); - - String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getGroomAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); - } - //presentaddressStateName - if(marriage.getGroomAddressDetails().getPresentaddressStateName() != null){ - String presentaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentaddressStateName()); - marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); - - String presentaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentaddressStateName()); - marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); - } - //permtaddressStateName - if(marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ - String permtaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - - String permtaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); - } - if(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null){ - String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); - - String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); - } - //presentOutsideKeralaDistrict - if(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null){ - String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); - - String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); - } - //permntInKeralaAdrDistrict - if(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null){ - String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); - - String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); - } - //permntOutsideKeralaDistrict - if(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null){ - String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); - - String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); - } - //presentInsideKeralaTaluk - if(marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null){ - String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); - marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); - String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); - marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); - } - //presentOutsideKeralaTaluk - if(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null){ - String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukEn(presentOutsideKeralaTalukEn); - - String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukMl(presentOutsideKeralaTalukMl); - } - //permntInKeralaAdrTaluk - if(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null){ - String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); - - String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); - } - //permntOutsideKeralaTaluk - if(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null){ - String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(prmtOutKeralaTalukEn); - - String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(prmtOutKeralaTalukMl); - } - //presentInsideKeralaVillage - if(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null){ - String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(presntInsKeralaVillageEn); - - String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(presntInsKeralaVillageMl); - } - //presentOutsideKeralaVillage - if(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null){ - String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageEn(presntOutKeralaVillageEn); - String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageMl(presntOutKeralaVillageMl); - } - //permntInKeralaAdrVillage - if(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null){ - String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); - - String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); - } - //permntOutsideKeralaVillage - if(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage() != null){ - String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageEn(permntOutsideKeralaVillageEn); - - String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageMl(permntOutsideKeralaVillageMl); - } - //presentInsideKeralaPostOffice - if(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null){ - String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); - marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); - - String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); - marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); - } - //permntInKeralaAdrPostOffice - if(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { - String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); - - String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); - } - //groom Maritalstatusid - if(marriage.getGroomDetails().getMaritalstatusid() != null){ - String groomMaritalstatusidEn = util.getMaritalStatusEn(mdmsData,marriage.getGroomDetails().getMaritalstatusid()); - marriage.getGroomDetails().setGroomMaritalstatusidEn(groomMaritalstatusidEn); - - String groomMaritalstatusidMl = util.getMaritalStatusEn(mdmsData,marriage.getGroomDetails().getMaritalstatusid()); - marriage.getGroomDetails().setGroomMaritalstatusidMl(groomMaritalstatusidMl); - } - //bride Maritalstatusid - if(marriage.getBrideDetails().getMaritalstatusid() != null){ - String brideMaritalstatusidEn = util.getMaritalStatusEn(mdmsData,marriage.getGroomDetails().getMaritalstatusid()); - marriage.getBrideDetails().setBrideMaritalstatusidEn(brideMaritalstatusidEn); - - String brideMaritalstatusidMl = util.getMaritalStatusEn(mdmsData,marriage.getGroomDetails().getMaritalstatusid()); - marriage.getBrideDetails().setBrideMaritalstatusidMl(brideMaritalstatusidMl); - } - }); - } return result; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 4e5265926fe..98e9c9b6621 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -83,13 +83,13 @@ public List createRegistry(MarriageRegistryRequest requ } - public List searchRegistry(MarriageRegistrySearchCriteria criteria,RequestInfo requestInfo) { + public List searchRegistry(MarriageRegistrySearchCriteria criteria) { - return repository.searchMarriageRegistry(criteria,requestInfo); + return repository.searchMarriageRegistry(criteria); } public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { - List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria,requestInfo); + List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria); if (marriageRegistryDetailsList != null && !marriageRegistryDetailsList.isEmpty()) { // List marriageCertificateList = repository.searchCertificateByMarriageId(marriageRegistryDetailsList.get(0).getId()); try { @@ -99,7 +99,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req MarriageCertRequest marriageCertRequest = MarriageCertRequest.builder().marriageCertificate(marriageCertificate).requestInfo(requestInfo).build(); marriageCertificate.setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); marriageCertificate.setRegistrationno(marriageRegistryDetailsList.get(0).getRegistrationno()); - List marriageDtls = searchCertificate(criteria,requestInfo); + List marriageDtls = searchCertificate(criteria); if (null!=marriageDtls && marriageDtls.size() > 1) { throw new CustomException("Invalid_Input", "Error in processing data"); } @@ -174,8 +174,8 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req } - public List searchCertificate(MarriageRegistrySearchCriteria criteria,RequestInfo requestInfo) { - List obj = repository.searchMarriageRegistry(criteria,requestInfo); + public List searchCertificate(MarriageRegistrySearchCriteria criteria) { + List obj = repository.searchMarriageRegistry(criteria); if(null!=obj&&obj.size()>0) { return repository.searchCertificateByMarriageId(obj.get(0).getId()); }else{ @@ -189,7 +189,7 @@ public List updateMarriageRegistry(MarriageCorrection MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); + List marriageRegistryDetails = searchRegistry(criteria); marriageCorrectionApplnValidator.validateCorrectionRegistrySearch(marriageRegistryDetails); MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index af914e7d9c8..241fdd0339a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -58,7 +58,7 @@ public ResponseEntity search(@RequestBody MarriageReg @ModelAttribute MarriageRegistrySearchCriteria criteria) { int registryCount=registryRepository.getMarriageRegistryCount(criteria); - List marriageDetails = marriageService.searchRegistry(criteria,request.getRequestInfo()); + List marriageDetails = marriageService.searchRegistry(criteria); MarriageRegistryResponse response = MarriageRegistryResponse .builder() @@ -72,7 +72,7 @@ public ResponseEntity search(@RequestBody MarriageReg @PostMapping("_certificate") public ResponseEntity certificateDownload(@RequestBody MarriageRegistryRequest request, @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria) { - List marriageCertResponseList = marriageService.searchCertificate(criteria,request.getRequestInfo()); + List marriageCertResponseList = marriageService.searchCertificate(criteria); MarriageCertResponse response; From 8d0921108d64363e4024a0979e72ed6d44e9bacb Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 4 May 2023 14:31:46 +0530 Subject: [PATCH 277/420] seach --- .../querybuilder/MarriageApplicationQueryBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 6f71b8374bc..1ce19b68102 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -30,7 +30,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") - .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo,GD.is_spouse_living as GD_is_spouse_living , GD.bride_groom as GD_bride_groom ,") + .append("GD.guardian_aadharno as GD_guardian_aadharno, GD.maritalstatusid as GD_maritalstatusid,GD.no_of_spouse_living as GD_livingspouseNo,GD.is_spouse_living as GD_is_spouse_living , GD.bride_groom as GD_bride_groom ,") .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") From c6d67080d1858a1eb834098a51c9447d97f03a36 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 4 May 2023 14:45:34 +0530 Subject: [PATCH 278/420] seach --- .../MarriageRegistryQueryBuilder.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index f5ee52f0a78..e491e8da6f6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -35,7 +35,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("GD.emailid as GD_emailid , GD.gender as GD_gender, GD.dateofbirth as GD_dateofbirth, GD.age as GD_age , GD.parent_guardian as GD_parent_guardian ,") .append("GD.fathername_en as GD_fathername_en, GD.mothername_en as GD_mothername_en,GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml,") .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") - .append("GD.guardian_aadharno as GD_guardian_aadhar, GD.maritalstatusid as GD_maritalstatus,GD.no_of_spouse_living as GD_livingspouseNo, GD.is_spouse_living as GD_is_spouse_living ,GD.bride_groom GD_bride_groom ,") + .append("GD.guardian_aadharno as GD_guardian_aadharno, GD.maritalstatusid as GD_maritalstatusid,GD.no_of_spouse_living as GD_livingspouseNo, GD.is_spouse_living as GD_is_spouse_living ,GD.bride_groom as GD_bride_groom ,") .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") @@ -45,13 +45,13 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.is_spouse_living as BD_is_spouse_living ,BD.bride_groom as BD_bride_groom,") - .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") - .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") - .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") - .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") - .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") - .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") - .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + // .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") + // .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") + // .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") + // .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") + // .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") + // .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") + // .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") From 8baeab28c494d71da31c7a624bf93948d9ba8e9b Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 4 May 2023 14:53:24 +0530 Subject: [PATCH 279/420] search --- .../NewMarriageResponseEnrichment.java | 53 -- .../MarriageApplicationRepository.java | 582 +++++++++--------- .../MarriageApplicationQueryBuilder.java | 2 + 3 files changed, 295 insertions(+), 342 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java deleted file mode 100644 index 650d1549251..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/NewMarriageResponseEnrichment.java +++ /dev/null @@ -1,53 +0,0 @@ -//package org.ksmart.marriage.marriageapplication.enrichment; -// -//import lombok.extern.slf4j.Slf4j; -//import org.egov.common.contract.request.RequestInfo; -//import org.egov.tracer.model.CustomException; -//import org.ksmart.marriage.common.services.MdmsTenantService; -//import org.ksmart.marriage.marriageapplication.service.MdmsForNewMarriageService; -//import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; -//import org.ksmart.marriage.utils.MarriageMdmsUtil; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.stereotype.Component; -//import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; -// -//import java.util.List; -// -//@Slf4j -//@Component -//public class NewMarriageResponseEnrichment { -// private final MarriageMdmsUtil mdmsUtil; -// private final MdmsForNewMarriageService mdmsMarriageService; -// private final MdmsTenantService mdmsTenantService; -// -// @Autowired -// NewMarriageResponseEnrichment(MarriageMdmsUtil mdmsUtil, MdmsForNewMarriageService mdmsMarriageService, MdmsTenantService mdmsTenantService) { -// this.mdmsUtil = mdmsUtil; -// this.mdmsMarriageService = mdmsMarriageService; -// this.mdmsTenantService = mdmsTenantService; -// } -// -// public void setNewMarriageRequestData(RequestInfo requestInfo, List result) { -// Object mdmsData = mdmsUtil.mdmsCall(requestInfo); -// if (result.size() == 0) { -// throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); -// } -// else if(result.size() >= 1) { -// result.forEach(marriage -> { -// marriage.setIsWorkflow(true); -// if(marriage.getMarriageType()!=null){ -// marriage.setMarriageTypeEn(mdmsTenantService.getMarriageTypesEn(mdmsData, marriage.getMarriageType())); -// marriage.setMarriageTypeMl(mdmsTenantService.getMarriageTypesMl(mdmsData, marriage.getMarriageType())); -// } -// if(marriage.getPlacetype()!=null){ -// marriage.setPlacetypeEn(mdmsTenantService.getplaceTypesEn(mdmsData,marriage.getPlacetype())); -// marriage.setPlacetypeMl(mdmsTenantService.getplaceTypesMl(mdmsData,marriage.getPlacetype())); -// -// } -// -// -// }); -// -// } -// } -//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index a5d2337056b..9492475d58d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -4,6 +4,7 @@ //import org.ksmart.marriage.common.producer.BndProducer; import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; import org.ksmart.marriage.common.contract.EncryptionDecryptionUtil; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; @@ -22,6 +23,8 @@ import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageDocumentRowMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; +import org.ksmart.marriage.marriageapplication.web.enums.ErrorCodes; + import org.springframework.stereotype.Repository; import lombok.extern.slf4j.Slf4j; @@ -60,469 +63,470 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); - - if(result != null) { - result.forEach(marriage -> { - //Jasmine 03.05.2023 - MDMS for Summery Page - - Object mdmsData = util.mDMSSearch(requestInfo, marriage.getTenantid()); - - if(marriage.getBrideAddressDetails().getPermtaddressCountry() != null){ - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //presentaddressCountry - if(marriage.getBrideAddressDetails().getPresentaddressCountry() != null){ - String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - - String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); - } - //presentOutSideCountry - if(marriage.getBrideAddressDetails().getPresentOutSideCountry() != null){ - String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentOutSideCountry()); - marriage.getBrideAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); - - String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentOutSideCountry()); - marriage.getBrideAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); - } - //permtaddressCountry - if(marriage.getBrideAddressDetails().getPermtaddressCountry() != null){ - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //permntOutsideIndiaCountry - if(marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null){ - String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); - - String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); - } - //presentaddressStateName - if(marriage.getBrideAddressDetails().getPresentaddressStateName() != null){ - String presentaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentaddressStateName()); + if (preparedStmtValues.size() == 0) { + throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); + } else { + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); + if (result != null) { + result.forEach(marriage -> { + //Jasmine 03.05.2023 - MDMS for Summery Page + + Object mdmsData = util.mDMSSearch(requestInfo, marriage.getTenantid()); + + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //presentaddressCountry + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + } + //presentOutSideCountry + if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { + String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); + + String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); + } + //permtaddressCountry + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //permntOutsideIndiaCountry + if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + + String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + } + //presentaddressStateName + if (marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { + String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressStateName()); marriage.getBrideAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); - - String presentaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentaddressStateName()); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressStateName()); marriage.getBrideAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); } //permtaddressStateName - if(marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ - String permtaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getBrideAddressDetails().getPermtaddressStateName()); + if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { + String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - - String permtaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getBrideAddressDetails().getPermtaddressStateName()); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); } - if(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict() != null){ - String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); + if (marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict() != null) { + String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); marriage.getBrideAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); - - String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); + + String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); marriage.getBrideAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); } //presentOutsideKeralaDistrict - if(marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict() != null){ - String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + if (marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict() != null) { + String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); - - String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + + String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); } //permntInKeralaAdrDistrict - if(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null){ - String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null) { + String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); - - String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + + String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); } //permntOutsideKeralaDistrict - if(marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null){ - String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + if (marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); - - String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); } //presentInsideKeralaTaluk - if(marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk() != null){ - String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); + if (marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk() != null) { + String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); marriage.getBrideAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); - - String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); + + String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); marriage.getBrideAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); } //presentOutsideKeralaTaluk - if(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName() != null){ - String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + if (marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName() != null) { + String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukEn(presentOutsideKeralaTalukEn); - - String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + + String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukMl(presentOutsideKeralaTalukMl); } //permntInKeralaAdrTaluk - if(marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null){ - String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null) { + String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); - - String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + + String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); } //permntOutsideKeralaTaluk - if(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk() != null){ - String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + if (marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk() != null) { + String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukEn(prmtOutKeralaTalukEn); - - String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + + String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukMl(prmtOutKeralaTalukMl); } //presentInsideKeralaVillage - if(marriage.getBrideAddressDetails().getPresentInsideKeralaVillage() != null){ - String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); + if (marriage.getBrideAddressDetails().getPresentInsideKeralaVillage() != null) { + String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukEn(presntInsKeralaVillageEn); - - String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); + + String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukMl(presntInsKeralaVillageMl); } //presentOutsideKeralaVillage - if(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName() != null){ - String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); + if (marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName() != null) { + String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageEn(presntOutKeralaVillageEn); - - String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); + + String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageMl(presntOutKeralaVillageMl); } //permntInKeralaAdrVillage - if(marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage() != null){ - String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage() != null) { + String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); - - String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + + String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); } //permntOutsideKeralaVillage - if(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage() != null){ - String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + if (marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage() != null) { + String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageEn(permntOutsideKeralaVillageEn); - - String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + + String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageMl(permntOutsideKeralaVillageMl); } //presentInsideKeralaPostOffice - if(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice() != null){ - String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + if (marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice() != null) { + String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); marriage.getBrideAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); - - String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData,marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + + String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); marriage.getBrideAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); } //permntInKeralaAdrPostOffice - if(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null){ - String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); - - String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData,marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + + String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); } - //GROOM DETAILS - if(marriage.getGroomAddressDetails().getPermtaddressCountry() != null){ - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPermtaddressCountry()); + //GROOM DETAILS + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPermtaddressCountry()); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } //presentaddressCountry - if(marriage.getGroomAddressDetails().getPresentaddressCountry() != null){ - String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentaddressCountry()); + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - - String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentaddressCountry()); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); } //presentOutSideCountry - if(marriage.getGroomAddressDetails().getPresentOutSideCountry() != null){ - String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutSideCountry()); + if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { + String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutSideCountry()); marriage.getGroomAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); - - String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutSideCountry()); + + String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutSideCountry()); marriage.getGroomAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); } //permtaddressCountry - if(marriage.getGroomAddressDetails().getPermtaddressCountry() != null){ - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPermtaddressCountry()); + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPermtaddressCountry()); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } //permntOutsideIndiaCountry - if(marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null){ - String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { + String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); marriage.getGroomAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); - - String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + + String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); marriage.getGroomAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); - } + } //presentaddressStateName - if(marriage.getGroomAddressDetails().getPresentaddressStateName() != null){ - String presentaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentaddressStateName()); + if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { + String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); - - String presentaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentaddressStateName()); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); } //permtaddressStateName - if(marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ - String permtaddressStateNameEn = util.getStateNameEn(mdmsData,marriage.getGroomAddressDetails().getPermtaddressStateName()); + if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { + String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - - String permtaddressStateNameMl = util.getStateNameMl(mdmsData,marriage.getGroomAddressDetails().getPermtaddressStateName()); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); } - if(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null){ - String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + if (marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null) { + String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); - - String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + + String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); } //presentOutsideKeralaDistrict - if(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null){ - String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + if (marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null) { + String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); - - String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + + String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); } //permntInKeralaAdrDistrict - if(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null){ - String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null) { + String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); - - String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + + String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); } //permntOutsideKeralaDistrict - if(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null){ - String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); - - String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); } //presentInsideKeralaTaluk - if(marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null){ - String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + if (marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null) { + String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); - - String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + + String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); } //presentOutsideKeralaTaluk - if(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null){ - String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + if (marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null) { + String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukEn(presentOutsideKeralaTalukEn); - - String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + + String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukMl(presentOutsideKeralaTalukMl); } //permntInKeralaAdrTaluk - if(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null){ - String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null) { + String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); - - String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + + String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); } //permntOutsideKeralaTaluk - if(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null){ - String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + if (marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null) { + String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(prmtOutKeralaTalukEn); - - String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + + String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(prmtOutKeralaTalukMl); } //presentInsideKeralaVillage - if(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null){ - String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + if (marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { + String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(presntInsKeralaVillageEn); - - String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + + String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(presntInsKeralaVillageMl); } //presentOutsideKeralaVillage - if(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null){ - String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); + if (marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null) { + String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageEn(presntOutKeralaVillageEn); - - String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); + + String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageMl(presntOutKeralaVillageMl); } //permntInKeralaAdrVillage - if(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null){ - String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { + String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); - - String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + + String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); } //permntOutsideKeralaVillage - if(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage() != null){ - String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + if (marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage() != null) { + String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageEn(permntOutsideKeralaVillageEn); - - String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData,marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + + String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageMl(permntOutsideKeralaVillageMl); } //presentInsideKeralaPostOffice - if(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null){ - String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + if (marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null) { + String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); - - String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData,marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + + String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); } //permntInKeralaAdrPostOffice - if(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null){ - String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); - - String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + + String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); } - // Marriage Details - // Marriage DistrictId - if(marriage.getDistrictid() != null){ - String marriageDistNameEn = util.getDistrictNameEn(mdmsData,marriage.getDistrictid()); + // Marriage Details + // Marriage DistrictId + if (marriage.getDistrictid() != null) { + String marriageDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getDistrictid()); marriage.setMarriageDistrictEn(marriageDistNameEn); - - String marriageDistNameMl = util.getDistrictNameMl(mdmsData,marriage.getDistrictid()); + + String marriageDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getDistrictid()); marriage.setMarriageDistrictMl(marriageDistNameMl); } //Marriage Village - if(marriage.getVillageId() != null){ - String marriageVillageEn = util.getVillageNameEn(mdmsData,marriage.getVillageId()); + if (marriage.getVillageId() != null) { + String marriageVillageEn = util.getVillageNameEn(mdmsData, marriage.getVillageId()); marriage.setMarriageVillageNameEn(marriageVillageEn); - - String marriageVillageMl = util.getVillageNameMl(mdmsData,marriage.getVillageId()); + + String marriageVillageMl = util.getVillageNameMl(mdmsData, marriage.getVillageId()); marriage.setMarriageVillageNameMl(marriageVillageMl); } - if(marriage.getVillageName() != null){ - String marriageVillageEn = util.getVillageNameEn(mdmsData,marriage.getVillageName()); + if (marriage.getVillageName() != null) { + String marriageVillageEn = util.getVillageNameEn(mdmsData, marriage.getVillageName()); marriage.setMarriageVillageNameEn(marriageVillageEn); - - String marriageVillageMl = util.getVillageNameMl(mdmsData,marriage.getVillageName()); + + String marriageVillageMl = util.getVillageNameMl(mdmsData, marriage.getVillageName()); marriage.setMarriageVillageNameMl(marriageVillageMl); } //Marriage Taluk - if(marriage.getTalukid()!= null){ - String marriageTalukNameEn = util.getTalukNameEn(mdmsData,marriage.getTalukid()); + if (marriage.getTalukid() != null) { + String marriageTalukNameEn = util.getTalukNameEn(mdmsData, marriage.getTalukid()); marriage.setMarriageTalukNameEn(marriageTalukNameEn); - - String marriageTalukNameMl = util.getTalukNameMl(mdmsData,marriage.getTalukid()); + + String marriageTalukNameMl = util.getTalukNameMl(mdmsData, marriage.getTalukid()); marriage.setMarriageTalukNameMl(marriageTalukNameMl); } - //WARD DETAILS-MDMS Location Call - Object mdmsDataLocation = util.mdmsCallForLocation(requestInfo, marriage.getTenantid()); - //presentWardNo - if(marriage.getBrideAddressDetails().getPresentWardNo() != null){ - String presentWardNoEn = util.getWardNameEn(mdmsDataLocation,marriage.getBrideAddressDetails().getPresentWardNo()); - marriage.getBrideAddressDetails().setPresentWardNoEn(presentWardNoEn); - - String presentWardNoMl = util.getWardNameMl(mdmsDataLocation,marriage.getBrideAddressDetails().getPresentWardNo()); - marriage.getBrideAddressDetails().setPresentWardNoMl(presentWardNoMl); - } - //permntInKeralaWardNo - if(marriage.getBrideAddressDetails().getPermntInKeralaWardNo() != null){ - String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation,marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); - marriage.getBrideAddressDetails().setPrmttWardNoEn(prmttWardNoEn); - - String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation,marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); - marriage.getBrideAddressDetails().setPrmttWardNoMl(prmttWardNoMl); - } - //Marriage WardCode - if(marriage.getWardCode() != null){ - String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation,marriage.getWardCode()); - marriage.getBrideAddressDetails().setPresentWardNoEn(marriageWardCodeEn); - - String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation,marriage.getWardCode()); - marriage.getBrideAddressDetails().setPresentWardNoMl(marriageWardCodeMl); - } - if(marriage.getGroomAddressDetails().getPresentWardNo() != null){ - String presentWardNoEn = util.getWardNameEn(mdmsDataLocation,marriage.getGroomAddressDetails().getPresentWardNo()); - marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); - - String presentWardNoMl = util.getWardNameMl(mdmsDataLocation,marriage.getGroomAddressDetails().getPresentWardNo()); - marriage.getGroomAddressDetails().setPresentWardNoMl(presentWardNoMl); - } - //permntInKeralaWardNo - if(marriage.getGroomAddressDetails().getPermntInKeralaWardNo() != null){ - String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation,marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); - marriage.getGroomAddressDetails().setPrmttWardNoEn(prmttWardNoEn); - - String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation,marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); - marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); - } - //Marriage WardCode - if(marriage.getWardCode() != null){ - String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation,marriage.getWardCode()); - marriage.getGroomAddressDetails().setPresentWardNoEn(marriageWardCodeEn); - - String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation,marriage.getWardCode()); - marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); - } - // if(marriage.getPlacetype() != null){ - // String MarriagePlaceTypeNameEn = util.getPlaceTypeNameEn(mdmsData,marriage.getPlacetype()); - // marriage.setMarriagePlaceTypenameEn(MarriagePlaceTypeNameEn); - - // String MarriagePlaceTypeNameMl = util.getPlaceTypeNameMl(mdmsData, marriage.getPlacetype()); - // marriage.setMarriagePlaceTypenameMl(MarriagePlaceTypeNameMl); - // } - - GroomDetails groomDetails =marriage.getGroomDetails(); - GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); - groomDetails.setAadharno(groomDetailsDec.getAadharno()); - if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + //WARD DETAILS-MDMS Location Call + Object mdmsDataLocation = util.mdmsCallForLocation(requestInfo, marriage.getTenantid()); + //presentWardNo + if (marriage.getBrideAddressDetails().getPresentWardNo() != null) { + String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPresentWardNo()); + marriage.getBrideAddressDetails().setPresentWardNoEn(presentWardNoEn); + + String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPresentWardNo()); + marriage.getBrideAddressDetails().setPresentWardNoMl(presentWardNoMl); + } + //permntInKeralaWardNo + if (marriage.getBrideAddressDetails().getPermntInKeralaWardNo() != null) { + String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriage.getBrideAddressDetails().setPrmttWardNoEn(prmttWardNoEn); + + String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriage.getBrideAddressDetails().setPrmttWardNoMl(prmttWardNoMl); + } + //Marriage WardCode + if (marriage.getWardCode() != null) { + String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); + marriage.getBrideAddressDetails().setPresentWardNoEn(marriageWardCodeEn); + + String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); + marriage.getBrideAddressDetails().setPresentWardNoMl(marriageWardCodeMl); + } + if (marriage.getGroomAddressDetails().getPresentWardNo() != null) { + String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); + marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); + + String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); + marriage.getGroomAddressDetails().setPresentWardNoMl(presentWardNoMl); + } + //permntInKeralaWardNo + if (marriage.getGroomAddressDetails().getPermntInKeralaWardNo() != null) { + String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); + marriage.getGroomAddressDetails().setPrmttWardNoEn(prmttWardNoEn); + + String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); + marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); + } + //Marriage WardCode + if (marriage.getWardCode() != null) { + String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); + marriage.getGroomAddressDetails().setPresentWardNoEn(marriageWardCodeEn); + + String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); + marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); + } + // if(marriage.getPlacetype() != null){ + // String MarriagePlaceTypeNameEn = util.getPlaceTypeNameEn(mdmsData,marriage.getPlacetype()); + // marriage.setMarriagePlaceTypenameEn(MarriagePlaceTypeNameEn); + + // String MarriagePlaceTypeNameMl = util.getPlaceTypeNameMl(mdmsData, marriage.getPlacetype()); + // marriage.setMarriagePlaceTypenameMl(MarriagePlaceTypeNameMl); + // } + + GroomDetails groomDetails = marriage.getGroomDetails(); + GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - } - else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + } else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); } - BrideDetails brideDetails =marriage.getBrideDetails(); - BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); + BrideDetails brideDetails = marriage.getBrideDetails(); + BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); brideDetails.setAadharno(brideDetailsDec.getAadharno()); - if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - } - else if(brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); } - WitnessDetails witnessDetails =marriage.getWitnessDetails(); - WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); + WitnessDetails witnessDetails = marriage.getWitnessDetails(); + WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); criteria.setApplicationType(marriage.getApplicationtype()); criteria.setApplicationNo(marriage.getApplicationNumber()); criteria.setTenantId(marriage.getTenantid()); - List completeDocumentDetails = getDocumentSearchDetails( criteria, requestInfo); + List completeDocumentDetails = getDocumentSearchDetails(criteria, requestInfo); marriage.setMarriageDocuments(completeDocumentDetails); - }); + }); + } + return result; } - return result; } public List getDocumentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 1ce19b68102..643f3e36fac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -32,6 +32,8 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GD.father_aadharno as GD_father_aadharno, GD.mother_aadharno as GD_mother_aadharno, GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,") .append("GD.guardian_aadharno as GD_guardian_aadharno, GD.maritalstatusid as GD_maritalstatusid,GD.no_of_spouse_living as GD_livingspouseNo,GD.is_spouse_living as GD_is_spouse_living , GD.bride_groom as GD_bride_groom ,") + + .append("BD.id as BD_id , BD.residentship as BD_residentship , BD.aadharno as BD_aadharno ,BD.passportno as BD_passportno , BD.socialsecurityno as BD_socialsecurityno ,") .append("BD.firstname_en as BD_firstname_en , BD.middlename_en as BD_middlename_en ,BD.lastname_en as BD_lastname_en , BD.firstname_ml as BD_firstname_ml,") .append("BD.middlename_ml as BD_middlename_ml , BD.lastname_ml as BD_lastname_ml , BD.mobile as BD_mobile , BD.emailid as BD_emailid , ") From 82b94e32a9d491d607748e8c24959501b1b4d68c Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 4 May 2023 15:53:52 +0530 Subject: [PATCH 280/420] error fix --- .../enrichment/MarriageDetailsEnrichment.java | 3 +++ .../web/model/marriage/BrideAddressDetails.java | 4 ++-- .../web/model/marriage/GroomAddressDetails.java | 8 +++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 396a711ebff..33c321f83a1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -294,6 +294,9 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setPresentAddrVillageId(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + + } else { if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 6d2306c0fbb..b879687e269 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -429,11 +429,11 @@ public class BrideAddressDetails { @JsonProperty("isPermanentAddressInt") private Integer isPermanentAddressInt; - @JsonProperty("PermanentAddrTalukId") + @JsonProperty("permanentAddrTalukId") private String permanentAddrTalukId ; - @JsonProperty("PermanentAddrVillageId") + @JsonProperty("permanentAddrVillageId") private String permanentAddrVillageId ; @Size(max = 64) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 9f7459a7146..3ed6f2a2dff 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -261,7 +261,8 @@ public class GroomAddressDetails { @JsonProperty("outSideIndiaPostCodePresent") private String outSideIndiaPostCodePresent; - + @JsonProperty("presentAddrVillageId") + private String presentAddrVillageId ; ////Permanant @JsonProperty("isPermanentAddress") @@ -429,11 +430,12 @@ public class GroomAddressDetails { @JsonProperty("isPermanentAddressInt") private Integer isPermanentAddressInt; - @JsonProperty("PermanentAddrTalukId") + + @JsonProperty("permanentAddrTalukId") private String permanentAddrTalukId ; - @JsonProperty("PermanentAddrVillageId") + @JsonProperty("permanentAddrVillageId") private String permanentAddrVillageId ; @Size(max = 64) @JsonProperty("countryIdPermanent") From 1dc857493f9782fbbb8ff3a5239d9d4827ee77ab Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 4 May 2023 17:42:14 +0530 Subject: [PATCH 281/420] seach --- .../common/contract/EncryptionDecryptionUtil.java | 1 + .../repository/MarriageApplicationRepository.java | 15 ++++++++------- .../service/MarriageApplicationService.java | 1 - 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java index 81ae6d02388..23e652e60d9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java @@ -70,6 +70,7 @@ public T encryptObject(Object objectToEncrypt, String key, Class classTyp public P decryptObject(Object objectToDecrypt, String key, Class classType, RequestInfo requestInfo) { try { + System.out.println("JasmineDecryptObject"+objectToDecrypt); boolean objectToDecryptNotList = false; if (objectToDecrypt == null) { return null; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index a5d2337056b..cf2d841f8fe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -476,13 +476,13 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); } //Marriage WardCode - if(marriage.getWardCode() != null){ - String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation,marriage.getWardCode()); - marriage.getGroomAddressDetails().setPresentWardNoEn(marriageWardCodeEn); + // if(marriage.getWardCode() != null){ + // String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation,marriage.getWardCode()); + // marriage.getGroomAddressDetails().setPresentWardNoEn(marriageWardCodeEn); - String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation,marriage.getWardCode()); - marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); - } + // String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation,marriage.getWardCode()); + // marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); + // } // if(marriage.getPlacetype() != null){ // String MarriagePlaceTypeNameEn = util.getPlaceTypeNameEn(mdmsData,marriage.getPlacetype()); // marriage.setMarriagePlaceTypenameEn(MarriagePlaceTypeNameEn); @@ -490,10 +490,11 @@ public List searchMarriageDetails(MarriageApplicatio // String MarriagePlaceTypeNameMl = util.getPlaceTypeNameMl(mdmsData, marriage.getPlacetype()); // marriage.setMarriagePlaceTypenameMl(MarriagePlaceTypeNameMl); // } - + System.out.println("ParentGuardianFlag-1"+marriage.getId()); GroomDetails groomDetails =marriage.getGroomDetails(); GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); groomDetails.setAadharno(groomDetailsDec.getAadharno()); + System.out.println("ParentGuardianFlag"+marriage.getId()); if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index d420a4a0274..8ab59ebb74d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -133,7 +133,6 @@ public List updateMarriageDetails(MarriageDetailsReq return request.getMarriageDetails(); } - public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { return repository.searchMarriageDetails(criteria,requestInfo); } From b7695e11d8e9298528a28d517e06b3253bc13925 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 4 May 2023 20:12:10 +0530 Subject: [PATCH 282/420] marriage mdms en ml data --- .../MarriageApplicationRepository.java | 78 +++++++++++++++---- .../web/model/MarriageApplicationDetails.java | 8 ++ .../MarriageCorrectionEnrichment.java | 3 +- .../web/model/MarriageCorrectionDetails.java | 4 + .../marriage/utils/MarriageConstants.java | 15 +++- .../marriage/utils/MarriageMdmsUtil.java | 74 +++++++++++++++--- 6 files changed, 152 insertions(+), 30 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 9492475d58d..2399a97e2f9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -439,8 +439,54 @@ public List searchMarriageDetails(MarriageApplicatio String marriageTalukNameMl = util.getTalukNameMl(mdmsData, marriage.getTalukid()); marriage.setMarriageTalukNameMl(marriageTalukNameMl); } + + //Marriage LB Type + if (marriage.getLbtype() != null) { + String marriageLBtypeEn = util.getMarriageLbtypeEn(mdmsData, marriage.getLbtype()); + marriage.setMarriageLBtypeEn(marriageLBtypeEn); + + String marriageLBtypeMl = util.getMarriageLbtypeMl(mdmsData, marriage.getLbtype()); + marriage.setMarriageLBtypeMl(marriageLBtypeMl); + } + //Marriage Place Type name + if (marriage.getPlacetype() != null) { + String marriagePlaceTypenameEn = util.getPlaceTypeNameEn(mdmsData, marriage.getPlacetype()); + marriage.setMarriagePlaceTypenameEn(marriagePlaceTypenameEn); + + String marriagePlaceTypenameMl = util.getPlaceTypeNameMl(mdmsData, marriage.getPlacetype()); + marriage.setMarriagePlaceTypenameMl(marriagePlaceTypenameMl); + } + //Marriage Type name + if (marriage.getMarriageType() != null) { + String marriageTypeEn = util.getMarriageTypeEn(mdmsData, marriage.getMarriageType()); + marriage.setMarriageTypeEn(marriageTypeEn); + + String marriageTypeMl = util.getMarriageTypeMl(mdmsData, marriage.getMarriageType()); + marriage.setMarriageTypeMl(marriageTypeMl); + } + + + //WARD DETAILS-MDMS Location Call Object mdmsDataLocation = util.mdmsCallForLocation(requestInfo, marriage.getTenantid()); + + //Marriage WardCode + if (marriage.getWardCode() != null) { + String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); + marriage.setMarriageWardCodeEn(marriageWardCodeEn); + + String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); + marriage.setMarriageWardCodeMl(marriageWardCodeMl); + } + //Marriage PlaceId + if (marriage.getPlaceid() != null) { + String marriagePlaceIdEn = util.getMarriagePlaceIdEn(mdmsDataLocation, marriage.getPlaceid()); + marriage.setMarriagePlaceIdEn(marriagePlaceIdEn); + + String marriagePlaceIdMl = util.getMarriagePlaceIdMl(mdmsDataLocation, marriage.getPlaceid()); + marriage.setMarriagePlaceIdMl(marriagePlaceIdMl); + } + //presentWardNo if (marriage.getBrideAddressDetails().getPresentWardNo() != null) { String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPresentWardNo()); @@ -457,14 +503,14 @@ public List searchMarriageDetails(MarriageApplicatio String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); marriage.getBrideAddressDetails().setPrmttWardNoMl(prmttWardNoMl); } - //Marriage WardCode - if (marriage.getWardCode() != null) { - String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); - marriage.getBrideAddressDetails().setPresentWardNoEn(marriageWardCodeEn); - - String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); - marriage.getBrideAddressDetails().setPresentWardNoMl(marriageWardCodeMl); - } +// //Marriage WardCode +// if (marriage.getWardCode() != null) { +// String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); +// marriage.getBrideAddressDetails().setPresentWardNoEn(marriageWardCodeEn); +// +// String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); +// marriage.getBrideAddressDetails().setPresentWardNoMl(marriageWardCodeMl); +// } if (marriage.getGroomAddressDetails().getPresentWardNo() != null) { String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); @@ -480,14 +526,14 @@ public List searchMarriageDetails(MarriageApplicatio String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); } - //Marriage WardCode - if (marriage.getWardCode() != null) { - String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); - marriage.getGroomAddressDetails().setPresentWardNoEn(marriageWardCodeEn); - - String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); - marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); - } +// //Marriage WardCode +// if (marriage.getWardCode() != null) { +// String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); +// marriage.getGroomAddressDetails().setPresentWardNoEn(marriageWardCodeEn); +// +// String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); +// marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); +// } // if(marriage.getPlacetype() != null){ // String MarriagePlaceTypeNameEn = util.getPlaceTypeNameEn(mdmsData,marriage.getPlacetype()); // marriage.setMarriagePlaceTypenameEn(MarriagePlaceTypeNameEn); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 8ef257656c7..504f7daa794 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -256,5 +256,13 @@ public class MarriageApplicationDetails { @JsonProperty("marriagePlaceTypenameMl") private String marriagePlaceTypenameMl; + @JsonProperty("marriageWardCodeEn") + private String marriageWardCodeEn; + @JsonProperty("marriageWardCodeMl") + private String marriageWardCodeMl; + @JsonProperty("marriagePlaceIdEn") + private String marriagePlaceIdEn; + @JsonProperty("marriagePlaceIdMl") + private String marriagePlaceIdMl; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index 3857130c3cb..b1f23502ba3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -59,7 +59,7 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp } DateFormat formatter = new SimpleDateFormat("ddMMyyyy"); - marriageApplicationDetails.setDateofreporting(Long.valueOf(formatter.format(new Date()))); + marriageApplicationDetails.setDateofreporting(new Date().getTime()); correctionRequest.getMarriageCorrectionDetails().forEach(correction -> { @@ -74,6 +74,7 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp marriageApplicationDetails.setWorkflowcode(correction.getWorkflowcode()); marriageApplicationDetails.setId(UUID.randomUUID().toString()); correction.setMarriageId(marriageApplicationDetails.getId()); + correction.setApplicationDate(new Date().getTime()); setApplicationNumbers(correctionRequest, marriageApplicationDetails); correction.setApplicationNo(marriageApplicationDetails.getApplicationNumber()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java index a500370b24a..e7f873d4dcb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -36,6 +36,8 @@ public class MarriageCorrectionDetails { @Size(max = 64) @JsonProperty("applicationNumber") private String applicationNo; + @JsonProperty("applicationDate") + private Long applicationDate; @Size(max = 64) @JsonProperty("businessService") private String businessservice; @@ -77,4 +79,6 @@ public class MarriageCorrectionDetails { @JsonProperty("Demands") private List demands; + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 09e580b166f..49a27dc74da 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -7,11 +7,11 @@ public class MarriageConstants { public static final String GENDERTYPE = "GenderType"; public static final String COMMON_MASTER_MODULE_NAME = "common-masters"; - public static final String CR_MDMS_MARRIAGETYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.MarriagePlaceType[*].code"; - public static final String CR_MDMS_MARRIAGE_TYPE_JSONPATH = "$.MdmsRes.birth-death-service.MarriagePlaceType"; + public static final String CR_MDMS_MARRIAGETYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.TypeOfMarriage[*].code"; + public static final String CR_MDMS_MARRIAGE_TYPE_JSONPATH = "$.MdmsRes.birth-death-service.TypeOfMarriage"; - public static final String CR_MDMS_PLACETYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.TypeOfMarriage[*].code"; - public static final String CR_MDMS_PLACE_TYPE_JSONPATH = "$.MdmsRes.birth-death-service.TypeOfMarriage"; + public static final String CR_MDMS_PLACETYPE_CODE_JSONPATH = "$.MdmsRes.birth-death-service.MarriagePlaceType[*].code"; + public static final String CR_MDMS_PLACE_TYPE_JSONPATH = "$.MdmsRes.birth-death-service.MarriagePlaceType"; //mdms path codes public static final String COMMON_MASTER_JSONPATH = "$.MdmsRes.common-masters"; @@ -206,4 +206,11 @@ public class MarriageConstants { public static final String CR_MDMS_BOUNDARY_CODE_JSONPATH = "$.MdmsRes.egov-location.TenantBoundary[*].boundary.children[*].children[*].code"; public static final String CR_MDMS_BOUNDARY_CODES_JSONPATH = "$.MdmsRes.egov-location.TenantBoundary[*].boundary.children[*].children[*]"; + + public static final String CR_MDMS_LBTYPE_CODE_JSONPATH = "$.MdmsRes.common-masters.LBType[*].code"; + public static final String CR_MDMS_LBTYPE_JSONPATH = "$.MdmsRes.common-masters.LBType"; + + public static final String CR_MDMS_PLACEID_CODE_JSONPATH = "$.MdmsRes.egov-location.MarriagePlace[*].code"; + public static final String CR_MDMS_PLACEID_JSONPATH = "$.MdmsRes.egov-location.MarriagePlace[*]"; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 199c835465d..386b61d8603 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -883,7 +883,11 @@ private ModuleDetail getCommonMastersSearch() { //VILLAGE crMarriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.VILLAGE) - .build()); + .build()); + //LBTYPE + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.LBTYPE) + .build()); ModuleDetail crMarriageModuleDtls = ModuleDetail.builder().masterDetails(crMarriageMasterDetails) .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); @@ -1065,6 +1069,11 @@ public List getBoundaryDetails() { .build()); crMasterDetails.addAll(masterBoundary); + List masterMarriagePlace = Collections.singletonList(MasterDetail.builder() + .name(MarriageConstants.MARRIAGE_PLACE) + .build()); + crMasterDetails.addAll(masterMarriagePlace); + ModuleDetail crModuleDetail = ModuleDetail.builder() .masterDetails(crMasterDetails) .moduleName(MarriageConstants.TENANT_EGOV_LOCATION) @@ -1096,16 +1105,63 @@ public String getWardNameMl(Object mdmsData, String WardId) { return names.get(index); } - public String getPlaceTypeNameEn(Object mdmsData, String WardId) { - List tenants = getBoundaryCode(mdmsData); - int index = tenants.indexOf(WardId); - ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".localname"); + public String getPlaceTypeNameEn(Object mdmsData, String placetype) { + List tenants = getPlaceTypeCode(mdmsData); + int index = tenants.indexOf(placetype); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACE_TYPE_JSONPATH+"["+index+"].name"); + } + public String getPlaceTypeNameMl(Object mdmsData, String placetype) { + List tenants = getPlaceTypeCode(mdmsData); + int index = tenants.indexOf(placetype); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACE_TYPE_JSONPATH+"["+index+"].namelocal"); + } + + public String getMarriageTypeEn(Object mdmsData, String marriageType) { + List tenants = getMarriageTypeCode(mdmsData); + int index = tenants.indexOf(marriageType); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TYPE_JSONPATH+"["+index+"].name"); + } + public String getMarriageTypeMl(Object mdmsData, String marriageType) { + List tenants = getMarriageTypeCode(mdmsData); + int index = tenants.indexOf(marriageType); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TYPE_JSONPATH+"["+index+"].namelocal"); + } + + public String getMarriagePlaceIdEn(Object mdmsData, String placeId) { + List tenants = getPlaceIdCode(mdmsData); + int index = tenants.indexOf(placeId); + ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACEID_JSONPATH+".name"); return names.get(index); } - public String getPlaceTypeNameMl(Object mdmsData, String WardId) { - List tenants = getBoundaryCode(mdmsData); - int index = tenants.indexOf(WardId); - ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".localname"); + public String getMarriagePlaceIdMl(Object mdmsData, String placeId) { + List tenants = getPlaceIdCode(mdmsData); + int index = tenants.indexOf(placeId); + ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACEID_JSONPATH+".nameLocal"); return names.get(index); } + + public String getMarriageLbtypeEn(Object mdmsData, String Lbtype) { + List tenants = getLBTypeCode(mdmsData); + int index = tenants.indexOf(Lbtype); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].name"); + } + public String getMarriageLbtypeMl(Object mdmsData, String Lbtype) { + List tenants = getLBTypeCode(mdmsData); + int index = tenants.indexOf(Lbtype); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].namelocal"); + } + + + private List getLBTypeCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_CODE_JSONPATH); + } + private List getPlaceTypeCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACETYPE_CODE_JSONPATH); + } + private List getMarriageTypeCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGETYPE_CODE_JSONPATH); + } + private List getPlaceIdCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACEID_CODE_JSONPATH); + } } \ No newline at end of file From 39e5e2c39717ed8e44a15561feb016b7812902e7 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Fri, 5 May 2023 12:46:52 +0530 Subject: [PATCH 283/420] conflict resolved --- .../querybuilder/CorrectionApplicationQueryBuilder.java | 2 +- .../repository/rowmapper/CorrectionApplicationRowMapper.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/querybuilder/CorrectionApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/querybuilder/CorrectionApplicationQueryBuilder.java index 126044fdecd..8e44f9132cb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/querybuilder/CorrectionApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/querybuilder/CorrectionApplicationQueryBuilder.java @@ -14,7 +14,7 @@ public class CorrectionApplicationQueryBuilder extends BaseMarriageQueryBuilder{ private static final String CORRECTION_QUERY = new StringBuilder() - .append("select md.id as md_id, md.tenantid as md_tenantid,md.applicationtype as md_applicationtype, md.businessservice as md_businessservice, md.workflowcode as md_workflowcode, md.applicationnumber as md_applicationnumber, md.registrationno as md_registrationno, md.registration_date as md_registration_date, md.action as md_action, md.status as md_status,md.createdtime as md_createdtime, md.createdby as md_createdby, md.lastmodifiedtime as md_lastmodifiedtime, md.lastmodifiedby as md_lastmodifiedby, ") + .append("select md.id as md_id, md.tenantid as md_tenantid,md.applicationtype as md_applicationtype, md.businessservice as md_businessservice, md.workflowcode as md_workflowcode, md.applicationnumber as md_applicationnumber, md.dateofreporting as md_dateofreporting, md.registrationno as md_registrationno, md.registration_date as md_registration_date, md.action as md_action, md.status as md_status,md.createdtime as md_createdtime, md.createdby as md_createdby, md.lastmodifiedtime as md_lastmodifiedtime, md.lastmodifiedby as md_lastmodifiedby, ") .append("cor.id as cor_id, cor.marriageid as cor_marriageid, cor.correction_field_name as cor_correction_field_name, cor.condition_code as cor_condition_code, cor.specific_condition as cor_specific_condition, ") .append("corch.id as ch_id, corch.marriageid as ch_marriageid, corch.correctionid as ch_correctionid, corch.correction_field_name as ch_correction_field_name, corch.table_name as ch_table_name, corch.column_name as ch_column_name, corch.old_value as ch_old_value, corch.new_value as ch_new_value, corch.column_ as ch_column_, ") .append("cordoc.id as doc_id, cordoc.document_name as doc_document_name, cordoc.document_type as doc_document_type, cordoc.document_description as doc_document_description, cordoc.filestoreid as doc_filestoreid, cordoc.document_link as doc_document_link, cordoc.marriageid as doc_marriageid, cordoc.active as doc_active, cordoc.correction_id as doc_correction_id, cordoc.correction_field_name as doc_correction_field_name ") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/rowmapper/CorrectionApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/rowmapper/CorrectionApplicationRowMapper.java index a5eedb8d49c..6ae5c4c2da0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/rowmapper/CorrectionApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/repository/rowmapper/CorrectionApplicationRowMapper.java @@ -46,6 +46,7 @@ public List extractData(ResultSet rs) throws SQLExcep .businessservice(rs.getString("md_businessservice")) .businessservice(rs.getString("md_workflowcode")) .applicationNo(rs.getString("md_applicationnumber")) + .applicationDate(rs.getLong("md_dateofreporting")) .registrationno(rs.getString("md_registrationno")) .registrationDate(rs.getLong("md_registration_date")) .action(rs.getString("md_action")) From 49501672b9d8b48e0ccbbcd6d7456ebd659db713 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Fri, 5 May 2023 16:06:04 +0530 Subject: [PATCH 284/420] marriage search - tenantId ML and En --- .../MarriageApplicationRepository.java | 42 ++++++++++++++++++- .../web/model/MarriageApplicationDetails.java | 6 +++ .../model/marriage/BrideAddressDetails.java | 8 +++- .../model/marriage/GroomAddressDetails.java | 6 +++ .../service/MarriageCorrectionService.java | 3 +- .../marriage/utils/MarriageMdmsUtil.java | 14 ++++++- 6 files changed, 74 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 2c72c04a1c1..2a84da92887 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -464,8 +464,46 @@ public List searchMarriageDetails(MarriageApplicatio String marriageTypeMl = util.getMarriageTypeMl(mdmsData, marriage.getMarriageType()); marriage.setMarriageTypeMl(marriageTypeMl); } - - + //Marriage TenantId name + if (marriage.getTenantid() != null) { + String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getTenantid()); + marriage.setMarriageTenantIdEn(tenantIdEn); + + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getTenantid()); + marriage.setMarriageTenantIdMl(tenantIdMl); + } + //Groom Present Address TenantId name + if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { + String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); + + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); + } + //Groom Permanent Address TenantId name + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { + String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); + + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); + } + //Bride Present Address TenantId name + if (marriage.getBrideAddressDetails().getPresentInsideKeralaLBName() != null) { + String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaLBName()); + marriage.getBrideAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); + + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaLBName()); + marriage.getBrideAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); + } + //Bride Permanent Address TenantId name + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName() != null) { + String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); + + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); + } //WARD DETAILS-MDMS Location Call Object mdmsDataLocation = util.mdmsCallForLocation(requestInfo, marriage.getTenantid()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 504f7daa794..526a3caa8ee 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -44,6 +44,12 @@ public class MarriageApplicationDetails { @JsonProperty("marriageTenantid") private String tenantid; + @JsonProperty("marriageTenantIdEn") + private String marriageTenantIdEn; + + @JsonProperty("marriageTenantIdMl") + private String marriageTenantIdMl; + @Size(max = 64) @JsonProperty("marriagePlacetype") private String placetype; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index b879687e269..2ac8ba8774c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -667,6 +667,12 @@ public class BrideAddressDetails { private String presentInsideKeralaLBNameEn; @JsonProperty("presentInsideKeralaLBNameMl") - private String presentInsideKeralaLBNameMl; + private String presentInsideKeralaLBNameMl; + + @JsonProperty("permntInKeralaAdrLBNameEn") + private String permntInKeralaAdrLBNameEn; + + @JsonProperty("permntInKeralaAdrLBNameMl") + private String permntInKeralaAdrLBNameMl; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 3ed6f2a2dff..691cc1c012d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -667,4 +667,10 @@ public class GroomAddressDetails { @JsonProperty("presentInsideKeralaLBNameMl") private String presentInsideKeralaLBNameMl; + + @JsonProperty("permntInKeralaAdrLBNameEn") + private String permntInKeralaAdrLBNameEn; + + @JsonProperty("permntInKeralaAdrLBNameMl") + private String permntInKeralaAdrLBNameMl; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 4c49a40fbe3..b665f6f9d6d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -197,7 +197,8 @@ public List updateMarriageCorrectionDetails(MarriageC return request.getMarriageCorrectionDetails(); } public List searchCorrectionApplinDetails(MarriageCorrectionRequest request,MarriageApplicationSearchCriteria criteria) { - return applicationRepository.getMarriageApplication(criteria,request.getRequestInfo()); + //return applicationRepository.getMarriageApplication(criteria,request.getRequestInfo()); + return applicationRepository.searchMarriageDetails(criteria,request.getRequestInfo()); } public List searchCorrectionDetails(String marriageId) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 386b61d8603..035322c9951 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -1150,7 +1150,16 @@ public String getMarriageLbtypeMl(Object mdmsData, String Lbtype) { int index = tenants.indexOf(Lbtype); return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].namelocal"); } - + public String getMarriageTenantEn(Object mdmsData, String tenantId) { + List tenants = getTenantIdCode(mdmsData); + int index = tenants.indexOf(tenantId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.name"); + } + public String getMarriageTenantMl(Object mdmsData, String tenantId) { + List tenants = getTenantIdCode(mdmsData); + int index = tenants.indexOf(tenantId); + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.localName"); + } private List getLBTypeCode(Object mdmsData) { return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_CODE_JSONPATH); @@ -1164,4 +1173,7 @@ private List getMarriageTypeCode(Object mdmsData) { private List getPlaceIdCode(Object mdmsData) { return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACEID_CODE_JSONPATH); } + private List getTenantIdCode(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH); + } } \ No newline at end of file From f22fb2b442e2e7c948154d2ac13137b2ba1af98b Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 6 May 2023 11:51:32 +0530 Subject: [PATCH 285/420] seach --- .../MarriageApplicationRepository.java | 713 ++++++++---------- .../BrideAddressDetailsRowMapper.java | 93 +-- .../model/marriage/BrideAddressDetails.java | 3 + 3 files changed, 366 insertions(+), 443 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 2c72c04a1c1..5b67e2676ce 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -69,345 +69,11 @@ public List searchMarriageDetails(MarriageApplicatio List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); if (result != null) { result.forEach(marriage -> { - //Jasmine 03.05.2023 - MDMS for Summery Page - +//Jasmine 03.05.2023 - MDMS for Summery Page Object mdmsData = util.mDMSSearch(requestInfo, marriage.getTenantid()); + //WARD DETAILS-MDMS Location Call + Object mdmsDataLocation = util.mdmsCallForLocation(requestInfo, marriage.getTenantid()); - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //presentaddressCountry - if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { - String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - - String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); - } - //presentOutSideCountry - if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { - String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); - marriage.getBrideAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); - - String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); - marriage.getBrideAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); - } - //permtaddressCountry - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //permntOutsideIndiaCountry - if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { - String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); - - String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); - } - //presentaddressStateName - if (marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { - String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressStateName()); - marriage.getBrideAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); - - String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressStateName()); - marriage.getBrideAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); - } - //permtaddressStateName - if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { - String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - - String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); - } - if (marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict() != null) { - String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getBrideAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); - - String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getBrideAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); - } - //presentOutsideKeralaDistrict - if (marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict() != null) { - String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); - marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); - - String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); - marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); - } - //permntInKeralaAdrDistrict - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null) { - String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); - - String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); - } - //permntOutsideKeralaDistrict - if (marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { - String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); - - String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); - } - //presentInsideKeralaTaluk - if (marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk() != null) { - String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); - marriage.getBrideAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); - - String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); - marriage.getBrideAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); - } - //presentOutsideKeralaTaluk - if (marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName() != null) { - String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukEn(presentOutsideKeralaTalukEn); - - String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukMl(presentOutsideKeralaTalukMl); - } - //permntInKeralaAdrTaluk - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null) { - String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); - - String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); - } - //permntOutsideKeralaTaluk - if (marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk() != null) { - String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukEn(prmtOutKeralaTalukEn); - - String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukMl(prmtOutKeralaTalukMl); - } - //presentInsideKeralaVillage - if (marriage.getBrideAddressDetails().getPresentInsideKeralaVillage() != null) { - String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukEn(presntInsKeralaVillageEn); - - String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaTalukMl(presntInsKeralaVillageMl); - } - //presentOutsideKeralaVillage - if (marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName() != null) { - String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageEn(presntOutKeralaVillageEn); - - String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageMl(presntOutKeralaVillageMl); - } - //permntInKeralaAdrVillage - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage() != null) { - String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); - - String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); - } - //permntOutsideKeralaVillage - if (marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage() != null) { - String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageEn(permntOutsideKeralaVillageEn); - - String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageMl(permntOutsideKeralaVillageMl); - } - //presentInsideKeralaPostOffice - if (marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice() != null) { - String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); - marriage.getBrideAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); - - String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); - marriage.getBrideAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); - } - //permntInKeralaAdrPostOffice - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null) { - String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); - - String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); - } - //GROOM DETAILS - if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //presentaddressCountry - if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { - String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); - marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - - String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); - marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); - } - //presentOutSideCountry - if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { - String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutSideCountry()); - marriage.getGroomAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); - - String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutSideCountry()); - marriage.getGroomAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); - } - //permtaddressCountry - if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //permntOutsideIndiaCountry - if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { - String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getGroomAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); - - String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getGroomAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); - } - //presentaddressStateName - if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { - String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); - marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); - - String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); - marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); - } - //permtaddressStateName - if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { - String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - - String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); - } - if (marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null) { - String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); - - String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); - } - //presentOutsideKeralaDistrict - if (marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null) { - String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); - - String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); - } - //permntInKeralaAdrDistrict - if (marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null) { - String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); - - String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); - } - //permntOutsideKeralaDistrict - if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { - String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); - - String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); - } - //presentInsideKeralaTaluk - if (marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null) { - String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); - marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); - - String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); - marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); - } - //presentOutsideKeralaTaluk - if (marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName() != null) { - String presentOutsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukEn(presentOutsideKeralaTalukEn); - - String presentOutsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukMl(presentOutsideKeralaTalukMl); - } - //permntInKeralaAdrTaluk - if (marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null) { - String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); - - String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); - } - //permntOutsideKeralaTaluk - if (marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk() != null) { - String prmtOutKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(prmtOutKeralaTalukEn); - - String prmtOutKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(prmtOutKeralaTalukMl); - } - //presentInsideKeralaVillage - if (marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { - String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukEn(presntInsKeralaVillageEn); - - String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTalukMl(presntInsKeralaVillageMl); - } - //presentOutsideKeralaVillage - if (marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName() != null) { - String presntOutKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageEn(presntOutKeralaVillageEn); - - String presntOutKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageMl(presntOutKeralaVillageMl); - } - //permntInKeralaAdrVillage - if (marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { - String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); - - String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); - } - //permntOutsideKeralaVillage - if (marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage() != null) { - String permntOutsideKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageEn(permntOutsideKeralaVillageEn); - - String permntOutsideKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageMl(permntOutsideKeralaVillageMl); - } - //presentInsideKeralaPostOffice - if (marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null) { - String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); - marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); - - String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); - marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); - } - //permntInKeralaAdrPostOffice - if (marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { - String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); - - String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); - } - - // Marriage Details // Marriage DistrictId if (marriage.getDistrictid() != null) { String marriageDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getDistrictid()); @@ -464,12 +130,6 @@ public List searchMarriageDetails(MarriageApplicatio String marriageTypeMl = util.getMarriageTypeMl(mdmsData, marriage.getMarriageType()); marriage.setMarriageTypeMl(marriageTypeMl); } - - - - //WARD DETAILS-MDMS Location Call - Object mdmsDataLocation = util.mdmsCallForLocation(requestInfo, marriage.getTenantid()); - //Marriage WardCode if (marriage.getWardCode() != null) { String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); @@ -486,61 +146,318 @@ public List searchMarriageDetails(MarriageApplicatio String marriagePlaceIdMl = util.getMarriagePlaceIdMl(mdmsDataLocation, marriage.getPlaceid()); marriage.setMarriagePlaceIdMl(marriagePlaceIdMl); } - - //presentWardNo - if (marriage.getBrideAddressDetails().getPresentWardNo() != null) { - String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPresentWardNo()); - marriage.getBrideAddressDetails().setPresentWardNoEn(presentWardNoEn); - - String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPresentWardNo()); - marriage.getBrideAddressDetails().setPresentWardNoMl(presentWardNoMl); - } - //permntInKeralaWardNo - if (marriage.getBrideAddressDetails().getPermntInKeralaWardNo() != null) { - String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); - marriage.getBrideAddressDetails().setPrmttWardNoEn(prmttWardNoEn); - - String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); - marriage.getBrideAddressDetails().setPrmttWardNoMl(prmttWardNoMl); - } -// //Marriage WardCode -// if (marriage.getWardCode() != null) { -// String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); -// marriage.getBrideAddressDetails().setPresentWardNoEn(marriageWardCodeEn); -// -// String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); -// marriage.getBrideAddressDetails().setPresentWardNoMl(marriageWardCodeMl); -// } - if (marriage.getGroomAddressDetails().getPresentWardNo() != null) { - String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); - marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); - - String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); - marriage.getGroomAddressDetails().setPresentWardNoMl(presentWardNoMl); - } - //permntInKeralaWardNo - if (marriage.getGroomAddressDetails().getPermntInKeralaWardNo() != null) { - String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); - marriage.getGroomAddressDetails().setPrmttWardNoEn(prmttWardNoEn); - - String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); - marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); - } -// //Marriage WardCode -// if (marriage.getWardCode() != null) { -// String marriageWardCodeEn = util.getWardNameEn(mdmsDataLocation, marriage.getWardCode()); -// marriage.getGroomAddressDetails().setPresentWardNoEn(marriageWardCodeEn); -// -// String marriageWardCodeMl = util.getWardNameMl(mdmsDataLocation, marriage.getWardCode()); -// marriage.getGroomAddressDetails().setPresentWardNoMl(marriageWardCodeMl); -// } - // if(marriage.getPlacetype() != null){ - // String MarriagePlaceTypeNameEn = util.getPlaceTypeNameEn(mdmsData,marriage.getPlacetype()); - // marriage.setMarriagePlaceTypenameEn(MarriagePlaceTypeNameEn); - - // String MarriagePlaceTypeNameMl = util.getPlaceTypeNameMl(mdmsData, marriage.getPlacetype()); - // marriage.setMarriagePlaceTypenameMl(MarriagePlaceTypeNameMl); - // } +//PRESENT ADDRESS DETAILS -BRIDE +System.out.println("InsideCountry and state!=null"+marriage.getBrideAddressDetails().getCountryIdPresent()); +System.out.println("InsideCountry and state!=null"+marriage.getBrideAddressDetails().getStateIdPresent()); + if (marriage.getBrideAddressDetails().getCountryIdPresent()!=null && marriage.getBrideAddressDetails().getStateIdPresent()!=null){ + //INSIDE INDIA + System.out.println("InsideCountry and state!=null"); + if (marriage.getBrideAddressDetails().getCountryIdPresent().equals(MarriageConstants.COUNTRY_CODE)){ + System.out.println("InsideCountry!=null"+marriage.getBrideAddressDetails().getCountryIdPresent()); + //INSIDE KERALA-PRESENT + if (marriage.getBrideAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)){ + System.out.println("Insidestate!=null"+marriage.getBrideAddressDetails().getStateIdPresent()); + //PRESENT-INSIDE INDIA-INSIDE KERALA + marriage.getBrideAddressDetails().setPresentaddressCountry(marriage.getBrideAddressDetails().getCountryIdPresent()); + + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + } + //PRESENT-STATE + marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); + if (marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { + String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressStateName()); + marriage.getBrideAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressStateName()); + marriage.getBrideAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + } + //PRESENT-DISTRICT + marriage.getBrideAddressDetails().setPresentInsideKeralaDistrict(marriage.getBrideAddressDetails().getDistrictIdPresent()); + if (marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict() != null) { + String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); + + String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); + } + // PRESENT-TALUK + + if (marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk() != null) { + String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); + + String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getBrideAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); + } + //PRESENT-VILLAGE + if (marriage.getBrideAddressDetails().getPresentInsideKeralaVillage() != null) { + String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); + marriage.getBrideAddressDetails().setPresentInsideKeralaVillageEn(presntInsKeralaVillageEn); + + String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaVillage()); + marriage.getBrideAddressDetails().setPresentInsideKeralaVillageMl(presntInsKeralaVillageMl); + } + //PRESENT -WARD + if (marriage.getBrideAddressDetails().getPresentWardNo() != null) { + String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPresentWardNo()); + marriage.getBrideAddressDetails().setPresentWardNoEn(presentWardNoEn); + + String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPresentWardNo()); + marriage.getBrideAddressDetails().setPresentWardNoMl(presentWardNoMl); + } + //PRESENT-POST OFFICE + if (marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice() != null) { + String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getBrideAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); + + String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getBrideAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); + } + + marriage.getBrideAddressDetails().setPresentInsideKeralaLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPresent()); + marriage.getBrideAddressDetails().setPresentInsideKeralaLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPresent()); + + marriage.getBrideAddressDetails().setPresentInsideKeralaStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPresent()); + marriage.getBrideAddressDetails().setPresentInsideKeralaStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPresent()); + + marriage.getBrideAddressDetails().setPresentInsideKeralaHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPresent()); + marriage.getBrideAddressDetails().setPresentInsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPresent()); + + marriage.getBrideAddressDetails().setPresentInsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPresent()); + + + } + //OUTSIDE KERALA-PRESENT + else{ + //PRESENT-COUNTRY + marriage.getBrideAddressDetails().setPresentaddressCountry(marriage.getBrideAddressDetails().getCountryIdPresent()); + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + } + //PRESENT-STATE + marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); + if (marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { + String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressStateName()); + marriage.getBrideAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressStateName()); + marriage.getBrideAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + } + + //PRESENT-OUTSIDE KERALA-DISTRICT + marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrict(marriage.getBrideAddressDetails().getDistrictIdPresent()); + if (marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict() != null) { + String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); + + String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); + } + + marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageName(marriage.getBrideAddressDetails().getVillageNamePresent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + + marriage.getBrideAddressDetails().setPresentOutsideKeralaLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPresent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPresent()); + + marriage.getBrideAddressDetails().setPresentOutsideKeralaStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPresent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPresent()); + + marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPresent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPresent()); + + marriage.getBrideAddressDetails().setPresentOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPresent()); + + } + } + //OUTSIDE INDIA + else{ + //PRESENT-OUTSIDE COUNTRY + marriage.getBrideAddressDetails().setPresentOutSideCountry(marriage.getBrideAddressDetails().getCountryIdPresent()); + if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { + String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); + + String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); + marriage.getBrideAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); + } + marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getVillageNamePresent()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePresent()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEn()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMl()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEnB()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMlB()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); + } + } + // PERMANENT ADDRESS DETAILS -BRIDE + if (marriage.getBrideAddressDetails().getCountryIdPermanent()!=null && marriage.getBrideAddressDetails().getStateIdPermanent()!=null){ + //INSIDE INDIA + if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)){ + //INSIDE KERALA-PERMANENT + if (marriage.getBrideAddressDetails().getStateIdPermanent().equals(MarriageConstants.STATE_CODE_SMALL)){ + //PERMANENT-COUNTRY + marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //PERMANENT-STATE + marriage.getBrideAddressDetails().setPermtaddressStateName(marriage.getBrideAddressDetails().getStateIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { + String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); + } + //PERMANENT-DISTRICT + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrict(marriage.getBrideAddressDetails().getDistrictIdPermanent()); + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null) { + String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); + + String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); + } + //PERMANENT-TALUK + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null) { + String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); + + String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); + } + //PERMANENT-VILLAGE + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage() != null) { + String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); + + String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); + } + //PERMANENT-POSTOFFICE + marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOffice(marriage.getBrideAddressDetails().getPoNoPermanent()); + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); + + String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); + } + //PERMANENT-WARD + if (marriage.getBrideAddressDetails().getPermntInKeralaWardNo() != null) { + String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriage.getBrideAddressDetails().setPrmttWardNoEn(prmttWardNoEn); + + String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriage.getBrideAddressDetails().setPrmttWardNoMl(prmttWardNoMl); + } + marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); + + marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); + + marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); + + marriage.getBrideAddressDetails().setPermntInKeralaAdrPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); + + } + //PERMANENT-INSIDE INDIA-OUTSIDE KERALA + else{ + //PERMANENT-COUNTRY + marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //PERMANENT-STATE + marriage.getBrideAddressDetails().setPermtaddressStateName(marriage.getBrideAddressDetails().getStateIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //PERMANENT-DISTRICT + if (marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + } + marriage.getBrideAddressDetails().setPermntOutsideKeralaVillage(marriage.getBrideAddressDetails().getVillageNamePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + + marriage.getBrideAddressDetails().setPermntOutsideKeralaLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); + + marriage.getBrideAddressDetails().setPresentOutsideKeralaStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); + + marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); + + marriage.getBrideAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); + + marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPinNoPermanent()); + + } + } + //PERMANENT-OUTSIDE INDIA + else{ + + if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + + String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + } + marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getVillageNamePermanent()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePermanent()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceEn()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceMl()); + + } + } GroomDetails groomDetails = marriage.getGroomDetails(); GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index dcc7fe05013..6a2e361edac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -17,42 +17,43 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .stateIdPresent(rs.getString("BPSA_stateid")) .districtIdPresent(rs.getString("BPSA_districtid")) .poNoPresent(rs.getString("BPSA_poid")) - .presentaddressCountry(rs.getString("GPMA_countryid")) + .pinNoPresent(rs.getString("BPSA_pinno")) + // .presentaddressCountry(rs.getString("GPMA_countryid")) .localityEnPresent(rs.getString("BPSA_locality_en")) .localityMlPresent(rs.getString("BPSA_locality_ml")) .streetNameEnPresent(rs.getString("BPSA_street_name_en")) .streetNameMlPresent(rs.getString("BPSA_street_name_ml")) .houseNameNoEnPresent(rs.getString("BPSA_housename_en")) .houseNameNoMlPresent(rs.getString("BPSA_housename_ml")) - .villageNamePresent(rs.getString("BPSA_village_name")) - .presentUuid(rs.getString("BPSA_id")) - .presentaddressCountry(rs.getString("BPSA_countryid")) - .presentaddressStateName(rs.getString("BPSA_stateid")) - .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) - .presentInsideKeralaDistrict(rs.getString("BPSA_districtid")) .presentInsideKeralaTaluk(rs.getString("BPSA_talukid")) .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) - .presentInsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) - .presentInsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) - .presentInsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) - .presentInsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) - .presentInsideKeralaStreetNameMl(rs.getString("BPSA_street_name_ml")) - .presentInsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) - .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) + .villageNamePresent(rs.getString("BPSA_village_name")) + .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) + .presentUuid(rs.getString("BPSA_id")) + // .presentaddressCountry(rs.getString("BPSA_countryid")) + // .presentaddressStateName(rs.getString("BPSA_stateid")) + // .presentInsideKeralaDistrict(rs.getString("BPSA_districtid")) + // .presentInsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) + // .presentInsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) + // .presentInsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) + // .presentInsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) + // .presentInsideKeralaStreetNameMl(rs.getString("BPSA_street_name_ml")) + // .presentInsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) + // .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) .presentWardNo(rs.getString("BPSA_ward_code")) - .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) + // .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) - // .presentOutsideKeralaCityVilgeEn(rs.getString("BPSA_village_name ")) - .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) + .presentOutsideKeralaCityVilgeEn(rs.getString("BPSA_village_name")) + // .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) - .presentOutsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) - .presentOutsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) - .presentOutsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) - .presentOutsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) - .presentOutsideKeralaStreetNameMl(rs.getString("BPSA_street_name_en")) - .presentOutsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) + // .presentOutsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) + // .presentOutsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) + // .presentOutsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) + // .presentOutsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) + // .presentOutsideKeralaStreetNameMl(rs.getString("BPSA_street_name_en")) + // .presentOutsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) @@ -68,40 +69,42 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .stateIdPermanent(rs.getString("BPMA_stateid")) .districtIdPermanent(rs.getString("BPMA_districtid")) .poNoPermanent(rs.getString("BPMA_poid")) + .pinNoPermanent(rs.getString("BPMA_pinno")) .localityEnPermanent(rs.getString("BPMA_locality_en")) .localityMlPermanent(rs.getString("BPMA_locality_ml")) .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) + //.streetNameEnPermanent(rs.getString("BPMA_housename_en")) .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) .villageNamePermanent(rs.getString("BPMA_village_name")) .permanentUuid(rs.getString("BPMA_id")) - .permtaddressCountry(rs.getString("BPMA_countryid")) - .permtaddressStateName(rs.getString("BPMA_stateid")) - .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) - .permntInKeralaAdrDistrict(rs.getString("BPMA_districtid")) - // .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name ")) + // .permtaddressCountry(rs.getString("BPMA_countryid")) + // .permtaddressStateName(rs.getString("BPMA_stateid")) + .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + // .permntInKeralaAdrDistrict(rs.getString("BPMA_districtid")) + .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name")) .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) - .permntInKeralaAdrLocalityNameEn(rs.getString("BPMA_locality_en")) - .permntInKeralaAdrStreetNameEn(rs.getString("BPMA_street_name_en")) - .permntInKeralaAdrHouseNameEn(rs.getString("BPMA_housename_en")) - .permntInKeralaAdrLocalityNameMl(rs.getString("BPMA_locality_en")) - .permntInKeralaAdrStreetNameMl(rs.getString("BPMA_street_name_ml")) - .permntInKeralaAdrHouseNameMl(rs.getString("BPMA_housename_ml")) - .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) + // .permntInKeralaAdrLocalityNameEn(rs.getString("BPMA_locality_en")) + // .permntInKeralaAdrStreetNameEn(rs.getString("BPMA_street_name_en")) + // .permntInKeralaAdrHouseNameEn(rs.getString("BPMA_housename_en")) + // .permntInKeralaAdrLocalityNameMl(rs.getString("BPMA_locality_en")) + // .permntInKeralaAdrStreetNameMl(rs.getString("BPMA_street_name_ml")) + // .permntInKeralaAdrHouseNameMl(rs.getString("BPMA_housename_ml")) + // .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) - .permntOutsideKeralaDistrict(rs.getString("BPMA_districtid")) - .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) - //.permntOutsideKeralaVillage(rs.getString("BPMA_village_name")) - .permntOutsideKeralaPincode(rs.getString("BPMA_pinno")) - .permntOutsideKeralaLocalityNameEn(rs.getString("BPMA_locality_en")) - .permntOutsideKeralaStreetNameEn(rs.getString("BPMA_street_name_en")) - .permntOutsideKeralaHouseNameEn(rs.getString("BPMA_housename_en")) - .permntOutsideKeralaLocalityNameMl(rs.getString("BPMA_locality_en")) - .permntOutsideKeralaStreetNameMl(rs.getString("BPMA_street_name_ml")) - .permntOutsideKeralaHouseNameMl(rs.getString("BPMA_housename_ml")) + // .permntOutsideKeralaDistrict(rs.getString("BPMA_districtid")) + // .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) + //* */.permntOutsideKeralaVillage(rs.getString("BPMA_village_name")) + //.permntOutsideKeralaPincode(rs.getString("BPMA_pinno")) + // .permntOutsideKeralaLocalityNameEn(rs.getString("BPMA_locality_en")) + // .permntOutsideKeralaStreetNameEn(rs.getString("BPMA_street_name_en")) + // .permntOutsideKeralaHouseNameEn(rs.getString("BPMA_housename_en")) + // .permntOutsideKeralaLocalityNameMl(rs.getString("BPMA_locality_en")) + // .permntOutsideKeralaStreetNameMl(rs.getString("BPMA_street_name_ml")) + // .permntOutsideKeralaHouseNameMl(rs.getString("BPMA_housename_ml")) .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index b879687e269..d538f4ac3bf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -217,6 +217,7 @@ public class BrideAddressDetails { @Size(max = 1000) @JsonProperty("villageNamePresent") private String villageNamePresent; + @Size(max = 1000) @JsonProperty("townOrVillagePresent") private String townOrVillagePresent; @@ -228,9 +229,11 @@ public class BrideAddressDetails { @Size(max = 1000) @JsonProperty("presentOthrTalukName") private String presentOthrTalukName; + @Size(max = 64) @JsonProperty("presentOthPostOfficeEn") private String presentOthPostOfficeEn; + @Size(max = 64) @JsonProperty("brideGroomPresent") private String brideGroomPresent; From 4b37f34b7705f0d2935742bbb239288bce6944e4 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 6 May 2023 12:01:40 +0530 Subject: [PATCH 286/420] error fix --- .../enrichment/MarriageDetailsEnrichment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 33c321f83a1..e7a8392e09e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -264,7 +264,7 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { if (marriage.getGroomAddressDetails().getIsPermanentAddress()) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); - if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); @@ -447,7 +447,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); - if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); if (marriage.getBrideAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); From f5cd558a164e429c30f607dea70b82d8abb5b3c8 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 6 May 2023 13:08:28 +0530 Subject: [PATCH 287/420] error fix --- .../enrichment/MarriageDetailsEnrichment.java | 186 ++++++++---------- 1 file changed, 79 insertions(+), 107 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index e7a8392e09e..962e6cbf0c9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -252,97 +252,82 @@ else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ } private void setGroomPresentAddress(MarriageDetailsRequest request) { request.getMarriageDetails() - .forEach(marriage ->{ - if (marriage.getGroomAddressDetails()!=null) { - - marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); - marriage.getGroomAddressDetails().setBrideGroomPresent("G"); - } + .forEach(marriage -> { + if (marriage.getGroomAddressDetails() != null) { + if (marriage.getGroomAddressDetails() != null) { - if (marriage.getGroomAddressDetails() != null && marriage.getGroomAddressDetails().getIsPermanentAddress() != null) { - marriage.getGroomAddressDetails().setIsPermanentAddressInt(marriage.getGroomAddressDetails().getIsPermanentAddress() == true ? 1 : 0); - if (marriage.getGroomAddressDetails().getIsPermanentAddress()) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); - marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); - if (marriage.getGroomAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { - marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); + marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPresent("G"); } - } - } - if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getGroomAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); - marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); - } - marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { + if (marriage.getGroomAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameEn()); - marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameMl()); + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); - marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameEn()); - marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameMl()); + marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameEn()); - marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameMl()); + marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameMl()); - marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); - marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameMl()); - marriage.getGroomAddressDetails().setPresentAddrVillageId(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameMl()); + marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); + marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setPresentAddrVillageId(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); - } else { - if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); - marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); - } - marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + } else { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameEn()); - marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameMl()); + marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameMl()); - marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameEn()); - marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameMl()); + marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameMl()); - marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameEn()); - marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameMl()); + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameMl()); - marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaPincode()); + marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaPincode()); - marriage.getGroomAddressDetails().setPresentOthrTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); + marriage.getGroomAddressDetails().setPresentOthrTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); - } - } - } else { -// if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); - marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + } + } + }else { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaPostCode()); - marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaPostCode()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); + + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); + + } - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); - marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); - marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); -// } } - } }); } private void setGroomPermanentAddress(MarriageDetailsRequest request) { @@ -381,6 +366,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); marriage.getGroomAddressDetails().setPoNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); } + else { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); @@ -441,49 +427,36 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); marriage.getBrideAddressDetails().setBrideGroomPresent("B"); } - - if (marriage.getBrideAddressDetails() != null && marriage.getBrideAddressDetails().getIsPermanentAddress() != null) { - marriage.getBrideAddressDetails().setIsPermanentAddressInt(marriage.getBrideAddressDetails().getIsPermanentAddress() == true ? 1 : 0); - if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); - marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); - if (marriage.getBrideAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - if (marriage.getBrideAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { - marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); - - } - } - } + if (marriage.getBrideAddressDetails()!=null) { if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { if (marriage.getBrideAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { + + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); - } - marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameEn()); - marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameMl()); + marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameEn()); - marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameMl()); + marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameMl()); - marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameEn()); - marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameMl()); + marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameMl()); - marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); - marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameMl()); + + marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); + marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); } else { - if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); - } + marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaLocalityNameEn()); @@ -506,28 +479,27 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } } - } else { -// if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + } else { + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); - marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); - marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); - marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); -// } - } + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); + } } + }); } From d8506f4693aba572687a7ca1813f5b599d4547dd Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 6 May 2023 13:12:26 +0530 Subject: [PATCH 288/420] seach --- .../MarriageApplicationRepository.java | 359 ++++++++++++++++-- .../BrideAddressDetailsRowMapper.java | 2 +- .../MarriageApplicationValidator.java | 8 +- .../model/marriage/BrideAddressDetails.java | 4 +- 4 files changed, 343 insertions(+), 30 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 82a48a3670c..977ec99eda1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -248,7 +248,7 @@ public List searchMarriageDetails(MarriageApplicatio } - //OUTSIDE KERALA-PRESENT + //OUTSIDE KERALA-PRESENT else{ //PRESENT-COUNTRY marriage.getBrideAddressDetails().setPresentaddressCountry(marriage.getBrideAddressDetails().getCountryIdPresent()); @@ -279,7 +279,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); } - marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageName(marriage.getBrideAddressDetails().getVillageNamePresent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getBrideAddressDetails().getVillageNamePresent()); marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPresentOutsideKeralaLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPresent()); @@ -291,7 +291,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPresent()); marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPresent()); - marriage.getBrideAddressDetails().setPresentOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getBrideAddressDetails().getTownOrVillagePresent()); marriage.getBrideAddressDetails().setPresentOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPresent()); } @@ -440,12 +440,6 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPermntOutsideKeralaVillage(marriage.getBrideAddressDetails().getVillageNamePermanent()); marriage.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); - String marriageTypeMl = util.getMarriageTypeMl(mdmsData, marriage.getMarriageType()); - marriage.setMarriageTypeMl(marriageTypeMl); - } - - - marriage.getBrideAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); marriage.getBrideAddressDetails().setPermntOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); @@ -480,22 +474,341 @@ public List searchMarriageDetails(MarriageApplicatio } - //Groom Present Address TenantId name - if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { - String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); - marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); + // //Groom Present Address TenantId name + // if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { + // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); - String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); - marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); - } - //Groom Permanent Address TenantId name - if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { - String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); + // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); + // } + // //Groom Permanent Address TenantId name + // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { + // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); - String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); - } + // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); + // } + } +//GROOM ADDRESS DETAILS + if (marriage.getGroomAddressDetails().getCountryIdPresent()!=null && marriage.getGroomAddressDetails().getStateIdPresent()!=null){ + //GROOM-INSIDE INDIA + System.out.println("InsideCountry and state!=null"); + if (marriage.getGroomAddressDetails().getCountryIdPresent().equals(MarriageConstants.COUNTRY_CODE)){ + System.out.println("InsideCountry!=null"+marriage.getGroomAddressDetails().getCountryIdPresent()); + //GROOM-INSIDE KERALA-PRESENT + if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)){ + System.out.println("Insidestate!=null"+marriage.getGroomAddressDetails().getStateIdPresent()); + //GROOM-PRESENT-INSIDE INDIA-INSIDE KERALA + marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); + + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + } + //GROOM-PRESENT-STATE + marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); + if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { + String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + } + //GROOM-PRESENT-DISTRICT + marriage.getGroomAddressDetails().setPresentInsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPresent()); + if (marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null) { + String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); + + String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); + } + // GROOM-PRESENT-TALUK + + if (marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null) { + String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); + + String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); + } + //GROOM-PRESENT-VILLAGE + if (marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { + String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + marriage.getGroomAddressDetails().setPresentInsideKeralaVillageEn(presntInsKeralaVillageEn); + + String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + marriage.getGroomAddressDetails().setPresentInsideKeralaVillageMl(presntInsKeralaVillageMl); + } + //GROOM-PRESENT -WARD + if (marriage.getGroomAddressDetails().getPresentWardNo() != null) { + String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); + marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); + + String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); + marriage.getGroomAddressDetails().setPresentWardNoMl(presentWardNoMl); + } + //GROOM-PRESENT-POST OFFICE + if (marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null) { + String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); + + String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); + } + //GROOM- Present Address TenantId name + if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { + String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); + + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); + } + + marriage.getGroomAddressDetails().setPresentInsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); + marriage.getGroomAddressDetails().setPresentInsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPresent()); + + marriage.getGroomAddressDetails().setPresentInsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPresent()); + marriage.getGroomAddressDetails().setPresentInsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPresent()); + + marriage.getGroomAddressDetails().setPresentInsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); + marriage.getGroomAddressDetails().setPresentInsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); + + marriage.getGroomAddressDetails().setPresentInsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); + + + } + //GROOM-OUTSIDE KERALA-PRESENT + else{ + //GROOM-PRESENT-COUNTRY + marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + } + //GROOM-PRESENT-STATE + marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); + if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { + String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + } + + //GROOM-PRESENT-OUTSIDE KERALA-DISTRICT + marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPresent()); + if (marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null) { + String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); + + String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); + } + + marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageName(marriage.getGroomAddressDetails().getVillageNamePresent()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + + marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPresent()); + + marriage.getGroomAddressDetails().setPresentOutsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPresent()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPresent()); + + marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); + + marriage.getGroomAddressDetails().setPresentOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePresent()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); + + } + } + //GROOM-OUTSIDE INDIA + else{ + //GROOM-PRESENT-OUTSIDE COUNTRY + marriage.getGroomAddressDetails().setPresentOutSideCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); + if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { + String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutSideCountry()); + marriage.getGroomAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); + + String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutSideCountry()); + marriage.getGroomAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); + } + marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePresent()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePresent()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEn()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMl()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEnB()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMlB()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); + } + } + // GROOM-PERMANENT ADDRESS DETAILS -BRIDE + if (marriage.getGroomAddressDetails().getCountryIdPermanent()!=null && marriage.getGroomAddressDetails().getStateIdPermanent()!=null){ + //GROOM-INSIDE INDIA + if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)){ + //GROOM-INSIDE KERALA-PERMANENT + if (marriage.getGroomAddressDetails().getStateIdPermanent().equals(MarriageConstants.STATE_CODE_SMALL)){ + //GROOM-PERMANENT-COUNTRY + marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //GROOM-PERMANENT-STATE + marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { + String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); + } + //GROOM-PERMANENT-DISTRICT + marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null) { + String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); + + String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); + } + //GROOM-PERMANENT-TALUK + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null) { + String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); + + String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); + } + //GROOM-PERMANENT-VILLAGE + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { + String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); + + String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); + } + //GROOM-PERMANENT-POSTOFFICE + marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOffice(marriage.getGroomAddressDetails().getPoNoPermanent()); + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); + + String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); + } + //GROOM-PERMANENT-WARD + if (marriage.getGroomAddressDetails().getPermntInKeralaWardNo() != null) { + String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); + marriage.getGroomAddressDetails().setPrmttWardNoEn(prmttWardNoEn); + + String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); + marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); + } + + //GROOM- Permanent Address TenantId name + if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { + String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); + + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); + } + marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); + + marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); + + marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); + + marriage.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); + + } + //GROOM-PERMANENT-INSIDE INDIA-OUTSIDE KERALA + else{ + //GROOM-PERMANENT-COUNTRY + marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //GROOM-PERMANENT-STATE + marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //GROOM-PERMANENT-DISTRICT + if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + } + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillage(marriage.getGroomAddressDetails().getVillageNamePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + + marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); + + marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); + + } + } + //GROOM-PERMANENT-OUTSIDE INDIA + else{ + + if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { + String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + + String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); + marriage.getGroomAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + } + marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePermanent()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePermanent()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceEn()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceMl()); + + } + } GroomDetails groomDetails = marriage.getGroomDetails(); GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 6a2e361edac..1450cd44e8a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -44,7 +44,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentWardNo(rs.getString("BPSA_ward_code")) // .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) - .presentOutsideKeralaCityVilgeEn(rs.getString("BPSA_village_name")) + .presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_village_name")) // .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 9aca8072562..cdc9e0e922e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1767,20 +1767,20 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo - .getPresentOutsideKeralaVillageName())) { + .getPresentOutsideKeralaVillageorTown())) { throw new CustomException( "BRIDE PRESENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - brideaddressInfo.getPresentOutsideKeralaVillageName() + brideaddressInfo.getPresentOutsideKeralaVillageorTown() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo - .getPresentOutsideKeralaCityVilgeEn())) { + .getPresentOutsideKeralaCityVilgeNameEn())) { throw new CustomException( " BRIDE PRESENT ADDRESS OUTSIDE KERALA: CITY INVALID ", "The City/Town " + - brideaddressInfo.getPresentOutsideKeralaCityVilgeEn() + brideaddressInfo.getPresentOutsideKeralaCityVilgeNameEn() + " is invalid"); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 97cfc9f2d0a..ba765377766 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -81,11 +81,11 @@ public class BrideAddressDetails { @Size(max = 1000) @JsonProperty("presentOutsideKeralaVillage") - private String presentOutsideKeralaVillageName; + private String presentOutsideKeralaVillageorTown; @Size(max = 1000) @JsonProperty("presentOutsideKeralaCityVilgeEn") - private String presentOutsideKeralaCityVilgeEn; + private String presentOutsideKeralaCityVilgeNameEn; @Size(max = 64) @JsonProperty("presentOutsideKeralaPincode") From b8edeb0c659c8df7a8bf3006e0e72c0918abf284 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 6 May 2023 13:13:55 +0530 Subject: [PATCH 289/420] seach --- .../enrichment/MarriageDetailsEnrichment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 962e6cbf0c9..d4d025a1d9a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -474,8 +474,8 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(marriage.getBrideAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageorTown()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); } } From 213426a7c1266a48563fbbf568d734de522a046f Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 6 May 2023 13:17:38 +0530 Subject: [PATCH 290/420] seach --- .../enrichment/MarriageDetailsEnrichment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index d4d025a1d9a..8f18ef8d033 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -474,8 +474,8 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(marriage.getBrideAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageorTown()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageorTown()); + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); } } From 0165c95c35506cc564fe3a0f4457d874cf809abe Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 6 May 2023 14:17:19 +0530 Subject: [PATCH 291/420] seach --- .../enrichment/MarriageDetailsEnrichment.java | 11 +-- .../GroomAddressDetailsRowMapper.java | 84 ++++++++++--------- .../model/marriage/GroomAddressDetails.java | 1 - 3 files changed, 49 insertions(+), 47 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 8f18ef8d033..49223a39855 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -428,12 +428,12 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setBrideGroomPresent("B"); } if (marriage.getBrideAddressDetails()!=null) { - + System.out.println("BridePresentAddress"); if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { if (marriage.getBrideAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - +System.out.println("BridePresentAddress-1"); marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); @@ -454,6 +454,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } else { + System.out.println("BridePresentAddress-2"); marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); @@ -473,10 +474,11 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthrTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(marriage.getBrideAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageorTown()); marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); - + // System.out.println("city/town"+marriage.getBrideAddressDetails().getTownOrVillagePresent()); + // System.out.println("villagename"+marriage.getBrideAddressDetails().getVillageNamePresent()); } } } else { @@ -559,7 +561,6 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 33ca73c531d..4fe9f6c95f7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -17,7 +17,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .stateIdPresent(rs.getString("GPSA_stateid")) .districtIdPresent(rs.getString("GPSA_districtid")) .poNoPresent(rs.getString("GPSA_poid")) - .presentaddressCountry(rs.getString("GPMA_countryid")) + .pinNoPresent(rs.getString("GPSA_pinno")) .localityEnPresent(rs.getString("GPSA_locality_en")) .localityMlPresent(rs.getString("GPSA_locality_ml")) .streetNameEnPresent(rs.getString("GPSA_street_name_en")) @@ -25,34 +25,35 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) .villageNamePresent(rs.getString("GPSA_village_name")) - .presentUuid(rs.getString("GPSA_id")) - .presentaddressCountry(rs.getString("GPSA_countryid")) - .presentaddressStateName(rs.getString("GPSA_stateid")) .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) - .presentInsideKeralaDistrict(rs.getString("GPSA_districtid")) - .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) - .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) - .presentInsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) - .presentInsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) - .presentInsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) - .presentInsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) - .presentInsideKeralaStreetNameMl(rs.getString("GPSA_street_name_ml")) - .presentInsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) - .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) + .presentUuid(rs.getString("GPSA_id")) + // .presentaddressCountry(rs.getString("GPSA_countryid")) + // .presentaddressStateName(rs.getString("GPSA_stateid")) + // .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) + // .presentInsideKeralaDistrict(rs.getString("GPSA_districtid")) + // .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) + // .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) + // .presentInsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) + //.presentInsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) + // .presentInsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) + // .presentInsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) + // .presentInsideKeralaStreetNameMl(rs.getString("GPSA_street_name_ml")) + // .presentInsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) + // .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) .presentWardNo(rs.getString("GPSA_ward_code")) - .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) + // .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) -// .presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name ")) - .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) + .presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name")) + // .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) - .presentOutsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) - .presentOutsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) - .presentOutsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) - .presentOutsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) - .presentOutsideKeralaStreetNameMl(rs.getString("GPSA_street_name_en")) - .presentOutsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) + // .presentOutsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) + //.presentOutsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) + //.presentOutsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) + // .presentOutsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) + // .presentOutsideKeralaStreetNameMl(rs.getString("GPSA_street_name_en")) + // .presentOutsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) .presentOutSideIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) @@ -71,6 +72,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .stateIdPermanent(rs.getString("GPMA_stateid")) .districtIdPermanent(rs.getString("GPMA_districtid")) .poNoPermanent(rs.getString("GPMA_poid")) + .pinNoPermanent(rs.getString("GPMA_pinno")) .localityEnPermanent(rs.getString("GPMA_locality_en")) .localityMlPermanent(rs.getString("GPMA_locality_ml")) .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) @@ -79,32 +81,32 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) .villageNamePermanent(rs.getString("GPMA_village_name")) .permanentUuid(rs.getString("GPMA_id")) - .permtaddressCountry(rs.getString("GPMA_countryid")) - .permtaddressStateName(rs.getString("GPMA_stateid")) + //.permtaddressCountry(rs.getString("GPMA_countryid")) + //.permtaddressStateName(rs.getString("GPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) - .permntInKeralaAdrDistrict(rs.getString("GPMA_districtid")) - //.permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name ")) + //.permntInKeralaAdrDistrict(rs.getString("GPMA_districtid")) + .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name")) .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) - .permntInKeralaAdrLocalityNameEn(rs.getString("GPMA_locality_en")) - .permntInKeralaAdrStreetNameEn(rs.getString("GPMA_street_name_en")) - .permntInKeralaAdrHouseNameEn(rs.getString("GPMA_housename_en")) - .permntInKeralaAdrLocalityNameMl(rs.getString("GPMA_locality_en")) - .permntInKeralaAdrStreetNameMl(rs.getString("GPMA_street_name_ml")) - .permntInKeralaAdrHouseNameMl(rs.getString("GPMA_housename_ml")) - .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) + // .permntInKeralaAdrLocalityNameEn(rs.getString("GPMA_locality_en")) + // .permntInKeralaAdrStreetNameEn(rs.getString("GPMA_street_name_en")) + // .permntInKeralaAdrHouseNameEn(rs.getString("GPMA_housename_en")) + //.permntInKeralaAdrLocalityNameMl(rs.getString("GPMA_locality_en")) + // .permntInKeralaAdrStreetNameMl(rs.getString("GPMA_street_name_ml")) + // .permntInKeralaAdrHouseNameMl(rs.getString("GPMA_housename_ml")) + // .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) - .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) + // .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) .permntOutsideKeralaVillage(rs.getString("GPMA_village_name")) .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) - .permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) - .permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) - .permntOutsideKeralaHouseNameEn(rs.getString("GPMA_housename_en")) - .permntOutsideKeralaLocalityNameMl(rs.getString("GPMA_locality_en")) - .permntOutsideKeralaStreetNameMl(rs.getString("GPMA_street_name_ml")) - .permntOutsideKeralaHouseNameMl(rs.getString("GPMA_housename_ml")) + //.permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) + //.permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) + // .permntOutsideKeralaHouseNameEn(rs.getString("GPMA_housename_en")) + // .permntOutsideKeralaLocalityNameMl(rs.getString("GPMA_locality_en")) + // .permntOutsideKeralaStreetNameMl(rs.getString("GPMA_street_name_ml")) + // .permntOutsideKeralaHouseNameMl(rs.getString("GPMA_housename_ml")) .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) .permntOutsideKeralaPostOfficeMl(rs.getString("GPMA_poname_ml")) .permntOutsideIndiaLineoneEn(rs.getString("GPMA_ot_address1_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 691cc1c012d..0c848d8446a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -529,7 +529,6 @@ public class GroomAddressDetails { private String outSideIndiaPostCodePermanent; //Jasmine 03.05.2023 - @JsonProperty("permanentAddrCountryNameEn") private String permanentAddrCountryNameEn ; From 01e2a95e4c802c3ddd46f0da749c2615905c1780 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 6 May 2023 15:15:44 +0530 Subject: [PATCH 292/420] error fix Address --- .../enrichment/MarriageDetailsEnrichment.java | 12 ++++++++---- .../repository/MarriageApplicationRepository.java | 4 ++-- .../rowmapper/GroomAddressDetailsRowMapper.java | 2 +- .../validator/MarriageApplicationValidator.java | 8 ++++---- .../web/model/marriage/GroomAddressDetails.java | 5 ++--- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 49223a39855..d21f35fdf5a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -304,7 +304,9 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageorTown()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); } } @@ -373,7 +375,6 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); @@ -384,13 +385,15 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); marriage.getGroomAddressDetails().setPermntOthrTalukName(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageEn()); } } } @@ -556,13 +559,14 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageEn()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 977ec99eda1..c45772e1913 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -614,7 +614,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); } - marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageName(marriage.getGroomAddressDetails().getVillageNamePresent()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getGroomAddressDetails().getVillageNamePresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); @@ -626,7 +626,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePresent()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 4fe9f6c95f7..926dad4bab0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -44,7 +44,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentWardNo(rs.getString("GPSA_ward_code")) // .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) - .presentOutsideKeralaCityVilgeEn(rs.getString("GPSA_village_name")) + .presentOutsideKeralaCityVilgeNameEn(rs.getString("GPSA_village_name")) // .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index cdc9e0e922e..131a885e88b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1198,20 +1198,20 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo - .getPresentOutsideKeralaVillageName())) { + .getPresentOutsideKeralaCityVilgeNameEn())) { throw new CustomException( "GROOM PRESENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - groomaddressInfo.getPresentOutsideKeralaVillageName() + groomaddressInfo.getPresentOutsideKeralaCityVilgeNameEn() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo - .getPresentOutsideKeralaCityVilgeEn())) { + .getPresentOutsideKeralaVillageorTown ())) { throw new CustomException( " GROOM PRESENT ADDRESS OUTSIDE KERALA: CITY INVALID ", "The City/Town " + - groomaddressInfo.getPresentOutsideKeralaCityVilgeEn() + groomaddressInfo.getPresentOutsideKeralaVillageorTown () + " is invalid"); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 0c848d8446a..d84a25c48e2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -81,12 +81,11 @@ public class GroomAddressDetails { @Size(max = 1000) @JsonProperty("presentOutsideKeralaVillage") - private String presentOutsideKeralaVillageName; + private String presentOutsideKeralaVillageorTown; @Size(max = 1000) @JsonProperty("presentOutsideKeralaCityVilgeEn") - private String presentOutsideKeralaCityVilgeEn; - + private String presentOutsideKeralaCityVilgeNameEn; @Size(max = 64) @JsonProperty("presentOutsideKeralaPincode") private String presentOutsideKeralaPincode; From 27e128fc6bde3e6d91dfdbc97482cd24ff8ad9e3 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 6 May 2023 15:40:20 +0530 Subject: [PATCH 293/420] error fix Address --- .../enrichment/MarriageDetailsEnrichment.java | 4 ++-- .../MarriageApplicationRepository.java | 4 ++-- .../rowmapper/GroomAddressDetailsRowMapper.java | 2 +- .../validator/MarriageApplicationValidator.java | 16 ++++++++-------- .../web/model/marriage/BrideAddressDetails.java | 2 +- .../web/model/marriage/GroomAddressDetails.java | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index d21f35fdf5a..d18ebb7e318 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -392,7 +392,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageorTwon()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageEn()); } } @@ -565,7 +565,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageorTwon()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageEn()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index c45772e1913..2f994f67d1d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -437,7 +437,7 @@ public List searchMarriageDetails(MarriageApplicatio String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); } - marriage.getBrideAddressDetails().setPermntOutsideKeralaVillage(marriage.getBrideAddressDetails().getVillageNamePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getBrideAddressDetails().getVillageNamePermanent()); marriage.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); @@ -772,7 +772,7 @@ public List searchMarriageDetails(MarriageApplicatio String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); } - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillage(marriage.getGroomAddressDetails().getVillageNamePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getGroomAddressDetails().getVillageNamePermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 926dad4bab0..0407a371ce6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -99,7 +99,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) // .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) - .permntOutsideKeralaVillage(rs.getString("GPMA_village_name")) + .permntOutsideKeralaVillageorTwon(rs.getString("GPMA_village_name")) .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) //.permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) //.permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 131a885e88b..cfb506f3d0c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -914,11 +914,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo - .getPermntOutsideKeralaVillage())) { + .getPermntOutsideKeralaVillageorTwon())) { throw new CustomException( "GROOM PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - groomaddressInfo.getPermntOutsideKeralaVillage() + groomaddressInfo.getPermntOutsideKeralaVillageorTwon() + " is invalid"); } @@ -932,11 +932,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(groomaddressInfo - .getPermntOutsideKeralaVillage())) { + .getPermntOutsideKeralaVillageorTwon())) { throw new CustomException( " GROOM PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - groomaddressInfo.getPermntOutsideKeralaVillage() + groomaddressInfo.getPermntOutsideKeralaVillageorTwon() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo @@ -1482,11 +1482,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo - .getPermntOutsideKeralaVillage())) { + .getPermntOutsideKeralaVillageorTwon())) { throw new CustomException( "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - brideaddressInfo.getPermntOutsideKeralaVillage() + brideaddressInfo.getPermntOutsideKeralaVillageorTwon() + " is invalid"); } @@ -1500,11 +1500,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(brideaddressInfo - .getPermntOutsideKeralaVillage())) { + .getPermntOutsideKeralaVillageorTwon())) { throw new CustomException( " BRIDE PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - brideaddressInfo.getPermntOutsideKeralaVillage() + brideaddressInfo.getPermntOutsideKeralaVillageorTwon() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index ba765377766..7d260e39847 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -352,7 +352,7 @@ public class BrideAddressDetails { @Size(max = 1000) @JsonProperty("permntOutsideKeralaVillage") - private String permntOutsideKeralaVillage; + private String permntOutsideKeralaVillageorTwon; @Size(max = 64) @JsonProperty("permntOutsideKeralaPincode") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index d84a25c48e2..015086e8ea2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -349,7 +349,7 @@ public class GroomAddressDetails { @Size(max = 1000) @JsonProperty("permntOutsideKeralaVillage") - private String permntOutsideKeralaVillage; + private String permntOutsideKeralaVillageorTwon; @Size(max = 64) @JsonProperty("permntOutsideKeralaPincode") From 41cd50c4a079b40cc2c9828f388d27d9a6218503 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 6 May 2023 15:40:32 +0530 Subject: [PATCH 294/420] seach --- .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../repository/rowmapper/GroomAddressDetailsRowMapper.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 49223a39855..9c5faa636bf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -482,11 +482,11 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } } } else { + System.out.println("outsideIndia-"+marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 4fe9f6c95f7..72b833f9ed7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -31,8 +31,8 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw // .presentaddressStateName(rs.getString("GPSA_stateid")) // .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) // .presentInsideKeralaDistrict(rs.getString("GPSA_districtid")) - // .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) - // .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) + .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) + .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) // .presentInsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) //.presentInsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) // .presentInsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) From 52c108782cdefb9878e0c5a86f01d581bcc61915 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 6 May 2023 17:33:05 +0530 Subject: [PATCH 295/420] row mapper --- .../enrichment/MarriageDetailsEnrichment.java | 18 ++++++++++-------- .../MarriageApplicationRepository.java | 2 ++ .../MarriageApplicationQueryBuilder.java | 8 ++++---- .../BrideAddressDetailsRowMapper.java | 2 ++ .../GroomAddressDetailsRowMapper.java | 10 +++++++--- .../MarriageApplicationRowMapper.java | 5 +++++ 6 files changed, 30 insertions(+), 15 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index f1c09d791a9..a0172ef241e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -69,6 +69,7 @@ public void enrichCreate(MarriageDetailsRequest request) { request.getMarriageDetails().forEach(marriage -> { marriage.setId(UUID.randomUUID().toString()); marriage.setAuditDetails(auditDetails); + if(marriage.getBrideDetails()!=null){ marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); marriage.getBrideDetails().setBrideGroom("B"); @@ -304,7 +305,6 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageorTown()); marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); @@ -312,8 +312,6 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { } }else { marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); - marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaPostCode()); @@ -326,6 +324,8 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); } @@ -401,9 +401,10 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { //if (marriage.getGroomAddressDetails().getPermtaddressCountry() != (MarriageConstants.COUNTRY_CODE)) { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); @@ -487,8 +488,6 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } else { System.out.println("outsideIndia-"+marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); @@ -501,6 +500,9 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); + + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); } } @@ -574,8 +576,6 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { else { // if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); - marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); @@ -587,6 +587,8 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); // } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 2f994f67d1d..3195631889b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -69,6 +69,8 @@ public List searchMarriageDetails(MarriageApplicatio List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); if (result != null) { result.forEach(marriage -> { + marriage.setIsWorkflow(true); + //Jasmine 03.05.2023 - MDMS for Summery Page Object mdmsData = util.mDMSSearch(requestInfo, marriage.getTenantid()); //WARD DETAILS-MDMS Location Call diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 643f3e36fac..33f197cc371 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -18,11 +18,11 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") .append("MD.placename_en as MD_placename_en , MD.placename_ml as MD_placename_ml , MD.houseno_and_name_en as MD_housenameno_en , MD.houseno_and_name_ml as MD_housenameno_ml ,") .append("MD.locality_en as MD_locality_en , MD.locality_ml as MD_locality_ml , MD.street_name_en as MD_street_name_en , MD.street_name_ml as MD_street_name_ml , ") - .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,") - .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date ,") - .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") + .append("MD.ward_code as MD_ward_code , MD.talukid as MD_talukid , MD.village_name as MD_village_name , MD.marriage_type as MD_marriage_type ,MD.applicationType as MD_applicationType , ") + .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.businessservice as MD_businessservice , ") + .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby , MD.workflowcode as MD_workflowcode, ") .append("MD.applicationNumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code, MD.zonal_office as MD_zonal_office,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code, MD.zonal_office as MD_zonal_office,MD.action as MD_action, MD.status as MD_status,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 1450cd44e8a..0d7f1dcd491 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -54,6 +54,8 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce // .presentOutsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) // .presentOutsideKeralaStreetNameMl(rs.getString("BPSA_street_name_en")) // .presentOutsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) + .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_city_town_village")) + .presentOutSideIndiaadrsVillage(rs.getString("BPSA_village_name")) .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index a27863879f8..c6a0a11d290 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -25,6 +25,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) .villageNamePresent(rs.getString("GPSA_village_name")) + .townOrVillagePresent(rs.getString("GPSA_city_town_village")) .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) .presentUuid(rs.getString("GPSA_id")) // .presentaddressCountry(rs.getString("GPSA_countryid")) @@ -58,6 +59,8 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) + .presentOutSideIndiaadrsCityTown(rs.getString("GPSA_city_town_village")) + .presentOutSideIndiaadrsVillage(rs.getString("GPSA_village_name")) .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) .presentOutSideIndiaPostCode(rs.getString("GPSA_ot_zipcode")) @@ -99,7 +102,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) // .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) - .permntOutsideKeralaVillageorTwon(rs.getString("GPMA_village_name")) + .permntOutsideKeralaVillageorTwon(rs.getString("GPMA_city_town_village")) .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) //.permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) //.permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) @@ -113,12 +116,13 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .permntOutsideIndiaLineoneMl(rs.getString("GPMA_ot_address1_ml")) .permntOutsideIndiaLinetwoEn(rs.getString("GPMA_ot_address2_en")) .permntOutsideIndiaLinetwoMl(rs.getString("GPMA_ot_address2_ml")) - // .permntOutsideIndiaVillage(rs.getString("")) - // .permntOutsideIndiaCityTown(rs.getString("")) +// .permntOutsideIndiaVillage(rs.getString("")) .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) .brideGroomPermanent(rs.getString("GPMA_bride_groom")) + .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name")) + .permntOutsideIndiaCityTown(rs.getString("GPMA_city_town_village")) // .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index eb7e9ae0528..937bf08d43b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -42,8 +42,13 @@ public List extractData(ResultSet rs) throws SQLExce .applicationNumber(rs.getString("MD_applicationnumber")) .registrationDate(rs.getLong("MD_registration_date")) .registrationNo(rs.getString("MD_registrationno")) + .businessservice(rs.getString("MD_businessservice")) .moduleCode(rs.getString("MD_module_code")) .zonalOffice(rs.getString("MD_zonal_office")) + .workflowcode(rs.getString("MD_workflowcode")) + .applicationtype(rs.getString("MD_applicationType")) + .action(rs.getString("MD_action")) + .status(rs.getString("MD_status")) // .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) From e6b55fbac80fd4963af0c1b360b792a190fac487 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 6 May 2023 18:02:17 +0530 Subject: [PATCH 296/420] seach --- .../enrichment/MarriageDetailsEnrichment.java | 41 +++++++++---------- .../BaseMarriageQueryBuilder.java | 8 ++++ .../MarriageApplicationQueryBuilder.java | 12 ++++-- .../querybuilder/BaseMarriageQuery.java | 17 ++++++++ .../MarriageRegistryQueryBuilder.java | 14 ++++--- 5 files changed, 61 insertions(+), 31 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index f1c09d791a9..e973764a387 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -432,7 +432,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } if (marriage.getBrideAddressDetails()!=null) { System.out.println("BridePresentAddress"); - if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { if (marriage.getBrideAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { @@ -456,10 +456,11 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); - } else { + } + else { System.out.println("BridePresentAddress-2"); - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); @@ -476,16 +477,16 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthrTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(marriage.getBrideAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - - + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageorTown()); marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); - // System.out.println("city/town"+marriage.getBrideAddressDetails().getTownOrVillagePresent()); - // System.out.println("villagename"+marriage.getBrideAddressDetails().getVillageNamePresent()); + } } - } else { + else { System.out.println("outsideIndia-"+marriage.getBrideAddressDetails().getPresentaddressCountry()); + System.out.println("outsideIndia-Province En"+marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); @@ -502,9 +503,10 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); } - } + } + }); } @@ -521,7 +523,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { //marriage.getBrideAddressDetails().setBrideGroomPresent("B"); } - if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ + if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null ){ if (marriage.getBrideAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { @@ -543,7 +545,8 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - } else { + } + else { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); @@ -569,9 +572,7 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageEn()); } } - - } - else { + else { // if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); @@ -585,13 +586,9 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - - - -// } - } - } - + } + } + } }); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java index d4625b18385..1219a508f1c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/BaseMarriageQueryBuilder.java @@ -90,6 +90,14 @@ void addFilterString(String column, String value, StringBuilder query, List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("LIKE ? "); + paramValues.add(value.toLowerCase().concat("%")); + } + } // private String createQuery(List ids) { // StringBuilder builder = new StringBuilder(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 643f3e36fac..29da41121c7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -132,11 +132,13 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); if (criteria.getBrideFirstnameEn() != null){ - addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + //addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + addLikeFilter("LOWER(BD.firstname_en)", criteria.getBrideFirstnameEn(), query, preparedStmtValues); } addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); if (criteria.getGroomFirstnameEn() != null){ - addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + //addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + addLikeFilter("LOWER(GD.firstname_en)", criteria.getGroomFirstnameEn(), query, preparedStmtValues); } addDateRangeFilter("MD.dateofmarriage", criteria.getFromDate(), @@ -224,11 +226,13 @@ public String getMarriageCountQuery(MarriageApplicationSearchCriteria criteria , addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); if (criteria.getBrideFirstnameEn() != null){ - addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + // addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + addLikeFilter("LOWER(BD.firstname_en)", criteria.getBrideFirstnameEn(), query, preparedStmtValues); } addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); if (criteria.getGroomFirstnameEn() != null){ - addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + // addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + addLikeFilter("LOWER(GD.firstname_en)", criteria.getGroomFirstnameEn(), query, preparedStmtValues); } addDateRangeFilter("MD.dateofmarriage", criteria.getFromDate(), diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java index c418dc6f37c..388e6aba865 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/BaseMarriageQuery.java @@ -80,6 +80,23 @@ void addFilterString(String column, String value, StringBuilder query, List paramValues) { + // if (StringUtils.isNotBlank(value)) { + // addWhereClause(paramValues, query); + // query.append(column) + // .append("LIKE ?% "); + // paramValues.add(value.toLowerCase()); + // } + // } + void addLikeFilter(final String column, final String value, final StringBuilder query, final List paramValues) { + if (StringUtils.isNotBlank(value)) { + addWhereClause(paramValues, query); + query.append(column) + .append("LIKE ? "); + paramValues.add(value.toLowerCase().concat("%")); + + } + } // void addDateRangeFilter(String column, Long startDate, Long endDate, StringBuilder query, // List paramValues) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index e491e8da6f6..7808d807904 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -123,17 +123,19 @@ public String getMarriageRegistrySearchQuery(@NotNull MarriageRegistrySearchCrit addFilter("MD.applicationnumber", criteria.getApplicationNumber(), query, preparedStmtValues); addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); - // addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValue + addFilter("MD_certificateno", criteria.getCertificateNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); if (criteria.getBrideFirstnameEn() != null){ - addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + // addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + addLikeFilter("LOWER(BD.firstname_en)", criteria.getBrideFirstnameEn(), query, preparedStmtValues); } // addFilter("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); //addFilter("BD_middlename_en", criteria.getBrideMiddlenameEn(), query, preparedStmtValues); // addFilter("BD_lastname_en", criteria.getBrideLastnameEn(), query, preparedStmtValues); addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); if (criteria.getGroomFirstnameEn() != null){ - addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + // addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + addLikeFilter("LOWER(GD.firstname_en)", criteria.getGroomFirstnameEn(), query, preparedStmtValues); } // addFilter("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); //addFilter("GD_middlename_en", criteria.getGroomMiddlenameEn(), query, preparedStmtValues); @@ -206,11 +208,13 @@ public String getMarriageRegistryCountQuery(@NotNull MarriageRegistrySearchCrite addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); if (criteria.getBrideFirstnameEn() != null){ - addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + //addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); + addLikeFilter("LOWER(BD.firstname_en)", criteria.getBrideFirstnameEn(), query, preparedStmtValues); } addFilter("GD.aadharno", criteria.getGroomAdharNo(), query, preparedStmtValues); if (criteria.getGroomFirstnameEn() != null){ - addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + // addFilterString("GD.firstname_en", criteria.getGroomFirstnameEn(), query, preparedStmtValues); + addLikeFilter("LOWER(GD.firstname_en)", criteria.getGroomFirstnameEn(), query, preparedStmtValues); } addDateRangeFilter("MD.dateofmarriage", criteria.getFromDate(), From 00d1554377cbf7cbb9aa642cdf0e58367ffb072d Mon Sep 17 00:00:00 2001 From: ikmkerala <107991882+ikmkerala@users.noreply.github.com> Date: Sat, 6 May 2023 19:55:42 +0530 Subject: [PATCH 297/420] Update application.properties --- .../marriage-services/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 92c0132fdf3..a513477870d 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -108,7 +108,7 @@ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certif egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath -egov.marriage.image.startPoint = https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/crmarriage +egov.marriage.image.startPoint = https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ #view certificate path config egov.ui.app.host=https://ksmart-dev.lsgkerala.gov.in/ From 9ede14479b868d587291cca8bc644725f314c8d5 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 7 May 2023 10:48:37 +0530 Subject: [PATCH 298/420] seach --- .../enrichment/MarriageDetailsEnrichment.java | 8 +- .../MarriageApplicationRepository.java | 50 +- .../BrideAddressDetailsRowMapper.java | 28 +- .../GroomAddressDetailsRowMapper.java | 1 + .../MarriageApplicationValidator.java | 8 +- .../model/marriage/BrideAddressDetails.java | 5 +- .../MarriageRegistryEnrichment.java | 683 +++++++++++++----- .../GroomRegistryAddressRowMapper.java | 2 +- .../model/BrideRegistryAddressDetails.java | 9 +- .../model/GroomRegistryAddressDetails.java | 11 +- 10 files changed, 594 insertions(+), 211 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 420bc5887c8..df44b8a7065 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -446,7 +446,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); } else { - // System.out.println("BridePresentAddress-2"); + System.out.println("BridePresentAddress-2"+marriage.getBrideAddressDetails().getPresentOutsideKeralaPincode()); marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); @@ -487,6 +487,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); } } @@ -553,8 +554,9 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageorTwon()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageEn()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageorTown()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaCityVilgeEn()); + //marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageEn()); } } else { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 3195631889b..32e651516e4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -281,7 +281,6 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); } - marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getBrideAddressDetails().getVillageNamePresent()); marriage.getBrideAddressDetails().setPresentOutsideKeralaTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPresentOutsideKeralaLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPresent()); @@ -292,9 +291,12 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPresent()); marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPresent()); - - marriage.getBrideAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getBrideAddressDetails().getTownOrVillagePresent()); - marriage.getBrideAddressDetails().setPresentOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPresent()); + + marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + System.out.println("presentOutsideKeralaVillageorTown"+marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageorTown()); + //System.out.println("townOrVillagePresent"+marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); + // marriage.getBrideAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + // marriage.getBrideAddressDetails().setPresentOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPresent()); } } @@ -432,6 +434,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } //PERMANENT-DISTRICT + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrict(marriage.getBrideAddressDetails().getDistrictIdPermanent()); if (marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); @@ -439,14 +442,25 @@ public List searchMarriageDetails(MarriageApplicatio String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); } - marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getBrideAddressDetails().getVillageNamePermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); + + marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); + + marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); + + marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); + + marriage.getBrideAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getVillageNamePermanent()); + // marriage.getBrideAddressDetails().setPermntOutsideKeralaVillage(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); marriage.getBrideAddressDetails().setPermntOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPinNoPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); } } @@ -628,8 +642,8 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); } } @@ -734,6 +748,8 @@ public List searchMarriageDetails(MarriageApplicatio String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); } + + marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); @@ -767,6 +783,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } //GROOM-PERMANENT-DISTRICT + marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); @@ -774,10 +791,19 @@ public List searchMarriageDetails(MarriageApplicatio String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); } + marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); + + marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); + + marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); + marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getGroomAddressDetails().getVillageNamePermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + // marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 0d7f1dcd491..e29c4aed9a0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -18,7 +18,6 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .districtIdPresent(rs.getString("BPSA_districtid")) .poNoPresent(rs.getString("BPSA_poid")) .pinNoPresent(rs.getString("BPSA_pinno")) - // .presentaddressCountry(rs.getString("GPMA_countryid")) .localityEnPresent(rs.getString("BPSA_locality_en")) .localityMlPresent(rs.getString("BPSA_locality_ml")) .streetNameEnPresent(rs.getString("BPSA_street_name_en")) @@ -29,7 +28,13 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) .villageNamePresent(rs.getString("BPSA_village_name")) .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) + .presentWardNo(rs.getString("BPSA_ward_code")) + + .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) + .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) + .presentUuid(rs.getString("BPSA_id")) + // .presentaddressCountry(rs.getString("GPMA_countryid")) // .presentaddressCountry(rs.getString("BPSA_countryid")) // .presentaddressStateName(rs.getString("BPSA_stateid")) // .presentInsideKeralaDistrict(rs.getString("BPSA_districtid")) @@ -39,13 +44,17 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce // .presentInsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) // .presentInsideKeralaStreetNameMl(rs.getString("BPSA_street_name_ml")) // .presentInsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) - // .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) - .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) - .presentWardNo(rs.getString("BPSA_ward_code")) + + + //.presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) + //.presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_city_town_village")) // .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) + .townOrVillagePresent(rs.getString("BPSA_city_town_village")) .presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_village_name")) - // .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) + .presentOutsideKeralaVillageorTown(rs.getString("BPSA_city_town_village")) + //.presentOutsideKeralaVillageorTown(rs.getString("BPSA_tenantid")) + .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) // .presentOutsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) @@ -75,7 +84,6 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .localityEnPermanent(rs.getString("BPMA_locality_en")) .localityMlPermanent(rs.getString("BPMA_locality_ml")) .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) - //.streetNameEnPermanent(rs.getString("BPMA_housename_en")) .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) @@ -83,9 +91,10 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .permanentUuid(rs.getString("BPMA_id")) // .permtaddressCountry(rs.getString("BPMA_countryid")) // .permtaddressStateName(rs.getString("BPMA_stateid")) - .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + .townOrVillagePermanent(rs.getString("BPMA_city_town_village")) // .permntInKeralaAdrDistrict(rs.getString("BPMA_districtid")) - .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name")) + .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) // .permntInKeralaAdrLocalityNameEn(rs.getString("BPMA_locality_en")) @@ -99,7 +108,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) // .permntOutsideKeralaDistrict(rs.getString("BPMA_districtid")) // .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) - //* */.permntOutsideKeralaVillage(rs.getString("BPMA_village_name")) + //* */.permntOutsideKeralaVillage(rs.getString("BPMA_city_town_village")) //.permntOutsideKeralaPincode(rs.getString("BPMA_pinno")) // .permntOutsideKeralaLocalityNameEn(rs.getString("BPMA_locality_en")) // .permntOutsideKeralaStreetNameEn(rs.getString("BPMA_street_name_en")) @@ -107,6 +116,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce // .permntOutsideKeralaLocalityNameMl(rs.getString("BPMA_locality_en")) // .permntOutsideKeralaStreetNameMl(rs.getString("BPMA_street_name_ml")) // .permntOutsideKeralaHouseNameMl(rs.getString("BPMA_housename_ml")) + .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name")) .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index c6a0a11d290..54f871999de 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -84,6 +84,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) .villageNamePermanent(rs.getString("GPMA_village_name")) .permanentUuid(rs.getString("GPMA_id")) + .townOrVillagePresent(rs.getString("GPMA_city_town_village")) //.permtaddressCountry(rs.getString("GPMA_countryid")) //.permtaddressStateName(rs.getString("GPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index cfb506f3d0c..7e2f2a705c7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -1482,11 +1482,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo - .getPermntOutsideKeralaVillageorTwon())) { + .getPermntOutsideKeralaVillageorTown())) { throw new CustomException( "BRIDE PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - brideaddressInfo.getPermntOutsideKeralaVillageorTwon() + brideaddressInfo.getPermntOutsideKeralaVillageorTown() + " is invalid"); } @@ -1500,11 +1500,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(brideaddressInfo - .getPermntOutsideKeralaVillageorTwon())) { + .getPermntOutsideKeralaVillageorTown())) { throw new CustomException( " BRIDE PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - brideaddressInfo.getPermntOutsideKeralaVillageorTwon() + brideaddressInfo.getPermntOutsideKeralaVillageorTown() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 7d260e39847..2ac48ad0987 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -352,7 +352,7 @@ public class BrideAddressDetails { @Size(max = 1000) @JsonProperty("permntOutsideKeralaVillage") - private String permntOutsideKeralaVillageorTwon; + private String permntOutsideKeralaVillageorTown; @Size(max = 64) @JsonProperty("permntOutsideKeralaPincode") @@ -678,4 +678,7 @@ public class BrideAddressDetails { @JsonProperty("permntInKeralaAdrLBNameMl") private String permntInKeralaAdrLBNameMl; + @JsonProperty("presentAddrVillageId") + private String presentAddrVillageId ; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index bb2c9cd5ef1..389b3912b07 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -119,124 +119,470 @@ private void setRegistrationNumber(MarriageRegistryRequest request) { } //Jasmine 28.03.2023 - private void setGroomPresentAddress(MarriageRegistryRequest request) { +// private void setGroomPresentAddress(MarriageRegistryRequest request) { - request.getMarriageDetails() - .forEach(marriage ->{ - if (marriage.getGroomAddressDetails()!=null) { +// request.getMarriageDetails() +// .forEach(marriage ->{ +// if (marriage.getGroomAddressDetails()!=null) { + +// marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); +// marriage.getGroomAddressDetails().setBrideGroomPresent("G"); +// } + +// if (marriage.getGroomAddressDetails() != null && marriage.getGroomAddressDetails().getIsPermanentAddress() != null) { +// marriage.getGroomAddressDetails().setIsPermanentAddressInt(marriage.getGroomAddressDetails().getIsPermanentAddress() == true ? 1 : 0); +// if(marriage.getGroomAddressDetails().getIsPermanentAddress()) { +// marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); +// marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); +// if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)) { +// marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); +// if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { +// marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); +// } +// } +// } - marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); - marriage.getGroomAddressDetails().setBrideGroomPresent("G"); - } +// if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { +// if (marriage.getGroomAddressDetails().getPresentaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { +// if (marriage.getGroomAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { +// if(!marriage.getGroomAddressDetails().getIsPermanentAddress()){ +// marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); +// marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); +// } - if (marriage.getGroomAddressDetails() != null && marriage.getGroomAddressDetails().getIsPermanentAddress() != null) { - marriage.getGroomAddressDetails().setIsPermanentAddressInt(marriage.getGroomAddressDetails().getIsPermanentAddress() == true ? 1 : 0); - if(marriage.getGroomAddressDetails().getIsPermanentAddress()) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getCountryIdPermanent()); - marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getStateIdPermanent()); - if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { - marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); - } - } - } +// marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); - if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null && marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getGroomAddressDetails().getPresentaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - if(!marriage.getGroomAddressDetails().getIsPermanentAddress()){ - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); - marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); - } +// marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameEn()); +// marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameMl()); - marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); +// marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameEn()); +// marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameMl()); - marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameEn()); - marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameMl()); +// marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameEn()); +// marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameMl()); - marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameEn()); - marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameMl()); +// marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); + +// // marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); +// // marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getpresentOutsideKeralaVillage()); + +// // marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); +// marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); - marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameEn()); - marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameMl()); - marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); - marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); +// } +// else { +// if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { +// marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); +// marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); +// } +// marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); +// marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameEn()); +// marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameMl()); - } - else { - if (!marriage.getGroomAddressDetails().getIsPermanentAddress()) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); - marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); - } - marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); +// marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameEn()); +// marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameMl()); - marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameEn()); - marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameMl()); +// marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameEn()); +// marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameMl()); - marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameEn()); - marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameMl()); +// marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaPincode()); - marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameEn()); - marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameMl()); +// marriage.getGroomAddressDetails().setPresentOthrTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); +// marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaPincode()); - marriage.getGroomAddressDetails().setPresentOthrTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); +// marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); +// marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); +// } +// } - marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeEn()); +// else { +// // if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { +// marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); +// marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); +// marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); - } - } +// marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaPostCode()); - else { - // if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { - marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentOutSideCountry()); - marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); +// marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); +// marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); + +// marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); +// marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); + +// marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); +// marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); + +// // } +// } +// } +// } +// }); +// } + +// private void setGroomPermanentAddress(MarriageRegistryRequest request) { +// request.getMarriageDetails() +// .forEach(marriage-> { + +// if (marriage.getGroomAddressDetails()!=null){ +// if (marriage.getGroomAddressDetails()!=null) { + +// marriage.getGroomAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); +// //marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); +// marriage.getGroomAddressDetails().setBrideGroomPermanent("G"); +// //marriage.getGroomAddressDetails().setBrideGroomPresent("B"); +// } + +// if(marriage.getGroomAddressDetails().getPermtaddressCountry()!=null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ +// if (marriage.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { +// if (marriage.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { + +// marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + +// marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); + +// marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + +// marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); +// marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + +// marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); +// marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); + +// marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); +// marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); +// marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); +// marriage.getGroomAddressDetails().setPoNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); +// } else { +// marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + +// marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); + +// marriage.getGroomAddressDetails().setDistrictIdPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + +// marriage.getGroomAddressDetails().setLocalityEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); +// marriage.getGroomAddressDetails().setLocalityMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + +// marriage.getGroomAddressDetails().setStreetNameEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); +// marriage.getGroomAddressDetails().setStreetNameMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); + +// marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); +// marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); + +// marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + +// marriage.getGroomAddressDetails().setPermntOthrTalukName(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); +// marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + +// marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + +// } +// } + +// } +// else { +// // if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { +// marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); +// marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); +// marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + +// marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); +// marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + +// marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); +// marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + +// marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); +// marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + +// marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); +// // } +// } +// } + +// }); +// } + +// public void setBridePresentAddress(MarriageRegistryRequest request) { +// request.getMarriageDetails() +// .forEach(marriage ->{ +// if (marriage.getBrideAddressDetails()!=null) { + +// marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); +// marriage.getBrideAddressDetails().setBrideGroomPresent("B"); +// } - marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaPostCode()); +// if (marriage.getBrideAddressDetails() != null && marriage.getBrideAddressDetails().getIsPermanentAddress() != null) { +// marriage.getBrideAddressDetails().setIsPermanentAddressInt(marriage.getBrideAddressDetails().getIsPermanentAddress() == true ? 1 : 0); +// if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { +// marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); +// marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); +// if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)) { +// marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); +// if (marriage.getBrideAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { +// marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); +// } +// } +// } - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); +// if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { +// if (marriage.getBrideAddressDetails().getPresentaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { +// if (marriage.getBrideAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { +// if(!marriage.getBrideAddressDetails().getIsPermanentAddress()){ +// marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); +// marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); +// } - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); - marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); +// marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); - marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); +// marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameEn()); +// marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameMl()); +// marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameEn()); +// marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameMl()); + +// marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameEn()); +// marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameMl()); + +// marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); +// marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); +// marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + + +// } +// else { +// if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { +// marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); +// marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); +// } +// marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); + +// marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaLocalityNameEn()); +// marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaLocalityNameMl()); + +// marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaStreetNameEn()); +// marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaStreetNameMl()); + +// marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaHouseNameEn()); +// marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaHouseNameMl()); + +// marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaPincode()); + +// marriage.getBrideAddressDetails().setPresentOthrTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); +// marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(marriage.getBrideAddressDetails().getPresentOutsideKeralaPostOfficeEn()); + + +// marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); +// marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + +// } +// } + +// else { +// // if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { +// marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); +// marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); +// marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + + +// marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); +// marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); + +// marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); +// marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); + +// marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); +// marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + +// marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); +// // } +// } +// } +// } +// }); +// } + +// private void setBridePermanentAddress(MarriageRegistryRequest request) { +// request.getMarriageDetails() +// .forEach(marriage-> { + +// if (marriage.getBrideAddressDetails()!=null){ +// if (marriage.getBrideAddressDetails()!=null) { + +// marriage.getBrideAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); +// //marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); +// marriage.getBrideAddressDetails().setBrideGroomPermanent("B"); +// //marriage.getBrideAddressDetails().setBrideGroomPresent("B"); +// } + +// if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ +// if (marriage.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { +// if (marriage.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { + +// marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + +// marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + +// marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + +// marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); +// marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + +// marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); +// marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); + +// marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); +// marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); +// marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); +// marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); +// } +// else { +// marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); + +// marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + +// marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + +// marriage.getBrideAddressDetails().setLocalityEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); +// marriage.getBrideAddressDetails().setLocalityMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + +// marriage.getBrideAddressDetails().setStreetNameEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); +// marriage.getBrideAddressDetails().setStreetNameMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); + +// marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); +// marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); + +// marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + +// marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); +// marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + + +// marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); +// } +// } +// } +// else { +// // if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { +// marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); +// marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); +// marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + +// marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); +// marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + +// marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); +// marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + +// marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); +// marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + +// marriage.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + +// // } // } - } - } - } - }); - } +// } +// }); +// } +//UPDATED ON 06.05.2023 +private void setGroomPresentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() + .forEach(marriage -> { + // if (marriage.getGroomAddressDetails() != null) { + if (marriage.getGroomAddressDetails() != null) { - private void setGroomPermanentAddress(MarriageRegistryRequest request) { - request.getMarriageDetails() - .forEach(marriage-> { + marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPresent("G"); + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null ) { + if (marriage.getGroomAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - if (marriage.getGroomAddressDetails()!=null){ - if (marriage.getGroomAddressDetails()!=null) { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); - marriage.getGroomAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); - //marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); - marriage.getGroomAddressDetails().setBrideGroomPermanent("G"); - //marriage.getGroomAddressDetails().setBrideGroomPresent("B"); - } + marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPincode()); + marriage.getGroomAddressDetails().setPoNoPresent(marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + + marriage.getGroomAddressDetails().setPresentAddrVillageId(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + + } + else { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setStateIdPresent(marriage.getGroomAddressDetails().getPresentaddressStateName()); + marriage.getGroomAddressDetails().setDistrictIdPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + + marriage.getGroomAddressDetails().setLocalityEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameEn()); + marriage.getGroomAddressDetails().setLocalityMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaLocalityNameMl()); + + marriage.getGroomAddressDetails().setStreetNameEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameEn()); + marriage.getGroomAddressDetails().setStreetNameMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaStreetNameMl()); + + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameEn()); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaHouseNameMl()); + + marriage.getGroomAddressDetails().setPinNoPresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaPincode()); + + marriage.getGroomAddressDetails().setPresentOthrTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(marriage.getGroomAddressDetails().getPresentOutsideKeralaPostOfficeEn()); + + + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaVillageorTown()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); + + } + } + else { + marriage.getGroomAddressDetails().setCountryIdPresent(marriage.getGroomAddressDetails().getPresentaddressCountry()); + + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaPostCode()); + + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMl()); - if(marriage.getGroomAddressDetails().getPermtaddressCountry()!=null && marriage.getGroomAddressDetails().getPermtaddressStateName() != null){ - if (marriage.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOutSideIndiaAdressMlB()); + + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); + + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + } + } + + + } + }); +} +private void setGroomPermanentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() + .forEach(marriage-> { + + if (marriage.getGroomAddressDetails()!=null){ + marriage.getGroomAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPermanent("G"); + if(marriage.getGroomAddressDetails().getPermtaddressCountry()!=null){ + if (marriage.getGroomAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { if (marriage.getGroomAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrTalukId(marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getGroomAddressDetails().setPermanentAddrVillageId(marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); @@ -252,7 +598,9 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); marriage.getGroomAddressDetails().setPoNoPermanent(marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - } else { + } + + else { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setStateIdPermanent(marriage.getGroomAddressDetails().getPermtaddressStateName()); @@ -268,7 +616,6 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); marriage.getGroomAddressDetails().setPermntOthrTalukName(marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); @@ -276,85 +623,73 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageorTown()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeNameEn()); } } - - } else { -// if (marriage.getGroomAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); -// } + marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); } - } - }); - } + } + } + }); +} - public void setBridePresentAddress(MarriageRegistryRequest request) { - request.getMarriageDetails() +private void setBridePresentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() .forEach(marriage ->{ if (marriage.getBrideAddressDetails()!=null) { marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); marriage.getBrideAddressDetails().setBrideGroomPresent("B"); } - - if (marriage.getBrideAddressDetails() != null && marriage.getBrideAddressDetails().getIsPermanentAddress() != null) { - marriage.getBrideAddressDetails().setIsPermanentAddressInt(marriage.getBrideAddressDetails().getIsPermanentAddress() == true ? 1 : 0); - if(marriage.getBrideAddressDetails().getIsPermanentAddress()) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getCountryIdPermanent()); - marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getStateIdPermanent()); - if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - if (marriage.getBrideAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)) { - marriage.getBrideAddressDetails().setPresentaddressStateName(marriage.getBrideAddressDetails().getStateIdPresent()); - } - } - } - - if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null && marriage.getBrideAddressDetails().getPresentaddressStateName() != null) { - if (marriage.getBrideAddressDetails().getPresentaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails()!=null) { + // System.out.println("BridePresentAddress"); + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { + if (marriage.getBrideAddressDetails().getPresentaddressCountry().equals(COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPresentaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { - if(!marriage.getBrideAddressDetails().getIsPermanentAddress()){ + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); - } - marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameEn()); - marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameMl()); + marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaDistrict()); - marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameEn()); - marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameMl()); + marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameEn()); + marriage.getBrideAddressDetails().setLocalityMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaLocalityNameMl()); - marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameEn()); - marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameMl()); + marriage.getBrideAddressDetails().setStreetNameEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameEn()); + marriage.getBrideAddressDetails().setStreetNameMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaStreetNameMl()); - marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); - marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + marriage.getBrideAddressDetails().setHouseNameNoEnPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameEn()); + marriage.getBrideAddressDetails().setHouseNameNoMlPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaHouseNameMl()); - - } + marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); + marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); + + marriage.getBrideAddressDetails().setPresentAddrVillageId(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + } else { - if (!marriage.getBrideAddressDetails().getIsPermanentAddress()) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); - } + System.out.println("BridePresentAddress-2"+marriage.getBrideAddressDetails().getPresentOutsideKeralaPincode()); + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); + marriage.getBrideAddressDetails().setDistrictIdPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setLocalityEnPresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaLocalityNameEn()); @@ -370,40 +705,38 @@ public void setBridePresentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPresentOthrTalukName(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(marriage.getBrideAddressDetails().getPresentOutsideKeralaPostOfficeEn()); - - - marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageName()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeEn()); + + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageorTown()); + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); } } - else { -// if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { - marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + // System.out.println("outsideIndia-"+marriage.getBrideAddressDetails().getPresentaddressCountry()); + // System.out.println("outsideIndia-Province En"+marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMl()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); - marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB()); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOutSideIndiaAdressMlB()); - marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); - marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); + + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); - marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); -// } - } } } - }); - } + } - private void setBridePermanentAddress(MarriageRegistryRequest request) { - request.getMarriageDetails() + }); +} + +private void setBridePermanentAddress(MarriageRegistryRequest request) { + request.getMarriageDetails() .forEach(marriage-> { if (marriage.getBrideAddressDetails()!=null){ @@ -415,13 +748,15 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { //marriage.getBrideAddressDetails().setBrideGroomPresent("B"); } - if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null && marriage.getBrideAddressDetails().getPermtaddressStateName() != null){ - if (marriage.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if(marriage.getBrideAddressDetails().getPermtaddressCountry()!=null ){ + if (marriage.getBrideAddressDetails().getPermtaddressCountry().equals(COUNTRY_CODE)) { if (marriage.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); marriage.getBrideAddressDetails().setStateIdPermanent(marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermanentAddrTalukId(marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermanentAddrVillageId(marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); marriage.getBrideAddressDetails().setDistrictIdPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); @@ -435,7 +770,7 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); marriage.getBrideAddressDetails().setPoNoPermanent(marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - } + } else { marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); @@ -452,21 +787,19 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); marriage.getBrideAddressDetails().setPermntOthrTalukName(marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); + + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageorTown()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageEn()); } - } - } - else { -// if (marriage.getBrideAddressDetails().getPermtaddressCountry() != COUNTRY_CODE) { + } + else { +// marriage.getBrideAddressDetails().setCountryIdPermanent(marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); - marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); @@ -477,14 +810,16 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); -// } } + } } + }); - } + } public void enrichUpdate(MarriageRegistryRequest request) { RequestInfo requestInfo = request.getRequestInfo(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java index 6d5861771d1..17c160b8781 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -95,7 +95,7 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) - .permntOutsideKeralaVillage(rs.getString("GPMA_village_name")) + .permntOutsideKeralaVillageorTown(rs.getString("GPMA_village_name")) .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) .permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) .permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java index e41ccc58958..b284546896f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java @@ -86,11 +86,11 @@ public class BrideRegistryAddressDetails { @Size(max = 1000) @JsonProperty("presentOutsideKeralaVillage") - private String presentOutsideKeralaVillageName; + private String presentOutsideKeralaVillageorTown; @Size(max = 1000) @JsonProperty("presentOutsideKeralaCityVilgeEn") - private String presentOutsideKeralaCityVilgeEn; + private String presentOutsideKeralaCityVilgeNameEn; @Size(max = 64) @JsonProperty("presentOutsideKeralaPincode") @@ -365,7 +365,7 @@ public class BrideRegistryAddressDetails { @Size(max = 1000) @JsonProperty("permntOutsideKeralaVillage") - private String permntOutsideKeralaVillage; + private String permntOutsideKeralaVillageorTown; @Size(max = 64) @JsonProperty("permntOutsideKeralaPincode") @@ -685,5 +685,8 @@ public class BrideRegistryAddressDetails { @JsonProperty("presentInsideKeralaLBNameMl") private String presentInsideKeralaLBNameMl; + @JsonProperty("presentAddrVillageId") + private String presentAddrVillageId ; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java index d2e2e05c516..d475df134e7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java @@ -86,11 +86,11 @@ public class GroomRegistryAddressDetails { @Size(max = 1000) @JsonProperty("presentOutsideKeralaVillage") - private String presentOutsideKeralaVillageName; + private String presentOutsideKeralaVillageorTown; @Size(max = 1000) @JsonProperty("presentOutsideKeralaCityVilgeEn") - private String presentOutsideKeralaCityVilgeEn; + private String presentOutsideKeralaCityVilgeNameEn; @Size(max = 64) @JsonProperty("presentOutsideKeralaPincode") @@ -290,7 +290,7 @@ public class GroomRegistryAddressDetails { @Size(max = 64) @JsonProperty("permntOutsideKeralaCityVilgeEn") - private String permntOutsideKeralaCityVilgeEn; + private String permntOutsideKeralaCityVilgeNameEn; @Size(max = 64) @JsonProperty("permntInKeralaAdrTaluk") @@ -354,7 +354,7 @@ public class GroomRegistryAddressDetails { @Size(max = 1000) @JsonProperty("permntOutsideKeralaVillage") - private String permntOutsideKeralaVillage; + private String permntOutsideKeralaVillageorTown; @Size(max = 64) @JsonProperty("permntOutsideKeralaPincode") @@ -681,4 +681,7 @@ public class GroomRegistryAddressDetails { @JsonProperty("presentInsideKeralaLBNameMl") private String presentInsideKeralaLBNameMl; + @JsonProperty("presentAddrVillageId") + private String presentAddrVillageId ; + } From f24dceb978818366852d24bbe8b6f5fd3cbb56cc Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 7 May 2023 12:27:29 +0530 Subject: [PATCH 299/420] demand --- .../enrichment/MarriageDetailsEnrichment.java | 50 ++++++++++++++----- .../MarriageApplicationRepository.java | 43 +++++++++------- .../BrideAddressDetailsRowMapper.java | 39 ++++++++------- .../GroomAddressDetailsRowMapper.java | 2 +- 4 files changed, 86 insertions(+), 48 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index df44b8a7065..4345165ffb1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -322,8 +322,11 @@ private void setGroomPresentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); - marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + + // marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + // marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); } } @@ -392,18 +395,30 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { else { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + // marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + // marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + + + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + + // marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + // marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + // marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + // marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + // marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + // marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); } @@ -487,7 +502,11 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); - marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); + + // marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); } } @@ -572,8 +591,13 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + // marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + // marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 32e651516e4..187ba2de847 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -293,9 +293,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPresent()); marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getBrideAddressDetails().getTownOrVillagePresent()); - System.out.println("presentOutsideKeralaVillageorTown"+marriage.getBrideAddressDetails().getPresentOutsideKeralaVillageorTown()); - //System.out.println("townOrVillagePresent"+marriage.getBrideAddressDetails().getPresentOutsideKeralaCityVilgeNameEn()); - // marriage.getBrideAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + // marriage.getBrideAddressDetails().setPresentOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPresent()); } @@ -303,16 +301,18 @@ public List searchMarriageDetails(MarriageApplicatio //OUTSIDE INDIA else{ //PRESENT-OUTSIDE COUNTRY - marriage.getBrideAddressDetails().setPresentOutSideCountry(marriage.getBrideAddressDetails().getCountryIdPresent()); - if (marriage.getBrideAddressDetails().getPresentOutSideCountry() != null) { - String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); - marriage.getBrideAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); - - String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentOutSideCountry()); - marriage.getBrideAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); + System.out.println("setPresentaddressCountry"+marriage.getBrideAddressDetails().getCountryIdPresent()); + marriage.getBrideAddressDetails().setPresentaddressCountry(marriage.getBrideAddressDetails().getCountryIdPresent()); + if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); + marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); } - marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getVillageNamePresent()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + + marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getVillageNamePresent()); marriage.getBrideAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePresent()); @@ -467,13 +467,22 @@ public List searchMarriageDetails(MarriageApplicatio //PERMANENT-OUTSIDE INDIA else{ - if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { - String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + // if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + // String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + // marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); - String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + // String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); + // marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + // } + marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } + marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getVillageNamePermanent()); marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index e29c4aed9a0..52d0e917924 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -34,6 +34,25 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) .presentUuid(rs.getString("BPSA_id")) + .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) + .townOrVillagePresent(rs.getString("BPSA_city_town_village")) + .presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_village_name")) + .presentOutsideKeralaVillageorTown(rs.getString("BPSA_city_town_village")) + .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) + .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) + .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) + + .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_village_name")) + .presentOutSideIndiaadrsVillage(rs.getString("BPSA_city_town_village")) + .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) + .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) + .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) + .presentOutSideIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) + .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) + .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) + .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) + + .brideGroomPresent(rs.getString("BPSA_bride_groom")) // .presentaddressCountry(rs.getString("GPMA_countryid")) // .presentaddressCountry(rs.getString("BPSA_countryid")) // .presentaddressStateName(rs.getString("BPSA_stateid")) @@ -49,30 +68,16 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce //.presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) //.presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_city_town_village")) // .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) - .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) - .townOrVillagePresent(rs.getString("BPSA_city_town_village")) - .presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_village_name")) - .presentOutsideKeralaVillageorTown(rs.getString("BPSA_city_town_village")) + //.presentOutsideKeralaVillageorTown(rs.getString("BPSA_tenantid")) - .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) - .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) - .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) + // .presentOutsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) // .presentOutsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) // .presentOutsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) // .presentOutsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) // .presentOutsideKeralaStreetNameMl(rs.getString("BPSA_street_name_en")) // .presentOutsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) - .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_city_town_village")) - .presentOutSideIndiaadrsVillage(rs.getString("BPSA_village_name")) - .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) - .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) - .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) - .presentOutSideIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) - .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) - .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) - .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) - .brideGroomPresent(rs.getString("BPSA_bride_groom")) + // PERMANENT diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 54f871999de..eea1fd34f3b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -84,7 +84,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) .villageNamePermanent(rs.getString("GPMA_village_name")) .permanentUuid(rs.getString("GPMA_id")) - .townOrVillagePresent(rs.getString("GPMA_city_town_village")) + .townOrVillagePermanent(rs.getString("GPMA_city_town_village")) //.permtaddressCountry(rs.getString("GPMA_countryid")) //.permtaddressStateName(rs.getString("GPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) From f5400173f9a75dc7d78c475b62984a8b7300962f Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 7 May 2023 10:50:50 +0530 Subject: [PATCH 300/420] row mapper --- core-services/egov-persister/src/main/resources/marriage.yml | 2 +- .../repository/rowmapper/GroomAddressDetailsRowMapper.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 0d744b5ac40..95670fbdbc0 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -1185,7 +1185,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PinNoPresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index eea1fd34f3b..adf30ed6caf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -40,13 +40,13 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw // .presentInsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) // .presentInsideKeralaStreetNameMl(rs.getString("GPSA_street_name_ml")) // .presentInsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) - // .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) +// .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) .presentWardNo(rs.getString("GPSA_ward_code")) // .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) .presentOutsideKeralaCityVilgeNameEn(rs.getString("GPSA_village_name")) - // .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) + .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) // .presentOutsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) From 5312f5cdaf915cd3b2b85e9e0331232c761727e3 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 7 May 2023 12:33:18 +0530 Subject: [PATCH 301/420] search --- .../egov-persister/src/main/resources/marriage.yml | 8 ++++---- .../rowmapper/GroomAddressDetailsRowMapper.java | 5 +++-- .../web/model/marriage/GroomAddressDetails.java | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 95670fbdbc0..773e059f497 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -381,7 +381,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent @@ -539,7 +539,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent @@ -1102,7 +1102,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent @@ -1185,7 +1185,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PinNoPresent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index adf30ed6caf..6d228742a39 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -40,13 +40,13 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw // .presentInsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) // .presentInsideKeralaStreetNameMl(rs.getString("GPSA_street_name_ml")) // .presentInsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) -// .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) + // .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) .presentWardNo(rs.getString("GPSA_ward_code")) // .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) .presentOutsideKeralaCityVilgeNameEn(rs.getString("GPSA_village_name")) - .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) + // .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) // .presentOutsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) @@ -85,6 +85,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .villageNamePermanent(rs.getString("GPMA_village_name")) .permanentUuid(rs.getString("GPMA_id")) .townOrVillagePermanent(rs.getString("GPMA_city_town_village")) + //.permtaddressCountry(rs.getString("GPMA_countryid")) //.permtaddressStateName(rs.getString("GPMA_stateid")) .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 015086e8ea2..91c3f611469 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -86,6 +86,7 @@ public class GroomAddressDetails { @Size(max = 1000) @JsonProperty("presentOutsideKeralaCityVilgeEn") private String presentOutsideKeralaCityVilgeNameEn; + @Size(max = 64) @JsonProperty("presentOutsideKeralaPincode") private String presentOutsideKeralaPincode; From 39076e08c0718052b93fc089673be872af41e202 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 7 May 2023 12:40:58 +0530 Subject: [PATCH 302/420] search --- .../repository/MarriageApplicationRepository.java | 1 + 1 file changed, 1 insertion(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 187ba2de847..e683b79e19c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -638,6 +638,7 @@ public List searchMarriageDetails(MarriageApplicatio String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); } + marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getGroomAddressDetails().getVillageNamePresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); From 1492c395cb6e4429691d5f396e68ce008c9ebb60 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 7 May 2023 12:53:08 +0530 Subject: [PATCH 303/420] demand --- .../MarriageApplicationRepository.java | 26 ++++++++----------- .../BrideAddressDetailsRowMapper.java | 20 +++++++------- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 187ba2de847..12cf48999e7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -157,16 +157,12 @@ public List searchMarriageDetails(MarriageApplicatio marriage.setMarriageTenantIdMl(tenantIdMl); } //PRESENT ADDRESS DETAILS -BRIDE -System.out.println("InsideCountry and state!=null"+marriage.getBrideAddressDetails().getCountryIdPresent()); -System.out.println("InsideCountry and state!=null"+marriage.getBrideAddressDetails().getStateIdPresent()); - if (marriage.getBrideAddressDetails().getCountryIdPresent()!=null && marriage.getBrideAddressDetails().getStateIdPresent()!=null){ + + if (marriage.getBrideAddressDetails().getCountryIdPresent()!=null ){ //INSIDE INDIA - System.out.println("InsideCountry and state!=null"); if (marriage.getBrideAddressDetails().getCountryIdPresent().equals(MarriageConstants.COUNTRY_CODE)){ - System.out.println("InsideCountry!=null"+marriage.getBrideAddressDetails().getCountryIdPresent()); //INSIDE KERALA-PRESENT if (marriage.getBrideAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)){ - System.out.println("Insidestate!=null"+marriage.getBrideAddressDetails().getStateIdPresent()); //PRESENT-INSIDE INDIA-INSIDE KERALA marriage.getBrideAddressDetails().setPresentaddressCountry(marriage.getBrideAddressDetails().getCountryIdPresent()); @@ -301,7 +297,7 @@ public List searchMarriageDetails(MarriageApplicatio //OUTSIDE INDIA else{ //PRESENT-OUTSIDE COUNTRY - System.out.println("setPresentaddressCountry"+marriage.getBrideAddressDetails().getCountryIdPresent()); + marriage.getBrideAddressDetails().setPresentaddressCountry(marriage.getBrideAddressDetails().getCountryIdPresent()); if (marriage.getBrideAddressDetails().getPresentaddressCountry() != null) { String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); @@ -310,20 +306,20 @@ public List searchMarriageDetails(MarriageApplicatio String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); } - + // System.out.println("setPresentaddressCountry"+marriage.getBrideAddressDetails().getTownOrVillagePresent()); marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getTownOrVillagePresent()); marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getVillageNamePresent()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePresent()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaPostCode(marriage.getBrideAddressDetails().getOutSideIndiaPostCodePresent()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEn()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMl()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressEn()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressMl()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEnB()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMlB()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressEnB()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressMlB()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceEn()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceMl()); } } // PERMANENT ADDRESS DETAILS -BRIDE diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 52d0e917924..742d8fefac1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -42,16 +42,16 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) - .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_village_name")) - .presentOutSideIndiaadrsVillage(rs.getString("BPSA_city_town_village")) - .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) - .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) - .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) - .presentOutSideIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) - .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) - .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) - .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) - + // .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_village_name")) + // .presentOutSideIndiaadrsVillage(rs.getString("BPSA_city_town_village")) + .presentOthrIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) + .presentOthrIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) + .presentOthrIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) + .presentOthrIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) + .presentOthrIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) + .presentOthrIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) + // .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) + .outSideIndiaPostCodePresent(rs.getString("BPSA_ot_zipcode")) .brideGroomPresent(rs.getString("BPSA_bride_groom")) // .presentaddressCountry(rs.getString("GPMA_countryid")) // .presentaddressCountry(rs.getString("BPSA_countryid")) From 1d61b841c8e17ca3aee96c67f136e20618349f21 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 7 May 2023 12:54:00 +0530 Subject: [PATCH 304/420] demand --- .../src/main/resources/marriage.yml | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 0d744b5ac40..f0f8b09e49c 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -381,7 +381,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + # - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent @@ -411,7 +412,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOthrIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceEn - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceMl @@ -539,8 +540,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode - + # - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPresent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent - jsonPath: $.MarriageDetails.*.id @@ -569,7 +571,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOthrIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceEn - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceMl @@ -1102,7 +1104,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + # - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent @@ -1122,7 +1125,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOthrIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceEn - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceMl @@ -1185,7 +1188,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + # - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent @@ -1205,7 +1209,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOthrIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceEn - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceMl @@ -1215,7 +1219,6 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent - - jsonPath: $.MarriageDetails.*.id - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName @@ -1422,7 +1425,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileURL - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId From 49ccb66e4955b45aeb17f88dd7d93813d5191142 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 7 May 2023 13:04:46 +0530 Subject: [PATCH 305/420] search --- .../MarriageApplicationRepository.java | 13 ++++++--- .../BrideAddressDetailsRowMapper.java | 27 ++++++++++--------- .../GroomAddressDetailsRowMapper.java | 8 +++--- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 995a0a0a664..a3d4ff7b8d5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -289,8 +289,8 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPresent()); marriage.getBrideAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + marriage.getBrideAddressDetails().setPresentOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPresent()); - // marriage.getBrideAddressDetails().setPresentOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPresent()); } } @@ -320,6 +320,11 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceEn()); marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceMl()); + +// marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); +// marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); + + } } // PERMANENT ADDRESS DETAILS -BRIDE @@ -457,8 +462,9 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - - } + + + } } //PERMANENT-OUTSIDE INDIA else{ @@ -650,6 +656,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 742d8fefac1..3e87a09fed5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -30,28 +30,29 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) .presentWardNo(rs.getString("BPSA_ward_code")) - .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) +// .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) .presentUuid(rs.getString("BPSA_id")) .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) .townOrVillagePresent(rs.getString("BPSA_city_town_village")) .presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_village_name")) - .presentOutsideKeralaVillageorTown(rs.getString("BPSA_city_town_village")) - .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) +// .presentOutsideKeralaVillageorTown(rs.getString("BPSA_city_town_village")) +// .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) - // .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_village_name")) - // .presentOutSideIndiaadrsVillage(rs.getString("BPSA_city_town_village")) - .presentOthrIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) - .presentOthrIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) - .presentOthrIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) - .presentOthrIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) - .presentOthrIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) - .presentOthrIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) - // .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) - .outSideIndiaPostCodePresent(rs.getString("BPSA_ot_zipcode")) + +// .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_village_name")) +// .presentOutSideIndiaadrsVillage(rs.getString("BPSA_city_town_village")) + .presentOutSideIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) + .presentOutSideIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) + .presentOutSideIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) + .presentOutSideIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) + .presentOutSideIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) + .presentOutSideIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) + .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) + .brideGroomPresent(rs.getString("BPSA_bride_groom")) // .presentaddressCountry(rs.getString("GPMA_countryid")) // .presentaddressCountry(rs.getString("BPSA_countryid")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 6d228742a39..f6d82a275e3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -59,7 +59,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) - .presentOutSideIndiaadrsCityTown(rs.getString("GPSA_city_town_village")) +// .presentOutSideIndiaadrsCityTown(rs.getString("GPSA_city_town_village")) .presentOutSideIndiaadrsVillage(rs.getString("GPSA_village_name")) .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) @@ -104,8 +104,8 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) // .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) - .permntOutsideKeralaVillageorTwon(rs.getString("GPMA_city_town_village")) - .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) +// .permntOutsideKeralaVillageorTwon(rs.getString("GPMA_city_town_village")) +// .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) //.permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) //.permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) // .permntOutsideKeralaHouseNameEn(rs.getString("GPMA_housename_en")) @@ -124,7 +124,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) .brideGroomPermanent(rs.getString("GPMA_bride_groom")) .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name")) - .permntOutsideIndiaCityTown(rs.getString("GPMA_city_town_village")) +// .permntOutsideIndiaCityTown(rs.getString("GPMA_city_town_village")) // .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) From 94c18ac810ee95b77e3d5b5611eb16836e9d3790 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 7 May 2023 13:40:35 +0530 Subject: [PATCH 306/420] service --- .../MarriageApplicationRepository.java | 60 ++++++++++++------- .../BrideAddressDetailsRowMapper.java | 26 +++++--- .../model/marriage/BrideAddressDetails.java | 30 +++++----- .../model/marriage/GroomAddressDetails.java | 18 +++--- .../model/BrideRegistryAddressDetails.java | 16 ++--- .../model/GroomRegistryAddressDetails.java | 16 ++--- 6 files changed, 96 insertions(+), 70 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 995a0a0a664..d25df9dc20a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -306,7 +306,7 @@ public List searchMarriageDetails(MarriageApplicatio String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); } - // System.out.println("setPresentaddressCountry"+marriage.getBrideAddressDetails().getTownOrVillagePresent()); + marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getTownOrVillagePresent()); marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getVillageNamePresent()); @@ -323,7 +323,7 @@ public List searchMarriageDetails(MarriageApplicatio } } // PERMANENT ADDRESS DETAILS -BRIDE - if (marriage.getBrideAddressDetails().getCountryIdPermanent()!=null && marriage.getBrideAddressDetails().getStateIdPermanent()!=null){ + if (marriage.getBrideAddressDetails().getCountryIdPermanent()!=null){ //INSIDE INDIA if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)){ //INSIDE KERALA-PERMANENT @@ -479,19 +479,34 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } - marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getVillageNamePermanent()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaVillage(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaCityTown(marriage.getBrideAddressDetails().getVillageNamePermanent()); + + marriage.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriage.getBrideAddressDetails().getOutSideIndiaPostCodePermanent()); + + marriage.getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOthrIndiaLineoneEn()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOthrIndiaLineoneMl()); + + marriage.getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOthrIndiaLinetwoEn()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOthrIndiaLinetwoMl()); + + marriage.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPermntOthrIndiaprovinceEn()); + marriage.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPermntOthrIndiaprovinceMl()); + + + // marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getTownOrVillagePresent()); + // marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getVillageNamePresent()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePermanent()); + // marriage.getBrideAddressDetails().setPresentOutSideIndiaPostCode(marriage.getBrideAddressDetails().getOutSideIndiaPostCodePresent()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); + // marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressEn()); + // marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressMl()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); + // marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressEnB()); + // marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressMlB()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceEn()); - marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceMl()); + // marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceEn()); + // marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceMl()); } @@ -656,13 +671,13 @@ public List searchMarriageDetails(MarriageApplicatio //GROOM-OUTSIDE INDIA else{ //GROOM-PRESENT-OUTSIDE COUNTRY - marriage.getGroomAddressDetails().setPresentOutSideCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); - if (marriage.getGroomAddressDetails().getPresentOutSideCountry() != null) { - String presentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutSideCountry()); - marriage.getGroomAddressDetails().setPresentOutSideCountryNameEn(presentOutSideCountryNameEn); + marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { + String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - String presentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutSideCountry()); - marriage.getGroomAddressDetails().setPresentOutSideCountryNameMl(presentOutSideCountryNameMl); + String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); } marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePresent()); marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); @@ -820,12 +835,13 @@ public List searchMarriageDetails(MarriageApplicatio //GROOM-PERMANENT-OUTSIDE INDIA else{ - if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { - String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getGroomAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); + marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); - marriage.getGroomAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePermanent()); marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 742d8fefac1..66d34416606 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -50,7 +50,6 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentOthrIndiaAdressMlB(rs.getString("BPSA_ot_address2_ml")) .presentOthrIndiaProvinceEn(rs.getString("BPSA_ot_state_region_province_en")) .presentOthrIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) - // .presentOutSideIndiaPostCode(rs.getString("BPSA_ot_zipcode")) .outSideIndiaPostCodePresent(rs.getString("BPSA_ot_zipcode")) .brideGroomPresent(rs.getString("BPSA_bride_groom")) // .presentaddressCountry(rs.getString("GPMA_countryid")) @@ -124,15 +123,26 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name")) .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) - .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) - .permntOutsideIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) - .permntOutsideIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) - .permntOutsideIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) + // .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) + // .permntOutsideIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) + // .permntOutsideIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) + // .permntOutsideIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) + + + .permntOthrIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) + .permntOthrIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) + .permntOthrIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) + .permntOthrIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) + .permntOthrIndiaprovinceEn(rs.getString("BPMA_ot_state_region_province_en")) + .permntOthrIndiaprovinceMl(rs.getString("BPMA_ot_state_region_province_ml")) + .outSideIndiaPostCodePermanent(rs.getString("BPMA_ot_zipcode")) + + // .permntOutsideIndiaVillage(rs.getString("")) // .permntOutsideIndiaCityTown(rs.getString("")) - .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) - .permntOutSideIndiaProvinceMl(rs.getString("BPMA_ot_state_region_province_ml")) - .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) + // .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) + // .permntOutSideIndiaProvinceMl(rs.getString("BPMA_ot_state_region_province_ml")) + // .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) .brideGroomPermanent(rs.getString("BPMA_bride_groom")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 2ac48ad0987..07fa1c5e55c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -299,11 +299,11 @@ public class BrideAddressDetails { private String permntInKeralaAdrVillage; @Size(max = 2500) - @JsonProperty("permntOutSideIndiaProvinceMl") + @JsonProperty("permntOutSideIndiaprovinceMl") private String permntOutSideIndiaProvinceMl; @Size(max = 2500) - @JsonProperty("permntOutSideIndiaProvinceEn") + @JsonProperty("permntOutSideIndiaprovinceEn") private String permntOutSideIndiaProvinceEn; @Size(max = 1000) @@ -418,9 +418,9 @@ public class BrideAddressDetails { @JsonProperty("permanentOutsideIndiaPostCode") private String permanentOutsideIndiaPostCode; - @Size(max = 64) - @JsonProperty("permntOutsideIndiaCountry") - private String permntOutsideIndiaCountry; + // @Size(max = 64) + // @JsonProperty("permntOutsideIndiaCountry") + // private String permntOutsideIndiaCountry; ////Db Fields////// @@ -529,8 +529,8 @@ public class BrideAddressDetails { @JsonProperty("outSideIndiaPostCodePermanent") private String outSideIndiaPostCodePermanent; - @JsonProperty("PermanentAddrCityOrVillageEn") - private String permanentAddrCityOrVillageEn ; + // @JsonProperty("PermanentAddrCityOrVillageEn") + // private String permanentAddrCityOrVillageEn ; //Jasmine 03.05.2023 @@ -546,17 +546,17 @@ public class BrideAddressDetails { @JsonProperty("presentaddressCountryNameMl") private String presentaddressCountryNameMl ; - @JsonProperty("presentOutSideCountryNameEn") - private String presentOutSideCountryNameEn ; + // @JsonProperty("presentOutSideCountryNameEn") + // private String presentOutSideCountryNameEn ; - @JsonProperty("presentOutSideCountryNameMl") - private String presentOutSideCountryNameMl ; + // @JsonProperty("presentOutSideCountryNameMl") + // private String presentOutSideCountryNameMl ; - @JsonProperty("permanentOutSideCountryNameEn") - private String permanentOutSideCountryNameEn ; + // @JsonProperty("permanentOutSideCountryNameEn") + // private String permanentOutSideCountryNameEn ; - @JsonProperty("permanentOutSideCountryNameMl") - private String permanentOutSideCountryNameMl ; + // @JsonProperty("permanentOutSideCountryNameMl") + // private String permanentOutSideCountryNameMl ; @JsonProperty("presentaddressStateNameEn") private String presentaddressStateNameEn; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 91c3f611469..d0ba831e56d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -297,7 +297,7 @@ public class GroomAddressDetails { private String permntInKeralaAdrVillage; @Size(max = 2500) - @JsonProperty("permntOutSideIndiaProvinceMl") + @JsonProperty("permntOutSideIndiaprovinceMl") private String permntOutSideIndiaProvinceMl; @Size(max = 2500) @@ -541,17 +541,17 @@ public class GroomAddressDetails { @JsonProperty("presentaddressCountryNameMl") private String presentaddressCountryNameMl ; - @JsonProperty("presentOutSideCountryNameEn") - private String presentOutSideCountryNameEn ; + // @JsonProperty("presentOutSideCountryNameEn") + // private String presentOutSideCountryNameEn ; - @JsonProperty("presentOutSideCountryNameMl") - private String presentOutSideCountryNameMl ; + // @JsonProperty("presentOutSideCountryNameMl") + // private String presentOutSideCountryNameMl ; - @JsonProperty("permanentOutSideCountryNameEn") - private String permanentOutSideCountryNameEn ; + // @JsonProperty("permanentOutSideCountryNameEn") + // private String permanentOutSideCountryNameEn ; - @JsonProperty("permanentOutSideCountryNameMl") - private String permanentOutSideCountryNameMl ; + // @JsonProperty("permanentOutSideCountryNameMl") + // private String permanentOutSideCountryNameMl ; @JsonProperty("presentaddressStateNameEn") private String presentaddressStateNameEn; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java index b284546896f..893e3cb8ea4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/BrideRegistryAddressDetails.java @@ -559,17 +559,17 @@ public class BrideRegistryAddressDetails { @JsonProperty("presentaddressCountryNameMl") private String presentaddressCountryNameMl ; - @JsonProperty("presentOutSideCountryNameEn") - private String presentOutSideCountryNameEn ; + // @JsonProperty("presentOutSideCountryNameEn") + // private String presentOutSideCountryNameEn ; - @JsonProperty("presentOutSideCountryNameMl") - private String presentOutSideCountryNameMl ; + // @JsonProperty("presentOutSideCountryNameMl") + // private String presentOutSideCountryNameMl ; - @JsonProperty("permanentOutSideCountryNameEn") - private String permanentOutSideCountryNameEn ; + // @JsonProperty("permanentOutSideCountryNameEn") + // private String permanentOutSideCountryNameEn ; - @JsonProperty("permanentOutSideCountryNameMl") - private String permanentOutSideCountryNameMl ; + // @JsonProperty("permanentOutSideCountryNameMl") + // private String permanentOutSideCountryNameMl ; @JsonProperty("presentaddressStateNameEn") private String presentaddressStateNameEn; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java index d475df134e7..4c27715308f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/GroomRegistryAddressDetails.java @@ -555,17 +555,17 @@ public class GroomRegistryAddressDetails { @JsonProperty("presentaddressCountryNameMl") private String presentaddressCountryNameMl ; - @JsonProperty("presentOutSideCountryNameEn") - private String presentOutSideCountryNameEn ; + // @JsonProperty("presentOutSideCountryNameEn") + // private String presentOutSideCountryNameEn ; - @JsonProperty("presentOutSideCountryNameMl") - private String presentOutSideCountryNameMl ; + // @JsonProperty("presentOutSideCountryNameMl") + // private String presentOutSideCountryNameMl ; - @JsonProperty("permanentOutSideCountryNameEn") - private String permanentOutSideCountryNameEn ; + // @JsonProperty("permanentOutSideCountryNameEn") + // private String permanentOutSideCountryNameEn ; - @JsonProperty("permanentOutSideCountryNameMl") - private String permanentOutSideCountryNameMl ; + // @JsonProperty("permanentOutSideCountryNameMl") + // private String permanentOutSideCountryNameMl ; @JsonProperty("presentaddressStateNameEn") private String presentaddressStateNameEn; From e22f8b6e8183d3caa3cf52efcce5084c20197adc Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 7 May 2023 13:42:39 +0530 Subject: [PATCH 307/420] search --- .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../repository/MarriageApplicationRepository.java | 9 +++++---- .../rowmapper/GroomAddressDetailsRowMapper.java | 2 +- .../validator/MarriageApplicationValidator.java | 8 ++++---- .../web/model/marriage/GroomAddressDetails.java | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 4345165ffb1..6618f36ea74 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -388,7 +388,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageorTwon()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageorTown()); marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageEn()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 062b4cbdf51..b4b626ed9c1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -320,7 +320,6 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceEn()); marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceMl()); - // marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); // marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); @@ -828,7 +827,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getGroomAddressDetails().getVillageNamePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getVillageNamePermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); // marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); @@ -836,8 +835,10 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); - - } + + + + } } //GROOM-PERMANENT-OUTSIDE INDIA else{ diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index f6d82a275e3..75a4670dd7e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -60,7 +60,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) // .presentOutSideIndiaadrsCityTown(rs.getString("GPSA_city_town_village")) - .presentOutSideIndiaadrsVillage(rs.getString("GPSA_village_name")) +// .presentOutSideIndiaadrsVillage(rs.getString("GPSA_village_name")) .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) .presentOutSideIndiaPostCode(rs.getString("GPSA_ot_zipcode")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 7e2f2a705c7..31b36f5430a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -914,11 +914,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo - .getPermntOutsideKeralaVillageorTwon())) { + .getPermntOutsideKeralaVillageorTown())) { throw new CustomException( "GROOM PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - groomaddressInfo.getPermntOutsideKeralaVillageorTwon() + groomaddressInfo.getPermntOutsideKeralaVillageorTown() + " is invalid"); } @@ -932,11 +932,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { } if (StringUtils.isEmpty(groomaddressInfo - .getPermntOutsideKeralaVillageorTwon())) { + .getPermntOutsideKeralaVillageorTown())) { throw new CustomException( " GROOM PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", "The Village " + - groomaddressInfo.getPermntOutsideKeralaVillageorTwon() + groomaddressInfo.getPermntOutsideKeralaVillageorTown() + " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index d0ba831e56d..f804191d5fe 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -350,7 +350,7 @@ public class GroomAddressDetails { @Size(max = 1000) @JsonProperty("permntOutsideKeralaVillage") - private String permntOutsideKeralaVillageorTwon; + private String permntOutsideKeralaVillageorTown; @Size(max = 64) @JsonProperty("permntOutsideKeralaPincode") From 467a9b4bf4c453e76617674903c8b812fa342948 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 7 May 2023 14:04:33 +0530 Subject: [PATCH 308/420] outside india groom repository updated --- .../MarriageApplicationRepository.java | 641 +++++++++++++----- .../BrideAddressDetailsRowMapper.java | 99 ++- .../GroomAddressDetailsRowMapper.java | 300 ++++---- 3 files changed, 701 insertions(+), 339 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 062b4cbdf51..438849b7d27 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -321,10 +321,6 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceEn()); marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceMl()); -// marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); -// marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); - - } } // PERMANENT ADDRESS DETAILS -BRIDE @@ -457,25 +453,16 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getBrideAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getVillageNamePermanent()); - // marriage.getBrideAddressDetails().setPermntOutsideKeralaVillage(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); marriage.getBrideAddressDetails().setPermntOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - } } //PERMANENT-OUTSIDE INDIA else{ - // if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { - // String permanentOutSideCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - // marriage.getBrideAddressDetails().setPermanentOutSideCountryNameEn(permanentOutSideCountryNameEn); - - // String permanentOutSideCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); - // marriage.getBrideAddressDetails().setPermanentOutSideCountryNameMl(permanentOutSideCountryNameMl); - // } marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); @@ -499,52 +486,18 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPermntOthrIndiaprovinceEn()); marriage.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPermntOthrIndiaprovinceMl()); - - // marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getBrideAddressDetails().getTownOrVillagePresent()); - // marriage.getBrideAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getBrideAddressDetails().getVillageNamePresent()); - - // marriage.getBrideAddressDetails().setPresentOutSideIndiaPostCode(marriage.getBrideAddressDetails().getOutSideIndiaPostCodePresent()); - - // marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressEn()); - // marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressMl()); - - // marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressEnB()); - // marriage.getBrideAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getBrideAddressDetails().getPresentOthrIndiaAdressMlB()); - - // marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceEn()); - // marriage.getBrideAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOthrIndiaProvinceMl()); - } + //***************GROOM ADDREDD DETAILS */ + //PRESENT ADDRESS DETAILS -GROOM - // //Groom Present Address TenantId name - // if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { - // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); - - // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); - // } - // //Groom Permanent Address TenantId name - // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { - // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); - - // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); - // } - } -//GROOM ADDRESS DETAILS - if (marriage.getGroomAddressDetails().getCountryIdPresent()!=null && marriage.getGroomAddressDetails().getStateIdPresent()!=null){ - //GROOM-INSIDE INDIA - System.out.println("InsideCountry and state!=null"); + if (marriage.getGroomAddressDetails().getCountryIdPresent()!=null ){ + //INSIDE INDIA if (marriage.getGroomAddressDetails().getCountryIdPresent().equals(MarriageConstants.COUNTRY_CODE)){ - System.out.println("InsideCountry!=null"+marriage.getGroomAddressDetails().getCountryIdPresent()); - //GROOM-INSIDE KERALA-PRESENT + //INSIDE KERALA-PRESENT if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)){ - System.out.println("Insidestate!=null"+marriage.getGroomAddressDetails().getStateIdPresent()); - //GROOM-PRESENT-INSIDE INDIA-INSIDE KERALA + //PRESENT-INSIDE INDIA-INSIDE KERALA marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); - + if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); @@ -552,8 +505,8 @@ public List searchMarriageDetails(MarriageApplicatio String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); } - //GROOM-PRESENT-STATE - marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); + //PRESENT-STATE + marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); @@ -561,17 +514,17 @@ public List searchMarriageDetails(MarriageApplicatio String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); } - //GROOM-PRESENT-DISTRICT + //PRESENT-DISTRICT marriage.getGroomAddressDetails().setPresentInsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPresent()); if (marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null) { String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); - + String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); } - // GROOM-PRESENT-TALUK - + // PRESENT-TALUK + if (marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null) { String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); @@ -579,7 +532,7 @@ public List searchMarriageDetails(MarriageApplicatio String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); } - //GROOM-PRESENT-VILLAGE + //PRESENT-VILLAGE if (marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); marriage.getGroomAddressDetails().setPresentInsideKeralaVillageEn(presntInsKeralaVillageEn); @@ -587,7 +540,7 @@ public List searchMarriageDetails(MarriageApplicatio String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); marriage.getGroomAddressDetails().setPresentInsideKeralaVillageMl(presntInsKeralaVillageMl); } - //GROOM-PRESENT -WARD + //PRESENT -WARD if (marriage.getGroomAddressDetails().getPresentWardNo() != null) { String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); @@ -595,7 +548,7 @@ public List searchMarriageDetails(MarriageApplicatio String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); marriage.getGroomAddressDetails().setPresentWardNoMl(presentWardNoMl); } - //GROOM-PRESENT-POST OFFICE + //PRESENT-POST OFFICE if (marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null) { String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); @@ -603,31 +556,31 @@ public List searchMarriageDetails(MarriageApplicatio String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); } - //GROOM- Present Address TenantId name + //GROOM Present Address TenantId name if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); - + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); } marriage.getGroomAddressDetails().setPresentInsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); marriage.getGroomAddressDetails().setPresentInsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPresent()); - + marriage.getGroomAddressDetails().setPresentInsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPresent()); marriage.getGroomAddressDetails().setPresentInsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPresent()); - + marriage.getGroomAddressDetails().setPresentInsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); marriage.getGroomAddressDetails().setPresentInsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); - + marriage.getGroomAddressDetails().setPresentInsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); } - //GROOM-OUTSIDE KERALA-PRESENT + //OUTSIDE KERALA-PRESENT else{ - //GROOM-PRESENT-COUNTRY + //PRESENT-COUNTRY marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); @@ -636,7 +589,7 @@ public List searchMarriageDetails(MarriageApplicatio String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); } - //GROOM-PRESENT-STATE + //PRESENT-STATE marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); @@ -646,7 +599,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); } - //GROOM-PRESENT-OUTSIDE KERALA-DISTRICT + //PRESENT-OUTSIDE KERALA-DISTRICT marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPresent()); if (marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null) { String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); @@ -655,29 +608,28 @@ public List searchMarriageDetails(MarriageApplicatio String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); } - marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); - marriage.getGroomAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getGroomAddressDetails().getVillageNamePresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPresent()); - + marriage.getGroomAddressDetails().setPresentOutsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPresent()); - + marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); marriage.getGroomAddressDetails().setPresentOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); + } } - //GROOM-OUTSIDE INDIA + //OUTSIDE INDIA else{ - //GROOM-PRESENT-OUTSIDE COUNTRY + //PRESENT-OUTSIDE COUNTRY + marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); @@ -686,8 +638,9 @@ public List searchMarriageDetails(MarriageApplicatio String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); } - marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePresent()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); + + marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getTownOrVillagePresent()); + marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getVillageNamePresent()); marriage.getGroomAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePresent()); @@ -699,33 +652,34 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); + } } - // GROOM-PERMANENT ADDRESS DETAILS -BRIDE - if (marriage.getGroomAddressDetails().getCountryIdPermanent()!=null && marriage.getGroomAddressDetails().getStateIdPermanent()!=null){ - //GROOM-INSIDE INDIA + // PERMANENT ADDRESS DETAILS -GROOM + if (marriage.getGroomAddressDetails().getCountryIdPermanent()!=null){ + //INSIDE INDIA if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)){ - //GROOM-INSIDE KERALA-PERMANENT + //INSIDE KERALA-PERMANENT if (marriage.getGroomAddressDetails().getStateIdPermanent().equals(MarriageConstants.STATE_CODE_SMALL)){ - //GROOM-PERMANENT-COUNTRY - marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); - if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + //PERMANENT-COUNTRY + marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //GROOM-PERMANENT-STATE - marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); - if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { + } + //PERMANENT-STATE + marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); - } - //GROOM-PERMANENT-DISTRICT + } + //PERMANENT-DISTRICT marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); if (marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null) { String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); @@ -733,8 +687,8 @@ public List searchMarriageDetails(MarriageApplicatio String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); - } - //GROOM-PERMANENT-TALUK + } + //PERMANENT-TALUK if (marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null) { String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); @@ -742,7 +696,7 @@ public List searchMarriageDetails(MarriageApplicatio String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); } - //GROOM-PERMANENT-VILLAGE + //PERMANENT-VILLAGE if (marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); @@ -750,7 +704,7 @@ public List searchMarriageDetails(MarriageApplicatio String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); } - //GROOM-PERMANENT-POSTOFFICE + //PERMANENT-POSTOFFICE marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOffice(marriage.getGroomAddressDetails().getPoNoPermanent()); if (marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); @@ -759,7 +713,7 @@ public List searchMarriageDetails(MarriageApplicatio String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); } - //GROOM-PERMANENT-WARD + //PERMANENT-WARD if (marriage.getGroomAddressDetails().getPermntInKeralaWardNo() != null) { String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); marriage.getGroomAddressDetails().setPrmttWardNoEn(prmttWardNoEn); @@ -768,16 +722,14 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); } - //GROOM- Permanent Address TenantId name + //GROOM Permanent Address TenantId name if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); - + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); } - - marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); @@ -790,27 +742,27 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); } - //GROOM-PERMANENT-INSIDE INDIA-OUTSIDE KERALA + //PERMANENT-INSIDE INDIA-OUTSIDE KERALA else{ - //GROOM-PERMANENT-COUNTRY + //PERMANENT-COUNTRY marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } - //GROOM-PERMANENT-STATE + //PERMANENT-STATE marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } - //GROOM-PERMANENT-DISTRICT + //PERMANENT-DISTRICT marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); @@ -819,6 +771,7 @@ public List searchMarriageDetails(MarriageApplicatio String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); } + marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); @@ -828,73 +781,427 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getGroomAddressDetails().getVillageNamePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - - // marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + + marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getVillageNamePermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); - - } + marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + + } } - //GROOM-PERMANENT-OUTSIDE INDIA + //PERMANENT-OUTSIDE INDIA else{ - marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); - if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + + marriage.getGroomAddressDetails().setPermntOutsideIndiaVillage(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaCityTown(marriage.getGroomAddressDetails().getVillageNamePermanent()); + + marriage.getGroomAddressDetails().setPermanentOutsideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePermanent()); + + marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); + + marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); + + marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceEn()); + marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceMl()); - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } - marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePermanent()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + } +/*******END************** */ + + // //Groom Present Address TenantId name + // if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { + // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); + + // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); + // } + // //Groom Permanent Address TenantId name + // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { + // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); + + // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); + // } + +//GROOM ADDRESS DETAILS + // if (marriage.getGroomAddressDetails().getCountryIdPresent()!=null && marriage.getGroomAddressDetails().getStateIdPresent()!=null){ + // //GROOM-INSIDE INDIA + // System.out.println("InsideCountry and state!=null"); + // if (marriage.getGroomAddressDetails().getCountryIdPresent().equals(MarriageConstants.COUNTRY_CODE)){ + // System.out.println("InsideCountry!=null"+marriage.getGroomAddressDetails().getCountryIdPresent()); + // //GROOM-INSIDE KERALA-PRESENT + // if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)){ + // System.out.println("Insidestate!=null"+marriage.getGroomAddressDetails().getStateIdPresent()); + // //GROOM-PRESENT-INSIDE INDIA-INSIDE KERALA + // marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); + + // if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { + // String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + // marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + // String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + // marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + // } + // //GROOM-PRESENT-STATE + // marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); + // if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { + // String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); + // marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + // String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); + // marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + // } + // //GROOM-PRESENT-DISTRICT + // marriage.getGroomAddressDetails().setPresentInsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPresent()); + // if (marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null) { + // String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); + + // String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); + // } + // // GROOM-PRESENT-TALUK + + // if (marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null) { + // String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); + + // String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); + // } + // //GROOM-PRESENT-VILLAGE + // if (marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { + // String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaVillageEn(presntInsKeralaVillageEn); + + // String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaVillageMl(presntInsKeralaVillageMl); + // } + // //GROOM-PRESENT -WARD + // if (marriage.getGroomAddressDetails().getPresentWardNo() != null) { + // String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); + // marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); + + // String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); + // marriage.getGroomAddressDetails().setPresentWardNoMl(presentWardNoMl); + // } + // //GROOM-PRESENT-POST OFFICE + // if (marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null) { + // String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); + + // String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); + // } + // //GROOM- Present Address TenantId name + // if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { + // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); + + // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); + // } + + // marriage.getGroomAddressDetails().setPresentInsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPresent()); + + // marriage.getGroomAddressDetails().setPresentInsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPresent()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPresent()); + + // marriage.getGroomAddressDetails().setPresentInsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); + // marriage.getGroomAddressDetails().setPresentInsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); + + // marriage.getGroomAddressDetails().setPresentInsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); + + + // } + // //GROOM-OUTSIDE KERALA-PRESENT + // else{ + // //GROOM-PRESENT-COUNTRY + // marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); + // if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { + // String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + // marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + // String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + // marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + // } + // //GROOM-PRESENT-STATE + // marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); + // if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { + // String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); + // marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); + + // String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); + // marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); + // } + + // //GROOM-PRESENT-OUTSIDE KERALA-DISTRICT + // marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPresent()); + // if (marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null) { + // String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + // marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); + + // String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); + // marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); + // } + // marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); + + // marriage.getGroomAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getGroomAddressDetails().getVillageNamePresent()); + // marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + + // marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); + // marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPresent()); + + // marriage.getGroomAddressDetails().setPresentOutsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPresent()); + // marriage.getGroomAddressDetails().setPresentOutsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPresent()); + + // marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); + // marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); + + // marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + // marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + // marriage.getGroomAddressDetails().setPresentOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); + + // } + // } + // //GROOM-OUTSIDE INDIA + // else{ + // //GROOM-PRESENT-OUTSIDE COUNTRY + // marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); + // if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { + // String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + // marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); + + // String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); + // marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); + // } + // marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePresent()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); + + // marriage.getGroomAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePresent()); + + // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEn()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMl()); + + // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEnB()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMlB()); + + // marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); + // } + // } + // // GROOM-PERMANENT ADDRESS DETAILS + // if (marriage.getGroomAddressDetails().getCountryIdPermanent()!=null && marriage.getGroomAddressDetails().getStateIdPermanent()!=null){ + // //GROOM-INSIDE INDIA + // if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)){ + // //GROOM-INSIDE KERALA-PERMANENT + // if (marriage.getGroomAddressDetails().getStateIdPermanent().equals(MarriageConstants.STATE_CODE_SMALL)){ + // //GROOM-PERMANENT-COUNTRY + // marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); + // if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + // } + // //GROOM-PERMANENT-STATE + // marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); + // if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { + // String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + // marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + + // String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + // marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); + // } + // //GROOM-PERMANENT-DISTRICT + // marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); + // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null) { + // String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); + + // String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); + // } + // //GROOM-PERMANENT-TALUK + // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null) { + // String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); + + // String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); + // } + // //GROOM-PERMANENT-VILLAGE + // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { + // String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); + + // String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); + // } + // //GROOM-PERMANENT-POSTOFFICE + // marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOffice(marriage.getGroomAddressDetails().getPoNoPermanent()); + // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + // String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); + + // String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); + // } + // //GROOM-PERMANENT-WARD + // if (marriage.getGroomAddressDetails().getPermntInKeralaWardNo() != null) { + // String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); + // marriage.getGroomAddressDetails().setPrmttWardNoEn(prmttWardNoEn); + + // String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); + // marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); + // } + + // //GROOM- Permanent Address TenantId name + // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { + // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); + + // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); + // } + + + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); + + // marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); + + // marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); + + // marriage.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); + + // } + // //GROOM-PERMANENT-INSIDE INDIA-OUTSIDE KERALA + // else{ + // //GROOM-PERMANENT-COUNTRY + // marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); + // if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + // } + // //GROOM-PERMANENT-STATE + // marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); + // if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { + // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + // } + // //GROOM-PERMANENT-DISTRICT + // marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); + // if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { + // String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + // marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + + // String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + // marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + // } + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); + + // marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); + + // marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); + // marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); + + // marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getGroomAddressDetails().getVillageNamePermanent()); + // marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + + // // marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + // marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); + + // marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + // marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); + + // } + // } + // //GROOM-PERMANENT-OUTSIDE INDIA + // else{ + + // marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); + // if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { + // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + // } + // marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePermanent()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePermanent()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePermanent()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceEn()); - marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceMl()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceEn()); + // marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceMl()); - } - } + // } + // } - GroomDetails groomDetails = marriage.getGroomDetails(); - GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); - groomDetails.setAadharno(groomDetailsDec.getAadharno()); - if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { + GroomDetails groomDetails = marriage.getGroomDetails(); + GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { - groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - } else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { - groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); - } - BrideDetails brideDetails = marriage.getBrideDetails(); - BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); - brideDetails.setAadharno(brideDetailsDec.getAadharno()); - if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { - brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { - brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + } else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { + groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + } + BrideDetails brideDetails = marriage.getBrideDetails(); + BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); + brideDetails.setAadharno(brideDetailsDec.getAadharno()); + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { + brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { + brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + } + WitnessDetails witnessDetails = marriage.getWitnessDetails(); + WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); + witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); + witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); + criteria.setApplicationType(marriage.getApplicationtype()); + criteria.setApplicationNo(marriage.getApplicationNumber()); + criteria.setTenantId(marriage.getTenantid()); + List completeDocumentDetails = getDocumentSearchDetails(criteria, requestInfo); + marriage.setMarriageDocuments(completeDocumentDetails); } - WitnessDetails witnessDetails = marriage.getWitnessDetails(); - WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); - witnessDetails.setWitness1AadharNo(witnessDetailsDec.getWitness1AadharNo()); - witnessDetails.setWitness2AadharNo(witnessDetailsDec.getWitness2AadharNo()); - criteria.setApplicationType(marriage.getApplicationtype()); - criteria.setApplicationNo(marriage.getApplicationNumber()); - criteria.setTenantId(marriage.getTenantid()); - List completeDocumentDetails = getDocumentSearchDetails(criteria, requestInfo); - marriage.setMarriageDocuments(completeDocumentDetails); }); } return result; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index c836080df71..5e30ef96348 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -29,21 +29,13 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .villageNamePresent(rs.getString("BPSA_village_name")) .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) .presentWardNo(rs.getString("BPSA_ward_code")) - -// .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) - .presentUuid(rs.getString("BPSA_id")) .presentOutsideKeralaTalukName(rs.getString("BPSA_taluk_name")) .townOrVillagePresent(rs.getString("BPSA_city_town_village")) .presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_village_name")) -// .presentOutsideKeralaVillageorTown(rs.getString("BPSA_city_town_village")) -// .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) .presentOutsideKeralaPostOfficeEn(rs.getString("BPSA_poname_en")) .presentOutsideKeralaPostOfficeMl(rs.getString("BPSA_poname_ml")) - - // .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_village_name")) - // .presentOutSideIndiaadrsVillage(rs.getString("BPSA_city_town_village")) .presentOthrIndiaAdressEn(rs.getString("BPSA_ot_address1_en")) .presentOthrIndiaAdressMl(rs.getString("BPSA_ot_address1_ml")) .presentOthrIndiaAdressEnB(rs.getString("BPSA_ot_address2_en")) @@ -52,6 +44,40 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentOthrIndiaProvinceMl(rs.getString("BPSA_ot_state_region_province_ml")) .outSideIndiaPostCodePresent(rs.getString("BPSA_ot_zipcode")) .brideGroomPresent(rs.getString("BPSA_bride_groom")) + +// PERMANENT + + .countryIdPermanent(rs.getString("BPMA_countryid")) + .stateIdPermanent(rs.getString("BPMA_stateid")) + .districtIdPermanent(rs.getString("BPMA_districtid")) + .poNoPermanent(rs.getString("BPMA_poid")) + .pinNoPermanent(rs.getString("BPMA_pinno")) + .localityEnPermanent(rs.getString("BPMA_locality_en")) + .localityMlPermanent(rs.getString("BPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) + .villageNamePermanent(rs.getString("BPMA_village_name")) + .permanentUuid(rs.getString("BPMA_id")) + .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + .townOrVillagePermanent(rs.getString("BPMA_city_town_village")) + .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) + .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) + .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) + .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) + .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name")) + .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) + .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) + .permntOthrIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) + .permntOthrIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) + .permntOthrIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) + .permntOthrIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) + .permntOthrIndiaprovinceEn(rs.getString("BPMA_ot_state_region_province_en")) + .permntOthrIndiaprovinceMl(rs.getString("BPMA_ot_state_region_province_ml")) + .outSideIndiaPostCodePermanent(rs.getString("BPMA_ot_zipcode")) + .brideGroomPermanent(rs.getString("BPMA_bride_groom")) + .build(); // .presentaddressCountry(rs.getString("GPMA_countryid")) // .presentaddressCountry(rs.getString("BPSA_countryid")) // .presentaddressStateName(rs.getString("BPSA_stateid")) @@ -62,54 +88,31 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce // .presentInsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) // .presentInsideKeralaStreetNameMl(rs.getString("BPSA_street_name_ml")) // .presentInsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) - - + // .presentOutSideIndiaadrsCityTown(rs.getString("BPSA_village_name")) + // .presentOutSideIndiaadrsVillage(rs.getString("BPSA_city_town_village")) + // .presentOutsideKeralaVillageorTown(rs.getString("BPSA_city_town_village")) +// .presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) +// .presentInsideKeralaPincode(rs.getString("BPSA_pinno")) //.presentOutsideKeralaPincode(rs.getString("BPSA_pinno")) //.presentOutsideKeralaCityVilgeNameEn(rs.getString("BPSA_city_town_village")) - // .presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) - - //.presentOutsideKeralaVillageorTown(rs.getString("BPSA_tenantid")) - + //.presentOutsideKeralaDistrict(rs.getString("BPSA_districtid")) + //.presentOutsideKeralaVillageorTown(rs.getString("BPSA_tenantid")) // .presentOutsideKeralaLocalityNameEn(rs.getString("BPSA_locality_en")) // .presentOutsideKeralaStreetNameEn(rs.getString("BPSA_street_name_en")) // .presentOutsideKeralaHouseNameEn(rs.getString("BPSA_housename_en")) // .presentOutsideKeralaLocalityNameMl(rs.getString("BPSA_locality_ml")) // .presentOutsideKeralaStreetNameMl(rs.getString("BPSA_street_name_en")) // .presentOutsideKeralaHouseNameMl(rs.getString("BPSA_housename_ml")) - - -// PERMANENT - - .countryIdPermanent(rs.getString("BPMA_countryid")) - .stateIdPermanent(rs.getString("BPMA_stateid")) - .districtIdPermanent(rs.getString("BPMA_districtid")) - .poNoPermanent(rs.getString("BPMA_poid")) - .pinNoPermanent(rs.getString("BPMA_pinno")) - .localityEnPermanent(rs.getString("BPMA_locality_en")) - .localityMlPermanent(rs.getString("BPMA_locality_ml")) - .streetNameEnPermanent(rs.getString("BPMA_street_name_en")) - .streetNameMlPermanent(rs.getString("BPMA_street_name_ml")) - .houseNameNoEnPermanent(rs.getString("BPMA_housename_en")) - .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) - .villageNamePermanent(rs.getString("BPMA_village_name")) - .permanentUuid(rs.getString("BPMA_id")) // .permtaddressCountry(rs.getString("BPMA_countryid")) // .permtaddressStateName(rs.getString("BPMA_stateid")) - .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) - .townOrVillagePermanent(rs.getString("BPMA_city_town_village")) // .permntInKeralaAdrDistrict(rs.getString("BPMA_districtid")) - - .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) - .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) - // .permntInKeralaAdrLocalityNameEn(rs.getString("BPMA_locality_en")) + // .permntInKeralaAdrLocalityNameEn(rs.getString("BPMA_locality_en")) // .permntInKeralaAdrStreetNameEn(rs.getString("BPMA_street_name_en")) // .permntInKeralaAdrHouseNameEn(rs.getString("BPMA_housename_en")) // .permntInKeralaAdrLocalityNameMl(rs.getString("BPMA_locality_en")) // .permntInKeralaAdrStreetNameMl(rs.getString("BPMA_street_name_ml")) // .permntInKeralaAdrHouseNameMl(rs.getString("BPMA_housename_ml")) // .permntInKeralaAdrPincode(rs.getString("BPMA_pinno")) - .permntInKeralaAdrPostOffice(rs.getString("BPMA_poid")) - .permntInKeralaWardNo(rs.getString("BPMA_ward_code")) // .permntOutsideKeralaDistrict(rs.getString("BPMA_districtid")) // .permntOutsideKeralaTaluk(rs.getString("BPMA_taluk_name")) //* */.permntOutsideKeralaVillage(rs.getString("BPMA_city_town_village")) @@ -120,35 +123,21 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce // .permntOutsideKeralaLocalityNameMl(rs.getString("BPMA_locality_en")) // .permntOutsideKeralaStreetNameMl(rs.getString("BPMA_street_name_ml")) // .permntOutsideKeralaHouseNameMl(rs.getString("BPMA_housename_ml")) - .permntOutsideKeralaCityVilgeEn(rs.getString("BPMA_village_name")) - .permntOutsideKeralaPostOfficeEn(rs.getString("BPMA_poname_en")) - .permntOutsideKeralaPostOfficeMl(rs.getString("BPMA_poname_ml")) // .permntOutsideIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) // .permntOutsideIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) // .permntOutsideIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) // .permntOutsideIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) - - - .permntOthrIndiaLineoneEn(rs.getString("BPMA_ot_address1_en")) - .permntOthrIndiaLineoneMl(rs.getString("BPMA_ot_address1_ml")) - .permntOthrIndiaLinetwoEn(rs.getString("BPMA_ot_address2_en")) - .permntOthrIndiaLinetwoMl(rs.getString("BPMA_ot_address2_ml")) - .permntOthrIndiaprovinceEn(rs.getString("BPMA_ot_state_region_province_en")) - .permntOthrIndiaprovinceMl(rs.getString("BPMA_ot_state_region_province_ml")) - .outSideIndiaPostCodePermanent(rs.getString("BPMA_ot_zipcode")) - - // .permntOutsideIndiaVillage(rs.getString("")) // .permntOutsideIndiaCityTown(rs.getString("")) // .permanentOutsideIndiaPostCode(rs.getString("BPMA_ot_zipcode")) // .permntOutSideIndiaProvinceMl(rs.getString("BPMA_ot_state_region_province_ml")) // .permntOutSideIndiaProvinceEn(rs.getString("BPMA_ot_state_region_province_en")) - .brideGroomPermanent(rs.getString("BPMA_bride_groom")) + // .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) - .build(); + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index f6d82a275e3..0f3e793418f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -12,122 +12,188 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw return GroomAddressDetails.builder() -// PRESENT - .countryIdPresent(rs.getString("GPSA_countryid")) - .stateIdPresent(rs.getString("GPSA_stateid")) - .districtIdPresent(rs.getString("GPSA_districtid")) - .poNoPresent(rs.getString("GPSA_poid")) - .pinNoPresent(rs.getString("GPSA_pinno")) - .localityEnPresent(rs.getString("GPSA_locality_en")) - .localityMlPresent(rs.getString("GPSA_locality_ml")) - .streetNameEnPresent(rs.getString("GPSA_street_name_en")) - .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) - .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) - .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) - .villageNamePresent(rs.getString("GPSA_village_name")) - .townOrVillagePresent(rs.getString("GPSA_city_town_village")) - .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) - .presentUuid(rs.getString("GPSA_id")) - // .presentaddressCountry(rs.getString("GPSA_countryid")) - // .presentaddressStateName(rs.getString("GPSA_stateid")) - // .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) - // .presentInsideKeralaDistrict(rs.getString("GPSA_districtid")) - .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) - .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) - // .presentInsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) - //.presentInsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) - // .presentInsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) - // .presentInsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) - // .presentInsideKeralaStreetNameMl(rs.getString("GPSA_street_name_ml")) - // .presentInsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) - // .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) - .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) - .presentWardNo(rs.getString("GPSA_ward_code")) - // .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) - .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) - .presentOutsideKeralaCityVilgeNameEn(rs.getString("GPSA_village_name")) - // .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) - .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) - .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) - // .presentOutsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) - //.presentOutsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) - //.presentOutsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) - // .presentOutsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) - // .presentOutsideKeralaStreetNameMl(rs.getString("GPSA_street_name_en")) - // .presentOutsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) - .presentOutSideIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) - .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) - .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) - .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) -// .presentOutSideIndiaadrsCityTown(rs.getString("GPSA_city_town_village")) - .presentOutSideIndiaadrsVillage(rs.getString("GPSA_village_name")) - .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) - .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) - .presentOutSideIndiaPostCode(rs.getString("GPSA_ot_zipcode")) - .brideGroomPresent(rs.getString("GPSA_bride_groom")) - - - - -// PERMANENT - - .countryIdPermanent(rs.getString("GPMA_countryid")) - .stateIdPermanent(rs.getString("GPMA_stateid")) - .districtIdPermanent(rs.getString("GPMA_districtid")) - .poNoPermanent(rs.getString("GPMA_poid")) - .pinNoPermanent(rs.getString("GPMA_pinno")) - .localityEnPermanent(rs.getString("GPMA_locality_en")) - .localityMlPermanent(rs.getString("GPMA_locality_ml")) - .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) - .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) - .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) - .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) - .villageNamePermanent(rs.getString("GPMA_village_name")) - .permanentUuid(rs.getString("GPMA_id")) - .townOrVillagePermanent(rs.getString("GPMA_city_town_village")) - - //.permtaddressCountry(rs.getString("GPMA_countryid")) - //.permtaddressStateName(rs.getString("GPMA_stateid")) - .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) - //.permntInKeralaAdrDistrict(rs.getString("GPMA_districtid")) - .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name")) - .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) - .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) - // .permntInKeralaAdrLocalityNameEn(rs.getString("GPMA_locality_en")) - // .permntInKeralaAdrStreetNameEn(rs.getString("GPMA_street_name_en")) - // .permntInKeralaAdrHouseNameEn(rs.getString("GPMA_housename_en")) - //.permntInKeralaAdrLocalityNameMl(rs.getString("GPMA_locality_en")) - // .permntInKeralaAdrStreetNameMl(rs.getString("GPMA_street_name_ml")) - // .permntInKeralaAdrHouseNameMl(rs.getString("GPMA_housename_ml")) - // .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) - .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) - .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) - // .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) - .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) -// .permntOutsideKeralaVillageorTwon(rs.getString("GPMA_city_town_village")) -// .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) - //.permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) - //.permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) - // .permntOutsideKeralaHouseNameEn(rs.getString("GPMA_housename_en")) - // .permntOutsideKeralaLocalityNameMl(rs.getString("GPMA_locality_en")) - // .permntOutsideKeralaStreetNameMl(rs.getString("GPMA_street_name_ml")) - // .permntOutsideKeralaHouseNameMl(rs.getString("GPMA_housename_ml")) - .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) - .permntOutsideKeralaPostOfficeMl(rs.getString("GPMA_poname_ml")) - .permntOutsideIndiaLineoneEn(rs.getString("GPMA_ot_address1_en")) - .permntOutsideIndiaLineoneMl(rs.getString("GPMA_ot_address1_ml")) - .permntOutsideIndiaLinetwoEn(rs.getString("GPMA_ot_address2_en")) - .permntOutsideIndiaLinetwoMl(rs.getString("GPMA_ot_address2_ml")) -// .permntOutsideIndiaVillage(rs.getString("")) - .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) - .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) - .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) - .brideGroomPermanent(rs.getString("GPMA_bride_groom")) - .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name")) -// .permntOutsideIndiaCityTown(rs.getString("GPMA_city_town_village")) - -// .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) -// .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) - .build(); + .countryIdPresent(rs.getString("GPSA_countryid")) + .stateIdPresent(rs.getString("GPSA_stateid")) + .districtIdPresent(rs.getString("GPSA_districtid")) + .poNoPresent(rs.getString("GPSA_poid")) + .pinNoPresent(rs.getString("GPSA_pinno")) + .localityEnPresent(rs.getString("GPSA_locality_en")) + .localityMlPresent(rs.getString("GPSA_locality_ml")) + .streetNameEnPresent(rs.getString("GPSA_street_name_en")) + .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) + .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) + .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) + .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) + .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) + .villageNamePresent(rs.getString("GPSA_village_name")) + .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) + .presentWardNo(rs.getString("GPSA_ward_code")) + .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) + .presentUuid(rs.getString("GPSA_id")) + .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) + .townOrVillagePresent(rs.getString("GPSA_city_town_village")) + .presentOutsideKeralaCityVilgeNameEn(rs.getString("GPSA_village_name")) + .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) + .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) + .presentOthrIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) + .presentOthrIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) + .presentOthrIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) + .presentOthrIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) + .presentOthrIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) + .presentOthrIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) + .outSideIndiaPostCodePresent(rs.getString("GPSA_ot_zipcode")) + .brideGroomPresent(rs.getString("GPSA_bride_groom")) + + //PERMANENT + + .countryIdPermanent(rs.getString("GPMA_countryid")) + .stateIdPermanent(rs.getString("GPMA_stateid")) + .districtIdPermanent(rs.getString("GPMA_districtid")) + .poNoPermanent(rs.getString("GPMA_poid")) + .pinNoPermanent(rs.getString("GPMA_pinno")) + .localityEnPermanent(rs.getString("GPMA_locality_en")) + .localityMlPermanent(rs.getString("GPMA_locality_ml")) + .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) + .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) + .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) + .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) + .villageNamePermanent(rs.getString("GPMA_village_name")) + .permanentUuid(rs.getString("GPMA_id")) + .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) + .townOrVillagePermanent(rs.getString("GPMA_city_town_village")) + .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) + .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) + .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) + .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) + .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name")) + .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) + .permntOutsideKeralaPostOfficeMl(rs.getString("GPMA_poname_ml")) + .permntOthrIndiaLineoneEn(rs.getString("GPMA_ot_address1_en")) + .permntOthrIndiaLineoneMl(rs.getString("GPMA_ot_address1_ml")) + .permntOthrIndiaLinetwoEn(rs.getString("GPMA_ot_address2_en")) + .permntOthrIndiaLinetwoMl(rs.getString("GPMA_ot_address2_ml")) + .permntOthrIndiaprovinceEn(rs.getString("GPMA_ot_state_region_province_en")) + .permntOthrIndiaprovinceMl(rs.getString("GPMA_ot_state_region_province_ml")) + .outSideIndiaPostCodePermanent(rs.getString("GPMA_ot_zipcode")) + .brideGroomPermanent(rs.getString("GPMA_bride_groom")) + .build(); + +// // PRESENT +// .countryIdPresent(rs.getString("GPSA_countryid")) +// .stateIdPresent(rs.getString("GPSA_stateid")) +// .districtIdPresent(rs.getString("GPSA_districtid")) +// .poNoPresent(rs.getString("GPSA_poid")) +// .pinNoPresent(rs.getString("GPSA_pinno")) +// .localityEnPresent(rs.getString("GPSA_locality_en")) +// .localityMlPresent(rs.getString("GPSA_locality_ml")) +// .streetNameEnPresent(rs.getString("GPSA_street_name_en")) +// .streetNameMlPresent(rs.getString("GPSA_street_name_ml")) +// .houseNameNoEnPresent(rs.getString("GPSA_housename_en")) +// .houseNameNoMlPresent(rs.getString("GPSA_housename_ml")) +// .villageNamePresent(rs.getString("GPSA_village_name")) +// .townOrVillagePresent(rs.getString("GPSA_city_town_village")) +// .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) +// .presentUuid(rs.getString("GPSA_id")) +// // .presentaddressCountry(rs.getString("GPSA_countryid")) +// // .presentaddressStateName(rs.getString("GPSA_stateid")) +// // .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) +// // .presentInsideKeralaDistrict(rs.getString("GPSA_districtid")) +// .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) +// .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) +// // .presentInsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) +// //.presentInsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) +// // .presentInsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) +// // .presentInsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) +// // .presentInsideKeralaStreetNameMl(rs.getString("GPSA_street_name_ml")) +// // .presentInsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) +// // .presentInsideKeralaPincode(rs.getString("GPSA_pinno")) +// .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) +// .presentWardNo(rs.getString("GPSA_ward_code")) +// // .presentOutsideKeralaDistrict(rs.getString("GPSA_districtid")) +// .presentOutsideKeralaTalukName(rs.getString("GPSA_taluk_name")) +// .presentOutsideKeralaCityVilgeNameEn(rs.getString("GPSA_village_name")) +// // .presentOutsideKeralaPincode(rs.getString("GPSA_pinno")) +// .presentOutsideKeralaPostOfficeEn(rs.getString("GPSA_poname_en")) +// .presentOutsideKeralaPostOfficeMl(rs.getString("GPSA_poname_ml")) +// // .presentOutsideKeralaLocalityNameEn(rs.getString("GPSA_locality_en")) +// //.presentOutsideKeralaStreetNameEn(rs.getString("GPSA_street_name_en")) +// //.presentOutsideKeralaHouseNameEn(rs.getString("GPSA_housename_en")) +// // .presentOutsideKeralaLocalityNameMl(rs.getString("GPSA_locality_ml")) +// // .presentOutsideKeralaStreetNameMl(rs.getString("GPSA_street_name_en")) +// // .presentOutsideKeralaHouseNameMl(rs.getString("GPSA_housename_ml")) +// .presentOutSideIndiaAdressEn(rs.getString("GPSA_ot_address1_en")) +// .presentOutSideIndiaAdressMl(rs.getString("GPSA_ot_address1_ml")) +// .presentOutSideIndiaAdressEnB(rs.getString("GPSA_ot_address2_en")) +// .presentOutSideIndiaAdressMlB(rs.getString("GPSA_ot_address2_ml")) +// // .presentOutSideIndiaadrsCityTown(rs.getString("GPSA_city_town_village")) +// .presentOutSideIndiaadrsVillage(rs.getString("GPSA_village_name")) +// .presentOutSideIndiaProvinceEn(rs.getString("GPSA_ot_state_region_province_en")) +// .presentOutSideIndiaProvinceMl(rs.getString("GPSA_ot_state_region_province_ml")) +// .presentOutSideIndiaPostCode(rs.getString("GPSA_ot_zipcode")) +// .brideGroomPresent(rs.getString("GPSA_bride_groom")) + + + + +// // PERMANENT + +// .countryIdPermanent(rs.getString("GPMA_countryid")) +// .stateIdPermanent(rs.getString("GPMA_stateid")) +// .districtIdPermanent(rs.getString("GPMA_districtid")) +// .poNoPermanent(rs.getString("GPMA_poid")) +// .pinNoPermanent(rs.getString("GPMA_pinno")) +// .localityEnPermanent(rs.getString("GPMA_locality_en")) +// .localityMlPermanent(rs.getString("GPMA_locality_ml")) +// .streetNameEnPermanent(rs.getString("GPMA_street_name_en")) +// .streetNameMlPermanent(rs.getString("GPMA_street_name_ml")) +// .houseNameNoEnPermanent(rs.getString("GPMA_housename_en")) +// .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) +// .villageNamePermanent(rs.getString("GPMA_village_name")) +// .permanentUuid(rs.getString("GPMA_id")) +// .townOrVillagePermanent(rs.getString("GPMA_city_town_village")) + +// //.permtaddressCountry(rs.getString("GPMA_countryid")) +// //.permtaddressStateName(rs.getString("GPMA_stateid")) +// .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) +// //.permntInKeralaAdrDistrict(rs.getString("GPMA_districtid")) +// .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name")) +// .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) +// .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) +// // .permntInKeralaAdrLocalityNameEn(rs.getString("GPMA_locality_en")) +// // .permntInKeralaAdrStreetNameEn(rs.getString("GPMA_street_name_en")) +// // .permntInKeralaAdrHouseNameEn(rs.getString("GPMA_housename_en")) +// //.permntInKeralaAdrLocalityNameMl(rs.getString("GPMA_locality_en")) +// // .permntInKeralaAdrStreetNameMl(rs.getString("GPMA_street_name_ml")) +// // .permntInKeralaAdrHouseNameMl(rs.getString("GPMA_housename_ml")) +// // .permntInKeralaAdrPincode(rs.getString("GPMA_pinno")) +// .permntInKeralaAdrPostOffice(rs.getString("GPMA_poid")) +// .permntInKeralaWardNo(rs.getString("GPMA_ward_code")) +// // .permntOutsideKeralaDistrict(rs.getString("GPMA_districtid")) +// .permntOutsideKeralaTaluk(rs.getString("GPMA_taluk_name")) +// // .permntOutsideKeralaVillageorTwon(rs.getString("GPMA_city_town_village")) +// // .permntOutsideKeralaPincode(rs.getString("GPMA_pinno")) +// //.permntOutsideKeralaLocalityNameEn(rs.getString("GPMA_locality_en")) +// //.permntOutsideKeralaStreetNameEn(rs.getString("GPMA_street_name_en")) +// // .permntOutsideKeralaHouseNameEn(rs.getString("GPMA_housename_en")) +// // .permntOutsideKeralaLocalityNameMl(rs.getString("GPMA_locality_en")) +// // .permntOutsideKeralaStreetNameMl(rs.getString("GPMA_street_name_ml")) +// // .permntOutsideKeralaHouseNameMl(rs.getString("GPMA_housename_ml")) +// .permntOutsideKeralaPostOfficeEn(rs.getString("GPMA_poname_en")) +// .permntOutsideKeralaPostOfficeMl(rs.getString("GPMA_poname_ml")) +// .permntOutsideIndiaLineoneEn(rs.getString("GPMA_ot_address1_en")) +// .permntOutsideIndiaLineoneMl(rs.getString("GPMA_ot_address1_ml")) +// .permntOutsideIndiaLinetwoEn(rs.getString("GPMA_ot_address2_en")) +// .permntOutsideIndiaLinetwoMl(rs.getString("GPMA_ot_address2_ml")) +// // .permntOutsideIndiaVillage(rs.getString("")) +// .permanentOutsideIndiaPostCode(rs.getString("GPMA_ot_zipcode")) +// .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) +// .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) +// .brideGroomPermanent(rs.getString("GPMA_bride_groom")) +// .permntOutsideKeralaCityVilgeEn(rs.getString("GPMA_village_name")) +// // .permntOutsideIndiaCityTown(rs.getString("GPMA_city_town_village")) + +// // .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) +// // .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) +// .build(); } } From b15144415704ca2859919c34318dd37b5cd66f9a Mon Sep 17 00:00:00 2001 From: JasmineNazeer <115537272+JasmineNazeer@users.noreply.github.com> Date: Sun, 7 May 2023 15:12:20 +0530 Subject: [PATCH 309/420] commented the image base path --- .../marriage-services/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index a513477870d..389f0a23329 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -108,7 +108,7 @@ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certif egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath -egov.marriage.image.startPoint = https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ +#egov.marriage.image.startPoint = https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ #view certificate path config egov.ui.app.host=https://ksmart-dev.lsgkerala.gov.in/ From 5c90363d28d00ffb818bcba668218350ded5a765 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 7 May 2023 15:22:10 +0530 Subject: [PATCH 310/420] search for marriageapplicationRepository DistrictOutsideKerala Added --- .../MarriageApplicationRepository.java | 137 ++++++++++++------ 1 file changed, 94 insertions(+), 43 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 72488fdd2a0..d2c355b4fbc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -424,14 +424,14 @@ public List searchMarriageDetails(MarriageApplicatio //PERMANENT-STATE marriage.getBrideAddressDetails().setPermtaddressStateName(marriage.getBrideAddressDetails().getStateIdPermanent()); if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); } //PERMANENT-DISTRICT - marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrict(marriage.getBrideAddressDetails().getDistrictIdPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrict(marriage.getBrideAddressDetails().getDistrictIdPermanent()); if (marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); @@ -747,48 +747,96 @@ public List searchMarriageDetails(MarriageApplicatio //PERMANENT-COUNTRY marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //PERMANENT-STATE - marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); - if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //PERMANENT-DISTRICT - marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); - if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { - String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); + marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } + //GROOM-PERMANENT-STATE + marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); + if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { + String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); + String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); + marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); - marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); - - marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); - marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); - - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - - marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getVillageNamePermanent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); - - marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); + } + //GROOM-PERMANENT-DISTRICT + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); + if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + } + marriage.getGroomAddressDetails().setPermntOutsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); + + marriage.getGroomAddressDetails().setPermntOutsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); + + marriage.getGroomAddressDetails().setPermntOutsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); + +// marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getVillageNamePermanent()); +// marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); +// +// // marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); +// marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); +// +// marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); +// marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); + + marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); + + marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getVillageNamePermanent()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); + + marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); +// String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); +// marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); +// } +// //PERMANENT-STATE +// marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); +// if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { +// String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); +// marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); +// +// String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); +// marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); +// } +// //PERMANENT-DISTRICT +// marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); +// if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { +// String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); +// marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); +// +// String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); +// marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); +// } +// +// marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); +// marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); +// +// marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); +// marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); +// +// marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); +// marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); +// +// marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); +// marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); +// +// marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getVillageNamePermanent()); +// marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); +// +// marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); +// marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); @@ -1106,6 +1154,7 @@ public List searchMarriageDetails(MarriageApplicatio // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); // } @@ -1155,6 +1204,8 @@ public List searchMarriageDetails(MarriageApplicatio // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); // } From 99020eff04022adbfba072bbc81bfdb173da62c8 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 7 May 2023 15:37:02 +0530 Subject: [PATCH 311/420] marriageregistry enrichment update for address --- .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../MarriageApplicationRepository.java | 50 ---------------- .../MarriageRegistryEnrichment.java | 58 +++++++++++++------ 3 files changed, 42 insertions(+), 68 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 6618f36ea74..f2183cd35be 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -461,7 +461,7 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); } else { - System.out.println("BridePresentAddress-2"+marriage.getBrideAddressDetails().getPresentOutsideKeralaPincode()); + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index d2c355b4fbc..43a8e59c999 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -781,15 +781,6 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPermntOutsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getVillageNamePermanent()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); -// -// // marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); -// -// marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); - marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); @@ -798,47 +789,6 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); -// String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); -// marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); -// } -// //PERMANENT-STATE -// marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); -// if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { -// String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); -// marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); -// -// String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); -// marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); -// } -// //PERMANENT-DISTRICT -// marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); -// if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { -// String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); -// -// String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); -// } -// -// marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); -// marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); -// -// marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); -// marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); -// -// marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); -// marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); -// -// marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); -// -// marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getVillageNamePermanent()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); -// -// marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); -// marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); - - } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 389b3912b07..c3f633c5f5c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -560,8 +560,11 @@ private void setGroomPresentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOutSideIndiaProvinceMl()); - marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); - marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); + + // marriage.getGroomAddressDetails().setTownOrVillagePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsCityTown()); + // marriage.getGroomAddressDetails().setVillageNamePresent(marriage.getGroomAddressDetails().getPresentOutSideIndiaadrsVillage()); } } @@ -624,24 +627,36 @@ private void setGroomPermanentAddress(MarriageRegistryRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageorTown()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeNameEn()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageEn()); } } else { marriage.getGroomAddressDetails().setCountryIdPermanent(marriage.getGroomAddressDetails().getPermtaddressCountry()); - marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + // marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + // marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + + + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + + // marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + // marriage.getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + // marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + // marriage.getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + // marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + // marriage.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); } @@ -682,11 +697,9 @@ private void setBridePresentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPinNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPincode()); marriage.getBrideAddressDetails().setPoNoPresent(marriage.getBrideAddressDetails().getPresentInsideKeralaPostOffice()); - - marriage.getBrideAddressDetails().setPresentAddrVillageId(marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); } else { - System.out.println("BridePresentAddress-2"+marriage.getBrideAddressDetails().getPresentOutsideKeralaPincode()); + marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); marriage.getBrideAddressDetails().setStateIdPresent(marriage.getBrideAddressDetails().getPresentaddressStateName()); @@ -727,6 +740,11 @@ private void setBridePresentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceMl()); marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaPostCode()); + + marriage.getBrideAddressDetails().setVillageNamePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); + marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsVillage()); + + // marriage.getBrideAddressDetails().setTownOrVillagePresent(marriage.getBrideAddressDetails().getPresentOutSideIndiaadrsCityTown()); } } @@ -794,7 +812,8 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPinNoPermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageorTown()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageEn()); + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaCityVilgeEn()); + //marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideKeralaVillageEn()); } } else { @@ -810,8 +829,13 @@ private void setBridePermanentAddress(MarriageRegistryRequest request) { marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); - marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + // marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + // marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + + marriage.getBrideAddressDetails().setVillageNamePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); + + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); } } From b98450f33a50ca80880db8117701e7f863b8830e Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sun, 7 May 2023 15:54:24 +0530 Subject: [PATCH 312/420] Entrichment permntOutsideKeralaTaluk Groom corrected --- .../enrichment/MarriageDetailsEnrichment.java | 2 +- .../repository/MarriageApplicationRepository.java | 1 + .../web/model/marriage/BrideAddressDetails.java | 12 ++++++------ .../web/model/marriage/GroomAddressDetails.java | 10 +++++----- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index f2183cd35be..8b714b885e2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -389,7 +389,7 @@ private void setGroomPermanentAddress(MarriageDetailsRequest request) { marriage.getGroomAddressDetails().setPinNoPermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); marriage.getGroomAddressDetails().setTownOrVillagePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageorTown()); - marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaVillageEn()); + marriage.getGroomAddressDetails().setVillageNamePermanent(marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); } } else { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 43a8e59c999..3b8a99c2888 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -458,6 +458,7 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + } } //PERMANENT-OUTSIDE INDIA diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 07fa1c5e55c..801366fb628 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -611,12 +611,12 @@ public class BrideAddressDetails { @JsonProperty("permntInKeralaAdrTalukMl") private String permntInKeralaAdrTalukMl; - - @JsonProperty("permntOutsideKeralaTalukEn") - private String permntOutsideKeralaTalukEn; - - @JsonProperty("permntOutsideKeralaTalukMl") - private String permntOutsideKeralaTalukMl; +// +// @JsonProperty("permntOutsideKeralaTalukEn") +// private String permntOutsideKeralaTalukEn; +// +// @JsonProperty("permntOutsideKeralaTalukMl") +// private String permntOutsideKeralaTalukMl; @JsonProperty("presentInsideKeralaVillageEn") private String presentInsideKeralaVillageEn; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index f804191d5fe..0d6cbf1ccfc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -607,11 +607,11 @@ public class GroomAddressDetails { @JsonProperty("permntInKeralaAdrTalukMl") private String permntInKeralaAdrTalukMl; - @JsonProperty("permntOutsideKeralaTalukEn") - private String permntOutsideKeralaTalukEn; - - @JsonProperty("permntOutsideKeralaTalukMl") - private String permntOutsideKeralaTalukMl; +// @JsonProperty("permntOutsideKeralaTalukEn") +// private String permntOutsideKeralaTalukEn; +// +// @JsonProperty("permntOutsideKeralaTalukMl") +// private String permntOutsideKeralaTalukMl; @JsonProperty("presentInsideKeralaVillageEn") private String presentInsideKeralaVillageEn; From 0682ab77a32aaff0e2d603917caf62b2f5071fbb Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sun, 7 May 2023 17:40:12 +0530 Subject: [PATCH 313/420] payment --- .../marriage/common/calculation/Category.java | 45 ++++ .../calculation/FeeAndBillingSlabIds.java | 25 ++ .../common/calculation/TaxHeadEstimate.java | 26 +++ .../calculation/collections/models/Bill.java | 191 +++++++++++++++ .../collections/models/BillAccountDetail.java | 83 +++++++ .../collections/models/BillDetail.java | 178 ++++++++++++++ .../collections/models/Payment.java | 148 ++++++++++++ .../collections/models/PaymentDetail.java | 96 ++++++++ .../collections/models/PaymentRequest.java | 30 +++ .../collections/models/PaymentResponse.java | 27 +++ .../models/PaymentSearchCriteria.java | 48 ++++ .../common/consumer/ReceiptConsumer.java | 220 ++++++++++++++++++ .../common/services/PaymentUpdateService.java | 113 +++++++++ .../MarriageApplicationRepository.java | 22 +- .../rowmapper/MarriagePaymentRowMapper.java | 66 ++++++ .../MarriageApplicationSearchCriteria.java | 3 + .../src/main/resources/application.properties | 6 +- 17 files changed, 1323 insertions(+), 4 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/Category.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/FeeAndBillingSlabIds.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/TaxHeadEstimate.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/Bill.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/BillAccountDetail.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/BillDetail.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/Payment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentDetail.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentSearchCriteria.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriagePaymentRowMapper.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/Category.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/Category.java new file mode 100644 index 00000000000..164c88ea727 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/Category.java @@ -0,0 +1,45 @@ +package org.ksmart.marriage.common.calculation; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum Category { + + TAX("TAX"), + + FEE("FEE"), + + REBATE("REBATE"), + + EXEMPTION("EXEMPTION"), + + ADVANCE_COLLECTION("ADVANCE_COLLECTION"), + + PENALTY("PENALTY"), + + FINES("FINES"), + + CHARGES("CHARGES"); + + private String value; + + Category(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static Category fromValue(String text) { + for (Category b : Category.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/FeeAndBillingSlabIds.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/FeeAndBillingSlabIds.java new file mode 100644 index 00000000000..6fe7cfbcf63 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/FeeAndBillingSlabIds.java @@ -0,0 +1,25 @@ +package org.ksmart.marriage.common.calculation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import javax.validation.Valid; +import java.math.BigDecimal; +import java.util.List; + +@Data +public class FeeAndBillingSlabIds { + + @JsonProperty("id") + @Valid + private String id; + + @JsonProperty("fee") + @Valid + private BigDecimal fee; + + @JsonProperty("billingSlabIds") + @Valid + private List billingSlabIds; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/TaxHeadEstimate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/TaxHeadEstimate.java new file mode 100644 index 00000000000..08f12d5f469 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/TaxHeadEstimate.java @@ -0,0 +1,26 @@ +package org.ksmart.marriage.common.calculation; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.math.BigDecimal; + + +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@Getter +@Setter +public class TaxHeadEstimate { + + private String taxHeadCode; + + private BigDecimal estimateAmount; + + private Category category; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/Bill.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/Bill.java new file mode 100644 index 00000000000..4e990db1860 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/Bill.java @@ -0,0 +1,191 @@ +package org.ksmart.marriage.common.calculation.collections.models; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import javax.validation.Valid; + +import org.ksmart.marriage.common.model.AuditDetails; +import org.springframework.util.CollectionUtils; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.JsonNode; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Getter +@Setter +@ToString +@Builder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode +public class Bill { + + @JsonProperty("id") + @Valid + private String id = null; + + @JsonProperty("mobileNumber") + @Valid + private String mobileNumber = null; + + @JsonProperty("paidBy") + @Valid + private String paidBy = null; + + @JsonProperty("payerName") + @Valid + private String payerName = null; + + @JsonProperty("payerAddress") + @Valid + private String payerAddress = null; + + @JsonProperty("payerEmail") + @Valid + private String payerEmail = null; + + @JsonProperty("payerId") + @Valid + private String payerId = null; + + @JsonProperty("status") + @Valid + private StatusEnum status = null; + + @JsonProperty("reasonForCancellation") + @Valid + private String reasonForCancellation = null; + + @JsonProperty("isCancelled") + @Valid + private Boolean isCancelled = null; + + @JsonProperty("additionalDetails") + @Valid + private JsonNode additionalDetails = null; + + @JsonProperty("billDetails") + @Valid + private List billDetails = null; + + @JsonProperty("tenantId") + @Valid + private String tenantId = null; + + @JsonProperty("auditDetails") + @Valid + private AuditDetails auditDetails = null; + + @JsonProperty("collectionModesNotAllowed") + @Valid + private List collectionModesNotAllowed = null; + + @JsonProperty("partPaymentAllowed") + @Valid + private Boolean partPaymentAllowed = null; + + @JsonProperty("isAdvanceAllowed") + @Valid + private Boolean isAdvanceAllowed; + + @JsonProperty("minimumAmountToBePaid") + @Valid + private BigDecimal minimumAmountToBePaid = null; + + @JsonProperty("businessService") + @Valid + private String businessService = null; + + @JsonProperty("totalAmount") + @Valid + private BigDecimal totalAmount = null; + + @JsonProperty("consumerCode") + @Valid + private String consumerCode = null; + + @JsonProperty("billNumber") + @Valid + private String billNumber = null; + + @JsonProperty("billDate") + @Valid + private Long billDate = null; + + @JsonProperty("amountPaid") + @Valid + private BigDecimal amountPaid; + + + + public enum StatusEnum { + ACTIVE("ACTIVE"), + + CANCELLED("CANCELLED"), + + PAID("PAID"), + + EXPIRED("EXPIRED"); + + private String value; + + StatusEnum(String value) { + this.value = value; + } + + + @Override + @JsonValue + public String toString() { + return String.valueOf(value); + } + + public static boolean contains(String test) { + for (StatusEnum val : StatusEnum.values()) { + if (val.name().equalsIgnoreCase(test)) { + return true; + } + } + return false; + } + + @JsonCreator + public static StatusEnum fromValue(String text) { + for (StatusEnum b : StatusEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + } + + public Boolean addBillDetail(BillDetail billDetail) { + + if (CollectionUtils.isEmpty(billDetails)) { + + billDetails = new ArrayList<>(); + return billDetails.add(billDetail); + } else { + + if (!billDetails.contains(billDetail)) + return billDetails.add(billDetail); + else + return false; + } + } + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/BillAccountDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/BillAccountDetail.java new file mode 100644 index 00000000000..558a5fbdccb --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/BillAccountDetail.java @@ -0,0 +1,83 @@ +package org.ksmart.marriage.common.calculation.collections.models; + +import java.math.BigDecimal; + +import javax.validation.Valid; +import javax.validation.constraints.Size; +import javax.xml.crypto.KeySelector.Purpose; + +import org.ksmart.marriage.common.model.AuditDetails; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Setter +@Getter +@ToString +@Builder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode +public class BillAccountDetail { + + @Size(max=64) + @JsonProperty("id") + @Valid + private String id = null; + + @Size(max=64) + @JsonProperty("tenantId") + @Valid + private String tenantId = null; + + @Size(max=64) + @JsonProperty("billDetailId") + @Valid + private String billDetailId = null; + + @Size(max=64) + @JsonProperty("demandDetailId") + @Valid + private String demandDetailId = null; + + @JsonProperty("order") + @Valid + private Integer order = null; + + @JsonProperty("amount") + @Valid + private BigDecimal amount = null; + + @JsonProperty("adjustedAmount") + @Valid + private BigDecimal adjustedAmount = null; + + @JsonProperty("isActualDemand") + @Valid + private Boolean isActualDemand = null; + + @Size(max=64) + @JsonProperty("taxHeadCode") + @Valid + private String taxHeadCode = null; + + @JsonProperty("additionalDetails") + @Valid + private JsonNode additionalDetails = null; + + @JsonProperty("purpose") + @Valid + private Purpose purpose = null; + + @JsonProperty("auditDetails") + @Valid + private AuditDetails auditDetails; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/BillDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/BillDetail.java new file mode 100644 index 00000000000..70ccab2fc84 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/BillDetail.java @@ -0,0 +1,178 @@ +/* + * eGov suite of products aim to improve the internal efficiency,transparency, + * accountability and the service delivery of the government organizations. + * + * Copyright (C) 2016 eGovernments Foundation + * + * The updated version of eGov suite of products as by eGovernments Foundation + * is available at http://www.egovernments.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/ or + * http://www.gnu.org/licenses/gpl.html . + * + * In addition to the terms of the GPL license to be adhered to in using this + * program, the following additional terms are to be complied with: + * + * 1) All versions of this program, verbatim or modified must carry this + * Legal Notice. + * + * 2) Any misrepresentation of the origin of the material is prohibited. It + * is required that all modified versions of this material be marked in + * reasonable ways as different from the original version. + * + * 3) This license does not grant any rights to any user of the program + * with regards to rights under trademark law for use of the trade names + * or trademarks of eGovernments Foundation. + * + * In case of any queries, you can reach eGovernments Foundation at contact@egovernments.org. + */ +package org.ksmart.marriage.common.calculation.collections.models; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import org.ksmart.marriage.common.model.AuditDetails; +import org.springframework.util.CollectionUtils; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; + +@Setter +@Getter +@ToString +@Builder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(of = {"id"}) +public class BillDetail { + + @JsonProperty("id") + @Valid + private String id = null; + + @JsonProperty("tenantId") + @Valid + private String tenantId = null; + + @JsonProperty("demandId") + @Valid + private String demandId = null; + + @JsonProperty("billId") + @Valid + private String billId = null; + + @JsonProperty("amount") + @NotNull + @Valid + private BigDecimal amount = null; + + @JsonProperty("amountPaid") + @Valid + private BigDecimal amountPaid = null; + + @NotNull + @JsonProperty("fromPeriod") + @Valid + private Long fromPeriod = null; + + @NotNull + @JsonProperty("toPeriod") + @Valid + private Long toPeriod = null; + + @JsonProperty("additionalDetails") + @Valid + private JsonNode additionalDetails = null; + + @JsonProperty("channel") + @Valid + private String channel = null; + + @JsonProperty("voucherHeader") + @Valid + private String voucherHeader = null; + + @JsonProperty("boundary") + @Valid + private String boundary = null; + + @JsonProperty("manualReceiptNumber") + @Valid + private String manualReceiptNumber = null; + + @JsonProperty("manualReceiptDate") + @Valid + private Long manualReceiptDate = null; + + + @JsonProperty("billAccountDetails") + @Valid + private List billAccountDetails = null; + + @NotNull + @JsonProperty("collectionType") + @Valid + private String collectionType = null; + + @JsonProperty("auditDetails") + @Valid + private AuditDetails auditDetails = null; + + + @Valid + private String billDescription; + + @NotNull + @JsonProperty("expiryDate") + @Valid + private Long expiryDate; + + @Valid + private String displayMessage; + + @Valid + private Boolean callBackForApportioning; + + @Valid + private String cancellationRemarks; + + public Boolean addBillAccountDetail(BillAccountDetail billAccountDetail) { + + if (CollectionUtils.isEmpty(billAccountDetails)) { + + billAccountDetails = new ArrayList<>(); + return billAccountDetails.add(billAccountDetail); + } else { + + if (!billAccountDetails.contains(billAccountDetail)) + return billAccountDetails.add(billAccountDetail); + else + return false; + } + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/Payment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/Payment.java new file mode 100644 index 00000000000..3acdc7e693b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/Payment.java @@ -0,0 +1,148 @@ +package org.ksmart.marriage.common.calculation.collections.models; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import org.ksmart.marriage.common.model.AuditDetails; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@EqualsAndHashCode +public class Payment { + + @Size(max=64) + @JsonProperty("id") + @Valid + private String id; + + @NotNull + @Size(max=64) + @JsonProperty("tenantId") + @Valid + private String tenantId; + + @JsonProperty("totalDue") + @Valid + private BigDecimal totalDue; + + @NotNull + @JsonProperty("totalAmountPaid") + @Valid + private BigDecimal totalAmountPaid; + + @Size(max=128) + @JsonProperty("transactionNumber") + @Valid + private String transactionNumber; + + @JsonProperty("transactionDate") + @Valid + private Long transactionDate; + + @NotNull + @JsonProperty("paymentMode") + @Valid + private String paymentMode; + + + @JsonProperty("instrumentDate") + @Valid + private Long instrumentDate; + + @Size(max=128) + @JsonProperty("instrumentNumber") + @Valid + private String instrumentNumber; + + @JsonProperty("instrumentStatus") + @Valid + private String instrumentStatus; + + @Size(max=64) + @JsonProperty("ifscCode") + @Valid + private String ifscCode; + + @JsonProperty("auditDetails") + @Valid + private AuditDetails auditDetails; + + @JsonProperty("additionalDetails") + @Valid + private JsonNode additionalDetails; + + @JsonProperty("paymentDetails") + @Valid + private List paymentDetails; + + @Size(max=128) + @NotNull + @JsonProperty("paidBy") + @Valid + private String paidBy = null; + + @Size(max=64) + @NotNull + @JsonProperty("mobileNumber") + @Valid + private String mobileNumber = null; + + @Size(max=128) + @JsonProperty("payerName") + @Valid + private String payerName = null; + + @Size(max=1024) + @JsonProperty("payerAddress") + @Valid + private String payerAddress = null; + + @Size(max=64) + @JsonProperty("payerEmail") + @Valid + private String payerEmail = null; + + @Size(max=64) + @JsonProperty("payerId") + @Valid + private String payerId = null; + + + @Size(max=64) + @JsonProperty("fileStoreId") + @Valid + private String fileStoreId = null; + + @JsonProperty("paymentStatus") + @Valid + private String paymentStatus; + + + public Payment addpaymentDetailsItem(PaymentDetail paymentDetail) { + if (this.paymentDetails == null) { + this.paymentDetails = new ArrayList<>(); + } + this.paymentDetails.add(paymentDetail); + return this; + } + + + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentDetail.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentDetail.java new file mode 100644 index 00000000000..e375127e744 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentDetail.java @@ -0,0 +1,96 @@ +package org.ksmart.marriage.common.calculation.collections.models; + +import java.math.BigDecimal; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import org.ksmart.marriage.common.model.AuditDetails; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.JsonNode; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + + +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@EqualsAndHashCode +public class PaymentDetail { + + @Size(max=64) + @JsonProperty("id") + @Valid + private String id; + + @Size(max=64) + @JsonProperty("paymentId") + @Valid + private String paymentId; + + @Size(max=64) + @JsonProperty("tenantId") + @Valid + private String tenantId; + + @JsonProperty("totalDue") + @Valid + private BigDecimal totalDue; + + @NotNull + @JsonProperty("totalAmountPaid") + @Valid + private BigDecimal totalAmountPaid; + + @Size(max=64) + @JsonProperty("receiptNumber") + @Valid + private String receiptNumber; + + @Size(max=64) + @JsonProperty("manualReceiptNumber") + @Valid + private String manualReceiptNumber; + + @JsonProperty("manualReceiptDate") + @Valid + private Long manualReceiptDate; + + @JsonProperty("receiptDate") + @Valid + private Long receiptDate = null; + + @JsonProperty("receiptType") + @Valid + private String receiptType = null; + + @JsonProperty("businessService") + @Valid + private String businessService; + + @NotNull + @Size(max=64) + @JsonProperty("billId") + @Valid + private String billId; + + @JsonProperty("bill") + @Valid + private Bill bill; + + @JsonProperty("additionalDetails") + @Valid + private JsonNode additionalDetails; + + @JsonProperty("auditDetails") + @Valid + private AuditDetails auditDetails; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentRequest.java new file mode 100644 index 00000000000..35f0370ad0a --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentRequest.java @@ -0,0 +1,30 @@ +package org.ksmart.marriage.common.calculation.collections.models; + + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import org.egov.common.contract.request.RequestInfo; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@NoArgsConstructor +@AllArgsConstructor +public class PaymentRequest { + + @NotNull + @Valid + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + @NotNull + @Valid + @JsonProperty("Payment") + private Payment payment; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentResponse.java new file mode 100644 index 00000000000..cc8c45e8e0c --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentResponse.java @@ -0,0 +1,27 @@ +package org.ksmart.marriage.common.calculation.collections.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.egov.common.contract.response.ResponseInfo; + +import javax.validation.Valid; +import java.util.List; + +@Builder +@Data +@AllArgsConstructor +@NoArgsConstructor +public class PaymentResponse { + + @JsonProperty("ResponseInfo") + @Valid + private ResponseInfo responseInfo; + + @JsonProperty("Payments") + @Valid + private List payments; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentSearchCriteria.java new file mode 100644 index 00000000000..7cacca15164 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/calculation/collections/models/PaymentSearchCriteria.java @@ -0,0 +1,48 @@ +package org.ksmart.marriage.common.calculation.collections.models; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; +import java.util.Set; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class PaymentSearchCriteria { + + + private Set ids; + + private Set billIds; + + private String tenantId; + + private Set receiptNumbers; + + private Set status; + + private Set instrumentStatus; + + private Set paymentModes; + + private List payerIds; + + private Set consumerCodes; + + private String transactionNumber; + + private String mobileNumber; + + private Long fromDate; + + private Long toDate; + + private Integer offset; + + private Integer limit; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java new file mode 100644 index 00000000000..819532c5dac --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java @@ -0,0 +1,220 @@ +package org.ksmart.marriage.common.consumer; + +// import static org.ksmart.marriage.utils.BirthDeathConstants.BIRTH_CERT; +// import static org.ksmart.marriage.utils.BirthDeathConstants.DEATH_CERT; + +import java.util.HashMap; +import java.util.List; + +//import org.ksmart.birth.birth.certmodel.BirthCertRequest; +//import org.ksmart.birth.birth.certmodel.BirthCertificate; +//import org.ksmart.birth.birth.certmodel.BirthCertificate.StatusEnum; +//import org.ksmart.birth.birth.model.EgBirthDtl; +//import org.ksmart.birth.birth.model.SearchCriteria; +//import org.ksmart.birth.birth.repository.BirthRepository; +import org.ksmart.marriage.common.calculation.collections.models.PaymentDetail; +import org.ksmart.marriage.common.calculation.collections.models.PaymentRequest; +//import org.ksmart.birth.common.contract.BirthPdfApplicationRequest; +//import org.ksmart.birth.common.contract.DeathPdfApplicationRequest; +//import org.ksmart.marriage.common.contract.EgovPdfResp; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.common.services.PaymentUpdateService; +//import org.ksmart.birth.config.BirthDeathConfiguration; +//import org.ksmart.birth.death.certmodel.DeathCertRequest; +//import org.ksmart.birth.death.certmodel.DeathCertificate; +//import org.ksmart.birth.death.model.EgDeathDtl; +//import org.ksmart.birth.death.repository.DeathRepository; +import org.ksmart.marriage.utils.MarriageConstants; +//import org.ksmart.marriage.utils.CommonUtils; +import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.kafka.annotation.KafkaListener; +import org.springframework.kafka.support.KafkaHeaders; +import org.springframework.messaging.handler.annotation.Header; +import org.springframework.stereotype.Component; + +import com.fasterxml.jackson.databind.ObjectMapper; + +import lombok.extern.slf4j.Slf4j; + + + +@Slf4j +@Component +public class ReceiptConsumer { + + + + private PaymentUpdateService paymentUpdateService; + +// private PaymentNotificationService paymentNotificationService; + + + @Autowired + public ReceiptConsumer(PaymentUpdateService paymentUpdateService) { + this.paymentUpdateService = paymentUpdateService; +// this.paymentNotificationService = paymentNotificationService; + } + + + + @KafkaListener(topics = {"${kafka.topics.receipt.create}"}) + public void listenPayments(final HashMap record) { + paymentUpdateService.process(record); +// paymentNotificationService.process(record); + } + } +// +// @Autowired +// @Qualifier("objectMapperBnd") +// private ObjectMapper mapper; +// +// @Autowired +// private CommonUtils commUtils; +// +// @Autowired +// private BirthDeathConfiguration config ; +// +// @Autowired +// private BndProducer bndProducer; +// +// @Autowired +// private BirthRepository repository; +// +// @Autowired +// private DeathRepository repositoryDeath; +// +// @KafkaListener(topics = {"${kafka.topics.receipt.create}"}) +// public void listen(final HashMap record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) { +// try { +// process(record); +// } catch (final Exception e) { +// log.error("Error while listening to value: " + record + " on topic: " + topic + ": ", e.getMessage()); +// } +// } +// +// public void process(HashMap record) { +// +// try { +// log.info("Process for object"+ record); +// PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); +// RequestInfo requestInfo = paymentRequest.getRequestInfo(); +// if( paymentRequest.getPayment().getTotalAmountPaid().compareTo(paymentRequest.getPayment().getTotalDue())!=0) +// return; +// List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); +// for (PaymentDetail paymentDetail : paymentDetails) { +// if(paymentDetail.getBusinessService().equalsIgnoreCase(BIRTH_CERT)) { +// BirthCertificate birthCertificate = updateBirthPAID(requestInfo, paymentDetail); +// updateBirthPDFGEN(requestInfo, birthCertificate); +// } +// if(paymentDetail.getBusinessService().equalsIgnoreCase(DEATH_CERT)) { +// DeathCertificate deathCertificate = updateDeathPAID(requestInfo, paymentDetail); +// updateDeathPDFGEN(requestInfo, deathCertificate); +// } +// } +// } catch (Exception e) { +// log.error("Exception while processing payment update: ",e); +// } +// +// } +// +// public DeathCertificate updateDeathPAID(RequestInfo requestInfo, PaymentDetail paymentDetail) { +// try { +// DeathCertificate deathCertificate = repositoryDeath.getDeathCertReqByConsumerCode(paymentDetail.getBill().getConsumerCode(),requestInfo); +// if(deathCertificate.getApplicationStatus().equals(DeathCertificate.StatusEnum.ACTIVE)) { +// String uuid = requestInfo.getUserInfo().getUuid(); +// AuditDetails auditDetails = commUtils.getAuditDetails(uuid, false); +// deathCertificate.getAuditDetails().setLastModifiedBy(auditDetails.getLastModifiedBy()); +// deathCertificate.getAuditDetails().setLastModifiedTime(auditDetails.getLastModifiedTime()); +// deathCertificate.setApplicationStatus(DeathCertificate.StatusEnum.PAID); +// deathCertificate.setDeathCertificateNo(paymentDetail.getBill().getConsumerCode()); +// DeathCertRequest request = DeathCertRequest.builder().requestInfo(requestInfo).deathCertificate(deathCertificate).build(); +// bndProducer.push(config.getUpdateDeathTopic(), request); +// } +// return deathCertificate; +// } +// catch (Exception e) { +// throw new CustomException(BirthDeathConstants.UPDATE_ERROR_MESSAGE, BirthDeathConstants.PAYMENT_ERROR_MESSAGE); +// } +// } +// +// public DeathCertificate updateDeathPDFGEN(RequestInfo requestInfo, DeathCertificate deathCertificate) { +// try { +// if(deathCertificate.getApplicationStatus().equals(DeathCertificate.StatusEnum.PAID)) { +// org.ksmart.birth.death.model.SearchCriteria criteria=new org.ksmart.birth.death.model.SearchCriteria(); +// criteria.setId(deathCertificate.getDeathDtlId()); +// List deathDtls = repositoryDeath.getDeathDtlsAll(criteria,requestInfo); +// if(deathDtls.size()>1) +// throw new CustomException("Invalid_Input","Error in processing data"); +// deathDtls.get(0).setDeathcertificateno(deathCertificate.getDeathCertificateNo()); +// DeathPdfApplicationRequest applicationRequest = DeathPdfApplicationRequest.builder().requestInfo(requestInfo).deathCertificate(deathDtls).build(); +// EgovPdfResp pdfResp = repositoryDeath.saveDeathCertPdf(applicationRequest); +// if(null!=pdfResp) { +// deathCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); +// deathCertificate.setEmbeddedUrl(applicationRequest.getDeathCertificate().get(0).getEmbeddedUrl()); +// deathCertificate.setDateofissue(applicationRequest.getDeathCertificate().get(0).getDateofissue()); +// } +// deathCertificate.setApplicationStatus(DeathCertificate.StatusEnum.PAID_PDF_GENERATED); +// DeathCertRequest requestNew = DeathCertRequest.builder().requestInfo(requestInfo).deathCertificate(deathCertificate).build(); +// bndProducer.push(config.getUpdateDeathTopic(), requestNew); +// repositoryDeath.updateCounter(deathCertificate.getDeathDtlId()); +// } +// return deathCertificate; +// } +// catch (Exception e) { +// throw new CustomException(BirthDeathConstants.PAYMENT_ERROR_MESSAGE, e.getMessage()); +// } +// } +// +// public BirthCertificate updateBirthPAID(RequestInfo requestInfo, PaymentDetail paymentDetail) { +// try { +// +// BirthCertificate birthCertificate = repository.getBirthCertReqByConsumerCode(paymentDetail.getBill().getConsumerCode(),requestInfo); +// if(birthCertificate.getApplicationStatus().equals(StatusEnum.ACTIVE)) { +// String uuid = requestInfo.getUserInfo().getUuid(); +// AuditDetails auditDetails = commUtils.getAuditDetails(uuid, false); +// birthCertificate.getAuditDetails().setLastModifiedBy(auditDetails.getLastModifiedBy()); +// birthCertificate.getAuditDetails().setLastModifiedTime(auditDetails.getLastModifiedTime()); +// birthCertificate.setApplicationStatus(StatusEnum.PAID); +// birthCertificate.setBirthCertificateNo(paymentDetail.getBill().getConsumerCode()); +// BirthCertRequest request = BirthCertRequest.builder().requestInfo(requestInfo).birthCertificate(birthCertificate).build(); +// bndProducer.push(config.getUpdateBirthTopic(), request); +// } +// return birthCertificate; +// } +// catch (Exception e) { +// throw new CustomException(BirthDeathConstants.PAYMENT_ERROR_MESSAGE,e.getMessage()); +// } +// } +// +// public BirthCertificate updateBirthPDFGEN(RequestInfo requestInfo, BirthCertificate birthCertificate) { +// try{ +// if(birthCertificate.getApplicationStatus().equals(StatusEnum.PAID)) { +// SearchCriteria criteria=new SearchCriteria(); +// criteria.setId(birthCertificate.getBirthDtlId()); +// List birtDtls = repository.getBirthDtlsAll(criteria,requestInfo); +// if(birtDtls.size()>1) +// throw new CustomException("Invalid_Input","Error in processing data"); +// birtDtls.get(0).setBirthcertificateno(birthCertificate.getBirthCertificateNo()); +// BirthPdfApplicationRequest applicationRequest = BirthPdfApplicationRequest.builder().requestInfo(requestInfo).birthCertificate(birtDtls).build(); +// EgovPdfResp pdfResp = repository.saveBirthCertPdf(applicationRequest); +// if(null!=pdfResp) { +// birthCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); +// birthCertificate.setEmbeddedUrl(applicationRequest.getBirthCertificate().get(0).getEmbeddedUrl()); +// birthCertificate.setDateofissue(applicationRequest.getBirthCertificate().get(0).getDateofissue()); +// } +// birthCertificate.setApplicationStatus(StatusEnum.PAID_PDF_GENERATED); +// BirthCertRequest requestNew = BirthCertRequest.builder().requestInfo(requestInfo).birthCertificate(birthCertificate).build(); +// bndProducer.push(config.getUpdateBirthTopic(), requestNew); +// repository.updateCounter(birthCertificate.getBirthDtlId()); +// } +// return birthCertificate; +// } +// catch (Exception e) { +// throw new CustomException(BirthDeathConstants.PAYMENT_ERROR_MESSAGE, e.getMessage()); +// } +// } +//} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java new file mode 100644 index 00000000000..13694d28601 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -0,0 +1,113 @@ +package org.ksmart.marriage.common.services; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.jayway.jsonpath.DocumentContext; +import com.jayway.jsonpath.JsonPath; + +import lombok.extern.slf4j.Slf4j; + +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.request.Role; + +import org.egov.tracer.model.CustomException; +import org.json.JSONObject; +import org.ksmart.marriage.common.calculation.collections.models.PaymentDetail; +import org.ksmart.marriage.common.calculation.collections.models.PaymentRequest; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; +import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; +//import org.ksmart.marriage.utils.BirthUtils; +//import org.ksmart.marriage.web.model.SearchCriteria; +//import org.ksmart.marriage.web.model.newbirth.NewBirthApplication; +//import org.ksmart.marriage.web.model.newbirth.NewBirthDetailRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; + +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.workflow.WorkflowIntegrator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +// import static org.ksmart.marriage.utils.MarriageConstants; +@Service +@Slf4j +public class PaymentUpdateService { + + private MarriageApplicationService marriageService; + + private MarriageApplicationConfiguration config; + + private MarriageApplicationSearchCriteria searchCriteria; + + private WorkflowIntegrator wfIntegrator; + + private MarriageDetailsEnrichment enrichmentService; + +// @Autowired +// private objectMapper mapper; + + //private BirthUtils util; + + public PaymentUpdateService(MarriageApplicationService marriageService,MarriageApplicationConfiguration config, + WorkflowIntegrator wfIntegrator,MarriageDetailsEnrichment enrichmentService) + //BirthUtils util, NewBirthRepository repository,) + { + this.marriageService=marriageService; + this.config=config; + this.wfIntegrator=wfIntegrator; + this.enrichmentService= enrichmentService; + } + + final String tenantId = "tenantId"; + + final String businessService = "businessService"; + + final String consumerCode = "consumerCode"; + + + /** + * Process the message from kafka and updates the status to paid + * + * @param record The incoming message from receipt create consumer + */ + public void process(HashMap record) { + ObjectMapper mapper = new ObjectMapper(); + try { + PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); + RequestInfo requestInfo = paymentRequest.getRequestInfo(); + + List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); + String tenantId = paymentRequest.getPayment().getTenantId(); + for (PaymentDetail paymentDetail : paymentDetails) { + MarriageApplicationSearchCriteria searchCriteria = new MarriageApplicationSearchCriteria(); + searchCriteria.setTenantId(tenantId); + + searchCriteria.setApplicationNo(paymentDetail.getBill().getConsumerCode()); + searchCriteria.setBusinessService(paymentDetail.getBusinessService()); + System.out.println(" payment detail tenantId:"+tenantId); + System.out.println(" payment detail tenantId:"+paymentDetail.getBill().getConsumerCode()); + System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); + List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); + + MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) + .marriageDetails(marriage).build(); + //System.out.println(" payment detail updateRequest:"+updateRequest); + wfIntegrator.callWorkFlow(updateRequest); + } + + + } catch (Exception e) { + log.error("KAFKA_PROCESS_ERROR", e); + } + + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 43a8e59c999..8a176466ba0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -20,6 +20,7 @@ import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; +import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriagePaymentRowMapper; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageDocumentRowMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; @@ -39,6 +40,8 @@ public class MarriageApplicationRepository { private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; private final MarriageDocumentRowMapper marriagedocumentRowMapper; + private final MarriagePaymentRowMapper marriagePaymentRowMapper; + @Autowired EncryptionDecryptionUtil encryptionDecryptionUtil; @@ -51,15 +54,28 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat JdbcTemplate jdbcTemplate, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, - MarriageDocumentRowMapper marriagedocumentRowMapper) { + MarriageDocumentRowMapper marriagedocumentRowMapper, + MarriagePaymentRowMapper marriagePaymentRowMapper + ) { this.producer = producer; this.jdbcTemplate = jdbcTemplate; this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; this.marriagedocumentRowMapper = marriagedocumentRowMapper; + this.marriagePaymentRowMapper = marriagePaymentRowMapper; + } + //Jasmine 07.05.2023 + public List searchMarriagePaymentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { + List preparedStmtValues = new ArrayList<>(); + String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + if (preparedStmtValues.size() == 0) { + throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); + } + else { + List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagePaymentRowMapper); + return result; + } } - //Jasmine 31.03.2023 - public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriagePaymentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriagePaymentRowMapper.java new file mode 100644 index 00000000000..6331176cc76 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriagePaymentRowMapper.java @@ -0,0 +1,66 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.springframework.dao.DataAccessException; +import org.springframework.jdbc.core.ResultSetExtractor; +import org.springframework.stereotype.Component; + +import javax.swing.text.Document; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; +@Component +public class MarriagePaymentRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper,DocumentRowMapper{ + + @Override + public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null + List result = new ArrayList<>(); + while (rs.next()) { + result.add(MarriageApplicationDetails.builder() + .id(rs.getString("MD_id")) + .dateofreporting(rs.getLong("MD_dateofreporting")) + .dateofmarriage(rs.getLong("MD_dateofmarriage")) + .districtid(rs.getString("MD_districtid")) + .lbtype(rs.getString("MD_lbtype")) + .tenantid(rs.getString("MD_tenantid")) + .placetype(rs.getString("MD_placetype")) + .placeid(rs.getString("MD_placeid")) + .marriageHouseNoAndNameEn(rs.getString("MD_housenameno_en")) + .marriageHouseNoAndNameMl(rs.getString("MD_housenameno_ml")) + .placenameEn(rs.getString("MD_placename_en")) + .placenameMl(rs.getString("MD_placename_ml")) + .streetNameEn(rs.getString("MD_street_name_en")) + .streetNameMl(rs.getString("MD_street_name_ml")) + .wardCode(rs.getString("MD_ward_code")) + .talukid(rs.getString("MD_talukid")) + .villageName(rs.getString("MD_village_name")) + .marriageType(rs.getString("MD_marriage_type")) + .landmark(rs.getString("MD_landmark")) + .localityEn(rs.getString("MD_locality_en")) + .localityMl(rs.getString("MD_locality_ml")) + .applicationNumber(rs.getString("MD_applicationnumber")) + .registrationDate(rs.getLong("MD_registration_date")) + .registrationNo(rs.getString("MD_registrationno")) + .businessservice(rs.getString("MD_businessservice")) + .moduleCode(rs.getString("MD_module_code")) + .zonalOffice(rs.getString("MD_zonal_office")) + .workflowcode(rs.getString("MD_workflowcode")) + .applicationtype(rs.getString("MD_applicationType")) + .action("PAY") + .status(rs.getString("MD_status")) + // .status(rs.getString("MD_registration_status")) + .brideDetails(getBrideDetails(rs)) + .groomDetails(getGroomDetails(rs)) + .witnessDetails(getWitnessDetails(rs)) + .brideAddressDetails(getBrideAddressDetails(rs)) + .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) + //.MarriageDocuments(getMarriageDocument(rs)) + .auditDetails(getAuditDetails(rs)) + .build()); + } + + + return result; + } +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java index 8600abb0152..7fc92875b70 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java @@ -35,6 +35,9 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("active") private Boolean active; + @JsonProperty("businessService") + private String businessService; + //Groom @JsonProperty("groomFirstnameEn") private String groomFirstnameEn; diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 389f0a23329..a3866ac6c68 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -108,7 +108,8 @@ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certif egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath -#egov.marriage.image.startPoint = https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ +egov.marriage.image.startPoint = +# https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ #view certificate path config egov.ui.app.host=https://ksmart-dev.lsgkerala.gov.in/ @@ -156,6 +157,9 @@ egov.collection.service.host=https://ksmart-dev.lsgkerala.gov.in/ egov.payment.search.endpoint=/collection-services/payments/_search +#kafka topics for downloading receipt +kafka.topics.receipt.create=egov.collection.payment-create + #Marriage correction topics persister.save.marriage.correction.topic=save-marriage-correction-topic persister.update.marriage.registry.correction.topic=correction-update-marriage-registry-topic From d04ec747919cac826b2e7056c801dcece69935a4 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Mon, 8 May 2023 10:01:02 +0530 Subject: [PATCH 314/420] search null issue fix --- .../MarriageApplicationRepository.java | 24 +++++---- .../marriage/utils/MarriageMdmsUtil.java | 52 +++++++++---------- 2 files changed, 40 insertions(+), 36 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index e93afaacade..ece45ec1c4c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -1196,21 +1196,25 @@ public List searchMarriageDetails(MarriageApplicatio GroomDetails groomDetails = marriage.getGroomDetails(); GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); groomDetails.setAadharno(groomDetailsDec.getAadharno()); - if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { + if (groomDetails.getParentGuardian() != null) { + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { - groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); - } else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { - groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + groomDetails.setMotherAadharno(groomDetailsDec.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsDec.getFatherAadharno()); + } else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { + groomDetails.setGuardianAadharno(groomDetailsDec.getGuardianAadharno()); + } } BrideDetails brideDetails = marriage.getBrideDetails(); BrideDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideDetails.class, requestInfo); brideDetails.setAadharno(brideDetailsDec.getAadharno()); - if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { - brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); - } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { - brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + if (brideDetails.getParentGuardian() != null) { + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { + brideDetails.setMotherAadharno(brideDetailsDec.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsDec.getFatherAadharno()); + } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { + brideDetails.setGuardianAadharno(brideDetailsDec.getGuardianAadharno()); + } } WitnessDetails witnessDetails = marriage.getWitnessDetails(); WitnessDetails witnessDetailsDec = encryptionDecryptionUtil.decryptObject(witnessDetails, "BndDetail", WitnessDetails.class, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 035322c9951..12ffb8ff1d8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -922,72 +922,72 @@ private List getBNDSearch() { public String getCountryNameEn(Object mdmsData, String CountryId) { List countries = getCountryCode(mdmsData); int index = countries.indexOf(CountryId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_COUNTRY_CODES_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_COUNTRY_CODES_JSONPATH+"["+index+"].name"); } public String getCountryNameMl(Object mdmsData, String CountryId) { List countries = getCountryCode(mdmsData); int index = countries.indexOf(CountryId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_COUNTRY_CODES_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_COUNTRY_CODES_JSONPATH+"["+index+"].namelocal"); } public String getStateNameEn(Object mdmsData, String StateId) { List states = getStateCode(mdmsData); int index = states.indexOf(StateId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_STATE_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_STATE_JSONPATH+"["+index+"].name"); } public String getStateNameMl(Object mdmsData, String StateId) { List states = getStateCode(mdmsData); int index = states.indexOf(StateId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_STATE_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_STATE_JSONPATH+"["+index+"].namelocal"); } public String getDistrictNameEn(Object mdmsData, String DistrictId) { List districts = getDistrictCode(mdmsData); int index = districts.indexOf(DistrictId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_DISTRICT_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_DISTRICT_JSONPATH+"["+index+"].name"); } public String getDistrictNameMl(Object mdmsData, String DistrictId) { List districts = getDistrictCode(mdmsData); int index = districts.indexOf(DistrictId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_DISTRICT_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_DISTRICT_JSONPATH+"["+index+"].namelocal"); } public String getTalukNameEn(Object mdmsData, String TalukId) { List taluks = getTalukCode(mdmsData); int index = taluks.indexOf(TalukId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TALUK_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TALUK_JSONPATH+"["+index+"].name"); } public String getTalukNameMl(Object mdmsData, String TalukId) { List taluks = getTalukCode(mdmsData); int index = taluks.indexOf(TalukId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TALUK_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TALUK_JSONPATH+"["+index+"].namelocal"); } public String getVillageNameEn(Object mdmsData, String VillageId) { List villages = getVillageCode(mdmsData); int index = villages.indexOf(VillageId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_VILLAGE_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_VILLAGE_JSONPATH+"["+index+"].name"); } public String getVillageNameMl(Object mdmsData, String VillageId) { List villages = getVillageCode(mdmsData); int index = villages.indexOf(VillageId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_VILLAGE_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_VILLAGE_JSONPATH+"["+index+"].namelocal"); } public String getPONameEn(Object mdmsData, String POId) { List po = getPOCode(mdmsData); int index = po.indexOf(POId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].name"); } public String getPONameMl(Object mdmsData, String POId) { List po = getPOCode(mdmsData); int index = po.indexOf(POId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_POSTOFFICE_JSONPATH+"["+index+"].namelocal"); } public String getMaritalStatusEn(Object mdmsData, String POId) { List maritalStatus = getMaritalStatusCode(mdmsData); int index = maritalStatus.indexOf(POId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARITALSTATUS_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARITALSTATUS_JSONPATH+"["+index+"].name"); } public String getMaritalStatusMl(Object mdmsData, String POId) { List po = getPOCode(mdmsData); int index = po.indexOf(POId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARITALSTATUS_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARITALSTATUS_JSONPATH+"["+index+"].namelocal"); } // public String getGenderEn(Object mdmsData, String POId) { // List po = getPOCode(mdmsData); @@ -1095,70 +1095,70 @@ public String getWardNameEn(Object mdmsData, String WardId) { List tenants = getBoundaryCode(mdmsData); int index = tenants.indexOf(WardId); ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".name"); - return names.get(index); + return index<0?null:names.get(index); } public String getWardNameMl(Object mdmsData, String WardId) { List tenants = getBoundaryCode(mdmsData); int index = tenants.indexOf(WardId); ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_BOUNDARY_CODES_JSONPATH+".localname"); - return names.get(index); + return index<0?null:names.get(index); } public String getPlaceTypeNameEn(Object mdmsData, String placetype) { List tenants = getPlaceTypeCode(mdmsData); int index = tenants.indexOf(placetype); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACE_TYPE_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACE_TYPE_JSONPATH+"["+index+"].name"); } public String getPlaceTypeNameMl(Object mdmsData, String placetype) { List tenants = getPlaceTypeCode(mdmsData); int index = tenants.indexOf(placetype); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACE_TYPE_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACE_TYPE_JSONPATH+"["+index+"].namelocal"); } public String getMarriageTypeEn(Object mdmsData, String marriageType) { List tenants = getMarriageTypeCode(mdmsData); int index = tenants.indexOf(marriageType); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TYPE_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TYPE_JSONPATH+"["+index+"].name"); } public String getMarriageTypeMl(Object mdmsData, String marriageType) { List tenants = getMarriageTypeCode(mdmsData); int index = tenants.indexOf(marriageType); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TYPE_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_TYPE_JSONPATH+"["+index+"].namelocal"); } public String getMarriagePlaceIdEn(Object mdmsData, String placeId) { List tenants = getPlaceIdCode(mdmsData); int index = tenants.indexOf(placeId); ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACEID_JSONPATH+".name"); - return names.get(index); + return index<0?null:names.get(index); } public String getMarriagePlaceIdMl(Object mdmsData, String placeId) { List tenants = getPlaceIdCode(mdmsData); int index = tenants.indexOf(placeId); ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACEID_JSONPATH+".nameLocal"); - return names.get(index); + return index<0?null:names.get(index); } public String getMarriageLbtypeEn(Object mdmsData, String Lbtype) { List tenants = getLBTypeCode(mdmsData); int index = tenants.indexOf(Lbtype); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].name"); } public String getMarriageLbtypeMl(Object mdmsData, String Lbtype) { List tenants = getLBTypeCode(mdmsData); int index = tenants.indexOf(Lbtype); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].namelocal"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_LBTYPE_JSONPATH+"["+index+"].namelocal"); } public String getMarriageTenantEn(Object mdmsData, String tenantId) { List tenants = getTenantIdCode(mdmsData); int index = tenants.indexOf(tenantId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.name"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.name"); } public String getMarriageTenantMl(Object mdmsData, String tenantId) { List tenants = getTenantIdCode(mdmsData); int index = tenants.indexOf(tenantId); - return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.localName"); + return index<0?null:JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_JSONPATH+"["+index+"].city.localName"); } private List getLBTypeCode(Object mdmsData) { From d00596c329786732246db2a7729561d2413fa37e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 8 May 2023 11:05:44 +0530 Subject: [PATCH 315/420] marriage registry update --- .../enrichment/MarriageRegistryEnrichment.java | 4 ++-- .../repository/MarriageRegistryRepository.java | 8 ++------ .../marriageregistry/service/MarriageRegistryService.java | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index c3f633c5f5c..05ea782eb40 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -81,8 +81,8 @@ public void enrichCreate(MarriageRegistryRequest request) { if(marriage.getWitnessDetails()!=null){ marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); marriage.getWitnessDetails().setWitnessId2(UUID.randomUUID().toString()); - marriage.getWitnessDetails().setSerial_no1(1); - marriage.getWitnessDetails().setSerial_no2(2); + marriage.getWitnessDetails().setSerial_no1(1); + marriage.getWitnessDetails().setSerial_no2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } }); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 444926d6107..02d896c01d1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -94,17 +94,14 @@ public List searchMarriageRegistry(MarriageRegistrySear List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); - - - - return result; + return result; } public int getMarriageRegistryCount(MarriageRegistrySearchCriteria criteria) { List preparedStmtList = new ArrayList<>(); String query = queryBuilder.getMarriageRegistryCountQuery(criteria, preparedStmtList, Boolean.FALSE); int MarriageCount = jdbcTemplate.queryForObject(query,preparedStmtList.toArray(),Integer.class); - System.out.println("Marriagecountquery"+query); + // System.out.println("Marriagecountquery"+query); return MarriageCount; } public List searchCertificateByMarriageId(String id) { @@ -115,7 +112,6 @@ public List searchCertificateByMarriageId(String id) { } - public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marriageCertPDFRequest) { MarriageCertPdfResponse pdfResponse = new MarriageCertPdfResponse(); try { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 98e9c9b6621..83ae06eae91 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -143,7 +143,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req marriageCertificate.setEmbeddedUrl(marriageCertPDFRequest.getMarriageCertificate().get(0).getEmbeddedUrl()); // marriageCertificateEnrichment.createCertificateNo(marriageCertRequest); //TODO check IdGenError MarriageCertPdfResponse pdfResp = repository.saveMarriageCertPdf(marriageCertPDFRequest); -// marriageCertificate.setDateofissue(marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getRegistrationDate()); + // marriageCertificate.setDateofissue(marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getRegistrationDate()); marriageCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); marriageCertificate.setCertificateStatus(MarriageCertificate.StatusEnum.FREE_DOWNLOAD); marriageCertificate.setCount(1);//If 1 download from filestoreId, If 0, need to regenerate certificate From 1ab14e2eceb3194e4686fb628a54aa0aaccb668c Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 8 May 2023 11:35:49 +0530 Subject: [PATCH 316/420] changes in values setting for marriage certificate --- .../MarriageApplicationConfiguration.java | 3 + .../MarriageRegistryRepository.java | 62 ++++++++++++++++--- .../marriage/utils/MarriageConstants.java | 1 + 3 files changed, 57 insertions(+), 9 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index a74a56fda05..db67932e74a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -129,6 +129,9 @@ public class MarriageApplicationConfiguration { @Value("${persister.update.marriage.demand.topic}") private String updateDemandTopic; + @Value("${egov.marriage.image.DefaultPhotoUrl}") + private String defaultPhotoUrl; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 5c20d4ee60a..9f72bc3b82e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -129,12 +129,12 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria //TODO pdf data creation if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails()&& StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en())) { StringBuilder groomFullName = new StringBuilder(); - groomFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en()); + groomFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en().trim()); if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en())) { - groomFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en()); + groomFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getMiddlename_en().trim()); } if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en())) { - groomFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en()); + groomFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en().trim()); } req.getMarriageCertificate().get(0).setGroomFullName(groomFullName.toString()); }else{ @@ -143,12 +143,12 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails()&& StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getFirstname_en())) { StringBuilder brideFullName = new StringBuilder(); - brideFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getFirstname_en()); + brideFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getFirstname_en().trim()); if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en())) { - brideFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en()); + brideFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getMiddlename_en().trim()); } if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en())) { - brideFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en()); + brideFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en().trim()); } req.getMarriageCertificate().get(0).setBrideFullName(brideFullName.toString()); }else{ @@ -161,11 +161,13 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath() + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); }else{ throw new CustomException("PDF_ERROR", "Groom Photo not found!!!" ); + //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getDefaultPhotoUrl()); } if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); }else{ throw new CustomException("PDF_ERROR", "Bride Photo not found!!!" ); + //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getDefaultPhotoUrl()); } }else{ throw new CustomException("PDF_ERROR", "Bride and Groom Photos not found!!!" ); @@ -261,7 +263,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria System.out.println(marriageAddr); } - req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(marriageAddr.toString()); + req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(StringUtils.isNotBlank(marriageAddr.toString())?marriageAddr.toString():MarriageConstants.NOT_RECORDED); } }else{ throw new CustomException("PDF_ERROR"," Marriage Place Type is Empty"); @@ -285,8 +287,16 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsGroomAddressMap)); // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsGroomAddressMap)); - req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); - req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + if (StringUtils.isNotBlank(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))){ + req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + }else{ + req.getMarriageCertificate().get(0).setGroomPermntFullAddr(MarriageConstants.NOT_RECORDED); + } + if (StringUtils.isNotBlank(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))) { + req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + }else{ + req.getMarriageCertificate().get(0).setBridePermntFullAddr(MarriageConstants.NOT_RECORDED); + } //Setting groom NRI address @@ -316,6 +326,8 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); } + setDefaultValuesIfNull(req.getMarriageCertificate().get(0)); + marriageCertPDFRequest.getMarriageCertificate().forEach(cert->{ String uiHost = marriageApplicationConfiguration.getUiAppHost(); String marriageCertPath = StringUtils.replaceEach(marriageApplicationConfiguration.getMarriageCertLink(), @@ -350,6 +362,38 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } + + private void setDefaultValuesIfNull(MarriageCertificate cert){ + cert.setAckNo(getDefaultValueIfNull(cert.getAckNo())); + cert.setMarriagePlaceFullAddr(getDefaultValueIfNull(cert.getMarriagePlaceFullAddr())); + cert.setTenantid(getDefaultValueIfNull(cert.getTenantid())); + cert.setApplicationId(getDefaultValueIfNull(cert.getApplicationId())); +// cert.setDateofissue(getDefaultValueIfNull(cert.getApplicationId())); + cert.getMarriageRegistryDetails().setTenantid(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getTenantid())); + cert.setLbType(getDefaultValueIfNull(cert.getLbType())); + cert.getMarriageRegistryDetails().setCertificateNo(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getCertificateNo())); + cert.getMarriageRegistryDetails().setApplicationNumber(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getApplicationNumber())); + cert.setMarriagePlaceFullAddr(getDefaultValueIfNull(cert.getMarriagePlaceFullAddr())); + cert.setGroomNRIAddress(getDefaultValueIfNull(cert.getGroomNRIAddress())); + cert.setGroomPermntFullAddr(getDefaultValueIfNull(cert.getGroomPermntFullAddr())); + cert.setBridePermntFullAddr(getDefaultValueIfNull(cert.getBridePermntFullAddr())); + cert.getMarriageRegistryDetails().getBrideAddressDetails().setCountryIdPermanent(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getBrideAddressDetails().getCountryIdPermanent())); + cert.getMarriageRegistryDetails().getGroomAddressDetails().setCountryIdPermanent(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent())); + cert.getMarriageRegistryDetails().getBrideDetails().setFathername_en(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getBrideDetails().getFathername_en())); + cert.getMarriageRegistryDetails().getGroomDetails().setFathername_en(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getGroomDetails().getFathername_en())); + cert.getMarriageRegistryDetails().getBrideDetails().setMothername_en(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getBrideDetails().getMothername_en())); + cert.getMarriageRegistryDetails().getGroomDetails().setMothername_en(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getGroomDetails().getMothername_en())); + cert.getMarriageRegistryDetails().getBrideDetails().setGuardianname_en(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getBrideDetails().getGuardianname_en())); + cert.getMarriageRegistryDetails().getGroomDetails().setGuardianname_en(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getGroomDetails().getGuardianname_en())); + cert.getMarriageRegistryDetails().getBrideDetails().setPassportno(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getBrideDetails().getPassportno())); + cert.getMarriageRegistryDetails().getGroomDetails().setPassportno(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getGroomDetails().getPassportno())); + cert.getMarriageRegistryDetails().setRegistrationno(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getRegistrationno())); +// cert.getMarriageRegistryDetails().setRegistrationno(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getRegistrationno())); + } + private String getDefaultValueIfNull(String value) { + return StringUtils.isNotBlank(value)?value: MarriageConstants.NOT_RECORDED; + } + public String getShortenedUrl(String url) { HashMap body=new HashMap<>(); body.put("url", url); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index dbbbd40aa35..894c7b6c36f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -168,4 +168,5 @@ public class MarriageConstants { public static final String MARRIAGE_PLACE_STATE_ID = "stateid"; public static final String MARRIAGE_PLACE_TENENT_CODE = "tenentCode"; public static final String BILLING_SERVICE = "BillingService"; + public static final String NOT_RECORDED = "Not Recorded"; } From 7211c5751db39f509a2dc529d63d22f876ecfce5 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 8 May 2023 11:41:02 +0530 Subject: [PATCH 317/420] marriage registry decryption --- .../service/MarriageCorrectionService.java | 6 +-- .../MarriageRegistryRepository.java | 39 ++++++++++++++++++- .../service/MarriageRegistryService.java | 14 +++---- .../MarriageRegistryController.java | 4 +- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index b665f6f9d6d..a44051d5d2a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -107,7 +107,7 @@ public List createCorrection(MarriageCorrectionReques criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setId(request.getMarriageCorrectionDetails().get(0).getRegisterId()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria); + List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); marriageCorrectionApplnValidator.validateCorrectionRegistrySearch(marriageRegistryDetails); MarriageApplicationDetails marriageApplicationDetail = RegistryToApplicationMapper.convert(marriageRegistryDetails); @@ -157,8 +157,8 @@ public List createCorrection(MarriageCorrectionReques } //req For Testing - private List searchRegistry(MarriageRegistrySearchCriteria criteria) { - return registryRepository.searchMarriageRegistry(criteria); + private List searchRegistry(MarriageRegistrySearchCriteria criteria,RequestInfo requestinfo) { + return registryRepository.searchMarriageRegistry(criteria,requestinfo); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 02d896c01d1..b35738a4a74 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -5,11 +5,14 @@ import org.apache.commons.lang3.StringUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.contract.EncryptionDecryptionUtil; import org.ksmart.marriage.common.producer.MarriageProducer; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageregistry.enrichment.MarriageCertificateEnrichment; import org.ksmart.marriage.marriageregistry.enrichment.MarriageRegistryEnrichment; +import org.ksmart.marriage.marriageregistry.web.model.BrideRegistryDetails; +import org.ksmart.marriage.marriageregistry.web.model.GroomRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistrySearchCriteria; import org.ksmart.marriage.marriageregistry.repository.querybuilder.MarriageRegistryQueryBuilder; @@ -53,6 +56,9 @@ public class MarriageRegistryRepository { private final MarriageCertificateEnrichment marriageCertificateEnrichment; private final MarriageMdmsUtil util; + @Autowired + EncryptionDecryptionUtil encryptionDecryptionUtil; + @Autowired public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnrichment, MarriageProducer producer, MarriageApplicationConfiguration marriageApplicationConfiguration, @@ -86,7 +92,7 @@ public MarriageRegistryRepository(MarriageRegistryEnrichment marriageRegistryEnr // return result.getMarriageDetails(); // } - public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria) { + public List searchMarriageRegistry(MarriageRegistrySearchCriteria criteria,RequestInfo requestInfo ) { List preparedStmtValues = new ArrayList<>(); @@ -94,9 +100,38 @@ public List searchMarriageRegistry(MarriageRegistrySear List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageRegistryRowMapper); - return result; + if (result != null) { + result.forEach(marriage -> { + + GroomRegistryDetails groomDetails = marriage.getGroomDetails(); + GroomRegistryDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomRegistryDetails.class, requestInfo); + groomDetails.setAadharno(groomDetailsDec.getAadharno()); + if (groomDetails.getParent_guardian() != null) { + if (groomDetails.getParent_guardian().equals(MarriageConstants.PARENT)) { + + groomDetails.setMother_aadharno(groomDetailsDec.getMother_aadharno()); + groomDetails.setFather_aadharno(groomDetailsDec.getFather_aadharno()); + } else if (groomDetails.getParent_guardian().equals(MarriageConstants.GUARDIAN)) { + groomDetails.setGuardian_aadharno(groomDetailsDec.getGuardian_aadharno()); + } + } + BrideRegistryDetails brideDetails = marriage.getBrideDetails(); + BrideRegistryDetails brideDetailsDec = encryptionDecryptionUtil.decryptObject(brideDetails, "BndDetail", BrideRegistryDetails.class, requestInfo); + brideDetails.setAadharno(brideDetailsDec.getAadharno()); + if (brideDetails.getParent_guardian() != null) { + if (brideDetails.getParent_guardian().equals(MarriageConstants.PARENT)) { + brideDetails.setMother_aadharno(brideDetailsDec.getMother_aadharno()); + brideDetails.setFather_aadharno(brideDetailsDec.getFather_aadharno()); + } else if (brideDetails.getParent_guardian().equals(MarriageConstants.GUARDIAN)) { + brideDetails.setGuardian_aadharno(brideDetailsDec.getGuardian_aadharno()); + } + } + }); + } + return result; } + public int getMarriageRegistryCount(MarriageRegistrySearchCriteria criteria) { List preparedStmtList = new ArrayList<>(); String query = queryBuilder.getMarriageRegistryCountQuery(criteria, preparedStmtList, Boolean.FALSE); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 83ae06eae91..1a033042163 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -83,13 +83,13 @@ public List createRegistry(MarriageRegistryRequest requ } - public List searchRegistry(MarriageRegistrySearchCriteria criteria) { + public List searchRegistry(MarriageRegistrySearchCriteria criteria,RequestInfo requestInfo) { - return repository.searchMarriageRegistry(criteria); + return repository.searchMarriageRegistry(criteria,requestInfo); } public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { - List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria); + List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria, requestInfo); if (marriageRegistryDetailsList != null && !marriageRegistryDetailsList.isEmpty()) { // List marriageCertificateList = repository.searchCertificateByMarriageId(marriageRegistryDetailsList.get(0).getId()); try { @@ -99,7 +99,7 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req MarriageCertRequest marriageCertRequest = MarriageCertRequest.builder().marriageCertificate(marriageCertificate).requestInfo(requestInfo).build(); marriageCertificate.setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); marriageCertificate.setRegistrationno(marriageRegistryDetailsList.get(0).getRegistrationno()); - List marriageDtls = searchCertificate(criteria); + List marriageDtls = searchCertificate(criteria,requestInfo); if (null!=marriageDtls && marriageDtls.size() > 1) { throw new CustomException("Invalid_Input", "Error in processing data"); } @@ -174,8 +174,8 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req } - public List searchCertificate(MarriageRegistrySearchCriteria criteria) { - List obj = repository.searchMarriageRegistry(criteria); + public List searchCertificate(MarriageRegistrySearchCriteria criteria,RequestInfo requestInfo) { + List obj = repository.searchMarriageRegistry(criteria,requestInfo); if(null!=obj&&obj.size()>0) { return repository.searchCertificateByMarriageId(obj.get(0).getId()); }else{ @@ -189,7 +189,7 @@ public List updateMarriageRegistry(MarriageCorrection MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); criteria.setTenantId(request.getMarriageCorrectionDetails().get(0).getTenantid()); - List marriageRegistryDetails = searchRegistry(criteria); + List marriageRegistryDetails = searchRegistry(criteria,request.getRequestInfo()); marriageCorrectionApplnValidator.validateCorrectionRegistrySearch(marriageRegistryDetails); MarriageApplicationSearchCriteria aplnCriteria=new MarriageApplicationSearchCriteria(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java index 241fdd0339a..af914e7d9c8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/controller/MarriageRegistryController.java @@ -58,7 +58,7 @@ public ResponseEntity search(@RequestBody MarriageReg @ModelAttribute MarriageRegistrySearchCriteria criteria) { int registryCount=registryRepository.getMarriageRegistryCount(criteria); - List marriageDetails = marriageService.searchRegistry(criteria); + List marriageDetails = marriageService.searchRegistry(criteria,request.getRequestInfo()); MarriageRegistryResponse response = MarriageRegistryResponse .builder() @@ -72,7 +72,7 @@ public ResponseEntity search(@RequestBody MarriageReg @PostMapping("_certificate") public ResponseEntity certificateDownload(@RequestBody MarriageRegistryRequest request, @Valid @ModelAttribute MarriageRegistrySearchCriteria criteria) { - List marriageCertResponseList = marriageService.searchCertificate(criteria); + List marriageCertResponseList = marriageService.searchCertificate(criteria,request.getRequestInfo()); MarriageCertResponse response; From 640fd16d82a17f15e2f43d3fdaa973ed31304eee Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 8 May 2023 11:41:18 +0530 Subject: [PATCH 318/420] conflicts resolved in properties --- .../src/main/resources/application.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index a3866ac6c68..337acf6c851 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -108,8 +108,9 @@ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certif egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath -egov.marriage.image.startPoint = +egov.marriage.image.startPoint = # https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ +egov.marriage.image.DefaultPhotoUrl = / #view certificate path config egov.ui.app.host=https://ksmart-dev.lsgkerala.gov.in/ @@ -157,8 +158,7 @@ egov.collection.service.host=https://ksmart-dev.lsgkerala.gov.in/ egov.payment.search.endpoint=/collection-services/payments/_search -#kafka topics for downloading receipt -kafka.topics.receipt.create=egov.collection.payment-create + #Marriage correction topics persister.save.marriage.correction.topic=save-marriage-correction-topic From 00df107ae18f5c9081b8a6502ae4252096d5ad96 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Mon, 8 May 2023 12:07:10 +0530 Subject: [PATCH 319/420] brideurl etc save in corr appln --- .../main/resources/marriage-correction.yml | 24 +++++++++++++++++-- .../mapper/RegistryToApplicationMapper.java | 17 +++++++++---- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 909946b0299..1e7f5a625d0 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationno, registration_date, action, status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); + lastmodifiedtime, lastmodifiedby, module_code, brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward, zonal_office) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -82,6 +82,26 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.auditDetails.lastModifiedBy + - jsonPath: $.MarriageDetails.*.moduleCode + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideUrl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomUrl + + - jsonPath: $.MarriageDetails.*.WitnessDetails.imageUuid + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideFilestoreId + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomFilestoreId + + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideExpired + + - jsonPath: $.MarriageDetails.*.WitnessDetails.groomExpired + + - jsonPath: $.MarriageDetails.*.WitnessDetails.isBackward + + - jsonPath: $.MarriageDetails.*.zonalOffice + - query: INSERT INTO public.eg_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 17b7822f70f..04d3d114438 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -2,10 +2,7 @@ import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; -import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.*; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.springframework.stereotype.Component; @@ -22,6 +19,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.setGroomDetails(new GroomDetails()); marriageApplicationDetails.setBrideAddressDetails(new BrideAddressDetails()); marriageApplicationDetails.setGroomAddressDetails(new GroomAddressDetails()); + marriageApplicationDetails.setWitnessDetails(new WitnessDetails()); MarriageRegistryDetails marriageRegistryDetails=registry.get(0); //MARRIAGE DETAILS @@ -51,6 +49,17 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukid()); marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillage_name()); + marriageApplicationDetails.setModuleCode(marriageRegistryDetails.getModuleCode()); + marriageApplicationDetails.getWitnessDetails().setBrideUrl(marriageRegistryDetails.getWitnessDetails().getBrideUrl()); + marriageApplicationDetails.getWitnessDetails().setGroomUrl(marriageRegistryDetails.getWitnessDetails().getGroomUrl()); + marriageApplicationDetails.getWitnessDetails().setImageUuid(marriageRegistryDetails.getWitnessDetails().getImageUuid()); + marriageApplicationDetails.getWitnessDetails().setBrideFilestoreId(marriageRegistryDetails.getWitnessDetails().getBrideFilestoreId()); + marriageApplicationDetails.getWitnessDetails().setGroomFilestoreId(marriageRegistryDetails.getWitnessDetails().getGroomFilestoreId()); + marriageApplicationDetails.getWitnessDetails().setBrideExpired(marriageRegistryDetails.getWitnessDetails().getBrideExpired()); + marriageApplicationDetails.getWitnessDetails().setGroomExpired(marriageRegistryDetails.getWitnessDetails().getGroomExpired()); + marriageApplicationDetails.getWitnessDetails().setIsBackward(marriageRegistryDetails.getWitnessDetails().getIsBackward()); + marriageApplicationDetails.setZonalOffice(marriageRegistryDetails.getZonalOffice()); + //BRIDE DETAILS marriageApplicationDetails.getBrideDetails().setBrideGroom(marriageRegistryDetails.getBrideDetails().getBrideGroom()); marriageApplicationDetails.getBrideDetails().setResidentship(marriageRegistryDetails.getBrideDetails().getResidentship()); From 8ab07952b5195de9f63596fd41a12ba4293f9473 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 8 May 2023 12:39:43 +0530 Subject: [PATCH 320/420] Marriage Application Repository OutsideKerala Missing Value Setted --- .../repository/MarriageApplicationRepository.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index ece45ec1c4c..3bdd7a9b8e8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -474,7 +474,14 @@ public List searchMarriageDetails(MarriageApplicatio marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); + + marriage.getBrideAddressDetails().setPermntOutsideKeralaHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); } } //PERMANENT-OUTSIDE INDIA From 38c869d3d54f8baa38d0671c0d4a3cfe01ba3a44 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Mon, 8 May 2023 12:52:50 +0530 Subject: [PATCH 321/420] included villageid , talukname in corr apln --- .../src/main/resources/marriage-correction.yml | 8 ++++++-- .../querybuilder/MarriageApplicationQueryBuilder.java | 2 +- .../rowmapper/MarriageApplicationRowMapper.java | 2 ++ .../mapper/RegistryToApplicationMapper.java | 4 ++-- .../querybuilder/MarriageRegistryQueryBuilder.java | 2 +- .../repository/rowmapper/MarriageRegistryRowMapper.java | 2 ++ .../web/model/MarriageRegistryDetails.java | 8 ++++++++ 7 files changed, 22 insertions(+), 6 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 1e7f5a625d0..2b860d9d846 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationno, registration_date, action, status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby, module_code, brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward, zonal_office) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); + lastmodifiedtime, lastmodifiedby, module_code, villageid, taluk_name, brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward, zonal_office) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -84,6 +84,10 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.moduleCode + - jsonPath: $.MarriageDetails.*.villageId + + - jsonPath: $.MarriageDetails.*.talukName + - jsonPath: $.MarriageDetails.*.WitnessDetails.brideUrl - jsonPath: $.MarriageDetails.*.WitnessDetails.groomUrl diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 697a8573c7c..60d68a379d2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -22,7 +22,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.businessservice as MD_businessservice , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby , MD.workflowcode as MD_workflowcode, ") .append("MD.applicationNumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code, MD.zonal_office as MD_zonal_office,MD.action as MD_action, MD.status as MD_status,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code, MD.zonal_office as MD_zonal_office,MD.action as MD_action, MD.status as MD_status,MD.villageid as MD_villageid, MD.taluk_name as MD_taluk_name,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 937bf08d43b..77cb2864b4b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -49,6 +49,8 @@ public List extractData(ResultSet rs) throws SQLExce .applicationtype(rs.getString("MD_applicationType")) .action(rs.getString("MD_action")) .status(rs.getString("MD_status")) + .villageId(rs.getString("MD_villageid")) + .talukName(rs.getString("MD_taluk_name")) // .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 04d3d114438..6189a77fb6f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -46,8 +46,8 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.setLocalityMl(marriageRegistryDetails.getLocality_ml()); marriageApplicationDetails.setRegistrationDate(marriageRegistryDetails.getRegistrationDate()); marriageApplicationDetails.setRegistrationNo(marriageRegistryDetails.getRegistrationno()); - marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukid()); - marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillage_name()); + marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukName()); + marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillageId()); marriageApplicationDetails.setModuleCode(marriageRegistryDetails.getModuleCode()); marriageApplicationDetails.getWitnessDetails().setBrideUrl(marriageRegistryDetails.getWitnessDetails().getBrideUrl()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 7808d807904..f961c66b073 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -27,7 +27,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("MD.landmark as MD_landmark , MD.registrationno as MD_registrationno , MD.registration_date as MD_registration_date , MD.registration_status as MD_registration_status , ") .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby ,") .append("MD.applicationnumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") - .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,MD.certificateno as MD_certificateno,MD.zonal_office as MD_zonal_office,") + .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code,MD.certificateno as MD_certificateno,MD.zonal_office as MD_zonal_office, MD.taluk_name as MD_taluk_name, MD.villageid as MD_villageid,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 637d6306bc6..598a7b03df1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -52,6 +52,8 @@ public List extractData(ResultSet rs) throws SQLExcepti .moduleCode(rs.getString("MD_module_code")) .certificateNo(rs.getString("MD_certificateno")) .zonalOffice(rs.getString("MD_zonal_office")) + .talukName(rs.getString("MD_taluk_name")) + .villageId(rs.getString("MD_villageid")) .brideDetails(getBrideDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomDetails(getGroomDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java index b522f6d71d4..a4b9fd71804 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistryDetails.java @@ -186,6 +186,14 @@ public class MarriageRegistryDetails { @JsonProperty("moduleCode") private String moduleCode; + @Size(max = 64) + @JsonProperty("villageId") + private String villageId; + + @Size(max = 1000) + @JsonProperty("talukName") + private String talukName; + @JsonProperty("BrideDetails") private BrideRegistryDetails brideDetails; From 880ee5e6618be5ccf60b91a5e92f478ed72bbd9e Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 8 May 2023 14:22:14 +0530 Subject: [PATCH 322/420] NEW FEILD ADDED IN MARRIAGE APPLICATION & DATABASE --- .../src/main/resources/marriage.yml | 28 +++++++++++-------- .../MarriageApplicationQueryBuilder.java | 8 +++--- .../BrideAddressDetailsRowMapper.java | 5 ++-- .../GroomAddressDetailsRowMapper.java | 4 +-- ...926__Marriage_Add_Address_Newfeild_dll.sql | 23 +++++++++++++++ 5 files changed, 49 insertions(+), 19 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230508125926__Marriage_Add_Address_Newfeild_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index e042e6e7d93..6d24ca8e148 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -347,8 +347,8 @@ serviceMaps: id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, - ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,present_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentUuid @@ -399,7 +399,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.isPermanentAddress - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutsideKeralaPostOfficeEn @@ -421,13 +421,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + - query : INSERT INTO public.eg_marriage_permanent_address_details( id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid @@ -498,15 +500,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent - + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName - query: INSERT INTO public.eg_marriage_present_address_details( id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, - ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,present_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentUuid @@ -557,7 +559,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.isPermanentAddress - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutsideKeralaPostOfficeEn @@ -579,13 +581,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + - query : INSERT INTO public.eg_marriage_permanent_address_details( id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid @@ -656,6 +660,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - query: INSERT INTO public.eg_marriage_document( id ,tenantid ,document_name ,document_type ,filestoreid , diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 60d68a379d2..503c6e75f7f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -57,19 +57,19 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") - .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode , GPMA.city_town_village as GPMA_city_town_village ,") + .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode , GPMA.city_town_village as GPMA_city_town_village , GPMA.permanent_tenentid as GPMA_permanent_tenentid,") .append("BPMA.id as BPMA_id ,BPMA.housename_no_en as BPMA_housename_en ,BPMA.housename_no_ml as BPMA_housename_ml,BPMA.villageid as BPMA_villageid ,BPMA.village_name as BPMA_village_name,") .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") .append("BPMA.locality_en as BPMA_locality_en , BPMA.locality_ml as BPMA_locality_ml , BPMA.street_name_en as BPMA_street_name_en , BPMA.street_name_ml as BPMA_street_name_ml,") .append("BPMA.districtid as BPMA_districtid , BPMA.stateid BPMA_stateid , BPMA.poid as BPMA_poid , BPMA.poname_en as BPMA_poname_en , BPMA.poname_ml as BPMA_poname_ml ,") - .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , ") + .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , BPMA.permanent_tenentid as BPMA_permanent_tenentid,") .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml , BPMA.ot_zipcode as BPMA_ot_zipcode ,BPMA.city_town_village as BPMA_city_town_village ,") .append("GPSA.id as GPSA_id ,GPSA.housename_no_en as GPSA_housename_en,GPSA.housename_no_ml as GPSA_housename_ml,GPSA.villageid as GPSA_villageid,GPSA.village_name as GPSA_village_name,") - .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") + .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code, GPSA.present_tenentid as GPSA_present_tenentid,") .append("GPSA.locality_en as GPSA_locality_en,GPSA.locality_ml as GPSA_locality_ml , GPSA.street_name_en as GPSA_street_name_en , GPSA.street_name_ml as GPSA_street_name_ml , ") .append("GPSA.districtid as GPSA_districtid , GPSA.stateid GPSA_stateid , GPSA.poid as GPSA_poid , GPSA.poname_en as GPSA_poname_en , GPSA.poname_ml as GPSA_poname_ml , ") .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom , ") @@ -77,7 +77,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml, GPSA.ot_zipcode as GPSA_ot_zipcode, GPSA.city_town_village as GPSA_city_town_village , ") - .append("BPSA.id as BPSA_id ,BPSA.housename_no_en as BPSA_housename_en,BPSA.housename_no_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,") + .append("BPSA.id as BPSA_id ,BPSA.housename_no_en as BPSA_housename_en,BPSA.housename_no_ml as BPSA_housename_ml,BPSA.villageid as BPSA_villageid,BPSA.village_name as BPSA_village_name,BPSA.present_tenentid as BPSA_present_tenentid,") .append("BPSA.talukid as BPSA_talukid , BPSA.taluk_name as BPSA_taluk_name , BPSA.tenantid as BPSA_tenantid , BPSA.ward_code as BPSA_ward_code ,") .append("BPSA.locality_en as BPSA_locality_en , BPSA.locality_ml as BPSA_locality_ml ,") .append("BPSA.street_name_en as BPSA_street_name_en , BPSA.street_name_ml as BPSA_street_name_ml , BPSA.districtid as BPSA_districtid , BPSA.stateid BPSA_stateid ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 5e30ef96348..3615d5901ef 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -27,7 +27,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .presentInsideKeralaTaluk(rs.getString("BPSA_talukid")) .presentInsideKeralaVillage(rs.getString("BPSA_villageid")) .villageNamePresent(rs.getString("BPSA_village_name")) - .presentInsideKeralaLBName(rs.getString("BPSA_tenantid")) + .presentInsideKeralaLBName(rs.getString("BPSA_present_tenentid")) .presentWardNo(rs.getString("BPSA_ward_code")) .presentInsideKeralaPostOffice(rs.getString("BPSA_poid")) .presentUuid(rs.getString("BPSA_id")) @@ -45,6 +45,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .outSideIndiaPostCodePresent(rs.getString("BPSA_ot_zipcode")) .brideGroomPresent(rs.getString("BPSA_bride_groom")) + // PERMANENT .countryIdPermanent(rs.getString("BPMA_countryid")) @@ -60,7 +61,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .houseNameNoMlPermanent(rs.getString("BPMA_housename_ml")) .villageNamePermanent(rs.getString("BPMA_village_name")) .permanentUuid(rs.getString("BPMA_id")) - .permntInKeralaAdrLBName(rs.getString("BPMA_tenantid")) + .permntInKeralaAdrLBName(rs.getString("BPMA_permanent_tenentid")) .townOrVillagePermanent(rs.getString("BPMA_city_town_village")) .permntInKeralaAdrTaluk(rs.getString("BPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("BPMA_villageid")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 0f3e793418f..173bb388c03 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -26,7 +26,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .presentInsideKeralaTaluk(rs.getString("GPSA_talukid")) .presentInsideKeralaVillage(rs.getString("GPSA_villageid")) .villageNamePresent(rs.getString("GPSA_village_name")) - .presentInsideKeralaLBName(rs.getString("GPSA_tenantid")) + .presentInsideKeralaLBName(rs.getString("GPSA_present_tenentid")) .presentWardNo(rs.getString("GPSA_ward_code")) .presentInsideKeralaPostOffice(rs.getString("GPSA_poid")) .presentUuid(rs.getString("GPSA_id")) @@ -59,7 +59,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .houseNameNoMlPermanent(rs.getString("GPMA_housename_ml")) .villageNamePermanent(rs.getString("GPMA_village_name")) .permanentUuid(rs.getString("GPMA_id")) - .permntInKeralaAdrLBName(rs.getString("GPMA_tenantid")) + .permntInKeralaAdrLBName(rs.getString("GPMA_permanent_tenentid")) .townOrVillagePermanent(rs.getString("GPMA_city_town_village")) .permntInKeralaAdrTaluk(rs.getString("GPMA_talukid")) .permntInKeralaAdrVillage(rs.getString("GPMA_villageid")) diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230508125926__Marriage_Add_Address_Newfeild_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230508125926__Marriage_Add_Address_Newfeild_dll.sql new file mode 100644 index 00000000000..0b2a5e2425e --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230508125926__Marriage_Add_Address_Newfeild_dll.sql @@ -0,0 +1,23 @@ +ALTER TABLE public.eg_marriage_present_address_details + ADD COLUMN present_tenentid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_permanent_address_details + ADD COLUMN permanent_tenentid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_present_address_details_audit + ADD COLUMN present_tenentid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_marriage_permanent_address_details_audit + ADD COLUMN permanent_tenentid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_present_address_details + ADD COLUMN present_tenentid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_permanent_address_details + ADD COLUMN permanent_tenentid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_present_address_details_audit + ADD COLUMN present_tenentid character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE public.eg_register_marriage_permanent_address_details_audit + ADD COLUMN permanent_tenentid character varying(64) COLLATE pg_catalog."default"; From 472dac932045f7e09f9a039fc4683f263ebafaa9 Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 8 May 2023 15:03:49 +0530 Subject: [PATCH 323/420] changes in NRI address --- .../MarriageRegistryEnrichment.java | 36 +++++++++++++++++++ .../MarriageRegistryRepository.java | 12 +++++++ .../model/certmodel/MarriageCertificate.java | 6 ++++ 3 files changed, 54 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 05ea782eb40..299428fc59f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -1021,6 +1021,42 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg return groomAddressBuilder.toString(); } + + public String setGroomNRIAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { + StringBuilder groomAddressBuilder = new StringBuilder(); + if (registryDetails.getGroomAddressDetails() != null) { + if (StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry())&&!registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + Map> mdmsCountryMap = util.mDMSCallGetCountry(req, registryDetails.getGroomAddressDetails().getCountryIdPermanent()); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaLineoneEn(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaprovinceEn(), groomAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(), groomAddressBuilder, true); + } + } + return groomAddressBuilder.toString(); + } + + public String setBrideNRIAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { + StringBuilder brideAddressBuilder = new StringBuilder(); + if (registryDetails.getBrideAddressDetails() != null) { + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())&&!registryDetails.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + registryDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + registryDetails.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + Map> mdmsCountryMap = util.mDMSCallGetCountry(req, registryDetails.getBrideAddressDetails().getCountryIdPermanent()); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaLineoneEn(), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaprovinceEn(), brideAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getOutSideIndiaPostCodePermanent(), brideAddressBuilder, true); + } + } + return brideAddressBuilder.toString(); + } public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { StringBuilder brideAddressBuilder = new StringBuilder(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 30c419b1911..444fe8956f8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -325,6 +325,18 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria req.getMarriageCertificate().get(0).setBridePermntFullAddr(MarriageConstants.NOT_RECORDED); } //Setting groom NRI address + if (StringUtils.isNotBlank(marriageRegistryEnrichment.setGroomNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))){ + req.getMarriageCertificate().get(0).setGroomPermntNRIFullAddr(marriageRegistryEnrichment.setGroomNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + }else{ + req.getMarriageCertificate().get(0).setGroomPermntNRIFullAddr(MarriageConstants.NOT_RECORDED); + } + + //Setting bride NRI address + if (StringUtils.isNotBlank(marriageRegistryEnrichment.setBrideNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))){ + req.getMarriageCertificate().get(0).setBridePermntNRIFullAddr(marriageRegistryEnrichment.setBrideNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + }else{ + req.getMarriageCertificate().get(0).setBridePermntNRIFullAddr(MarriageConstants.NOT_RECORDED); + } //Setting bride address data from MDMS diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index f9fb09ce94e..06595f63f1c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -82,6 +82,12 @@ public class MarriageCertificate { @JsonProperty("bridePermntFullAddr") private String bridePermntFullAddr; + @JsonProperty("groomPermntNRIFullAddr") + private String groomPermntNRIFullAddr; + + @JsonProperty("bridePermntNRIFullAddr") + private String bridePermntNRIFullAddr; + @JsonProperty("marriagePlaceFullAddr") private String marriagePlaceFullAddr; @JsonProperty("groomNRIAddress") From d9d66ba439607b6b1fb8f1b2ad45310d11118417 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Mon, 8 May 2023 15:06:36 +0530 Subject: [PATCH 324/420] correction create push before wf --- .../marriagecorrection/service/MarriageCorrectionService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index a44051d5d2a..dacab353978 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -123,10 +123,10 @@ public List createCorrection(MarriageCorrectionReques //mdmsValidator.validateMarriageMDMSData(marriageDetailsRequest,mdmsData); //validatorService.ruleEngineMarriage(marriageDetailsRequest, wfc, mdmsData); + producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); if (request.getMarriageCorrectionDetails().get(0).getIsWorkflow()){ workflowIntegrator.callCorrectionWorkFlow(request); } - producer.push(marriageApplicationConfiguration.getSaveMarriageCorrectionTopic(), request); request.getMarriageCorrectionDetails().forEach(marriage->{ if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ From 7c4b376a61d813036a1228e6cab2309736a79ebf Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 8 May 2023 15:14:48 +0530 Subject: [PATCH 325/420] changes in certificate --- .../repository/MarriageRegistryRepository.java | 8 ++++---- .../web/model/certmodel/MarriageCertificate.java | 8 ++------ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 444fe8956f8..a8546a6eb4f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -326,16 +326,16 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } //Setting groom NRI address if (StringUtils.isNotBlank(marriageRegistryEnrichment.setGroomNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))){ - req.getMarriageCertificate().get(0).setGroomPermntNRIFullAddr(marriageRegistryEnrichment.setGroomNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + req.getMarriageCertificate().get(0).setGroomNRIAddress(marriageRegistryEnrichment.setGroomNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); }else{ - req.getMarriageCertificate().get(0).setGroomPermntNRIFullAddr(MarriageConstants.NOT_RECORDED); + req.getMarriageCertificate().get(0).setGroomNRIAddress(MarriageConstants.NOT_RECORDED); } //Setting bride NRI address if (StringUtils.isNotBlank(marriageRegistryEnrichment.setBrideNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))){ - req.getMarriageCertificate().get(0).setBridePermntNRIFullAddr(marriageRegistryEnrichment.setBrideNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + req.getMarriageCertificate().get(0).setBrideNRIAddress(marriageRegistryEnrichment.setBrideNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); }else{ - req.getMarriageCertificate().get(0).setBridePermntNRIFullAddr(MarriageConstants.NOT_RECORDED); + req.getMarriageCertificate().get(0).setBrideNRIAddress(MarriageConstants.NOT_RECORDED); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index 06595f63f1c..0abaa6447d0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -81,12 +81,8 @@ public class MarriageCertificate { @JsonProperty("bridePermntFullAddr") private String bridePermntFullAddr; - - @JsonProperty("groomPermntNRIFullAddr") - private String groomPermntNRIFullAddr; - - @JsonProperty("bridePermntNRIFullAddr") - private String bridePermntNRIFullAddr; + @JsonProperty("brideNRIAddress") + private String brideNRIAddress; @JsonProperty("marriagePlaceFullAddr") private String marriagePlaceFullAddr; From f8aa7fab92442096668572644cb4fb52e56d2238 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 8 May 2023 15:36:57 +0530 Subject: [PATCH 326/420] marriage registry enrichement updation --- .../service/MarriageRegistryRequestService.java | 4 +++- .../enrichment/MarriageRegistryEnrichment.java | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index d072d4c1ec3..82010149085 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -80,6 +80,7 @@ private GroomRegistryAddressDetails groomAddressRegistryDetails(MarriageDetailsR GroomRegistryAddressDetails groomRegistryAddressDetails = new GroomRegistryAddressDetails(); // permtaddressCountry groomRegistryAddressDetails.setPermtaddressCountry(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry()); + groomRegistryAddressDetails.setPermtaddressStateName(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressStateName()); groomRegistryAddressDetails.setCountryIdPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPresent()); groomRegistryAddressDetails.setCountryIdPermanent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getCountryIdPermanent()); groomRegistryAddressDetails.setStateIdPresent(marriageGroomAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getStateIdPresent()); @@ -129,7 +130,8 @@ private GroomRegistryAddressDetails groomAddressRegistryDetails(MarriageDetailsR private BrideRegistryAddressDetails brideAddressRegistryDetails(MarriageDetailsRequest marriageBrideAddressrequest) { BrideRegistryAddressDetails brideRegistryAddressDetails = new BrideRegistryAddressDetails(); - brideRegistryAddressDetails.setPermtaddressCountry(marriageBrideAddressrequest.getMarriageDetails().get(0).getGroomAddressDetails().getPermtaddressCountry()); + brideRegistryAddressDetails.setPermtaddressCountry(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressCountry()); + brideRegistryAddressDetails.setPermtaddressStateName(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getPermtaddressStateName()); brideRegistryAddressDetails.setCountryIdPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getCountryIdPresent()); brideRegistryAddressDetails.setCountryIdPermanent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getCountryIdPermanent()); brideRegistryAddressDetails.setStateIdPresent(marriageBrideAddressrequest.getMarriageDetails().get(0).getBrideAddressDetails().getStateIdPresent()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 05ea782eb40..50ee849cbbd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -955,14 +955,14 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthPostOfficeEn(), groomAddressBuilder, true); - if(!registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict().isEmpty()){ + if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict())){ appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); } else { appendIfNotBlank(registryDetails.getGroomAddressDetails().getDistrictName(), groomAddressBuilder, true); } - if(!registryDetails.getGroomAddressDetails().getPermtaddressStateName().isEmpty()){ + if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName())){ appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); } else{ @@ -1112,7 +1112,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(), brideAddressBuilder, true); - if(!registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict().isEmpty()){ + if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict())){ appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); } else { From cbc79f45b9b50aab4420d0f570ddab0ed6e90050 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 8 May 2023 15:51:24 +0530 Subject: [PATCH 327/420] MARRIAGE APPLICATION YML UPDATE CHANGE --- .../src/main/resources/marriage.yml | 30 ++++++++++++------- .../MarriageRegistryEnrichment.java | 21 +++++++------ 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 6d24ca8e148..479f744f944 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -1067,14 +1067,14 @@ serviceMaps: jsonMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - query : UPDATE public.eg_marriage_present_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, - ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,present_tenentid=? WHERE marriageid=? and bride_groom='B' and tenantid=?; @@ -1138,9 +1138,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePresent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid @@ -1151,14 +1153,14 @@ serviceMaps: jsonMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - query : UPDATE public.eg_marriage_present_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, - ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,present_tenentid WHERE marriageid=? and bride_groom='G' and tenantid=?; basePath: MarriageDetails.*.GroomAddressDetails @@ -1221,9 +1223,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid @@ -1239,7 +1243,7 @@ serviceMaps: SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?,poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, - ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? + ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,permanent_tenentid WHERE marriageid=? and bride_groom='B' and tenantid=?; basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: @@ -1299,9 +1303,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid @@ -1311,14 +1317,14 @@ serviceMaps: jsonMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - query : UPDATE public.eg_marriage_permanent_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, - ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? + ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,permanent_tenentid WHERE bride_groom='G' AND marriageid=? and tenantid=?; @@ -1381,9 +1387,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - query: UPDATE public.eg_marriage_document SET active = ? ,lastmodifiedby = ? , lastmodifiedtime = ? ,applicationtype = ? WHERE bride_groom=? AND applicationnumber=? AND document_type=? diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 796e2acb560..7b5724a5c66 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -901,20 +901,20 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent(), groomAddressBuilder, true); - if(!registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict().isEmpty()){ + if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict())){ appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); } else { appendIfNotBlank(registryDetails.getGroomAddressDetails().getDistrictName(), groomAddressBuilder, true); } - if(!registryDetails.getGroomAddressDetails().getPermtaddressStateName().isEmpty()){ + if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName())){ appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); } else{ appendIfNotBlank(registryDetails.getGroomAddressDetails().getStateName(), groomAddressBuilder, true); } - if(!registryDetails.getGroomAddressDetails().getPermtaddressCountry().isEmpty() ){ + if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry()) ){ appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); } else{ @@ -956,6 +956,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthPostOfficeEn(), groomAddressBuilder, true); if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermntOutsideKeralaDistrict())){ + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); } else { @@ -963,12 +964,13 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg } if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressStateName())){ + appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap), groomAddressBuilder, true); } else{ appendIfNotBlank(registryDetails.getGroomAddressDetails().getStateName(), groomAddressBuilder, true); } - if(!registryDetails.getGroomAddressDetails().getPermtaddressCountry().isEmpty() ){ + if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry())){ appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); } else{ @@ -1095,20 +1097,20 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); - if(!registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict().isEmpty()){ + if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict())){ appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); } else { appendIfNotBlank(registryDetails.getBrideAddressDetails().getDistrictName(), brideAddressBuilder, true); } - if(!registryDetails.getBrideAddressDetails().getPermtaddressStateName().isEmpty()){ + if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName())){ appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); } else{ appendIfNotBlank(registryDetails.getBrideAddressDetails().getStateName(), brideAddressBuilder, true); } - if(!registryDetails.getBrideAddressDetails().getPermtaddressCountry().isEmpty() ){ + if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())){ appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); } else{ @@ -1149,19 +1151,20 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(), brideAddressBuilder, true); if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict())){ + appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); } else { appendIfNotBlank(registryDetails.getBrideAddressDetails().getDistrictName(), brideAddressBuilder, true); } - if(!registryDetails.getBrideAddressDetails().getPermtaddressStateName().isEmpty()){ + if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName())){ appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); } else{ appendIfNotBlank(registryDetails.getBrideAddressDetails().getStateName(), brideAddressBuilder, true); } - if(!registryDetails.getBrideAddressDetails().getPermtaddressCountry().isEmpty() ){ + if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())){ appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); } else{ From 4a659be1cb7214548ea5a7aca04111ec22bcc087 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 8 May 2023 16:03:59 +0530 Subject: [PATCH 328/420] MARRIAGE CERTIFICATE OUTSIDE INDIA VALUE SET --- .../MarriageRegistryEnrichment.java | 158 +++++++++--------- 1 file changed, 78 insertions(+), 80 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 7b5724a5c66..70b4ce027b6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -985,36 +985,38 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg // } } else { - Object mdmsGroomAddressData = util.mDMSCallGetAddress(req - , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() - , registryDetails.getGroomAddressDetails().getDistrictIdPermanent() - , registryDetails.getGroomAddressDetails().getStateIdPermanent() - , registryDetails.getGroomAddressDetails().getCountryIdPermanent() - , registryDetails.getGroomAddressDetails().getPoNoPermanent() - , registryDetails.getGroomAddressDetails().getVillageNamePermanent() - , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - if(null!=mdmsGroomAddressData) { - Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); - registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(null); - registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setStateIdPermanent(null); - registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); - registryDetails.getGroomAddressDetails().setPoNoPermanent(null); - - registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaLineoneEn(), groomAddressBuilder, true); - - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaprovinceEn(), groomAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); - - appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(), groomAddressBuilder, true); - } - + return setGroomNRIAddressForCertificate(req,registryDetails); + +// Object mdmsGroomAddressData = util.mDMSCallGetAddress(req +// , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() +// , registryDetails.getGroomAddressDetails().getDistrictIdPermanent() +// , registryDetails.getGroomAddressDetails().getStateIdPermanent() +// , registryDetails.getGroomAddressDetails().getCountryIdPermanent() +// , registryDetails.getGroomAddressDetails().getPoNoPermanent() +// , registryDetails.getGroomAddressDetails().getVillageNamePermanent() +// , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); +// if(null!=mdmsGroomAddressData) { +// Map> mdmsGroomAddressMap = util.getMarriageMDMSData(mdmsGroomAddressData); +// registryDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(null); +// registryDetails.getGroomAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); +// registryDetails.getGroomAddressDetails().setStateIdPermanent(null); +// registryDetails.getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); +// registryDetails.getGroomAddressDetails().setPoNoPermanent(null); +// +// registryDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); +// registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); +// registryDetails.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); +// registryDetails.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaLineoneEn(), groomAddressBuilder, true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaprovinceEn(), groomAddressBuilder, true); +// +// appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap), groomAddressBuilder, true); +// +// appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(), groomAddressBuilder, true); +// } +// } @@ -1064,8 +1066,8 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg StringBuilder brideAddressBuilder = new StringBuilder(); if (registryDetails.getBrideAddressDetails() != null) { if (registryDetails.getBrideAddressDetails().getPermtaddressCountry() != null && registryDetails.getBrideAddressDetails().getPermtaddressStateName() != null) { - if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())&®istryDetails.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { - if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName())&®istryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry()) && registryDetails.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName()) && registryDetails.getBrideAddressDetails().getPermtaddressStateName().equals(MarriageConstants.STATE_CODE_SMALL)) { Object mdmsBrideAddressData = util.mDMSCallGetAddress(req , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() @@ -1075,7 +1077,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg , registryDetails.getBrideAddressDetails().getPoNoPermanent() , registryDetails.getBrideAddressDetails().getVillageNamePermanent() , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - if(null!=mdmsBrideAddressData) { + if (null != mdmsBrideAddressData) { Map> mdmsBrideAddressMap = util.getMarriageMDMSData(mdmsBrideAddressData); registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsBrideAddressMap)); registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); @@ -1097,23 +1099,20 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); - if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict())){ + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict())) { appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); - } - else { + } else { appendIfNotBlank(registryDetails.getBrideAddressDetails().getDistrictName(), brideAddressBuilder, true); } - if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName())){ + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName())) { appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); - } - else{ + } else { appendIfNotBlank(registryDetails.getBrideAddressDetails().getStateName(), brideAddressBuilder, true); } - if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())){ + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())) { appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); - } - else{ + } else { appendIfNotBlank(registryDetails.getBrideAddressDetails().getCountryName(), brideAddressBuilder, true); } appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); @@ -1150,24 +1149,21 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthPostOfficeEn(), brideAddressBuilder, true); - if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict())){ + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaDistrict())) { appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); - } - else { + } else { appendIfNotBlank(registryDetails.getBrideAddressDetails().getDistrictName(), brideAddressBuilder, true); } - if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName())){ + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressStateName())) { appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap), brideAddressBuilder, true); - } - else{ + } else { appendIfNotBlank(registryDetails.getBrideAddressDetails().getStateName(), brideAddressBuilder, true); } - if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())){ + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())) { appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); - } - else{ + } else { appendIfNotBlank(registryDetails.getBrideAddressDetails().getCountryName(), brideAddressBuilder, true); } appendIfNotBlank(registryDetails.getBrideAddressDetails().getPinNoPermanent(), brideAddressBuilder, true); @@ -1175,37 +1171,39 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg } } + } else { - Object mdmsBrideAddressData = util.mDMSCallGetAddress(req - , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() - , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() - , registryDetails.getBrideAddressDetails().getStateIdPermanent() - , registryDetails.getBrideAddressDetails().getCountryIdPermanent() - , registryDetails.getBrideAddressDetails().getPoNoPermanent() - , registryDetails.getBrideAddressDetails().getVillageNamePermanent() - , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - if (null != mdmsBrideAddressData) { - Map> mdmsBrideAddressMap = util.getMarriageMDMSData(mdmsBrideAddressData); - registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(null); - registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); - registryDetails.getBrideAddressDetails().setStateIdPermanent(null); - registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); - registryDetails.getBrideAddressDetails().setPoNoPermanent(null); + return setBrideNRIAddressForCertificate(req,registryDetails); +// Object mdmsBrideAddressData = util.mDMSCallGetAddress(req +// , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() +// , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() +// , registryDetails.getBrideAddressDetails().getStateIdPermanent() +// , registryDetails.getBrideAddressDetails().getCountryIdPermanent() +// , registryDetails.getBrideAddressDetails().getPoNoPermanent() +// , registryDetails.getBrideAddressDetails().getVillageNamePermanent() +// , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); +// if (null != mdmsBrideAddressData) { +// Map> mdmsBrideAddressMap = util.getMarriageMDMSData(mdmsBrideAddressData); +// registryDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(null); +// registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); +// registryDetails.getBrideAddressDetails().setStateIdPermanent(null); +// registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); +// registryDetails.getBrideAddressDetails().setPoNoPermanent(null); +//// +// registryDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); +// registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); +// registryDetails.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); +// registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); // - registryDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(registryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - registryDetails.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(registryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); - registryDetails.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(registryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaLineoneEn(), brideAddressBuilder, true); - - appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaprovinceEn(), brideAddressBuilder, true); - - appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); - - appendIfNotBlank(registryDetails.getBrideAddressDetails().getOutSideIndiaPostCodePermanent(), brideAddressBuilder, true); - - } +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaLineoneEn(), brideAddressBuilder, true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getPermntOthrIndiaprovinceEn(), brideAddressBuilder, true); +// +// appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap), brideAddressBuilder, true); +// +// appendIfNotBlank(registryDetails.getBrideAddressDetails().getOutSideIndiaPostCodePermanent(), brideAddressBuilder, true); +// +// } } } From ebee9784f1882d84261fed4def2631f077a2677d Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 8 May 2023 16:31:40 +0530 Subject: [PATCH 329/420] MARRIAGE CORRECTION,REGISTRY AND APPLICATION YML FOR ADDRESS NEW FEILD permanent_tenentid AND presentInsideKeralaLBName ADDED --- .../main/resources/marriage-correction.yml | 34 +++++++------ .../src/main/resources/marriage-registry.yml | 51 ++++++++++--------- .../src/main/resources/marriage.yml | 12 ++--- 3 files changed, 52 insertions(+), 45 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 2b860d9d846..8720b68692f 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -274,8 +274,8 @@ serviceMaps: id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid @@ -284,11 +284,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PermanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrTaluk + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk @@ -308,7 +308,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent @@ -326,34 +326,36 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentOutsideIndiaPostCode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - query : INSERT INTO public.eg_marriage_permanent_address_details( id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid diff --git a/core-services/egov-persister/src/main/resources/marriage-registry.yml b/core-services/egov-persister/src/main/resources/marriage-registry.yml index dca5544511c..bd18df39b46 100644 --- a/core-services/egov-persister/src/main/resources/marriage-registry.yml +++ b/core-services/egov-persister/src/main/resources/marriage-registry.yml @@ -358,8 +358,8 @@ serviceMaps: id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, - ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,present_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentUuid @@ -392,7 +392,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPresent @@ -422,7 +422,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.PresentOthrIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceEn - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentOthrIndiaProvinceMl @@ -432,16 +432,15 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePresent - + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.presentInsideKeralaLBName - query : INSERT INTO public.eg_register_marriage_permanent_address_details( - id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); - + id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid @@ -512,12 +511,14 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - query: INSERT INTO public.eg_register_marriage_present_address_details( - id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, - street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, - lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, - ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, + street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, + lastmodifiedby, bride_groom, same_as_permanent, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, + ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,present_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentUuid @@ -550,7 +551,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPostOffice - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaPincode + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.pinNoPresent - jsonPath: $.MarriageDetails.*.GroomAddressDetails.countryIdPresent @@ -580,7 +581,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOutSideIndiaAdressMlB - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PresentOthrIndiaProvinceEn + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceEn - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentOthrIndiaProvinceMl @@ -590,13 +591,14 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePresent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.presentInsideKeralaLBName - query : INSERT INTO public.eg_register_marriage_permanent_address_details( - id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); + id, housename_en, housename_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: @@ -667,6 +669,9 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName + - version: 1.0 description: Persists save marriage certificate details in marriage certificate table fromTopic: save-marriagecertificate-topic diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 479f744f944..0bad44ee811 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -425,11 +425,11 @@ serviceMaps: - query : INSERT INTO public.eg_marriage_permanent_address_details( - id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, - locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, - createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); + id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, + locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, + createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid @@ -1237,7 +1237,7 @@ serviceMaps: jsonMaps: - jsonPath: $.MarriageDetails.*.id - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrLBName + - jsonPath: $.MarriageDetails.*.marriageTenantid - query: UPDATE public.eg_marriage_permanent_address_details SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, From b73e107edf6940f54155af56a36a728efadbcb7d Mon Sep 17 00:00:00 2001 From: JasmineNazeer <115537272+JasmineNazeer@users.noreply.github.com> Date: Mon, 8 May 2023 16:57:11 +0530 Subject: [PATCH 330/420] Update application.properties image basepath updated --- .../src/main/resources/application.properties | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 337acf6c851..ed52f5c6ff7 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -108,8 +108,7 @@ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certif egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath -egov.marriage.image.startPoint = -# https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ +egov.marriage.image.startPoint =https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ egov.marriage.image.DefaultPhotoUrl = / #view certificate path config From ad5acec31f611d164d2b1569a2af62749f140252 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Mon, 8 May 2023 17:19:20 +0530 Subject: [PATCH 331/420] encri of search reg data for corr apll --- .../MarriageApplicationRepository.java | 285 +++++++++--------- .../MarriageCorrectionEnrichment.java | 41 ++- 2 files changed, 183 insertions(+), 143 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 3bdd7a9b8e8..358d6122652 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -340,176 +340,177 @@ public List searchMarriageDetails(MarriageApplicatio } } // PERMANENT ADDRESS DETAILS -BRIDE - if (marriage.getBrideAddressDetails().getCountryIdPermanent()!=null){ + if (marriage.getBrideAddressDetails().getCountryIdPermanent()!=null) { //INSIDE INDIA - if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)){ + if (marriage.getBrideAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)) { //INSIDE KERALA-PERMANENT - if (marriage.getBrideAddressDetails().getStateIdPermanent().equals(MarriageConstants.STATE_CODE_SMALL)){ - //PERMANENT-COUNTRY - marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - //PERMANENT-STATE - marriage.getBrideAddressDetails().setPermtaddressStateName(marriage.getBrideAddressDetails().getStateIdPermanent()); - if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { - String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - - String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); - } - //PERMANENT-DISTRICT - marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrict(marriage.getBrideAddressDetails().getDistrictIdPermanent()); - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null) { - String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); - - String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); - } - //PERMANENT-TALUK - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null) { - String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); - - String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); - } - //PERMANENT-VILLAGE - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage() != null) { - String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); + if (marriage.getBrideAddressDetails().getStateIdPermanent().equals(MarriageConstants.STATE_CODE_SMALL)) { + //PERMANENT-COUNTRY + marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //PERMANENT-STATE + marriage.getBrideAddressDetails().setPermtaddressStateName(marriage.getBrideAddressDetails().getStateIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { + String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); + } + //PERMANENT-DISTRICT + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrict(marriage.getBrideAddressDetails().getDistrictIdPermanent()); + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict() != null) { + String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); + + String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); + } + //PERMANENT-TALUK + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk() != null) { + String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); - String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); - } - //PERMANENT-POSTOFFICE - marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOffice(marriage.getBrideAddressDetails().getPoNoPermanent()); - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null) { - String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); + String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); + } + //PERMANENT-VILLAGE + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage() != null) { + String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); - String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); - } - //PERMANENT-WARD - if (marriage.getBrideAddressDetails().getPermntInKeralaWardNo() != null) { - String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); - marriage.getBrideAddressDetails().setPrmttWardNoEn(prmttWardNoEn); + String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); + } + //PERMANENT-POSTOFFICE + marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOffice(marriage.getBrideAddressDetails().getPoNoPermanent()); + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice() != null) { + String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); + + String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); + } + //PERMANENT-WARD + if (marriage.getBrideAddressDetails().getPermntInKeralaWardNo() != null) { + String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriage.getBrideAddressDetails().setPrmttWardNoEn(prmttWardNoEn); - String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); - marriage.getBrideAddressDetails().setPrmttWardNoMl(prmttWardNoMl); - } + String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriage.getBrideAddressDetails().setPrmttWardNoMl(prmttWardNoMl); + } - //Bride Permanent Address TenantId name - if (marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName() != null) { - String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); - - String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); - } - marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); + //Bride Permanent Address TenantId name + if (marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName() != null) { + String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); - marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); + String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getBrideAddressDetails().getPermntInKeralaAdrLBName()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); + } + marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); - } - //PERMANENT-INSIDE INDIA-OUTSIDE KERALA - else{ - //PERMANENT-COUNTRY - marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + marriage.getBrideAddressDetails().setPermntInKeralaAdrPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } - //PERMANENT-STATE - marriage.getBrideAddressDetails().setPermtaddressStateName(marriage.getBrideAddressDetails().getStateIdPermanent()); - if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { - String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + //PERMANENT-INSIDE INDIA-OUTSIDE KERALA + else { + //PERMANENT-COUNTRY + marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); + } + //PERMANENT-STATE + marriage.getBrideAddressDetails().setPermtaddressStateName(marriage.getBrideAddressDetails().getStateIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressStateName() != null) { + String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); + + String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); + marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); + } + //PERMANENT-DISTRICT + marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrict(marriage.getBrideAddressDetails().getDistrictIdPermanent()); + if (marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { + String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + + String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); + } - String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressStateName()); - marriage.getBrideAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); - } - //PERMANENT-DISTRICT - marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrict(marriage.getBrideAddressDetails().getDistrictIdPermanent()); - if (marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict() != null) { - String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); - String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); - } + marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); - marriage.getBrideAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getVillageNamePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaVillageorTown(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriage.getBrideAddressDetails().getPresentOutsideKeralaTalukName()); - - marriage.getBrideAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getBrideAddressDetails().getVillageNamePermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaPincode(marriage.getBrideAddressDetails().getPinNoPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaLocalityNameEn(marriage.getBrideAddressDetails().getLocalityEnPermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaLocalityNameMl(marriage.getBrideAddressDetails().getLocalityMlPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); + + marriage.getBrideAddressDetails().setPermntOutsideKeralaHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriage.getBrideAddressDetails().setPermntOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); + } + } + //PERMANENT-OUTSIDE INDIA + else { - marriage.getBrideAddressDetails().setPermntOutsideKeralaStreetNameEn(marriage.getBrideAddressDetails().getStreetNameEnPermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaStreetNameMl(marriage.getBrideAddressDetails().getStreetNameMlPermanent()); + marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); + if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { + String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - marriage.getBrideAddressDetails().setPermntOutsideKeralaHouseNameEn(marriage.getBrideAddressDetails().getHouseNameNoEnPermanent()); - marriage.getBrideAddressDetails().setPermntOutsideKeralaHouseNameMl(marriage.getBrideAddressDetails().getHouseNameNoMlPermanent()); + String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); + marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); } - } - //PERMANENT-OUTSIDE INDIA - else{ - marriage.getBrideAddressDetails().setPermtaddressCountry(marriage.getBrideAddressDetails().getCountryIdPermanent()); - if (marriage.getBrideAddressDetails().getPermtaddressCountry() != null) { - String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); + marriage.getBrideAddressDetails().setPermntOutsideIndiaVillage(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaCityTown(marriage.getBrideAddressDetails().getVillageNamePermanent()); - String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getBrideAddressDetails().getPermtaddressCountry()); - marriage.getBrideAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - } - - marriage.getBrideAddressDetails().setPermntOutsideIndiaVillage(marriage.getBrideAddressDetails().getTownOrVillagePermanent()); - marriage.getBrideAddressDetails().setPermntOutsideIndiaCityTown(marriage.getBrideAddressDetails().getVillageNamePermanent()); - - marriage.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriage.getBrideAddressDetails().getOutSideIndiaPostCodePermanent()); + marriage.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriage.getBrideAddressDetails().getOutSideIndiaPostCodePermanent()); - marriage.getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOthrIndiaLineoneEn()); - marriage.getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOthrIndiaLineoneMl()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(marriage.getBrideAddressDetails().getPermntOthrIndiaLineoneEn()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(marriage.getBrideAddressDetails().getPermntOthrIndiaLineoneMl()); - marriage.getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOthrIndiaLinetwoEn()); - marriage.getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOthrIndiaLinetwoMl()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(marriage.getBrideAddressDetails().getPermntOthrIndiaLinetwoEn()); + marriage.getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(marriage.getBrideAddressDetails().getPermntOthrIndiaLinetwoMl()); - marriage.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPermntOthrIndiaprovinceEn()); - marriage.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPermntOthrIndiaprovinceMl()); + marriage.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriage.getBrideAddressDetails().getPermntOthrIndiaprovinceEn()); + marriage.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriage.getBrideAddressDetails().getPermntOthrIndiaprovinceMl()); + } } //***************GROOM ADDREDD DETAILS */ //PRESENT ADDRESS DETAILS -GROOM @@ -1232,7 +1233,7 @@ public List searchMarriageDetails(MarriageApplicatio criteria.setTenantId(marriage.getTenantid()); List completeDocumentDetails = getDocumentSearchDetails(criteria, requestInfo); marriage.setMarriageDocuments(completeDocumentDetails); - } + }); } return result; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index b1f23502ba3..38b759c483c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -6,6 +6,7 @@ import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.contract.EncryptionDecryptionUtil; import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.repository.IdGenRepository; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; @@ -36,6 +37,8 @@ public class MarriageCorrectionEnrichment implements BaseEnrichment { MarriageApplicationConfiguration config; @Autowired IdGenRepository idGenRepository; + @Autowired + EncryptionDecryptionUtil encryptionDecryptionUtil; public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageApplicationDetails marriageApplicationDetails) { @@ -231,7 +234,43 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp setBridePermanentAddress(marriageApplicationDetails); setGroomPermanentAddress(marriageApplicationDetails); - + + GroomDetails groomDetails =marriageApplicationDetails.getGroomDetails(); + GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); + groomDetails.setAadharno(groomDetailsEnc.getAadharno()); + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); + groomDetails.setGuardianAadharno(null); + } + else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); + groomDetails.setMotherAadharno(null); + groomDetails.setFatherAadharno(null); + } + else{ + groomDetails.setMotherAadharno(null); + groomDetails.setFatherAadharno(null); + groomDetails.setGuardianAadharno(null); + } + BrideDetails brideDetails =marriageApplicationDetails.getBrideDetails(); + BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); + brideDetails.setAadharno(brideDetailsEnc.getAadharno()); + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ + brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); + brideDetails.setGuardianAadharno(null); + } + else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ + brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + brideDetails.setMotherAadharno(null); + brideDetails.setFatherAadharno(null); + } + else{ + brideDetails.setMotherAadharno(null); + brideDetails.setFatherAadharno(null); + brideDetails.setGuardianAadharno(null); + } } From 8782552ad0b313f3e66d0665f404f9fc2595c3c6 Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 8 May 2023 17:37:07 +0530 Subject: [PATCH 332/420] changes in registry address --- .../marriageregistry/enrichment/MarriageRegistryEnrichment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 299428fc59f..4bc50caf4ca 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -1034,7 +1034,7 @@ public String setGroomNRIAddressForCertificate(RequestInfo req,MarriageRegistryD appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaLineoneEn(), groomAddressBuilder, true); appendIfNotBlank(registryDetails.getGroomAddressDetails().getPermntOthrIndiaprovinceEn(), groomAddressBuilder, true); appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(), groomAddressBuilder, false); } } return groomAddressBuilder.toString(); From 89232e1895d9f20fa6f17d12bf106f351084f6d6 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 8 May 2023 17:41:34 +0530 Subject: [PATCH 333/420] address change in certificate --- .../repository/MarriageRegistryRepository.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index a8546a6eb4f..32ac11da4ef 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -314,13 +314,15 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsGroomAddressMap)); // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsGroomAddressMap)); - if (StringUtils.isNotBlank(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))){ - req.getMarriageCertificate().get(0).setGroomPermntFullAddr(marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + String groomAddr = marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); + if (StringUtils.isNotBlank(groomAddr)){ + req.getMarriageCertificate().get(0).setGroomPermntFullAddr(groomAddr); }else{ req.getMarriageCertificate().get(0).setGroomPermntFullAddr(MarriageConstants.NOT_RECORDED); } - if (StringUtils.isNotBlank(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))) { - req.getMarriageCertificate().get(0).setBridePermntFullAddr(marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + String brideAddr = marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); + if (StringUtils.isNotBlank(brideAddr)) { + req.getMarriageCertificate().get(0).setBridePermntFullAddr(brideAddr); }else{ req.getMarriageCertificate().get(0).setBridePermntFullAddr(MarriageConstants.NOT_RECORDED); } From 337311ded49e25074ffbddf48d7176cddc6c29ca Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Mon, 8 May 2023 17:42:38 +0530 Subject: [PATCH 334/420] corr yml change --- .../src/main/resources/marriage-correction.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index 8720b68692f..fbb6eeb0f7a 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -274,8 +274,8 @@ serviceMaps: id, housename_no_en, housename_no_ml, villageid, village_name, talukid, taluk_name, ward_code, locality_en, locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, - ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); + ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village, permanent_tenentid) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentUuid @@ -355,7 +355,7 @@ serviceMaps: locality_ml, street_name_en, street_name_ml, districtid, stateid, poid, pinno, countryid, marriageid, createdtime, createdby, lastmodifiedtime, lastmodifiedby, bride_groom, tenantid, poname_en, ot_address1_en, ot_address1_ml, ot_address2_en, ot_address2_ml, ot_state_region_province_en, ot_state_region_province_ml, ot_zipcode, poname_ml, city_town_village,permanent_tenentid) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?); + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?); basePath: MarriageDetails.*.GroomAddressDetails jsonMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentUuid @@ -426,6 +426,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.townOrVillagePermanent + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrLBName From 134d4f8bb8f01c8e51db4957272d01acca3ab46b Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 8 May 2023 18:08:18 +0530 Subject: [PATCH 335/420] changes in address removed trailing comma if exists --- .../enrichment/MarriageRegistryEnrichment.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index ab7e9de0f78..d8d93798886 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -921,7 +921,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getCountryName(), groomAddressBuilder, true); } - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, false); } } else { @@ -977,7 +977,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getCountryName(), groomAddressBuilder, true); } - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPinNoPermanent(), groomAddressBuilder, false); } @@ -1021,6 +1021,9 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg } } + if(StringUtils.isNotBlank(groomAddressBuilder.toString()) && ((Character) groomAddressBuilder.toString().charAt(groomAddressBuilder.toString().length())).equals(',')){ + return groomAddressBuilder.toString().substring(0, groomAddressBuilder.toString().length()-1); + } return groomAddressBuilder.toString(); @@ -1041,6 +1044,9 @@ public String setGroomNRIAddressForCertificate(RequestInfo req,MarriageRegistryD appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(), groomAddressBuilder, false); } } + if(StringUtils.isNotBlank(groomAddressBuilder.toString()) && ((Character) groomAddressBuilder.toString().charAt(groomAddressBuilder.toString().length())).equals(',')){ + return groomAddressBuilder.toString().substring(0, groomAddressBuilder.toString().length()-1); + } return groomAddressBuilder.toString(); } @@ -1059,6 +1065,9 @@ public String setBrideNRIAddressForCertificate(RequestInfo req,MarriageRegistryD appendIfNotBlank(registryDetails.getBrideAddressDetails().getOutSideIndiaPostCodePermanent(), brideAddressBuilder, true); } } + if(StringUtils.isNotBlank(brideAddressBuilder.toString()) && ((Character) brideAddressBuilder.toString().charAt(brideAddressBuilder.toString().length())).equals(',')){ + return brideAddressBuilder.toString().substring(0, brideAddressBuilder.toString().length()-1); + } return brideAddressBuilder.toString(); } public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { @@ -1207,7 +1216,9 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg } } - + if(StringUtils.isNotBlank(brideAddressBuilder.toString()) && ((Character) brideAddressBuilder.toString().charAt(brideAddressBuilder.toString().length())).equals(',')){ + return brideAddressBuilder.toString().substring(0, brideAddressBuilder.toString().length()-1); + } return brideAddressBuilder.toString(); } From 0f9e21a3e107b5921a59d327775ca251717d9077 Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 9 May 2023 11:10:00 +0530 Subject: [PATCH 336/420] changes in address setting --- .../enrichment/MarriageRegistryEnrichment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index d8d93798886..1289b179ae3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -1021,7 +1021,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg } } - if(StringUtils.isNotBlank(groomAddressBuilder.toString()) && ((Character) groomAddressBuilder.toString().charAt(groomAddressBuilder.toString().length())).equals(',')){ + if(StringUtils.isNotBlank(groomAddressBuilder.toString()) && ((Character) groomAddressBuilder.toString().charAt(groomAddressBuilder.toString().length()-1)).equals(',')){ return groomAddressBuilder.toString().substring(0, groomAddressBuilder.toString().length()-1); } @@ -1044,7 +1044,7 @@ public String setGroomNRIAddressForCertificate(RequestInfo req,MarriageRegistryD appendIfNotBlank(registryDetails.getGroomAddressDetails().getOutSideIndiaPostCodePermanent(), groomAddressBuilder, false); } } - if(StringUtils.isNotBlank(groomAddressBuilder.toString()) && ((Character) groomAddressBuilder.toString().charAt(groomAddressBuilder.toString().length())).equals(',')){ + if(StringUtils.isNotBlank(groomAddressBuilder.toString()) && ((Character) groomAddressBuilder.toString().charAt(groomAddressBuilder.toString().length()-1)).equals(',')){ return groomAddressBuilder.toString().substring(0, groomAddressBuilder.toString().length()-1); } return groomAddressBuilder.toString(); @@ -1065,7 +1065,7 @@ public String setBrideNRIAddressForCertificate(RequestInfo req,MarriageRegistryD appendIfNotBlank(registryDetails.getBrideAddressDetails().getOutSideIndiaPostCodePermanent(), brideAddressBuilder, true); } } - if(StringUtils.isNotBlank(brideAddressBuilder.toString()) && ((Character) brideAddressBuilder.toString().charAt(brideAddressBuilder.toString().length())).equals(',')){ + if(StringUtils.isNotBlank(brideAddressBuilder.toString()) && ((Character) brideAddressBuilder.toString().charAt(brideAddressBuilder.toString().length()-1)).equals(',')){ return brideAddressBuilder.toString().substring(0, brideAddressBuilder.toString().length()-1); } return brideAddressBuilder.toString(); @@ -1216,7 +1216,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg } } - if(StringUtils.isNotBlank(brideAddressBuilder.toString()) && ((Character) brideAddressBuilder.toString().charAt(brideAddressBuilder.toString().length())).equals(',')){ + if(StringUtils.isNotBlank(brideAddressBuilder.toString()) && ((Character) brideAddressBuilder.toString().charAt(brideAddressBuilder.toString().length()-1)).equals(',')){ return brideAddressBuilder.toString().substring(0, brideAddressBuilder.toString().length()-1); } return brideAddressBuilder.toString(); From 3967a6383d20d74502c36801c83e89271692627b Mon Sep 17 00:00:00 2001 From: JasmineNazeer <115537272+JasmineNazeer@users.noreply.github.com> Date: Tue, 9 May 2023 12:27:07 +0530 Subject: [PATCH 337/420] Update application.properties --- .../marriage-services/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index ed52f5c6ff7..35447e9e160 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -108,7 +108,7 @@ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certif egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath -egov.marriage.image.startPoint =https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/ +egov.marriage.image.startPoint =https://ikm-rainmaker.s3.ap-south-1.amazonaws.com egov.marriage.image.DefaultPhotoUrl = / #view certificate path config From 0a42fe4a4809a53cf5b6e2d95b2b47de004e4225 Mon Sep 17 00:00:00 2001 From: JasmineNazeer <115537272+JasmineNazeer@users.noreply.github.com> Date: Tue, 9 May 2023 13:24:00 +0530 Subject: [PATCH 338/420] Update application.properties --- .../marriage-services/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 35447e9e160..b715b677442 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -108,7 +108,7 @@ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certif egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath -egov.marriage.image.startPoint =https://ikm-rainmaker.s3.ap-south-1.amazonaws.com +egov.marriage.image.startPoint =https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/crmarriage egov.marriage.image.DefaultPhotoUrl = / #view certificate path config From 73a9dfe1b7e49732add9aedcf7692643827b8b6a Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Tue, 9 May 2023 13:45:14 +0530 Subject: [PATCH 339/420] corr create parentguardian null check --- .../MarriageCorrectionEnrichment.java | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index 38b759c483c..c0d78a0f5a7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -238,38 +238,38 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp GroomDetails groomDetails =marriageApplicationDetails.getGroomDetails(); GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); groomDetails.setAadharno(groomDetailsEnc.getAadharno()); - if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ - groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); - groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); - groomDetails.setGuardianAadharno(null); - } - else if(groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ - groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); - groomDetails.setMotherAadharno(null); - groomDetails.setFatherAadharno(null); - } - else{ - groomDetails.setMotherAadharno(null); - groomDetails.setFatherAadharno(null); - groomDetails.setGuardianAadharno(null); + if(groomDetails.getParentGuardian()!=null) { + if (groomDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { + groomDetails.setMotherAadharno(groomDetailsEnc.getMotherAadharno()); + groomDetails.setFatherAadharno(groomDetailsEnc.getFatherAadharno()); + groomDetails.setGuardianAadharno(null); + } else if (groomDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { + groomDetails.setGuardianAadharno(groomDetailsEnc.getGuardianAadharno()); + groomDetails.setMotherAadharno(null); + groomDetails.setFatherAadharno(null); + } else { + groomDetails.setMotherAadharno(null); + groomDetails.setFatherAadharno(null); + groomDetails.setGuardianAadharno(null); + } } BrideDetails brideDetails =marriageApplicationDetails.getBrideDetails(); BrideDetails brideDetailsEnc = encryptionDecryptionUtil.encryptObject(brideDetails, "BndDetail", BrideDetails.class); brideDetails.setAadharno(brideDetailsEnc.getAadharno()); - if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)){ - brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); - brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); - brideDetails.setGuardianAadharno(null); - } - else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ - brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); - brideDetails.setMotherAadharno(null); - brideDetails.setFatherAadharno(null); - } - else{ - brideDetails.setMotherAadharno(null); - brideDetails.setFatherAadharno(null); - brideDetails.setGuardianAadharno(null); + if(brideDetails.getParentGuardian()!=null) { + if (brideDetails.getParentGuardian().equals(MarriageConstants.PARENT)) { + brideDetails.setMotherAadharno(brideDetailsEnc.getMotherAadharno()); + brideDetails.setFatherAadharno(brideDetailsEnc.getFatherAadharno()); + brideDetails.setGuardianAadharno(null); + } else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)) { + brideDetails.setGuardianAadharno(brideDetailsEnc.getGuardianAadharno()); + brideDetails.setMotherAadharno(null); + brideDetails.setFatherAadharno(null); + } else { + brideDetails.setMotherAadharno(null); + brideDetails.setFatherAadharno(null); + brideDetails.setGuardianAadharno(null); + } } } From 166e8048df8e121f77e467a388c409b5f7c531bd Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 9 May 2023 16:09:32 +0530 Subject: [PATCH 340/420] marriage registry address mapping in requestJSON --- .../MarriageRegistryRequestService.java | 4 ++-- .../MarriageRegistryEnrichment.java | 21 ++++++++++++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index 82010149085..aaf27b2525d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -223,7 +223,7 @@ private GroomRegistryDetails groomRegistryDetails(MarriageDetailsRequest marriag groomRegistryDetails.setMiddlename_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMiddlenameMl()); groomRegistryDetails.setLastname_en(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastnameEn()); groomRegistryDetails.setLastname_ml(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getLastnameMl()); - groomRegistryDetails.setMobile(Long.valueOf(String.valueOf(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMobile()))); + groomRegistryDetails.setMobile(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getMobile()); groomRegistryDetails.setEmailid(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getEmailid()); groomRegistryDetails.setGender(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getGender()); groomRegistryDetails.setDateofbirth(marriageGroomrequest.getMarriageDetails().get(0).getGroomDetails().getDateofbirth()); @@ -259,7 +259,7 @@ private BrideRegistryDetails brideRegistryDetails (MarriageDetailsRequest Marria brideRegistryDetails.setMiddlename_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMiddlenameMl()); brideRegistryDetails.setLastname_en(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastnameEn()); brideRegistryDetails.setLastname_ml(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getLastnameMl()); - brideRegistryDetails.setMobile(Long.valueOf(String.valueOf(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMobile()))); + brideRegistryDetails.setMobile(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getMobile()); brideRegistryDetails.setEmailid(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getEmailid()); brideRegistryDetails.setGender(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getGender()); brideRegistryDetails.setDateofbirth(MarriageBriderequest.getMarriageDetails().get(0).getBrideDetails().getDateofbirth()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 1289b179ae3..65c38c37253 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -76,7 +76,6 @@ public void enrichCreate(MarriageRegistryRequest request) { if(marriage.getGroomDetails()!=null){ marriage.getGroomDetails().setGroomId((UUID.randomUUID().toString())); marriage.getGroomDetails().setBrideGroom("G"); - } if(marriage.getWitnessDetails()!=null){ marriage.getWitnessDetails().setWitnessId1(UUID.randomUUID().toString()); @@ -85,12 +84,24 @@ public void enrichCreate(MarriageRegistryRequest request) { marriage.getWitnessDetails().setSerial_no2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } + //Added on 09.05.2023 Jasmine + if(marriage.getBrideAddressDetails()!=null){ + marriage.getBrideAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getBrideAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPresent("B"); + } + if(marriage.getGroomAddressDetails()!=null){ + marriage.getGroomAddressDetails().setPresentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); + marriage.getGroomAddressDetails().setBrideGroomPresent("G"); + } + }); setRegistrationNumber(request); - setBridePermanentAddress(request); - setBridePresentAddress(request); - setGroomPermanentAddress(request); - setGroomPresentAddress(request); + // setBridePermanentAddress(request); + // setBridePresentAddress(request); + // setGroomPermanentAddress(request); + // setGroomPresentAddress(request); createCertificateNo(request); } From 33d038104c984b2203726edaea368d875bd70924 Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 9 May 2023 17:28:59 +0530 Subject: [PATCH 341/420] changes in payment service --- .../marriage/common/services/PaymentUpdateService.java | 7 ++++++- .../config/MarriageApplicationConfiguration.java | 3 ++- .../marriageapplication/service/DemandService.java | 2 +- .../java/org/ksmart/marriage/utils/MarriageConstants.java | 1 + .../src/main/resources/application.properties | 4 ++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index 13694d28601..baae89dafa7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -24,6 +24,7 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -96,7 +97,11 @@ public void process(HashMap record) { System.out.println(" payment detail tenantId:"+paymentDetail.getBill().getConsumerCode()); System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); - + if(null!=marriage && marriage.size()==1){ + if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + marriage.get(0).setAction(MarriageConstants.ACTION_PAY); + } + } MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) .marriageDetails(marriage).build(); //System.out.println(" payment detail updateRequest:"+updateRequest); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index db67932e74a..ec479a1b7f9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -132,6 +132,7 @@ public class MarriageApplicationConfiguration { @Value("${egov.marriage.image.DefaultPhotoUrl}") private String defaultPhotoUrl; - + @Value("${egov.demand.taxheadmastercode}") + private String taxHeadMasterCode; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java index d30ce0ab6f3..ccfc9872177 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java @@ -61,7 +61,7 @@ public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkF demand.setBusinessService("CR"); ArrayList demandDetails = new ArrayList<>(); DemandDetail demandDetail=new DemandDetail(); - demandDetail.setTaxHeadMasterCode("140130400"); + demandDetail.setTaxHeadMasterCode(config.getTaxHeadMasterCode()); demandDetail.setTaxAmount(new BigDecimal(wfc.getAmount())); demandDetail.setTenantId(demand.getTenantId()); setGLCode(demandDetail, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 1feaadcecf8..a8b4c05aac6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -214,4 +214,5 @@ public class MarriageConstants { public static final String CR_MDMS_PLACEID_CODE_JSONPATH = "$.MdmsRes.egov-location.MarriagePlace[*].code"; public static final String CR_MDMS_PLACEID_JSONPATH = "$.MdmsRes.egov-location.MarriagePlace[*]"; + public static final String ACTION_PAY = "PAY"; } diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index b715b677442..0ca5d56a799 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -94,6 +94,8 @@ egov.mdms.module.name=birth-death-service egov.billingservice.host=https://ksmart-dev.lsgkerala.gov.in/ egov.demand.create.endpoint=/billing-service/demand/_create egov.bill.gen.endpoint=/billing-service/bill/v2/_fetchbill +#Demand Account Head +egov.demand.taxheadmastercode=140130400 #download path config egov.pdf.host=https://ksmart-dev.lsgkerala.gov.in/ @@ -165,3 +167,5 @@ persister.update.marriage.registry.correction.topic=correction-update-marriage-r persister.update.marriage.application.correction.topic=correction-update-marriage-application-topic persister.update.marriage.demand.topic=update-demand-topic + + From 0464b875254eebaf21e3eeb2990410059293edee Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 10 May 2023 10:49:14 +0530 Subject: [PATCH 342/420] changes in marriage certificate , removed unused code, added log --- .../common/services/PaymentUpdateService.java | 6 +- .../MarriageRegistryRepository.java | 88 +++++-------------- .../service/MarriageRegistryService.java | 31 +------ 3 files changed, 28 insertions(+), 97 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index baae89dafa7..73be2a35120 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -93,9 +93,9 @@ public void process(HashMap record) { searchCriteria.setApplicationNo(paymentDetail.getBill().getConsumerCode()); searchCriteria.setBusinessService(paymentDetail.getBusinessService()); - System.out.println(" payment detail tenantId:"+tenantId); - System.out.println(" payment detail tenantId:"+paymentDetail.getBill().getConsumerCode()); - System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); +// System.out.println(" payment detail tenantId:"+tenantId); +// System.out.println(" payment detail tenantId:"+paymentDetail.getBill().getConsumerCode()); +// System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); if(null!=marriage && marriage.size()==1){ if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 32ac11da4ef..d1edd738867 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -136,7 +136,6 @@ public int getMarriageRegistryCount(MarriageRegistrySearchCriteria criteria) { List preparedStmtList = new ArrayList<>(); String query = queryBuilder.getMarriageRegistryCountQuery(criteria, preparedStmtList, Boolean.FALSE); int MarriageCount = jdbcTemplate.queryForObject(query,preparedStmtList.toArray(),Integer.class); - // System.out.println("Marriagecountquery"+query); return MarriageCount; } public List searchCertificateByMarriageId(String id) { @@ -153,7 +152,6 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if (marriageCertPDFRequest != null && marriageCertPDFRequest.getMarriageCertificate() != null && marriageCertPDFRequest.getMarriageCertificate().size() > 0 &&null!=marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails()) { MarriageCertPDFRequest req = MarriageCertPDFRequest.builder().marriageCertificate(marriageCertPDFRequest.getMarriageCertificate()).requestInfo(marriageCertPDFRequest.getRequestInfo()).build(); - //TODO pdf data creation if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails()&& StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en())) { StringBuilder groomFullName = new StringBuilder(); groomFullName.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getFirstname_en().trim()); @@ -165,6 +163,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } req.getMarriageCertificate().get(0).setGroomFullName(groomFullName.toString()); }else{ + log.info("PDF_ERROR. Marriage Certificate , Groom Details not found!!!"); throw new CustomException("PDF_ERROR", "Groom Details not found!!!" ); } if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails()&& @@ -179,6 +178,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } req.getMarriageCertificate().get(0).setBrideFullName(brideFullName.toString()); }else{ + log.info("PDF_ERROR. Marriage Certificate , Bride Details not found!!!"); throw new CustomException("PDF_ERROR", "Bride Details not found!!!" ); } if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails()){ @@ -187,22 +187,23 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath() + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); }else{ + log.info("PDF_ERROR. Marriage Certificate , Groom Photo not found!!!"); throw new CustomException("PDF_ERROR", "Groom Photo not found!!!" ); //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getDefaultPhotoUrl()); } if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); }else{ + log.info("PDF_ERROR. Marriage Certificate , Bride Photo not found!!!"); throw new CustomException("PDF_ERROR", "Bride Photo not found!!!" ); //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getDefaultPhotoUrl()); } }else{ + log.info("PDF_ERROR. Marriage Certificate , Bride and Groom Photos not found!!!"); throw new CustomException("PDF_ERROR", "Bride and Groom Photos not found!!!" ); } if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype()) { - // Map> mdmsTenantMap = util.mDMSCallGetTenantData(req.getRequestInfo(),req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid()); - //req.getMarriageCertificate().get(0).setLbType(getValueFromMap(MarriageConstants.LBTYPE, mdmsTenantMap)); //Setting Marriage Place Address------------------------------------------------------------------------------------------ StringBuilder marriageAddr = new StringBuilder(); if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype())) { @@ -222,14 +223,12 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); - System.out.println(marriageAddr); } else if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) || req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) { if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlaceid())) { Object mdmsMarriagePlaceData1 = util.mDMSCallGetMandapamAddress(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); - System.out.println(mdmsMarriagePlaceData1); if (null != mdmsMarriagePlaceData1) { Map mdmsMap1 = util.getMandapamAttributeValues(mdmsMarriagePlaceData1); if (null != mdmsMap1) { @@ -246,12 +245,10 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if (null != mdmsMarriagePlaceData) { Map> mdmsMap = util.getMarriageMDMSData(req, mdmsMarriagePlaceData); if (null != mdmsMap) { - System.out.println(getValueFromMap(MarriageConstants.DISTRICT, mdmsMap)); util.appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsMap), marriageAddr, true); util.appendIfNotBlank(getValueFromMap(MarriageConstants.STATE, mdmsMap), marriageAddr, true); Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); - System.out.println(marriageAddr); } } @@ -276,44 +273,17 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark() + ","); } - -// Object mdmsMarriagePlaceAddressData = util.mDMSCallGetAddress(req.getRequestInfo() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getTenantid() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getDistrictid() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); - System.out.println(marriageAddr); } req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(StringUtils.isNotBlank(marriageAddr.toString())?marriageAddr.toString():MarriageConstants.NOT_RECORDED); } }else{ + log.info("PDF_ERROR. Marriage Certificate , Marriage Place Type is Empty.. Cannot Generate Certificate!!!"); throw new CustomException("PDF_ERROR"," Marriage Place Type is Empty"); } -// StringBuilder groomAddr = new StringBuilder(); - //Setting Groom Address data from MDMS -// Object mdmsGroomAddressData = util.mDMSCallGetAddress(req.getRequestInfo() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrLBName() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getDistrictIdPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getStateIdPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getCountryIdPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPoNoPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getVillageNamePermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().getPermntInKeralaAdrTaluk()); -// Map> mdmsGroomAddressMap = util.getMarriageMDMSData(req, mdmsGroomAddressData); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsGroomAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsGroomAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsGroomAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsGroomAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsGroomAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsGroomAddressMap)); String groomAddr = marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); if (StringUtils.isNotBlank(groomAddr)){ req.getMarriageCertificate().get(0).setGroomPermntFullAddr(groomAddr); @@ -340,29 +310,8 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria req.getMarriageCertificate().get(0).setBrideNRIAddress(MarriageConstants.NOT_RECORDED); } - - //Setting bride address data from MDMS -// Object mdmsBrideAddressData = util.mDMSCallGetAddress(req.getRequestInfo() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrLBName() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getDistrictIdPresent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getStateIdPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getCountryIdPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPoNoPermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getVillageNamePermanent() -// , req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().getPermntInKeralaAdrTaluk()); -// Map> mdmsBrideAddressMap = util.getMarriageMDMSData(req, mdmsBrideAddressData); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrLBName(getValueFromMap(MarriageConstants.TENANTS, mdmsBrideAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setDistrictIdPresent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsBrideAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE, mdmsBrideAddressMap)); -// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK, mdmsBrideAddressMap)); - - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); - } if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); @@ -381,22 +330,28 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; String marriageCertPath = StringUtils.replace(marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(), "$tenantId", tenantId); String pdfFinalPath = uiHost + marriageCertPath; - System.out.println(new Gson().toJson(req)); - MarriageCertPdfResponse response = restTemplate.postForObject(pdfFinalPath, req, MarriageCertPdfResponse.class);//Creating PDF - - if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { - throw new CustomException("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE", - "No file store id found from pdf service"); + try { + MarriageCertPdfResponse response = restTemplate.postForObject(pdfFinalPath, req, MarriageCertPdfResponse.class);//Creating PDF + if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { + log.error("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE. Marriage Certificate , Error in generating PDF. No file store id found from pdf service!!!"); + throw new CustomException("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE", + "No file store id found from pdf service"); + } + pdfResponse.setFilestoreIds(response.getFilestoreIds()); + }catch (Exception e){ + log.error("PDF_ERROR. Marriage Certificate , Error in PDF Service.!!!",e); + throw new CustomException("PDF_ERROR", "No file store id found from pdf service"+e.getMessage()); } - pdfResponse.setFilestoreIds(response.getFilestoreIds()); + + }); }else{ + log.error("PDF_ERROR. Marriage Certificate , Error in generating PDF. Marriage Registry Data is Empty!!!"); throw new CustomException("PDF_ERROR", "Error in generating PDF. Marriage Registry Data is Empty" ); } }catch(Exception e){ - e.printStackTrace(); - System.out.println(e.getMessage()); + log.error("PDF_ERROR. Marriage Certificate , Error in generating PDF.!!!"); throw new CustomException("PDF_ERROR", "Error in generating PDF" + e.getMessage()); } return pdfResponse; @@ -429,7 +384,6 @@ private void setDefaultValuesIfNull(MarriageCertificate cert){ cert.getMarriageRegistryDetails().getBrideDetails().setPassportno(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getBrideDetails().getPassportno())); cert.getMarriageRegistryDetails().getGroomDetails().setPassportno(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getGroomDetails().getPassportno())); cert.getMarriageRegistryDetails().setRegistrationno(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getRegistrationno())); -// cert.getMarriageRegistryDetails().setRegistrationno(getDefaultValueIfNull(cert.getMarriageRegistryDetails().getRegistrationno())); } private String getDefaultValueIfNull(String value) { return StringUtils.isNotBlank(value)?value: MarriageConstants.NOT_RECORDED; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 1a033042163..c06581cb165 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -91,11 +91,8 @@ public List searchRegistry(MarriageRegistrySearchCriter public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, RequestInfo requestInfo) { List marriageRegistryDetailsList = repository.searchMarriageRegistry(criteria, requestInfo); if (marriageRegistryDetailsList != null && !marriageRegistryDetailsList.isEmpty()) { -// List marriageCertificateList = repository.searchCertificateByMarriageId(marriageRegistryDetailsList.get(0).getId()); try { - MarriageCertificate marriageCertificate = new MarriageCertificate(); - MarriageCertRequest marriageCertRequest = MarriageCertRequest.builder().marriageCertificate(marriageCertificate).requestInfo(requestInfo).build(); marriageCertificate.setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); marriageCertificate.setRegistrationno(marriageRegistryDetailsList.get(0).getRegistrationno()); @@ -103,25 +100,11 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req if (null!=marriageDtls && marriageDtls.size() > 1) { throw new CustomException("Invalid_Input", "Error in processing data"); } - -// if(marriageDtls.size() > 0) { //TODO check if certificate already available , will the date of issue changes? marriageCertificate.setMarriageRegId(marriageRegistryDetailsList.get(0).getId()); -// marriageCertificate.setApplicationId(marriageDtls.get(0).getApplicationId()); -// marriageCertificate.setApplicationNumber(marriageDtls.get(0).getAckNo()); -// marriageCertificate.setDateofreporting(marriageRegistryDetailsList.get(0).getDateofreporting()); -// marriageCertificate.setTenantid(marriageRegistryDetailsList.get(0).getTenantid()); SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy"); String date = df.format(marriageRegistryDetailsList.get(0).getRegistrationDate()); String datestr = date.split("-")[2]; marriageCertificate.setYear(datestr); -//TODO re-check the fields setting -// marriageDtls.get(0).setCertId(marriageCertRequest.getMarriageCertificate().getMarriagecertificateno()); -// if(null!=marriageDtls&&marriageDtls.size()==1){ -// marriageDtls.get(0).setMarriageRegistryDetails(marriageRegistryDetailsList.get(0)); -// } -// else if (marriageDtls==null||marriageDtls.size()==0) { -// marriageDtls.add(marriageCertificate); -// } MarriageCertPDFRequest marriageCertPDFRequest = MarriageCertPDFRequest.builder().requestInfo(requestInfo).marriageCertificate(Arrays.asList(marriageCertificate)).build(); long currentDate=System.currentTimeMillis(); marriageCertificate.setDateofissue(currentDate); @@ -134,41 +117,35 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req String[] dobAry = strDate.split("/"); try { dodInWords = NumToWordConverter.convertNumber(Long.parseLong(dobAry[0])) + "/" + new SimpleDateFormat("MMMM").format(res) + "/" + NumToWordConverter.convertNumber(Long.parseLong(dobAry[2])); - marriageCertificate.setDateOfIssueInWords(StringUtils.upperCase(StringUtils.isNotBlank(dodInWords)?dodInWords.trim():dodInWords)); } catch(Exception e) { + log.error("DateToWords conversion error. threw an Exception: ",e); } } marriageCertificate.setEmbeddedUrl(marriageCertPDFRequest.getMarriageCertificate().get(0).getEmbeddedUrl()); - // marriageCertificateEnrichment.createCertificateNo(marriageCertRequest); //TODO check IdGenError MarriageCertPdfResponse pdfResp = repository.saveMarriageCertPdf(marriageCertPDFRequest); - // marriageCertificate.setDateofissue(marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getRegistrationDate()); marriageCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); marriageCertificate.setCertificateStatus(MarriageCertificate.StatusEnum.FREE_DOWNLOAD); marriageCertificate.setCount(1);//If 1 download from filestoreId, If 0, need to regenerate certificate - -// } marriageCertificate.setMarriagecertificateno(marriageRegistryDetailsList.get(0).getCertificateNo()); List marriageCertSearch = repository.searchCertificateByMarriageId(marriageCertRequest.getMarriageCertificate().getMarriageRegId()); if (null != marriageCertSearch && !marriageCertSearch.isEmpty()) { marriageCertRequest.getMarriageCertificate().setId(marriageCertSearch.get(0).getId()); repository.updateMarriageCertificate(marriageCertRequest); } else { - //marriageCertificate.setId(UUID.randomUUID().toString()); repository.saveMarriageCertificate(marriageCertRequest); } - - return marriageCertificate; } catch (Exception e) { - System.out.println(e.getMessage()); - e.printStackTrace(); + log.error("DOWNLOAD_ERROR. Marriage Certificate , threw an Exception: ",e); throw new CustomException("DOWNLOAD_ERROR", "Error in Downloading Certificate"+e.getMessage()); } }else if (marriageRegistryDetailsList == null && marriageRegistryDetailsList.isEmpty()){ + log.info("DOWNLOAD_ERROR. Marriage Certificate , Marriage registry not found"); throw new CustomException("DOWNLOAD_ERROR", "Marriage registry not found"); }else{ + log.info("DOWNLOAD_ERROR. Marriage Certificate , More than one marriage registry found"); throw new CustomException("DOWNLOAD_ERROR", "More than one marriage registry found"); } From d5f48c29103fac94b9938d1ecd1c1f463ab31f81 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Wed, 10 May 2023 10:55:08 +0530 Subject: [PATCH 343/420] corr prmnt addrs change --- .../MarriageCorrectionEnrichment.java | 221 +++++++++--------- 1 file changed, 112 insertions(+), 109 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java index c0d78a0f5a7..95ef0afd699 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/enrichment/MarriageCorrectionEnrichment.java @@ -61,8 +61,11 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp marriageApplicationDetails.getGroomDetails().setBrideGroom("G"); } - DateFormat formatter = new SimpleDateFormat("ddMMyyyy"); + //DateFormat formatter = new SimpleDateFormat("ddMMyyyy"); marriageApplicationDetails.setDateofreporting(new Date().getTime()); + HashMap prmntAdrsChangeFlag=new HashMap<>(); + prmntAdrsChangeFlag.put("bride",false); + prmntAdrsChangeFlag.put("groom",false); correctionRequest.getMarriageCorrectionDetails().forEach(correction -> { @@ -115,94 +118,91 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp String[] fieldName = changeField.getField().split("\\."); if (fieldName.length == 1) { if (marriageApplnDetailsFieldMap.containsKey(fieldName[0])) { - if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + //if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); correctionFieldValue.setId(UUID.randomUUID().toString()); correctionFieldValue.setCorrectionId(correctionId); correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); correctionFieldValue.setColumnName(changeField.getField()); - //correctionFieldValue.setOldValue(marriageApplnDetailsAccessor.getPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0])).toString()); - correctionFieldValue.setOldValue(changeField.getOldValue()); - correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setOldValue(changeField.getOldValue()==null?"":changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()==null?"":changeField.getNewValue()); correctionFieldValue.setAuditDetails(auditDetails); correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); marriageApplnDetailsAccessor.setPropertyValue(marriageApplnDetailsFieldMap.get(fieldName[0]), changeField.getNewValue()); - } + //} } } else if (fieldName.length == 2) { if (fieldName[0].equalsIgnoreCase("BrideDetails")) { if (brideDetailsFieldMap.containsKey(fieldName[1])) { - if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + //if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); correctionFieldValue.setId(UUID.randomUUID().toString()); correctionFieldValue.setCorrectionId(correctionId); correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); correctionFieldValue.setColumnName(changeField.getField()); - //correctionFieldValue.setOldValue(brideDetailsAccessor.getPropertyValue(brideDetailsFieldMap.get(fieldName[1])).toString()); - correctionFieldValue.setOldValue(changeField.getOldValue()); - correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setOldValue(changeField.getOldValue()==null?"":changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()==null?"":changeField.getNewValue()); correctionFieldValue.setAuditDetails(auditDetails); correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); brideDetailsAccessor.setPropertyValue(brideDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); - } + // } } } else if (fieldName[0].equalsIgnoreCase("GroomDetails")) { if (groomDetailsFieldMap.containsKey(fieldName[1])) { - if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + //if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); correctionFieldValue.setId(UUID.randomUUID().toString()); correctionFieldValue.setCorrectionId(correctionId); correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); correctionFieldValue.setColumnName(changeField.getField()); - //correctionFieldValue.setOldValue(groomDetailsAccessor.getPropertyValue(groomDetailsFieldMap.get(fieldName[1])).toString()); - correctionFieldValue.setOldValue(changeField.getOldValue()); - correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setOldValue(changeField.getOldValue()==null?"":changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()==null?"":changeField.getNewValue()); correctionFieldValue.setAuditDetails(auditDetails); correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); groomDetailsAccessor.setPropertyValue(groomDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); - } + //} } } else if (fieldName[0].equalsIgnoreCase("BrideAddressDetails")) { if (brideAddressDetailsFieldMap.containsKey(fieldName[1])) { - if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + prmntAdrsChangeFlag.put("bride",true); + //if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); correctionFieldValue.setId(UUID.randomUUID().toString()); correctionFieldValue.setCorrectionId(correctionId); correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); correctionFieldValue.setColumnName(changeField.getField()); - //correctionFieldValue.setOldValue(brideAddressDetailsAccessor.getPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1])).toString()); - correctionFieldValue.setOldValue(changeField.getOldValue()); - correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setOldValue(changeField.getOldValue()==null?"":changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()==null?"":changeField.getNewValue()); correctionFieldValue.setAuditDetails(auditDetails); correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); brideAddressDetailsAccessor.setPropertyValue(brideAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); - } + //} } } else if (fieldName[0].equalsIgnoreCase("GroomAddressDetails")) { if (groomAddressDetailsFieldMap.containsKey(fieldName[1])) { - if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { + prmntAdrsChangeFlag.put("groom",true); + //if(changeField.getOldValue()!=null && changeField.getOldValue()!=null) { CorrectionFieldValue correctionFieldValue = new CorrectionFieldValue(); correctionFieldValue.setId(UUID.randomUUID().toString()); correctionFieldValue.setCorrectionId(correctionId); correctionFieldValue.setMarriageId(marriageApplicationDetails.getId()); correctionFieldValue.setCorrectionFieldName(correctionField.getCorrectionFieldName()); correctionFieldValue.setColumnName(changeField.getField()); - //correctionFieldValue.setOldValue(String.valueOf(groomAddressDetailsAccessor.getPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1])))); - correctionFieldValue.setOldValue(changeField.getOldValue()); - correctionFieldValue.setNewValue(changeField.getNewValue()); + correctionFieldValue.setOldValue(changeField.getOldValue()==null?"":changeField.getOldValue()); + correctionFieldValue.setNewValue(changeField.getNewValue()==null?"":changeField.getNewValue()); correctionFieldValue.setAuditDetails(auditDetails); correctionRequest.getCorrectionFieldValue().add(correctionFieldValue); groomAddressDetailsAccessor.setPropertyValue(groomAddressDetailsFieldMap.get(fieldName[1]), changeField.getNewValue()); - } + //} } } @@ -231,9 +231,10 @@ public void enrichCreate(MarriageCorrectionRequest correctionRequest, MarriageAp }); }); + setBridePermanentAddress(marriageApplicationDetails,prmntAdrsChangeFlag.get("bride")); + + setGroomPermanentAddress(marriageApplicationDetails,prmntAdrsChangeFlag.get("groom")); - setBridePermanentAddress(marriageApplicationDetails); - setGroomPermanentAddress(marriageApplicationDetails); GroomDetails groomDetails =marriageApplicationDetails.getGroomDetails(); GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); @@ -320,7 +321,7 @@ private void validateFileCodes(List fileCodes, int count) { } - private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { + private void setGroomPermanentAddress(MarriageApplicationDetails marriage, Boolean prmntAdrsChangeFlag) { if (marriage != null) { if (marriage.getGroomAddressDetails() != null) { @@ -329,57 +330,58 @@ private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { marriage.getGroomAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); marriage.getGroomAddressDetails().setBrideGroomPermanent("G"); } + if(prmntAdrsChangeFlag) { + if (marriage.getGroomAddressDetails().getCountryIdPermanent() != null && marriage.getGroomAddressDetails().getStateIdPermanent() != null) { + if (marriage.getGroomAddressDetails().getCountryIdPermanent().equalsIgnoreCase(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getGroomAddressDetails().getStateIdPermanent().equalsIgnoreCase(MarriageConstants.STATE_CODE_SMALL)) { + + //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent, marriage.getGroomAddressDetails().getPermtaddressCountry()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrTalukId,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrVillageId,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + //setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent,marriage.getGroomAddressDetails().getPermtaddressStateName()); + //setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); + setIfNotNull(marriage.getGroomAddressDetails()::setLocalityEnPermanent, marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setLocalityMlPermanent, marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameEnPermanent, marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameMlPermanent, marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoEnPermanent, marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoMlPermanent, marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPoNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + } else { + //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent , marriage.getGroomAddressDetails().getPermtaddressCountry()); + //setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent , marriage.getGroomAddressDetails().getPermtaddressStateName()); + //setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); + //setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setLocalityEnPermanent, marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setLocalityMlPermanent, marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameEnPermanent, marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameMlPermanent, marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoEnPermanent, marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoMlPermanent, marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); + //setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrTalukName , marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthPostOfficeEn , marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + //setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - if (marriage.getGroomAddressDetails().getCountryIdPermanent() != null && marriage.getGroomAddressDetails().getStateIdPermanent() != null) { - if (marriage.getGroomAddressDetails().getCountryIdPermanent().equalsIgnoreCase(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getGroomAddressDetails().getStateIdPermanent().equalsIgnoreCase(MarriageConstants.STATE_CODE_SMALL)) { - - //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent, marriage.getGroomAddressDetails().getPermtaddressCountry()); - //setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrTalukId,marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - //setIfNotNull(marriage.getGroomAddressDetails()::setPermanentAddrVillageId,marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - //setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent,marriage.getGroomAddressDetails().getPermtaddressStateName()); - //setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - setIfNotNull(marriage.getGroomAddressDetails()::setLocalityEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setLocalityMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrStreetNameMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoEnPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoMlPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrHouseNameMl()); - //setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - //setIfNotNull(marriage.getGroomAddressDetails()::setPoNoPermanent,marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + } } else { - //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPermanent , marriage.getGroomAddressDetails().getPermtaddressCountry()); - //setIfNotNull(marriage.getGroomAddressDetails()::setStateIdPermanent , marriage.getGroomAddressDetails().getPermtaddressStateName()); - //setIfNotNull(marriage.getGroomAddressDetails()::setDistrictIdPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - //setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaCityVilgeEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setLocalityEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setLocalityMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaLocalityNameMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setStreetNameMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaStreetNameMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoEnPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setHouseNameNoMlPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaHouseNameMl()); - //setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaVillage()); - //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrTalukName , marriage.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); - //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthPostOfficeEn , marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - //setIfNotNull(marriage.getGroomAddressDetails()::setPinNoPermanent , marriage.getGroomAddressDetails().getPermntOutsideKeralaPincode()); - - } - } else { - //if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { + //if (marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry() != null) { //setIfNotNull(marriage.getGroomAddressDetails()::setCountryIdPresent , marriage.getGroomAddressDetails().getPermntOutsideIndiaCountry()); //setIfNotNull(marriage.getGroomAddressDetails()::setVillageNamePermanent , marriage.getGroomAddressDetails().getPermntOutsideIndiaVillage()); //setIfNotNull(marriage.getGroomAddressDetails()::setTownOrVillagePermanent , marriage.getGroomAddressDetails().getPermntOutsideIndiaCityTown()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLineoneEn , marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLineoneMl , marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoEn , marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoMl , marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLineoneEn, marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLineoneMl, marriage.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoEn, marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaLinetwoMl, marriage.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceEn , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); //setIfNotNull(marriage.getGroomAddressDetails()::setPermntOthrIndiaprovinceMl , marriage.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); //setIfNotNull(marriage.getGroomAddressDetails()::setOutSideIndiaPostCodePermanent , marriage.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - //} - } + //} + } + } } } @@ -389,7 +391,7 @@ private void setGroomPermanentAddress(MarriageApplicationDetails marriage) { } - private void setBridePermanentAddress(MarriageApplicationDetails marriage) { + private void setBridePermanentAddress(MarriageApplicationDetails marriage, Boolean prmntAdrsChangeFlag) { if (marriage != null) { if (marriage.getBrideAddressDetails() != null) { @@ -398,42 +400,42 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { marriage.getBrideAddressDetails().setPermanentUuid(UUID.randomUUID().toString()); marriage.getBrideAddressDetails().setBrideGroomPermanent("B"); } + if(prmntAdrsChangeFlag) { + if (marriage.getBrideAddressDetails().getCountryIdPermanent() != null && marriage.getBrideAddressDetails().getStateIdPermanent() != null) { + if (marriage.getBrideAddressDetails().getCountryIdPermanent().equalsIgnoreCase(MarriageConstants.COUNTRY_CODE)) { + if (marriage.getBrideAddressDetails().getStateIdPermanent().equalsIgnoreCase(MarriageConstants.STATE_CODE_SMALL)) { + + //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); + //setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrTalukId, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrVillageId, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + //setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); + setIfNotNull(marriage.getBrideAddressDetails()::setLocalityEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setLocalityMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPoNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + } else { + //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); + //setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); + //setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); + setIfNotNull(marriage.getBrideAddressDetails()::setLocalityEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setLocalityMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); + setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); + setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); + //setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrTalukName, marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthPostOfficeEn, marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + //setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - if (marriage.getBrideAddressDetails().getCountryIdPermanent() != null && marriage.getBrideAddressDetails().getStateIdPermanent() != null) { - if (marriage.getBrideAddressDetails().getCountryIdPermanent().equalsIgnoreCase(MarriageConstants.COUNTRY_CODE)) { - if (marriage.getBrideAddressDetails().getStateIdPermanent().equalsIgnoreCase(MarriageConstants.STATE_CODE_SMALL)) { - - //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); - //setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); - //setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrTalukId, marriage.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - //setIfNotNull(marriage.getBrideAddressDetails()::setPermanentAddrVillageId, marriage.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - //setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrDistrict()); - setIfNotNull(marriage.getBrideAddressDetails()::setLocalityEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); - setIfNotNull(marriage.getBrideAddressDetails()::setLocalityMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); - setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrStreetNameMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoEnPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); - setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoMlPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrHouseNameMl()); - //setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - //setIfNotNull(marriage.getBrideAddressDetails()::setPoNoPermanent, marriage.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + } } else { - //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPermanent, marriage.getBrideAddressDetails().getPermtaddressCountry()); - //setIfNotNull(marriage.getBrideAddressDetails()::setStateIdPermanent, marriage.getBrideAddressDetails().getPermtaddressStateName()); - //setIfNotNull(marriage.getBrideAddressDetails()::setDistrictIdPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaDistrict()); - setIfNotNull(marriage.getBrideAddressDetails()::setLocalityEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); - setIfNotNull(marriage.getBrideAddressDetails()::setLocalityMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); - setIfNotNull(marriage.getBrideAddressDetails()::setStreetNameMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaStreetNameMl()); - setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoEnPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); - setIfNotNull(marriage.getBrideAddressDetails()::setHouseNameNoMlPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaHouseNameMl()); - //setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaVillage()); - //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrTalukName, marriage.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); - //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthPostOfficeEn, marriage.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - //setIfNotNull(marriage.getBrideAddressDetails()::setPinNoPermanent, marriage.getBrideAddressDetails().getPermntOutsideKeralaPincode()); - - } - } else { - //if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { + //if (marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry() != null) { //setIfNotNull(marriage.getBrideAddressDetails()::setCountryIdPresent, marriage.getBrideAddressDetails().getPermntOutsideIndiaCountry()); //setIfNotNull(marriage.getBrideAddressDetails()::setVillageNamePermanent, marriage.getBrideAddressDetails().getPermntOutsideIndiaVillage()); //setIfNotNull(marriage.getBrideAddressDetails()::setTownOrVillagePermanent, marriage.getBrideAddressDetails().getPermntOutsideIndiaCityTown()); @@ -445,9 +447,10 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { //setIfNotNull(marriage.getBrideAddressDetails()::setPermntOthrIndiaprovinceMl, marriage.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); //setIfNotNull(marriage.getBrideAddressDetails()::setOutSideIndiaPostCodePermanent, marriage.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - //} - } + //} + } + } } } @@ -458,9 +461,9 @@ private void setBridePermanentAddress(MarriageApplicationDetails marriage) { public static void setIfNotNull( Consumer setter,V value) { - if (Objects.nonNull(value)) { + //if (Objects.nonNull(value)) { setter.accept(value); - } + //} } From 081160606f9e8be6c22ac0373b91bc9211860769 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Wed, 10 May 2023 12:16:33 +0530 Subject: [PATCH 344/420] corr yml change adrs --- .../main/resources/marriage-correction.yml | 28 +++++++++---------- .../mapper/RegistryToApplicationMapper.java | 6 ++-- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage-correction.yml b/core-services/egov-persister/src/main/resources/marriage-correction.yml index fbb6eeb0f7a..dff50f2510a 100644 --- a/core-services/egov-persister/src/main/resources/marriage-correction.yml +++ b/core-services/egov-persister/src/main/resources/marriage-correction.yml @@ -284,11 +284,11 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrVillageId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrVillage - jsonPath: $.MarriageDetails.*.BrideAddressDetails.villageNamePermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentAddrTalukId + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrTaluk - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaTaluk @@ -308,7 +308,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.BrideAddressDetails.poNoPermanent - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.pinNoPermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntInKeralaAdrPincode - jsonPath: $.MarriageDetails.*.BrideAddressDetails.countryIdPermanent @@ -326,23 +326,23 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.marriageTenantid - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLineoneEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLineoneMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLineoneMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLinetwoEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideIndiaLinetwoMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaLinetwoMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceEn + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaprovinceEn - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthrIndiaprovinceMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutSideIndiaprovinceMl - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.outSideIndiaPostCodePermanent + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permanentOutsideIndiaPostCode - - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOthPostOfficeMl + - jsonPath: $.MarriageDetails.*.BrideAddressDetails.permntOutsideKeralaPostOfficeMl - jsonPath: $.MarriageDetails.*.BrideAddressDetails.townOrVillagePermanent @@ -364,7 +364,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.houseNameNoMlPermanent - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.PermanentAddrVillageId + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntInKeralaAdrVillage - jsonPath: $.MarriageDetails.*.GroomAddressDetails.villageNamePermanent @@ -418,7 +418,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceEn - - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaProvinceMl + - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permntOutSideIndiaprovinceMl - jsonPath: $.MarriageDetails.*.GroomAddressDetails.permanentOutsideIndiaPostCode diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 6189a77fb6f..32469dfe749 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -140,7 +140,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName()); marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriageApplicationDetails.getBrideAddressDetails().setPermanentAddrVillageId(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrVillage()); marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaWardNo()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); @@ -153,6 +153,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); marriageApplicationDetails.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); marriageApplicationDetails.getBrideAddressDetails().setPinNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPinNoPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setTownOrVillagePermanent(marriageRegistryDetails.getBrideAddressDetails().getTownOrVillagePermanent()); //GROOM ADDRESS DETAILS marriageApplicationDetails.getGroomAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getCountryIdPermanent()); @@ -170,7 +171,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName()); marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriageApplicationDetails.getGroomAddressDetails().setPermanentAddrVillageId(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrVillage()); marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaWardNo()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); @@ -183,6 +184,7 @@ public MarriageApplicationDetails convert(List registry marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); marriageApplicationDetails.getGroomAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); marriageApplicationDetails.getGroomAddressDetails().setPinNoPermanent(marriageRegistryDetails.getGroomAddressDetails().getPinNoPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setTownOrVillagePermanent(marriageRegistryDetails.getGroomAddressDetails().getTownOrVillagePermanent()); return marriageApplicationDetails; } From db89a742d4c9da83f3dfcd73db47e91fb92a9501 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 10 May 2023 12:54:40 +0530 Subject: [PATCH 345/420] setAddressNull --- .../enrichment/MarriageDetailsEnrichment.java | 256 +++++++++++++++++- .../MarriageRegistryQueryBuilder.java | 10 +- .../rowmapper/MarriageRegistryRowMapper.java | 7 +- .../rowmapper/WitnessRegistryRowMapper.java | 108 ++++---- 4 files changed, 318 insertions(+), 63 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 8b714b885e2..f0159a91fac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -86,6 +86,8 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); } setApplicationNumbers(request); + setBrideAddressNull(request); + setGroomAddressNull(request); setBridePermanentAddress(request); setBridePresentAddress(request); setGroomPermanentAddress(request); @@ -606,10 +608,262 @@ private void setBridePermanentAddress(MarriageDetailsRequest request) { }); } + private void setBrideAddressNull(MarriageDetailsRequest request){ + request.getMarriageDetails() + .forEach(marriage->{ +//PRESENT + marriage.getBrideAddressDetails().setCountryIdPresent(null); + marriage.getBrideAddressDetails().setStateIdPresent(null); + + + marriage.getBrideAddressDetails().setDistrictIdPresent(null); + + marriage.getBrideAddressDetails().setLocalityEnPresent(null); + marriage.getBrideAddressDetails().setLocalityMlPresent(null); + + marriage.getBrideAddressDetails().setStreetNameEnPresent(null); + marriage.getBrideAddressDetails().setStreetNameMlPresent(null); + + marriage.getBrideAddressDetails().setHouseNameNoEnPresent(null); + marriage.getBrideAddressDetails().setHouseNameNoMlPresent(null); + + marriage.getBrideAddressDetails().setPinNoPresent(null); + marriage.getBrideAddressDetails().setPoNoPresent(null); + + + marriage.getBrideAddressDetails().setCountryIdPresent(null); + marriage.getBrideAddressDetails().setStateIdPresent(null); + + marriage.getBrideAddressDetails().setDistrictIdPresent(null); + + marriage.getBrideAddressDetails().setLocalityEnPresent(null); + marriage.getBrideAddressDetails().setLocalityMlPresent(null); + + marriage.getBrideAddressDetails().setStreetNameEnPresent(null); + marriage.getBrideAddressDetails().setStreetNameMlPresent(null); + + marriage.getBrideAddressDetails().setHouseNameNoEnPresent(null); + marriage.getBrideAddressDetails().setHouseNameNoMlPresent(null); + + marriage.getBrideAddressDetails().setPinNoPresent(null); + + marriage.getBrideAddressDetails().setPresentOthrTalukName(null); + marriage.getBrideAddressDetails().setPresentOthPostOfficeEn(null); + + marriage.getBrideAddressDetails().setTownOrVillagePresent(null); + marriage.getBrideAddressDetails().setVillageNamePresent(null); + + + marriage.getBrideAddressDetails().setCountryIdPresent(null); + + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(null); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMl(null); + + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEnB(null); + marriage.getBrideAddressDetails().setPresentOthrIndiaAdressMlB(null); + + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceEn(null); + marriage.getBrideAddressDetails().setPresentOthrIndiaProvinceMl(null); + + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePresent(null); + + marriage.getBrideAddressDetails().setVillageNamePresent(null); + marriage.getBrideAddressDetails().setTownOrVillagePresent(null); + +//PERMANENT + + marriage.getBrideAddressDetails().setCountryIdPermanent(null); + + marriage.getBrideAddressDetails().setStateIdPermanent(null); + marriage.getBrideAddressDetails().setPermanentAddrTalukId(null); + marriage.getBrideAddressDetails().setPermanentAddrVillageId(null); + + marriage.getBrideAddressDetails().setDistrictIdPermanent(null); + + marriage.getBrideAddressDetails().setLocalityEnPermanent(null); + marriage.getBrideAddressDetails().setLocalityMlPermanent(null); + + marriage.getBrideAddressDetails().setStreetNameEnPermanent(null); + marriage.getBrideAddressDetails().setStreetNameMlPermanent(null); + + marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(null); + marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(null); + marriage.getBrideAddressDetails().setPinNoPermanent(null); + marriage.getBrideAddressDetails().setPoNoPermanent(null); + + marriage.getBrideAddressDetails().setCountryIdPermanent(null); + + marriage.getBrideAddressDetails().setStateIdPermanent(null); + + marriage.getBrideAddressDetails().setDistrictIdPermanent(null); + + marriage.getBrideAddressDetails().setLocalityEnPermanent(null); + marriage.getBrideAddressDetails().setLocalityMlPermanent(null); + + marriage.getBrideAddressDetails().setStreetNameEnPermanent(null); + marriage.getBrideAddressDetails().setStreetNameMlPermanent(null); + + marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(null); + marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(null); + + + marriage.getBrideAddressDetails().setPermntOthrTalukName(null); + marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(null); + + marriage.getBrideAddressDetails().setPinNoPermanent(null); + + marriage.getBrideAddressDetails().setTownOrVillagePermanent(null); + marriage.getBrideAddressDetails().setVillageNamePermanent(null); + + marriage.getBrideAddressDetails().setCountryIdPermanent(null); + + marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(null); + marriage.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(null); + + marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(null); + marriage.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(null); + + marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(null); + marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(null); + + + marriage.getBrideAddressDetails().setVillageNamePermanent(null); + marriage.getBrideAddressDetails().setTownOrVillagePermanent(null); + + marriage.getBrideAddressDetails().setOutSideIndiaPostCodePermanent(null); + + } ); + } + private void setGroomAddressNull(MarriageDetailsRequest request){ + request.getMarriageDetails() + .forEach(marriage-> { +//PRESENT + + marriage.getGroomAddressDetails().setCountryIdPresent(null); + marriage.getGroomAddressDetails().setStateIdPresent(null); + + marriage.getGroomAddressDetails().setDistrictIdPresent(null); + + marriage.getGroomAddressDetails().setLocalityEnPresent(null); + marriage.getGroomAddressDetails().setLocalityMlPresent(null); + + marriage.getGroomAddressDetails().setStreetNameEnPresent(null); + marriage.getGroomAddressDetails().setStreetNameMlPresent(null); + + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(null); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(null); + + marriage.getGroomAddressDetails().setPinNoPresent(null); + marriage.getGroomAddressDetails().setPoNoPresent(null); + + marriage.getGroomAddressDetails().setPresentAddrVillageId(null); + + + marriage.getGroomAddressDetails().setCountryIdPresent(null); + marriage.getGroomAddressDetails().setStateIdPresent(null); + marriage.getGroomAddressDetails().setDistrictIdPresent(null); + + marriage.getGroomAddressDetails().setLocalityEnPresent(null); + marriage.getGroomAddressDetails().setLocalityMlPresent(null); + + marriage.getGroomAddressDetails().setStreetNameEnPresent(null); + marriage.getGroomAddressDetails().setStreetNameMlPresent(null); + + marriage.getGroomAddressDetails().setHouseNameNoEnPresent(null); + marriage.getGroomAddressDetails().setHouseNameNoMlPresent(null); + + marriage.getGroomAddressDetails().setPinNoPresent(null); + + marriage.getGroomAddressDetails().setPresentOthrTalukName(null); + marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(null); + + + marriage.getGroomAddressDetails().setTownOrVillagePresent(null); + marriage.getGroomAddressDetails().setVillageNamePresent(null); + + + marriage.getGroomAddressDetails().setCountryIdPresent(null); + + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(null); + + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(null); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMl(null); + + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEnB(null); + marriage.getGroomAddressDetails().setPresentOthrIndiaAdressMlB(null); + + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceEn(null); + marriage.getGroomAddressDetails().setPresentOthrIndiaProvinceMl(null); + + marriage.getGroomAddressDetails().setVillageNamePresent(null); + marriage.getGroomAddressDetails().setTownOrVillagePresent(null); +//PERMANENT + marriage.getGroomAddressDetails().setCountryIdPermanent(null); + marriage.getGroomAddressDetails().setPermanentAddrTalukId(null); + marriage.getGroomAddressDetails().setPermanentAddrVillageId(null); + + marriage.getGroomAddressDetails().setStateIdPermanent(null); + + marriage.getGroomAddressDetails().setDistrictIdPermanent(null); + + marriage.getGroomAddressDetails().setLocalityEnPermanent(null); + marriage.getGroomAddressDetails().setLocalityMlPermanent(null); + + marriage.getGroomAddressDetails().setStreetNameEnPermanent(null); + marriage.getGroomAddressDetails().setStreetNameMlPermanent(null); + + marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(null); + marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(null); + marriage.getGroomAddressDetails().setPinNoPermanent(null); + marriage.getGroomAddressDetails().setPoNoPermanent(null); + + marriage.getGroomAddressDetails().setCountryIdPermanent(null); + + marriage.getGroomAddressDetails().setStateIdPermanent(null); + + marriage.getGroomAddressDetails().setDistrictIdPermanent(null); + + marriage.getGroomAddressDetails().setLocalityEnPermanent(null); + marriage.getGroomAddressDetails().setLocalityMlPermanent(null); + + marriage.getGroomAddressDetails().setStreetNameEnPermanent(null); + marriage.getGroomAddressDetails().setStreetNameMlPermanent(null); + + marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(null); + marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(null); + + + marriage.getGroomAddressDetails().setPermntOthrTalukName(null); + marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(null); + + + marriage.getGroomAddressDetails().setPinNoPermanent(null); + + marriage.getGroomAddressDetails().setTownOrVillagePermanent(null); + marriage.getGroomAddressDetails().setVillageNamePermanent(null); + + marriage.getGroomAddressDetails().setCountryIdPermanent(null); + + + marriage.getGroomAddressDetails().setVillageNamePermanent(null); + marriage.getGroomAddressDetails().setTownOrVillagePermanent(null); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(null); + marriage.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(null); + + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(null); + marriage.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(null); + + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceEn(null); + marriage.getGroomAddressDetails().setPermntOthrIndiaprovinceMl(null); + + marriage.getGroomAddressDetails().setOutSideIndiaPostCodePermanent(null); + } ) ; + } - // private void setRegistrationNumber(MarriageDetailsRequest request) { + // private void setRegistrationNumber(MarriageDetailsRequest request) { // RequestInfo requestInfo = request.getRequestInfo(); // List marriageDetails = request.getMarriageDetails(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index f961c66b073..b069f6f64a7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -89,11 +89,11 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode , ") - .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") - .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") - .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") - .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") - +// .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") +// .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") +// .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") +// .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") +// .append("FROM public.eg_register_marriage_details as MD ") .append("INNER JOIN eg_register_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") .append("BD.bride_groom ='B' ") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 598a7b03df1..a43879e8c33 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -13,8 +13,9 @@ @Component public class MarriageRegistryRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideRegistryRowMapper, - GroomRegistryRowMapper,GroomRegistryAddressRowMapper,BrideRegistryAddressRowMapper, - WitnessRegistryRowMapper{ + GroomRegistryRowMapper,GroomRegistryAddressRowMapper,BrideRegistryAddressRowMapper +// WitnessRegistryRowMapper + { @Override public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null @@ -58,7 +59,7 @@ public List extractData(ResultSet rs) throws SQLExcepti .brideAddressDetails(getBrideAddressDetails(rs)) .groomDetails(getGroomDetails(rs)) .groomAddressDetails(getGroomAddressDetails(rs)) - .witnessDetails(getWitnessDetails(rs)) +// .witnessDetails(getWitnessDetails(rs)) .auditDetails(getAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index a245b717de8..4f6c72b7b09 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -1,54 +1,54 @@ -package org.ksmart.marriage.marriageregistry.repository.rowmapper; - -import org.ksmart.marriage.marriageregistry.web.model.WitnessRegistryDetails; -import java.sql.ResultSet; -import java.sql.SQLException; -import org.springframework.stereotype.Component; - - -@Component -public interface WitnessRegistryRowMapper { - default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { - - return WitnessRegistryDetails.builder() - .marriageid(rs.getString("MD_id")) - .witnessId1(rs.getString("WD1_id")) - .witness1AadharNo(rs.getString("WD1_aadharno")) - .witness1NameEn(rs.getString("WD1_name_en")) - .witness1NameMl(rs.getString("WD1_name_ml")) - .witness1Age(rs.getInt("WD1_age")) - .witness1AddresSEn(rs.getString("WD1_address_en")) - .witness1AddressMl(rs.getString("WD1_address_ml")) - .witness1Mobile(rs.getLong("WD1_mobile")) - .witness1Esigned(rs.getBoolean("WD1_is_esigned")) - //.witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) - .serial_no1(rs.getInt("WD1_serial_no")) - .witnessId2(rs.getString("WD2_id")) - .witness2AadharNo(rs.getString("WD2_aadharno")) - .witness2NameEn(rs.getString("WD2_name_en")) - .witness2NameMl(rs.getString("WD2_name_ml")) - .witness2Age(rs.getInt("WD2_age")) - .witness2AddresSEn(rs.getString("WD2_address_en")) - .witness2AddressMl(rs.getString("WD2_address_ml")) - .witness2Mobile(rs.getLong("WD2_mobile")) - .serial_no2(rs.getInt("WD1_serial_no")) - .witness2Esigned(rs.getBoolean("WD2_is_esigned")) - .brideUrl(rs.getString("MD_brideurl")) - .groomUrl(rs.getString("MD_groomurl")) - .imageUuid(rs.getString("MD_imageuuid")) - .brideFilestoreId(rs.getString("MD_bride_filestoreid")) - .groomFilestoreId(rs.getString("MD_groom_filestoreid")) - // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) - .tenentId(rs.getString("MD_tenantid")) - .brideExpired(rs.getBoolean("MD_bride_expired")) - .brideUrl(rs.getString("MD_brideurl")) - .brideFilestoreId(rs.getString("MD_bride_filestoreid")) - .groomExpired(rs.getBoolean("MD_groom_expired")) - .groomUrl(rs.getString("MD_groomurl")) - .groomFilestoreId(rs.getString("MD_groom_filestoreid")) - .imageUuid(rs.getString("MD_imageuuid")) - .isBackward(rs.getBoolean("MD_is_backward")) - .build(); - } - -} \ No newline at end of file +//package org.ksmart.marriage.marriageregistry.repository.rowmapper; +// +//import org.ksmart.marriage.marriageregistry.web.model.WitnessRegistryDetails; +//import java.sql.ResultSet; +//import java.sql.SQLException; +//import org.springframework.stereotype.Component; +// +// +//@Component +//public interface WitnessRegistryRowMapper { +// default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { +// +// return WitnessRegistryDetails.builder() +// .marriageid(rs.getString("MD_id")) +// .witnessId1(rs.getString("WD1_id")) +// .witness1AadharNo(rs.getString("WD1_aadharno")) +// .witness1NameEn(rs.getString("WD1_name_en")) +// .witness1NameMl(rs.getString("WD1_name_ml")) +// .witness1Age(rs.getInt("WD1_age")) +// .witness1AddresSEn(rs.getString("WD1_address_en")) +// .witness1AddressMl(rs.getString("WD1_address_ml")) +// .witness1Mobile(rs.getLong("WD1_mobile")) +// .witness1Esigned(rs.getBoolean("WD1_is_esigned")) +// //.witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) +// .serial_no1(rs.getInt("WD1_serial_no")) +// .witnessId2(rs.getString("WD2_id")) +// .witness2AadharNo(rs.getString("WD2_aadharno")) +// .witness2NameEn(rs.getString("WD2_name_en")) +// .witness2NameMl(rs.getString("WD2_name_ml")) +// .witness2Age(rs.getInt("WD2_age")) +// .witness2AddresSEn(rs.getString("WD2_address_en")) +// .witness2AddressMl(rs.getString("WD2_address_ml")) +// .witness2Mobile(rs.getLong("WD2_mobile")) +// .serial_no2(rs.getInt("WD1_serial_no")) +// .witness2Esigned(rs.getBoolean("WD2_is_esigned")) +// .brideUrl(rs.getString("MD_brideurl")) +// .groomUrl(rs.getString("MD_groomurl")) +// .imageUuid(rs.getString("MD_imageuuid")) +// .brideFilestoreId(rs.getString("MD_bride_filestoreid")) +// .groomFilestoreId(rs.getString("MD_groom_filestoreid")) +// // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) +// .tenentId(rs.getString("MD_tenantid")) +// .brideExpired(rs.getBoolean("MD_bride_expired")) +// .brideUrl(rs.getString("MD_brideurl")) +// .brideFilestoreId(rs.getString("MD_bride_filestoreid")) +// .groomExpired(rs.getBoolean("MD_groom_expired")) +// .groomUrl(rs.getString("MD_groomurl")) +// .groomFilestoreId(rs.getString("MD_groom_filestoreid")) +// .imageUuid(rs.getString("MD_imageuuid")) +// .isBackward(rs.getBoolean("MD_is_backward")) +// .build(); +// } +// +//} \ No newline at end of file From f1e13e1b10c3ef9ec25c9222332e530b1a94c123 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 10 May 2023 14:27:36 +0530 Subject: [PATCH 346/420] comments discarede --- .../contract/EncryptionDecryptionUtil.java | 2 +- .../enrichment/MarriageDetailsEnrichment.java | 6 +- .../MarriageApplicationRepository.java | 32 ++--- .../rowmapper/MarriagePaymentRowMapper.java | 122 +++++++++--------- .../service/MarriageApplicationService.java | 6 +- .../MarriageRegistryRequestService.java | 2 +- .../MarriageApplicationValidator.java | 14 +- .../MarriageApplicationController.java | 2 +- .../service/MarriageCorrectionService.java | 2 +- 9 files changed, 93 insertions(+), 95 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java index 23e652e60d9..0d93c5e0266 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/contract/EncryptionDecryptionUtil.java @@ -70,7 +70,7 @@ public T encryptObject(Object objectToEncrypt, String key, Class classTyp public P decryptObject(Object objectToDecrypt, String key, Class classType, RequestInfo requestInfo) { try { - System.out.println("JasmineDecryptObject"+objectToDecrypt); + // System.out.println("JasmineDecryptObject"+objectToDecrypt); boolean objectToDecryptNotList = false; if (objectToDecrypt == null) { return null; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 8b714b885e2..074d8fbfe2e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -688,14 +688,14 @@ private void setApplicationNumbers(MarriageDetailsRequest request) { } //Jasmine 30.03.2023 public List saveDemand(RequestInfo requestInfo, List demands){ - System.out.println("hientersaveDemand"); + // System.out.println("hientersaveDemand"); StringBuilder url = new StringBuilder(config.getBillingHost()); url.append(config.getDemandCreateEndpoint()); DemandRequest request = new DemandRequest(requestInfo,demands); Object result = serviceRequestRepository.fetchResult(url,request); - System.out.println("demands"+demands); - System.out.println("demandresult"+result); + // System.out.println("demands"+demands); + // System.out.println("demandresult"+result); DemandResponse response = null; try{ response = mapper.convertValue(result,DemandResponse.class); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 358d6122652..b62a282c4f7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -20,7 +20,7 @@ import org.ksmart.marriage.utils.MarriageMdmsUtil; import org.ksmart.marriage.marriageapplication.repository.querybuilder.MarriageApplicationQueryBuilder; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageApplicationRowMapper; -import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriagePaymentRowMapper; +//import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriagePaymentRowMapper; import org.ksmart.marriage.marriageapplication.repository.rowmapper.MarriageDocumentRowMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; @@ -40,7 +40,7 @@ public class MarriageApplicationRepository { private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; private final MarriageDocumentRowMapper marriagedocumentRowMapper; - private final MarriagePaymentRowMapper marriagePaymentRowMapper; + // private final MarriagePaymentRowMapper marriagePaymentRowMapper; @Autowired @@ -54,28 +54,28 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat JdbcTemplate jdbcTemplate, MarriageApplicationQueryBuilder marriageQueryBuilder, MarriageApplicationRowMapper marriageApplicationRowMapper, - MarriageDocumentRowMapper marriagedocumentRowMapper, - MarriagePaymentRowMapper marriagePaymentRowMapper + MarriageDocumentRowMapper marriagedocumentRowMapper + // MarriagePaymentRowMapper marriagePaymentRowMapper ) { this.producer = producer; this.jdbcTemplate = jdbcTemplate; this.marriageQueryBuilder = marriageQueryBuilder; this.marriageApplicationRowMapper = marriageApplicationRowMapper; this.marriagedocumentRowMapper = marriagedocumentRowMapper; - this.marriagePaymentRowMapper = marriagePaymentRowMapper; + // this.marriagePaymentRowMapper = marriagePaymentRowMapper; } //Jasmine 07.05.2023 - public List searchMarriagePaymentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { - List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - if (preparedStmtValues.size() == 0) { - throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); - } - else { - List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagePaymentRowMapper); - return result; - } - } + // public List searchMarriagePaymentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { + // List preparedStmtValues = new ArrayList<>(); + // String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + // if (preparedStmtValues.size() == 0) { + // throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); + // } + // else { + // List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagePaymentRowMapper); + // return result; + // } + // } public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriagePaymentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriagePaymentRowMapper.java index 6331176cc76..d513d5a794c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriagePaymentRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriagePaymentRowMapper.java @@ -1,66 +1,66 @@ -package org.ksmart.marriage.marriageapplication.repository.rowmapper; +// package org.ksmart.marriage.marriageapplication.repository.rowmapper; -import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; -import org.springframework.dao.DataAccessException; -import org.springframework.jdbc.core.ResultSetExtractor; -import org.springframework.stereotype.Component; +// import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +// import org.springframework.dao.DataAccessException; +// import org.springframework.jdbc.core.ResultSetExtractor; +// import org.springframework.stereotype.Component; -import javax.swing.text.Document; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.List; -@Component -public class MarriagePaymentRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper,DocumentRowMapper{ +// import javax.swing.text.Document; +// import java.sql.ResultSet; +// import java.sql.SQLException; +// import java.util.ArrayList; +// import java.util.List; +// @Component +// public class MarriagePaymentRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper,DocumentRowMapper{ - @Override - public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null - List result = new ArrayList<>(); - while (rs.next()) { - result.add(MarriageApplicationDetails.builder() - .id(rs.getString("MD_id")) - .dateofreporting(rs.getLong("MD_dateofreporting")) - .dateofmarriage(rs.getLong("MD_dateofmarriage")) - .districtid(rs.getString("MD_districtid")) - .lbtype(rs.getString("MD_lbtype")) - .tenantid(rs.getString("MD_tenantid")) - .placetype(rs.getString("MD_placetype")) - .placeid(rs.getString("MD_placeid")) - .marriageHouseNoAndNameEn(rs.getString("MD_housenameno_en")) - .marriageHouseNoAndNameMl(rs.getString("MD_housenameno_ml")) - .placenameEn(rs.getString("MD_placename_en")) - .placenameMl(rs.getString("MD_placename_ml")) - .streetNameEn(rs.getString("MD_street_name_en")) - .streetNameMl(rs.getString("MD_street_name_ml")) - .wardCode(rs.getString("MD_ward_code")) - .talukid(rs.getString("MD_talukid")) - .villageName(rs.getString("MD_village_name")) - .marriageType(rs.getString("MD_marriage_type")) - .landmark(rs.getString("MD_landmark")) - .localityEn(rs.getString("MD_locality_en")) - .localityMl(rs.getString("MD_locality_ml")) - .applicationNumber(rs.getString("MD_applicationnumber")) - .registrationDate(rs.getLong("MD_registration_date")) - .registrationNo(rs.getString("MD_registrationno")) - .businessservice(rs.getString("MD_businessservice")) - .moduleCode(rs.getString("MD_module_code")) - .zonalOffice(rs.getString("MD_zonal_office")) - .workflowcode(rs.getString("MD_workflowcode")) - .applicationtype(rs.getString("MD_applicationType")) - .action("PAY") - .status(rs.getString("MD_status")) - // .status(rs.getString("MD_registration_status")) - .brideDetails(getBrideDetails(rs)) - .groomDetails(getGroomDetails(rs)) - .witnessDetails(getWitnessDetails(rs)) - .brideAddressDetails(getBrideAddressDetails(rs)) - .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) - //.MarriageDocuments(getMarriageDocument(rs)) - .auditDetails(getAuditDetails(rs)) - .build()); - } +// @Override +// public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null +// List result = new ArrayList<>(); +// while (rs.next()) { +// result.add(MarriageApplicationDetails.builder() +// .id(rs.getString("MD_id")) +// .dateofreporting(rs.getLong("MD_dateofreporting")) +// .dateofmarriage(rs.getLong("MD_dateofmarriage")) +// .districtid(rs.getString("MD_districtid")) +// .lbtype(rs.getString("MD_lbtype")) +// .tenantid(rs.getString("MD_tenantid")) +// .placetype(rs.getString("MD_placetype")) +// .placeid(rs.getString("MD_placeid")) +// .marriageHouseNoAndNameEn(rs.getString("MD_housenameno_en")) +// .marriageHouseNoAndNameMl(rs.getString("MD_housenameno_ml")) +// .placenameEn(rs.getString("MD_placename_en")) +// .placenameMl(rs.getString("MD_placename_ml")) +// .streetNameEn(rs.getString("MD_street_name_en")) +// .streetNameMl(rs.getString("MD_street_name_ml")) +// .wardCode(rs.getString("MD_ward_code")) +// .talukid(rs.getString("MD_talukid")) +// .villageName(rs.getString("MD_village_name")) +// .marriageType(rs.getString("MD_marriage_type")) +// .landmark(rs.getString("MD_landmark")) +// .localityEn(rs.getString("MD_locality_en")) +// .localityMl(rs.getString("MD_locality_ml")) +// .applicationNumber(rs.getString("MD_applicationnumber")) +// .registrationDate(rs.getLong("MD_registration_date")) +// .registrationNo(rs.getString("MD_registrationno")) +// .businessservice(rs.getString("MD_businessservice")) +// .moduleCode(rs.getString("MD_module_code")) +// .zonalOffice(rs.getString("MD_zonal_office")) +// .workflowcode(rs.getString("MD_workflowcode")) +// .applicationtype(rs.getString("MD_applicationType")) +// .action("PAY") +// .status(rs.getString("MD_status")) +// // .status(rs.getString("MD_registration_status")) +// .brideDetails(getBrideDetails(rs)) +// .groomDetails(getGroomDetails(rs)) +// .witnessDetails(getWitnessDetails(rs)) +// .brideAddressDetails(getBrideAddressDetails(rs)) +// .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) +// //.MarriageDocuments(getMarriageDocument(rs)) +// .auditDetails(getAuditDetails(rs)) +// .build()); +// } - return result; - } -} \ No newline at end of file +// return result; +// } +// } \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 8ab59ebb74d..b5ecf4f44c6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -72,11 +72,11 @@ public List saveMarriageDetails(MarriageDetailsReque workflowIntegrator.callWorkFlow(request); } request.getMarriageDetails().forEach(marriage->{ - System.out.println("JSONStatus"+marriage.getStatus()); - System.out.println("ConstStatus"+MarriageConstants.STATUS_FOR_PAYMENT); + // System.out.println("JSONStatus"+marriage.getStatus()); + // System.out.println("ConstStatus"+MarriageConstants.STATUS_FOR_PAYMENT); // if(wfc.getPayment()!= null){ if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ - System.out.println("hienterpayment"); + // System.out.println("hienterpayment"); List demands = new ArrayList<>(); Demand demand = new Demand(); demand.setTenantId(marriage.getTenantid()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index aaf27b2525d..51156884eaa 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -68,7 +68,7 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr ObjectMapper mapper = new ObjectMapper(); Object obj = request; mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); - System.out.println("JasmineRegistryRequest "+ mapper.writeValueAsString(obj)); + //System.out.println("JasmineRegistryRequest "+ mapper.writeValueAsString(obj)); }catch(Exception e) { log.error("Exception while fetching from searcher: ",e); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 31b36f5430a..c7f7204f50a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -105,13 +105,13 @@ public int getDaysDiff(Date dateToCheck) private void validateDoM(Long dateOfMarriage, String wfCode, String applicationType,Object mdmsData, WorkFlowCheck wfc) { Calendar calendar = Calendar.getInstance(); Long currentDate = calendar.getTimeInMillis(); - System.out.println("wfCode"+wfCode); + // System.out.println("wfCode"+wfCode); if (dateOfMarriage > currentDate) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Date of death should be less than or same as current date."); } else { wfc = checkValidation(mdmsData, dateOfMarriage, wfc); - System.out.println("wfc"+wfc.getWorkflowCode()); + //System.out.println("wfc"+wfc.getWorkflowCode()); if(!wfc.getWorkflowCode().equals(wfCode)) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Workflow code from the application request is wrong."); @@ -129,7 +129,7 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF Long currentDate = calendar.getTimeInMillis(); List> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); - System.out.println("mdmswfcode"+wfLists); + // System.out.println("mdmswfcode"+wfLists); for (int n = 0; n < wfLists.size(); n++) { String startStr = wfLists.get(n).get("startdateperiod").toString(); String endStr = wfLists.get(n).get("enddateperiod").toString(); @@ -253,8 +253,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { if (StringUtils.isEmpty( marriagedtls.getPlaceid())) { - System.out.println("marriageward" + marriagedtls - .getPlaceid()); + // System.out.println("marriageward" + marriagedtls.getPlaceid()); throw new CustomException( " PLACE ID IS INVALID ", "The Place Id English " + @@ -395,7 +394,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } - System.out.println("groomname" + groomInfo.getFirstnameEn()); + // System.out.println("groomname" + groomInfo.getFirstnameEn()); if (StringUtils.isEmpty(groomInfo.getFirstnameEn())) { throw new CustomException(" GROOM NAME ENGLISH INVALID ", "The groom name in english " + @@ -433,8 +432,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(groomInfo.getFathernameMl())) { - System.out.println("groomfather" - + groomInfo.getFathernameMl()); + // System.out.println("groomfather" + groomInfo.getFathernameMl()); throw new CustomException( " GROOM FATHER NAME MALAYALAM ", "The groom Father Name in malayalam " diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index 1cb448bafe1..a0b133a6c6c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -89,7 +89,7 @@ public ResponseEntity updateMarriageDetails(@RequestBody MarriageDetailsReque @PostMapping(value = { "/_searchmarriage"}) public ResponseEntity searchMarriageDetails(@RequestBody MarriageDetailsRequest request, @Valid @ModelAttribute MarriageApplicationSearchCriteria criteria) { - System.out.println("SearchCriteria"+criteria); + // System.out.println("SearchCriteria"+criteria); int count=repository.getMarriageCount(criteria); List marriageDetails = MarriageService.searchMarriageDetails(criteria, request.getRequestInfo()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index dacab353978..cadd5a15ff7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -130,7 +130,7 @@ public List createCorrection(MarriageCorrectionReques request.getMarriageCorrectionDetails().forEach(marriage->{ if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ - System.out.println("hienterpayment"); + // System.out.println("hienterpayment"); List demands = new ArrayList<>(); Demand demand = new Demand(); demand.setTenantId(marriage.getTenantid()); From 57c3ecfbe13a0f283fa6420b9bf4b556b08d1610 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 10 May 2023 14:38:28 +0530 Subject: [PATCH 347/420] registry query update --- .../repository/querybuilder/MarriageRegistryQueryBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index b069f6f64a7..d077514ac3c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -87,7 +87,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") - .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode , ") + .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode ") // .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") // .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") From d3ab9c3fedf65e1dca69d33e293797ecb1986e77 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Wed, 10 May 2023 15:11:40 +0530 Subject: [PATCH 348/420] corr outside india adress change --- .../CorrectionApplicationToRegistryMapper.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java index ae2ae9cae37..5ce0af10e09 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java @@ -99,10 +99,10 @@ public MarriageRegistryRequest convert(List registryDet //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk()); //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); //registryDetails.get(0).getBrideAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); @@ -130,10 +130,10 @@ public MarriageRegistryRequest convert(List registryDet //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk()); //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); //registryDetails.get(0).getGroomAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); From a9694508a2dfa9de51e54f226f225e0d37284fbd Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Wed, 10 May 2023 15:39:30 +0530 Subject: [PATCH 349/420] corr addrs change --- .../CorrectionApplicationToRegistryMapper.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java index 5ce0af10e09..664e17fddef 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java @@ -99,10 +99,10 @@ public MarriageRegistryRequest convert(List registryDet //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk()); //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLineoneEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLineoneMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLinetwoEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLinetwoMl()); //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); //registryDetails.get(0).getBrideAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); @@ -130,10 +130,10 @@ public MarriageRegistryRequest convert(List registryDet //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk()); //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); //registryDetails.get(0).getGroomAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); From f280911bb487eef3da4750143c9ef3abade4bd98 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 10 May 2023 18:00:32 +0530 Subject: [PATCH 350/420] registry query update --- .../MarriageRegistryQueryBuilder.java | 24 ++-- .../rowmapper/MarriageRegistryRowMapper.java | 6 +- .../rowmapper/WitnessRegistryRowMapper.java | 108 +++++++++--------- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index d077514ac3c..220ebac09bc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -45,13 +45,13 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BD.mother_aadharno as BD_mother_aadharno , BD.guardianname_en as BD_guardianname_en , BD.guardianname_ml as BD_guardianname_ml ,") .append("BD.guardian_aadharno as BD_guardian_aadharno , BD.maritalstatusid as BD_maritalstatusid,BD.no_of_spouse_living as BD_livingspouseNo,BD.is_spouse_living as BD_is_spouse_living ,BD.bride_groom as BD_bride_groom,") - // .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") - // .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") - // .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") - // .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") - // .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") - // .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") - // .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") + .append("GD.id GD_id , GD.residentship as GD_residentship,GD.aadharno as GD_aadharno,GD.passportno as GD_passportno,GD.socialsecurityno as GD_socialsecurityno ,") + .append("GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en , GD.firstname_ml as GD_firstname_ml ,") + .append("GD.middlename_ml as GD_middlename_ml ,GD.lastname_ml as GD_lastname_ml , GD.mobile as GD_mobile,GD.emailid as GD_emailid , GD.gender as GD_gender,") + .append("GD.dateofbirth as GD_dateofbirth , GD.age as GD_age , GD.parent_guardian as GD_parent_guardian , GD.fathername_en as GD_fathername_en,") + .append("GD.mothername_en as GD_mothername_en, GD.fathername_ml as GD_fathername_ml, GD.mothername_ml as GD_mothername_ml, GD.father_aadharno as GD_father_aadharno ,") + .append("GD.mother_aadharno as GD_mother_aadharno,GD.guardianname_en as GD_guardianname_en, GD.guardianname_ml as GD_guardianname_ml,GD.guardian_aadharno as GD_guardian_aadharno,") + .append("GD.maritalstatusid as GD_maritalstatusid, GD.no_of_spouse_living as GD_livingspouseNo, GD.bride_groom GD_bride_groom ,") .append("GPMA.id as GPMA_id ,GPMA.housename_en as GPMA_housename_en,GPMA.housename_ml as GPMA_housename_ml,GPMA.villageid as GPMA_villageid,GPMA.village_name as GPMA_village_name,") .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") @@ -87,12 +87,12 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") - .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode ") + .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode, ") -// .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") -// .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") -// .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") -// .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") + .append("WD1.id AS WD1_id , WD1.aadharno as WD1_aadharno , WD1.name_en as WD1_name_en , WD1.name_ml as WD1_name_ml , WD1.age as WD1_age , WD1.address_en as WD1_address_en ,") + .append("WD1.address_ml as WD1_address_ml , WD1.mobile as WD1_mobile , WD1.is_esigned as WD1_is_esigned , WD1.marriageid as WD1_marriageid , WD1.serial_no as WD1_serial_no, ") + .append("WD2.id as WD2_id ,WD2.aadharno as WD2_aadharno , WD2.name_en as WD2_name_en , WD2.name_ml as WD2_name_ml , WD2.age as WD2_age ,WD2.address_en as WD2_address_en ,") + .append("WD2.address_ml as WD2_address_ml , WD2.mobile as WD2_mobile , WD2.is_esigned as WD2_is_esigned , WD2.marriageid as WD2_marriageid , WD2.serial_no as WD2_serial_no ") // .append("FROM public.eg_register_marriage_details as MD ") .append("INNER JOIN eg_register_marriage_bride_groom_details as BD ON BD.marriageid = MD.id AND ") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index a43879e8c33..4bde70c09b4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -13,8 +13,8 @@ @Component public class MarriageRegistryRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideRegistryRowMapper, - GroomRegistryRowMapper,GroomRegistryAddressRowMapper,BrideRegistryAddressRowMapper -// WitnessRegistryRowMapper + GroomRegistryRowMapper,GroomRegistryAddressRowMapper,BrideRegistryAddressRowMapper, + WitnessRegistryRowMapper { @Override @@ -59,7 +59,7 @@ public List extractData(ResultSet rs) throws SQLExcepti .brideAddressDetails(getBrideAddressDetails(rs)) .groomDetails(getGroomDetails(rs)) .groomAddressDetails(getGroomAddressDetails(rs)) -// .witnessDetails(getWitnessDetails(rs)) + .witnessDetails(getWitnessDetails(rs)) .auditDetails(getAuditDetails(rs)) .build()); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index 4f6c72b7b09..55137d65027 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -1,54 +1,54 @@ -//package org.ksmart.marriage.marriageregistry.repository.rowmapper; -// -//import org.ksmart.marriage.marriageregistry.web.model.WitnessRegistryDetails; -//import java.sql.ResultSet; -//import java.sql.SQLException; -//import org.springframework.stereotype.Component; -// -// -//@Component -//public interface WitnessRegistryRowMapper { -// default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { -// -// return WitnessRegistryDetails.builder() -// .marriageid(rs.getString("MD_id")) -// .witnessId1(rs.getString("WD1_id")) -// .witness1AadharNo(rs.getString("WD1_aadharno")) -// .witness1NameEn(rs.getString("WD1_name_en")) -// .witness1NameMl(rs.getString("WD1_name_ml")) -// .witness1Age(rs.getInt("WD1_age")) -// .witness1AddresSEn(rs.getString("WD1_address_en")) -// .witness1AddressMl(rs.getString("WD1_address_ml")) -// .witness1Mobile(rs.getLong("WD1_mobile")) -// .witness1Esigned(rs.getBoolean("WD1_is_esigned")) -// //.witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) -// .serial_no1(rs.getInt("WD1_serial_no")) -// .witnessId2(rs.getString("WD2_id")) -// .witness2AadharNo(rs.getString("WD2_aadharno")) -// .witness2NameEn(rs.getString("WD2_name_en")) -// .witness2NameMl(rs.getString("WD2_name_ml")) -// .witness2Age(rs.getInt("WD2_age")) -// .witness2AddresSEn(rs.getString("WD2_address_en")) -// .witness2AddressMl(rs.getString("WD2_address_ml")) -// .witness2Mobile(rs.getLong("WD2_mobile")) -// .serial_no2(rs.getInt("WD1_serial_no")) -// .witness2Esigned(rs.getBoolean("WD2_is_esigned")) -// .brideUrl(rs.getString("MD_brideurl")) -// .groomUrl(rs.getString("MD_groomurl")) -// .imageUuid(rs.getString("MD_imageuuid")) -// .brideFilestoreId(rs.getString("MD_bride_filestoreid")) -// .groomFilestoreId(rs.getString("MD_groom_filestoreid")) -// // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) -// .tenentId(rs.getString("MD_tenantid")) -// .brideExpired(rs.getBoolean("MD_bride_expired")) -// .brideUrl(rs.getString("MD_brideurl")) -// .brideFilestoreId(rs.getString("MD_bride_filestoreid")) -// .groomExpired(rs.getBoolean("MD_groom_expired")) -// .groomUrl(rs.getString("MD_groomurl")) -// .groomFilestoreId(rs.getString("MD_groom_filestoreid")) -// .imageUuid(rs.getString("MD_imageuuid")) -// .isBackward(rs.getBoolean("MD_is_backward")) -// .build(); -// } -// -//} \ No newline at end of file +package org.ksmart.marriage.marriageregistry.repository.rowmapper; + +import org.ksmart.marriage.marriageregistry.web.model.WitnessRegistryDetails; +import java.sql.ResultSet; +import java.sql.SQLException; +import org.springframework.stereotype.Component; + + +@Component +public interface WitnessRegistryRowMapper { + default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { + + return WitnessRegistryDetails.builder() + .marriageid(rs.getString("MD_id")) + .witnessId1(rs.getString("WD1_id")) + .witness1AadharNo(rs.getString("WD1_aadharno")) + .witness1NameEn(rs.getString("WD1_name_en")) + .witness1NameMl(rs.getString("WD1_name_ml")) + .witness1Age(rs.getInt("WD1_age")) + .witness1AddresSEn(rs.getString("WD1_address_en")) + .witness1AddressMl(rs.getString("WD1_address_ml")) + .witness1Mobile(rs.getLong("WD1_mobile")) + .witness1Esigned(rs.getBoolean("WD1_is_esigned")) + //.witness1Esigned(Boolean.valueOf(rs.getString("WD1_is_esigned"))) + .serial_no1(rs.getInt("WD1_serial_no")) + .witnessId2(rs.getString("WD2_id")) + .witness2AadharNo(rs.getString("WD2_aadharno")) + .witness2NameEn(rs.getString("WD2_name_en")) + .witness2NameMl(rs.getString("WD2_name_ml")) + .witness2Age(rs.getInt("WD2_age")) + .witness2AddresSEn(rs.getString("WD2_address_en")) + .witness2AddressMl(rs.getString("WD2_address_ml")) + .witness2Mobile(rs.getLong("WD2_mobile")) + .serial_no2(rs.getInt("WD1_serial_no")) + .witness2Esigned(rs.getBoolean("WD2_is_esigned")) + .brideUrl(rs.getString("MD_brideurl")) + .groomUrl(rs.getString("MD_groomurl")) + .imageUuid(rs.getString("MD_imageuuid")) + .brideFilestoreId(rs.getString("MD_bride_filestoreid")) + .groomFilestoreId(rs.getString("MD_groom_filestoreid")) + // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) + .tenentId(rs.getString("MD_tenantid")) + .brideExpired(rs.getBoolean("MD_bride_expired")) + .brideUrl(rs.getString("MD_brideurl")) + .brideFilestoreId(rs.getString("MD_bride_filestoreid")) + .groomExpired(rs.getBoolean("MD_groom_expired")) + .groomUrl(rs.getString("MD_groomurl")) + .groomFilestoreId(rs.getString("MD_groom_filestoreid")) + .imageUuid(rs.getString("MD_imageuuid")) + .isBackward(rs.getBoolean("MD_is_backward")) + .build(); + } + +} \ No newline at end of file From abfd726a4f07b38175fdc41e008c24a3864255e8 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 10 May 2023 18:30:41 +0530 Subject: [PATCH 351/420] migration script update --- ...30323144512__marriage_services_new_dll.sql | 951 ------------------ ...30324134618__marriage_services_new_dll.sql | 162 --- ...30325112220__marriage_services_new_dll.sql | 36 - ...30329160721__marriage_services_new_dll.sql | 35 - ...30330143022__marriage_services_new_dll.sql | 24 - ..._marriageAddNewFields_services_new_dll.sql | 57 -- ...rriageFieldSizeChange_services_new_dll.sql | 15 - ...03144525__newFieldAdd_services_new_dll.sql | 23 - ...81200__marriage_registry_new_field_dll.sql | 2 - ...406224500__document_table_updation_dll.sql | 12 - ...30409161000__correction_tables_new_dll.sql | 104 -- ...14121800__registry_certno_deletion_dll.sql | 1 - ...0419145000__marriage_amount_insert_dll.sql | 5 - ...20105826__newFieldAdd_services_new_dll.sql | 23 - ...20111227__newFieldAdd_services_new_dll.sql | 28 - ...20111628__newFieldAdd_services_new_dll.sql | 13 - ...22__operationAndStamp_deletion_new_dll.sql | 39 - ...20113301__Foreignkey_deletions_new_dll.sql | 3 - .../V20230420113405__addNewfeild_new_dll.sql | 19 - .../V20230420141409__addNewfeild_new_dll.sql | 11 - ...2800__addNewfieldInCertificate_new_dll.sql | 2 - ...700__addNewfieldInCertificateTable_dll.sql | 3 - ...addNewfieldInCertificateAuditTable_dll.sql | 3 - ...21155505__removefieldInCertificate_dll.sql | 2 - ...926__Marriage_Add_Address_Newfeild_dll.sql | 23 - ...0__marriage_services_create_tables_dll.sql | 0 26 files changed, 1596 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230324134618__marriage_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230330143022__marriage_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230404181200__marriage_registry_new_field_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230406224500__document_table_updation_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230409161000__correction_tables_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230414121800__registry_certno_deletion_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230419145000__marriage_amount_insert_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420105826__newFieldAdd_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111227__newFieldAdd_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111628__newFieldAdd_services_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111822__operationAndStamp_deletion_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113301__Foreignkey_deletions_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113405__addNewfeild_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420141409__addNewfeild_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420152800__addNewfieldInCertificate_new_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421120700__addNewfieldInCertificateTable_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421155505__removefieldInCertificate_dll.sql delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230508125926__Marriage_Add_Address_Newfeild_dll.sql create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V202305101820__marriage_services_create_tables_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql deleted file mode 100644 index 6cdfe8a0148..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230323144512__marriage_services_new_dll.sql +++ /dev/null @@ -1,951 +0,0 @@ --- Table: public.eg_marriage_details - --- DROP TABLE IF EXISTS public.eg_marriage_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeid character varying(1000) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - placename_ml character varying(1000) COLLATE pg_catalog."default", - houseno_and_name_en character varying(2500) COLLATE pg_catalog."default", - houseno_and_name_ml character varying(2500) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - applicationnumber character varying(64) COLLATE pg_catalog."default", - filenumber character varying(64) COLLATE pg_catalog."default", - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), - CONSTRAINT eg_marriage_place_details_filenumber_fkey UNIQUE (filenumber), - CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, applicationnumber) - ); --- Index: idx_eg_marriage_details_tenantid - --- DROP INDEX IF EXISTS public.idx_eg_marriage_details_tenantid; - -CREATE INDEX IF NOT EXISTS idx_eg_marriage_details_tenantid - ON public.eg_marriage_details USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) - TABLESPACE pg_default; - --- Table: public.eg_marriage_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeid character varying(1000) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - placename_ml character varying(1000) COLLATE pg_catalog."default", - houseno_and_name_en character varying(2500) COLLATE pg_catalog."default", - houseno_and_name_ml character varying(2500) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, - businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, - workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, - applicationnumber character varying(64) COLLATE pg_catalog."default", - filenumber character varying(64) COLLATE pg_catalog."default", - file_date bigint, - file_status character varying(64) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - action character varying(64) COLLATE pg_catalog."default", - status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default"); - --- Table: public.eg_marriage_bride_groom_details - --- DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - aadharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_ml character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_ml character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_ml character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_ml character varying(200) COLLATE pg_catalog."default", - father_aadharno character varying(15) COLLATE pg_catalog."default", - mother_aadharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_ml character varying(200) COLLATE pg_catalog."default", - guardian_aadharno character varying(15) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living integer, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - --- Table: public.eg_marriage_bride_groom_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_bride_groom_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - aadharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - firstname_ml character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - middlename_ml character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - lastname_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - fathername_ml character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - mothername_ml character varying(200) COLLATE pg_catalog."default", - father_aadharno character varying(15) COLLATE pg_catalog."default", - mother_aadharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_ml character varying(200) COLLATE pg_catalog."default", - guardian_aadharno character varying(15) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living integer, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" - ); - --- Table: public.eg_marriage_permanent_address_details - --- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - tenantid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - --- Table: public.eg_marriage_permanent_address_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_permanent_address_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - tenantid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default" - ); - --- Table: public.eg_marriage_present_address_details - --- DROP TABLE IF EXISTS public.eg_marriage_present_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - same_as_permanent boolean, - tenantid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - --- Table: public.eg_marriage_present_address_details_audit - --- DROP TABLE IF EXISTS public.eg_marriage_present_address_details_audit; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_no_en character varying(2500) COLLATE pg_catalog."default", - housename_no_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - same_as_permanent boolean, - tenantid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default" - ); - --- Table: public.eg_marriage_witness_details - --- DROP TABLE IF EXISTS public.eg_marriage_witness_details; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - aadharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_ml character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_ml character varying(200) COLLATE pg_catalog."default", - mobile bigint, - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no integer, - CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - -CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - aadharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_ml character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_ml character varying(200) COLLATE pg_catalog."default", - mobile bigint, - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no integer - ); --- Table: public.eg_register_marriage_document - --- DROP TABLE IF EXISTS public.eg_register_marriage_document; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_document -( - id character varying(128) COLLATE pg_catalog."default", - tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_description character varying(140) COLLATE pg_catalog."default", - filestoreid character varying(1024) COLLATE pg_catalog."default", - document_link character varying(1024) COLLATE pg_catalog."default", - file_type character varying(20) COLLATE pg_catalog."default", - file_size bigint, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - active boolean NOT NULL, - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - CONSTRAINT eg_marriage_document_document_fkey PRIMARY KEY (tenantid, document_type, document_name, marriageid, bride_groom, active), - CONSTRAINT eg_marriage_document_pkey UNIQUE (id) - ); - -CREATE TABLE IF NOT EXISTS public.eg_marriage_document_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(128) COLLATE pg_catalog."default", - tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_description character varying(140) COLLATE pg_catalog."default", - filestoreid character varying(1024) COLLATE pg_catalog."default", - document_link character varying(1024) COLLATE pg_catalog."default", - file_type character varying(20) COLLATE pg_catalog."default", - file_size bigint, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - active boolean NOT NULL, - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint); - --- Table: public.eg_register_marriage_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeid character varying(64) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - placename_ml character varying(1000) COLLATE pg_catalog."default", - housenameno_en character varying(1000) COLLATE pg_catalog."default", - housenameno_ml character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - registration_status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - applicationnumber character varying(64) COLLATE pg_catalog."default", - is_migrated boolean, - migrated_date bigint, - CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber, tenantid) - ); - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - dateofmarriage bigint, - dateofreporting bigint, - districtid character varying(64) COLLATE pg_catalog."default", - lbtype character varying(64) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - placetype character varying(64) COLLATE pg_catalog."default", - placeid character varying(64) COLLATE pg_catalog."default", - placename_en character varying(1000) COLLATE pg_catalog."default", - placename_ml character varying(1000) COLLATE pg_catalog."default", - housenameno_en character varying(1000) COLLATE pg_catalog."default", - housenameno_ml character varying(1000) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(1000) COLLATE pg_catalog."default", - street_name_ml character varying(1000) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - village_name character varying(64) COLLATE pg_catalog."default", - marriage_type character varying(64) COLLATE pg_catalog."default", - oth_marriage_type character varying(200) COLLATE pg_catalog."default", - landmark character varying(1000) COLLATE pg_catalog."default", - registrationno character varying(64) COLLATE pg_catalog."default", - registration_date bigint, - registration_status character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - applicationnumber character varying(64) COLLATE pg_catalog."default", - is_migrated boolean, - migrated_date bigint); --- Index: idx_eg_register_marriage_details_tenantid - --- DROP INDEX IF EXISTS public.idx_eg_register_marriage_details_tenantid; - -CREATE INDEX IF NOT EXISTS idx_eg_register_marriage_details_tenantid - ON public.eg_register_marriage_details USING btree - (tenantid COLLATE pg_catalog."default" ASC NULLS LAST) - TABLESPACE pg_default; - --- Table: public.eg_register_marriage_bride_groom_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_bride_groom_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - aadharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - firstname_ml character varying(200) COLLATE pg_catalog."default", - middlename_ml character varying(200) COLLATE pg_catalog."default", - lastname_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - fathername_ml character varying(200) COLLATE pg_catalog."default", - mothername_ml character varying(200) COLLATE pg_catalog."default", - father_aadharno character varying(15) COLLATE pg_catalog."default", - mother_aadharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_ml character varying(200) COLLATE pg_catalog."default", - guardian_aadharno character varying(15) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living integer, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_bride_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_bride_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - residentship character varying(64) COLLATE pg_catalog."default", - aadharno character varying(15) COLLATE pg_catalog."default", - passportno character varying(1000) COLLATE pg_catalog."default", - socialsecurityno character varying(64) COLLATE pg_catalog."default", - firstname_en character varying(200) COLLATE pg_catalog."default", - middlename_en character varying(200) COLLATE pg_catalog."default", - lastname_en character varying(200) COLLATE pg_catalog."default", - firstname_ml character varying(200) COLLATE pg_catalog."default", - middlename_ml character varying(200) COLLATE pg_catalog."default", - lastname_ml character varying(200) COLLATE pg_catalog."default", - mobile character varying(150) COLLATE pg_catalog."default", - emailid character varying(300) COLLATE pg_catalog."default", - gender character varying(20) COLLATE pg_catalog."default", - dateofbirth bigint, - age integer, - parent_guardian character varying(64) COLLATE pg_catalog."default", - fathername_en character varying(200) COLLATE pg_catalog."default", - mothername_en character varying(200) COLLATE pg_catalog."default", - fathername_ml character varying(200) COLLATE pg_catalog."default", - mothername_ml character varying(200) COLLATE pg_catalog."default", - father_aadharno character varying(15) COLLATE pg_catalog."default", - mother_aadharno character varying(15) COLLATE pg_catalog."default", - guardianname_en character varying(200) COLLATE pg_catalog."default", - guardianname_ml character varying(200) COLLATE pg_catalog."default", - guardian_aadharno character varying(15) COLLATE pg_catalog."default", - maritalstatusid character varying(64) COLLATE pg_catalog."default", - is_spouse_living boolean, - no_of_spouse_living integer, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" - ); - - --- Table: public.eg_register_marriage_permanent_address_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_permanent_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" - ); - - --- Table: public.eg_register_marriage_present_address_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_present_address_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - same_as_permanent boolean, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - same_as_permanent boolean, - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default" - ); - --- Table: public.eg_register_marriage_witness_details - --- DROP TABLE IF EXISTS public.eg_register_marriage_witness_details; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - aadharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_ml character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_ml character varying(200) COLLATE pg_catalog."default", - mobile bigint, - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no integer, - CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), - CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE NO ACTION - ON DELETE NO ACTION - ); - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - aadharno character varying(15) COLLATE pg_catalog."default", - name_en character varying(200) COLLATE pg_catalog."default", - name_ml character varying(200) COLLATE pg_catalog."default", - age integer, - address_en character varying(200) COLLATE pg_catalog."default", - address_ml character varying(200) COLLATE pg_catalog."default", - mobile bigint, - is_esigned boolean, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - serial_no integer - ); - - --- Table: public.eg_register_marriage_document - --- DROP TABLE IF EXISTS public.eg_register_marriage_document; - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document -( - id character varying(128) COLLATE pg_catalog."default", - tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_description character varying(140) COLLATE pg_catalog."default", - filestoreid character varying(1024) COLLATE pg_catalog."default", - document_link character varying(1024) COLLATE pg_catalog."default", - file_type character varying(20) COLLATE pg_catalog."default", - file_size bigint, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - active boolean NOT NULL, - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid, document_type, document_name, marriageid, bride_groom, active), - CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id) - ); - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(128) COLLATE pg_catalog."default", - tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, - document_description character varying(140) COLLATE pg_catalog."default", - filestoreid character varying(1024) COLLATE pg_catalog."default", - document_link character varying(1024) COLLATE pg_catalog."default", - file_type character varying(20) COLLATE pg_catalog."default", - file_size bigint, - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - active boolean NOT NULL, - createdby character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint - ); - --- Table: public.eg_marriage_certificate - --- DROP TABLE IF EXISTS public.eg_marriage_certificate; - -CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - registrationno character varying(25) COLLATE pg_catalog."default", - registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, - filestoreid character varying(256) COLLATE pg_catalog."default", - status character varying(25) COLLATE pg_catalog."default", - additionaldetail jsonb, - embeddedurl character varying(64) COLLATE pg_catalog."default", - dateofissue bigint, - tenantid character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - CONSTRAINT eg_marriage_certificate_request_pkey PRIMARY KEY (id), - CONSTRAINT eg_marriage_certificate_request_fkey FOREIGN KEY (registrydetailsid) - REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE - ON UPDATE CASCADE - ON DELETE CASCADE - ); - -CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate_audit -( - operation character(1) COLLATE pg_catalog."default" NOT NULL, - stamp timestamp without time zone NOT NULL, - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - registrationno character varying(25) COLLATE pg_catalog."default", - registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, - filestoreid character varying(256) COLLATE pg_catalog."default", - status character varying(25) COLLATE pg_catalog."default", - additionaldetail jsonb, - embeddedurl character varying(64) COLLATE pg_catalog."default", - dateofissue bigint, - tenantid character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - lastmodifiedtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedby character varying(64) COLLATE pg_catalog."default" - ); - - -CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details -( - id character varying(64) COLLATE pg_catalog."default" NOT NULL, - housename_en character varying(2500) COLLATE pg_catalog."default", - housename_ml character varying(2500) COLLATE pg_catalog."default", - villageid character varying(64) COLLATE pg_catalog."default", - village_name character varying(1000) COLLATE pg_catalog."default", - talukid character varying(64) COLLATE pg_catalog."default", - taluk_name character varying(1000) COLLATE pg_catalog."default", - tenantid character varying(64) COLLATE pg_catalog."default", - ward_code character varying(64) COLLATE pg_catalog."default", - locality_en character varying(1000) COLLATE pg_catalog."default", - locality_ml character varying(1000) COLLATE pg_catalog."default", - street_name_en character varying(2000) COLLATE pg_catalog."default", - street_name_ml character varying(2000) COLLATE pg_catalog."default", - districtid character varying(64) COLLATE pg_catalog."default", - stateid character varying(64) COLLATE pg_catalog."default", - poid character varying(64) COLLATE pg_catalog."default", - poname_en character varying(64) COLLATE pg_catalog."default", - poname_ml character varying(64) COLLATE pg_catalog."default", - pinno character varying(10) COLLATE pg_catalog."default", - countryid character varying(64) COLLATE pg_catalog."default", - marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, - bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, - mig_chvackno character varying(64) COLLATE pg_catalog."default", - createdtime bigint, - createdby character varying(64) COLLATE pg_catalog."default", - lastmodifiedtime bigint, - lastmodifiedby character varying(64) COLLATE pg_catalog."default", - ot_address1_en character varying(2500) COLLATE pg_catalog."default", - ot_address1_ml character varying(2500) COLLATE pg_catalog."default", - ot_address2_en character varying(2500) COLLATE pg_catalog."default", - ot_address2_ml character varying(2500) COLLATE pg_catalog."default", - ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", - ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", - ot_zipcode character varying(10) COLLATE pg_catalog."default", - CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id) -); diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230324134618__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230324134618__marriage_services_new_dll.sql deleted file mode 100644 index 9fb9118279a..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230324134618__marriage_services_new_dll.sql +++ /dev/null @@ -1,162 +0,0 @@ -ALTER TABLE public.eg_marriage_permanent_address_details -ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_marriage_permanent_address_details_audit -ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_present_address_details -ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_marriage_present_address_details_audit -ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_register_marriage_permanent_address_details -ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_register_marriage_permanent_address_details_audit -ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_register_marriage_present_address_details -ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_register_marriage_present_address_details_audit -ADD COLUMN ot_address1_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address1_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_address2_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", -ADD COLUMN ot_zipcode character varying(10) COLLATE pg_catalog."default"; - - - -ALTER TABLE public.eg_marriage_details -ADD COLUMN DOMCorreflag boolean, -ADD COLUMN placeIdCorrflag boolean, -ADD COLUMN groomNameCorreflag boolean, -ADD COLUMN brideNameCorreflag boolean, -ADD COLUMN grromAgeCorreflag boolean, -ADD COLUMN brideAgeCorreflag boolean, -ADD COLUMN groomDOBCorreflag boolean, -ADD COLUMN brideDOBCorreflag boolean, -ADD COLUMN groomPermanentAddrCorreflag boolean, -ADD COLUMN bridePermanentAddrCorreflag boolean, -ADD COLUMN groomMotherCorreflag boolean, -ADD COLUMN brideMotherCorreflag boolean, -ADD COLUMN groomFatherCorreflag boolean, -ADD COLUMN brideFatherCorreflag boolean, -ADD COLUMN groomGuardianCorreflag boolean, -ADD COLUMN brideGurdianCorreflag boolean; - - -ALTER TABLE public.eg_marriage_details_audit -ADD COLUMN DOMCorreflag boolean, -ADD COLUMN placeIdCorrflag boolean, -ADD COLUMN groomNameCorreflag boolean, -ADD COLUMN brideNameCorreflag boolean, -ADD COLUMN grromAgeCorreflag boolean, -ADD COLUMN brideAgeCorreflag boolean, -ADD COLUMN groomDOBCorreflag boolean, -ADD COLUMN brideDOBCorreflag boolean, -ADD COLUMN groomPermanentAddrCorreflag boolean, -ADD COLUMN bridePermanentAddrCorreflag boolean, -ADD COLUMN groomMotherCorreflag boolean, -ADD COLUMN brideMotherCorreflag boolean, -ADD COLUMN groomFatherCorreflag boolean, -ADD COLUMN brideFatherCorreflag boolean, -ADD COLUMN groomGuardianCorreflag boolean, -ADD COLUMN brideGurdianCorreflag boolean; - - - -ALTER TABLE public.eg_marriage_details -DROP COLUMN filenumber, -DROP COLUMN file_date, -DROP COLUMN file_status; - ---ALTER TABLE public.eg_register_marriage_details ---ADD COLUMN DOMCorreflag boolean, ---ADD COLUMN placeIdCorrflag boolean, ---ADD COLUMN groomNameCorreflag boolean, ---ADD COLUMN brideNameCorreflag boolean, ---ADD COLUMN grromAgeCorreflag boolean, ---ADD COLUMN brideAgeCorreflag boolean, ---ADD COLUMN groomDOBCorreflag boolean, ---ADD COLUMN brideDOBCorreflag boolean, ---ADD COLUMN groomPermanentAddrCorreflag boolean, ---ADD COLUMN bridePermanentAddrCorreflag boolean, ---ADD COLUMN groomMotherCorreflag boolean, ---ADD COLUMN brideMotherCorreflag boolean, ---ADD COLUMN groomFatherCorreflag boolean, ---ADD COLUMN brideFatherCorreflag boolean, ---ADD COLUMN groomGuardianCorreflag boolean, ---ADD COLUMN brideGurdianCorreflag boolean; --- ---ALTER TABLE public.eg_register_marriage_details_audit ---ADD COLUMN DOMCorreflag boolean, ---ADD COLUMN placeIdCorrflag boolean, ---ADD COLUMN groomNameCorreflag boolean, ---ADD COLUMN brideNameCorreflag boolean, ---ADD COLUMN grromAgeCorreflag boolean, ---ADD COLUMN brideAgeCorreflag boolean, ---ADD COLUMN groomDOBCorreflag boolean, ---ADD COLUMN brideDOBCorreflag boolean, ---ADD COLUMN groomPermanentAddrCorreflag boolean, ---ADD COLUMN bridePermanentAddrCorreflag boolean, ---ADD COLUMN groomMotherCorreflag boolean, ---ADD COLUMN brideMotherCorreflag boolean, ---ADD COLUMN groomFatherCorreflag boolean, ---ADD COLUMN brideFatherCorreflag boolean, ---ADD COLUMN groomGuardianCorreflag boolean, ---ADD COLUMN brideGurdianCorreflag boolean; --- --- --- diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql deleted file mode 100644 index aac214e7ba7..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230325112220__marriage_services_new_dll.sql +++ /dev/null @@ -1,36 +0,0 @@ -ALTER TABLE public.eg_marriage_bride_groom_details --- DROP COLUMN no_of_spouse_living, - ADD COLUMN IF NOT EXISTS no_of_spouse_living bigint; - -ALTER TABLE public.eg_register_marriage_details - ADD COLUMN IF NOT EXISTS migrated_marriage_type character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details_audit - ADD COLUMN IF NOT EXISTS migrated_marriage_type character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_permanent_address_details - ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_permanent_address_details_audit - ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_present_address_details - ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_present_address_details_audit - ADD COLUMN IF NOT EXISTS poname_ml character varying(64) COLLATE pg_catalog."default"; --- ---ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN firstname_mal TO firstname_ml; ---ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN middlename_mal TO middlename_ml; ---ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN mothername_mal TO mothername_ml; ---ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN guardianname_mal TO guardianname_ml; ---ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN lastname_mal TO lastname_ml; ---ALTER TABLE eg_marriage_bride_groom_details RENAME COLUMN fathername_mal TO fathername_ml; --- --- ---ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN firstname_mal TO firstname_ml; ---ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN middlename_mal TO middlename_ml; ---ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN mothername_mal TO mothername_ml; ---ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN guardianname_mal TO guardianname_ml; ---ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN lastname_mal TO lastname_ml; ---ALTER TABLE eg_marriage_bride_groom_details_audit RENAME COLUMN fathername_mal TO fathername_ml; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql deleted file mode 100644 index e2ce8c23121..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230329160721__marriage_services_new_dll.sql +++ /dev/null @@ -1,35 +0,0 @@ -ALTER TABLE public.eg_marriage_bride_groom_details - ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", - ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_witness_details - ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", - ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_bride_groom_details_audit - ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", - ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_witness_details_audit - ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", - ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_document - ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_document_audit - ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_details - ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_details_audit - ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_details - RENAME COLUMN bridegurdiancorreflag TO brideguardiancorreflag; - -ALTER TABLE public.eg_marriage_details_audit - RENAME COLUMN bridegurdiancorreflag TO brideguardiancorreflag; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230330143022__marriage_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230330143022__marriage_services_new_dll.sql deleted file mode 100644 index e2af5f0300e..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230330143022__marriage_services_new_dll.sql +++ /dev/null @@ -1,24 +0,0 @@ -ALTER TABLE public.eg_marriage_details_audit - DROP COLUMN operation, - DROP COLUMN stamp; - -ALTER TABLE public.eg_marriage_details_audit -DROP COLUMN filenumber, -DROP COLUMN file_date, -DROP COLUMN file_status; - -ALTER TABLE public.eg_marriage_bride_groom_details_audit - DROP COLUMN operation, - DROP COLUMN stamp; - -ALTER TABLE public.eg_marriage_permanent_address_details_audit - DROP COLUMN operation, - DROP COLUMN stamp; - -ALTER TABLE public.eg_marriage_present_address_details_audit - DROP COLUMN operation, - DROP COLUMN stamp; - -ALTER TABLE public.eg_marriage_witness_details_audit - DROP COLUMN operation, - DROP COLUMN stamp; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql deleted file mode 100644 index 436e8cf4b09..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230331100423__marriageAddNewFields_services_new_dll.sql +++ /dev/null @@ -1,57 +0,0 @@ -ALTER TABLE public.eg_register_marriage_bride_groom_details - ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", - ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_witness_details - ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", - ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_bride_groom_details_audit - ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", - ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_witness_details_audit - ADD COLUMN IF NOT EXISTS tenantid character varying(64) COLLATE pg_catalog."default", - ALTER COLUMN aadharno TYPE character varying(200) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_document - ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_document_audit - ADD COLUMN IF NOT EXISTS applicationNumber character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details - ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details_audit - ADD COLUMN IF NOT EXISTS villageid character varying(64) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS taluk_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_details_audit - RENAME COLUMN grromAgeCorreflag TO groomAgeCorreflag; -ALTER TABLE public.eg_marriage_details - RENAME COLUMN grromAgeCorreflag TO groomAgeCorreflag; - - -ALTER TABLE public.eg_marriage_details - ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_marriage_details_audit - ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details - ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; - - -ALTER TABLE public.eg_register_marriage_details_audit - ADD COLUMN IF NOT EXISTS brideUrl character varying(200) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS groomUrl character varying(200) COLLATE pg_catalog."default", - ADD COLUMN IF NOT EXISTS imageUuid character varying(64) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql deleted file mode 100644 index 5fc52926416..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230401110024__marriageFieldSizeChange_services_new_dll.sql +++ /dev/null @@ -1,15 +0,0 @@ -ALTER TABLE eg_marriage_bride_groom_details -ALTER COLUMN mobile TYPE bigint -USING mobile::bigint; - -ALTER TABLE eg_marriage_bride_groom_details_audit -ALTER COLUMN mobile TYPE bigint -USING mobile::bigint; - -ALTER TABLE eg_register_marriage_bride_groom_details -ALTER COLUMN mobile TYPE bigint -USING mobile::bigint; - -ALTER TABLE eg_register_marriage_bride_groom_details_audit -ALTER COLUMN mobile TYPE bigint -USING mobile::bigint; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql deleted file mode 100644 index 090da6c2f90..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230403144525__newFieldAdd_services_new_dll.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE public.eg_marriage_permanent_address_details -ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_permanent_address_details_audit -ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_present_address_details -ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_present_address_details_audit -ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_permanent_address_details -ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_permanent_address_details_audit -ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_present_address_details -ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_present_address_details_audit -ADD COLUMN city_town_village character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230404181200__marriage_registry_new_field_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230404181200__marriage_registry_new_field_dll.sql deleted file mode 100644 index 01ded08275e..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230404181200__marriage_registry_new_field_dll.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE public.eg_register_marriage_details ADD certificateno varchar(64) NULL; -ALTER TABLE public.eg_register_marriage_details_audit ADD certificateno varchar(64) NULL; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230406224500__document_table_updation_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230406224500__document_table_updation_dll.sql deleted file mode 100644 index 7fc8a93fc64..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230406224500__document_table_updation_dll.sql +++ /dev/null @@ -1,12 +0,0 @@ - ALTER TABLE public.eg_marriage_document - ADD COLUMN IF NOT EXISTS updated_flag Integer; - - ALTER TABLE public.eg_marriage_document_audit - ADD COLUMN IF NOT EXISTS updated_flag Integer; - - ALTER TABLE public.eg_marriage_document - ADD COLUMN IF NOT EXISTS registrationno character varying(64); - - ALTER TABLE public.eg_marriage_document_audit - ADD COLUMN IF NOT EXISTS registrationno character varying(64); - diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230409161000__correction_tables_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230409161000__correction_tables_new_dll.sql deleted file mode 100644 index 53b9b7cb9c0..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230409161000__correction_tables_new_dll.sql +++ /dev/null @@ -1,104 +0,0 @@ - - -ALTER TABLE IF EXISTS public.eg_marriage_document - ADD COLUMN IF NOT EXISTS correction_id character varying(64); - -ALTER TABLE IF EXISTS public.eg_marriage_document - ADD COLUMN IF NOT EXISTS correction_field_name character varying(1024); - - -ALTER TABLE IF EXISTS public.eg_marriage_document_audit - ADD COLUMN IF NOT EXISTS correction_id character varying(64); - -ALTER TABLE IF EXISTS public.eg_marriage_document_audit - ADD COLUMN IF NOT EXISTS correction_field_name character varying(1024); - -ALTER TABLE IF EXISTS public.eg_marriage_document - ADD COLUMN IF NOT EXISTS applicationtype character varying(64); - -ALTER TABLE IF EXISTS public.eg_marriage_document_audit - ADD COLUMN IF NOT EXISTS applicationtype character varying(64); - - -CREATE TABLE IF NOT EXISTS public.eg_marriage_correction - ( - id character varying(64) NOT NULL, - marriageid character varying(64) NOT NULL, - correction_field_name character varying(1024) NOT NULL, - condition_code character varying(1024), - specific_condition character varying(1024), - createdby character varying(64), - createdtime bigint, - lastmodifiedby character varying(64), - lastmodifiedtime bigint, - CONSTRAINT eg_marriage_correction_pkey PRIMARY KEY (id) - ); - - -- ALTER TABLE IF EXISTS public.eg_marriage_correction - -- OWNER to postgres; - - - -CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_audit -( - id character varying(64) NOT NULL, - marriageid character varying(64) NOT NULL, - correction_field_name character varying(1024) NOT NULL, - condition_code character varying(1024), - specific_condition character varying(1024), - createdby character varying(64), - createdtime bigint, - lastmodifiedby character varying(64), - lastmodifiedtime bigint, - CONSTRAINT eg_marriage_correction_audit_pkey PRIMARY KEY (id) -); - - -- ALTER TABLE IF EXISTS public.eg_marriage_correction_audit - -- OWNER to postgres; - - - - -CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_child -( - id character varying(64) NOT NULL, - marriageid character varying(64) NOT NULL, - correctionid character varying(64) NOT NULL, - correction_field_name character varying(1024) NOT NULL, - table_name character varying(1024), - column_name character varying(1024) NOT NULL, - old_value character varying(2500) NOT NULL, - new_value character varying(2500) NOT NULL, - column_ character varying(1024), - createdby character varying(64), - createdtime bigint, - lastmodifiedby character varying(64), - lastmodifiedtime bigint, - CONSTRAINT eg_marriage_correction_child_pkey PRIMARY KEY (id) -); - - -- ALTER TABLE IF EXISTS public.eg_marriage_correction_child - -- OWNER to postgres; - - - -CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_child_audit -( - id character varying(64) NOT NULL, - marriageid character varying(64) NOT NULL, - correctionid character varying(64) NOT NULL, - correction_field_name character varying(1024) NOT NULL, - table_name character varying(1024), - column_name character varying(1024) NOT NULL, - old_value character varying(2500) NOT NULL, - new_value character varying(2500) NOT NULL, - column_ character varying(1024), - createdby character varying(64), - createdtime bigint, - lastmodifiedby character varying(64), - lastmodifiedtime bigint, - CONSTRAINT eg_marriage_correction_child_audit_pkey PRIMARY KEY (id) -); - --- ALTER TABLE IF EXISTS public.eg_marriage_correction_child_audit --- OWNER to postgres; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230414121800__registry_certno_deletion_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230414121800__registry_certno_deletion_dll.sql deleted file mode 100644 index 1c27a654fcc..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230414121800__registry_certno_deletion_dll.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE IF EXISTS public.eg_register_marriage_details DROP COLUMN IF EXISTS certificatenumber; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230419145000__marriage_amount_insert_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230419145000__marriage_amount_insert_dll.sql deleted file mode 100644 index cc21ad00b1f..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230419145000__marriage_amount_insert_dll.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE public.eg_marriage_details - ADD COLUMN IF NOT EXISTS amount BIGINT ; - - ALTER TABLE public.eg_marriage_details_audit - ADD COLUMN IF NOT EXISTS amount BIGINT ; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420105826__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420105826__newFieldAdd_services_new_dll.sql deleted file mode 100644 index 217df082f61..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420105826__newFieldAdd_services_new_dll.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE public.eg_marriage_details -ADD COLUMN IF NOT EXISTS bride_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS groom_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS bride_expired boolean, -ADD COLUMN IF NOT EXISTS groom_expired boolean; - -ALTER TABLE public.eg_marriage_details_audit -ADD COLUMN IF NOT EXISTS bride_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS groom_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS bride_expired boolean, -ADD COLUMN IF NOT EXISTS groom_expired boolean; - -ALTER TABLE public.eg_register_marriage_details -ADD COLUMN IF NOT EXISTS bride_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS groom_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS bride_expired boolean, -ADD COLUMN IF NOT EXISTS groom_expired boolean; - -ALTER TABLE public.eg_register_marriage_details_audit -ADD COLUMN IF NOT EXISTS bride_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS groom_filestoreid character varying(256) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS bride_expired boolean, -ADD COLUMN IF NOT EXISTS groom_expired boolean; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111227__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111227__newFieldAdd_services_new_dll.sql deleted file mode 100644 index 9158c22366a..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111227__newFieldAdd_services_new_dll.sql +++ /dev/null @@ -1,28 +0,0 @@ -ALTER TABLE public.eg_marriage_details - ADD COLUMN IF NOT EXISTS module_code character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_details_audit - ADD COLUMN IF NOT EXISTS module_code character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details - ADD COLUMN IF NOT EXISTS module_code character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details_audit - ADD COLUMN IF NOT EXISTS module_code character varying(64) COLLATE pg_catalog."default"; - - ALTER TABLE public.eg_marriage_bride_groom_details ALTER COLUMN father_aadharno TYPE VARCHAR(200); - ALTER TABLE public.eg_marriage_bride_groom_details ALTER COLUMN mother_aadharno TYPE VARCHAR(200); - ALTER TABLE public.eg_marriage_bride_groom_details ALTER COLUMN guardian_aadharno TYPE VARCHAR(200); - - ALTER TABLE public.eg_marriage_bride_groom_details_audit ALTER COLUMN father_aadharno TYPE VARCHAR(200); - ALTER TABLE public.eg_marriage_bride_groom_details_audit ALTER COLUMN mother_aadharno TYPE VARCHAR(200); - ALTER TABLE public.eg_marriage_bride_groom_details_audit ALTER COLUMN guardian_aadharno TYPE VARCHAR(200); - - ALTER TABLE public.eg_register_marriage_bride_groom_details ALTER COLUMN father_aadharno TYPE VARCHAR(200); - ALTER TABLE public.eg_register_marriage_bride_groom_details ALTER COLUMN mother_aadharno TYPE VARCHAR(200); - ALTER TABLE public.eg_register_marriage_bride_groom_details ALTER COLUMN guardian_aadharno TYPE VARCHAR(200); - - ALTER TABLE public.eg_register_marriage_bride_groom_details_audit ALTER COLUMN father_aadharno TYPE VARCHAR(200); - ALTER TABLE public.eg_register_marriage_bride_groom_details_audit ALTER COLUMN mother_aadharno TYPE VARCHAR(200); - ALTER TABLE public.eg_register_marriage_bride_groom_details_audit ALTER COLUMN guardian_aadharno TYPE VARCHAR(200); - diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111628__newFieldAdd_services_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111628__newFieldAdd_services_new_dll.sql deleted file mode 100644 index ba38bfc2657..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111628__newFieldAdd_services_new_dll.sql +++ /dev/null @@ -1,13 +0,0 @@ -ALTER TABLE public.eg_marriage_details - ADD COLUMN IF NOT EXISTS is_backward boolean; - -ALTER TABLE public.eg_marriage_details_audit - ADD COLUMN IF NOT EXISTS is_backward boolean; - -ALTER TABLE public.eg_register_marriage_details - ADD COLUMN IF NOT EXISTS is_backward boolean, - ADD COLUMN IF NOT EXISTS certificatenumber character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details_audit - ADD COLUMN IF NOT EXISTS is_backward boolean, - ADD COLUMN IF NOT EXISTS certificatenumber character varying(64) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111822__operationAndStamp_deletion_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111822__operationAndStamp_deletion_new_dll.sql deleted file mode 100644 index 9d19fbb1ce4..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420111822__operationAndStamp_deletion_new_dll.sql +++ /dev/null @@ -1,39 +0,0 @@ - - -ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_details_audit DROP COLUMN IF EXISTS stamp; - - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_permanent_address_details_audit DROP COLUMN IF EXISTS stamp; - - - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_bride_groom_details_audit DROP COLUMN IF EXISTS stamp; - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_document_audit DROP COLUMN IF EXISTS stamp; - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_present_address_details_audit DROP COLUMN IF EXISTS stamp; - - - - -ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS operation; - -ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit DROP COLUMN IF EXISTS stamp; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113301__Foreignkey_deletions_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113301__Foreignkey_deletions_new_dll.sql deleted file mode 100644 index 9723a13e64f..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113301__Foreignkey_deletions_new_dll.sql +++ /dev/null @@ -1,3 +0,0 @@ - -ALTER table eg_marriage_document - DROP CONSTRAINT IF EXISTS eg_marriage_document_document_fkey; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113405__addNewfeild_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113405__addNewfeild_new_dll.sql deleted file mode 100644 index 840a529c1df..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420113405__addNewfeild_new_dll.sql +++ /dev/null @@ -1,19 +0,0 @@ -ALTER TABLE public.eg_marriage_permanent_address_details -ADD COLUMN IF NOT EXISTS state_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS district_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS country_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_permanent_address_details_audit -ADD COLUMN IF NOT EXISTS state_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS district_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS country_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_permanent_address_details -ADD COLUMN IF NOT EXISTS state_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS district_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS country_name character varying(1000) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_permanent_address_details_audit -ADD COLUMN IF NOT EXISTS state_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS district_name character varying(1000) COLLATE pg_catalog."default", -ADD COLUMN IF NOT EXISTS country_name character varying(1000) COLLATE pg_catalog."default"; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420141409__addNewfeild_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420141409__addNewfeild_new_dll.sql deleted file mode 100644 index 53c4ee3d3f5..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420141409__addNewfeild_new_dll.sql +++ /dev/null @@ -1,11 +0,0 @@ -ALTER TABLE public.eg_marriage_details -ADD COLUMN IF NOT EXISTS zonal_office character varying(100) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_details_audit -ADD COLUMN IF NOT EXISTS zonal_office character varying(100) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details -ADD COLUMN IF NOT EXISTS zonal_office character varying(100) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_details_audit -ADD COLUMN IF NOT EXISTS zonal_office character varying(100) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420152800__addNewfieldInCertificate_new_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420152800__addNewfieldInCertificate_new_dll.sql deleted file mode 100644 index c6373ee5d51..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230420152800__addNewfieldInCertificate_new_dll.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE public.eg_marriage_certificate -ADD COLUMN IF NOT EXISTS count int4; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421120700__addNewfieldInCertificateTable_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421120700__addNewfieldInCertificateTable_dll.sql deleted file mode 100644 index 12276b01c66..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421120700__addNewfieldInCertificateTable_dll.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE public.eg_marriage_certificate ADD COLUMN IF NOT EXISTS count int4; -ALTER TABLE public.eg_marriage_certificate ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; - diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql deleted file mode 100644 index 95507a63b77..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421130601__addNewfieldInCertificateAuditTable_dll.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE IF EXISTS public.eg_marriage_certificate_audit ADD COLUMN IF NOT EXISTS count int4; -ALTER TABLE IF EXISTS public.eg_marriage_certificate_audit ALTER COLUMN registrationno TYPE varchar(64) USING registrationno::varchar; - diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421155505__removefieldInCertificate_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421155505__removefieldInCertificate_dll.sql deleted file mode 100644 index ae3680fc06e..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230421155505__removefieldInCertificate_dll.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE IF EXISTS public.eg_marriage_certificate_audit DROP COLUMN IF EXISTS operation; -ALTER TABLE IF EXISTS public.eg_marriage_certificate_audit DROP COLUMN IF EXISTS stamp; \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230508125926__Marriage_Add_Address_Newfeild_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230508125926__Marriage_Add_Address_Newfeild_dll.sql deleted file mode 100644 index 0b2a5e2425e..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230508125926__Marriage_Add_Address_Newfeild_dll.sql +++ /dev/null @@ -1,23 +0,0 @@ -ALTER TABLE public.eg_marriage_present_address_details - ADD COLUMN present_tenentid character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_permanent_address_details - ADD COLUMN permanent_tenentid character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_present_address_details_audit - ADD COLUMN present_tenentid character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_marriage_permanent_address_details_audit - ADD COLUMN permanent_tenentid character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_present_address_details - ADD COLUMN present_tenentid character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_permanent_address_details - ADD COLUMN permanent_tenentid character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_present_address_details_audit - ADD COLUMN present_tenentid character varying(64) COLLATE pg_catalog."default"; - -ALTER TABLE public.eg_register_marriage_permanent_address_details_audit - ADD COLUMN permanent_tenentid character varying(64) COLLATE pg_catalog."default"; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305101820__marriage_services_create_tables_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305101820__marriage_services_create_tables_dll.sql new file mode 100644 index 00000000000..e69de29bb2d From 949754893387e2c2f95cbb12fa37197f2e873d4e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 10 May 2023 18:31:33 +0530 Subject: [PATCH 352/420] migration script update --- .../V20230425124600__Marriage_table_type_updation.sql | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V20230425124600__Marriage_table_type_updation.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230425124600__Marriage_table_type_updation.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230425124600__Marriage_table_type_updation.sql deleted file mode 100644 index e8188610ea9..00000000000 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V20230425124600__Marriage_table_type_updation.sql +++ /dev/null @@ -1,9 +0,0 @@ - ALTER TABLE eg_marriage_details ALTER COLUMN brideurl TYPE VARCHAR(2000); - ALTER TABLE eg_marriage_details ALTER COLUMN groomurl TYPE VARCHAR(2000); - ALTER TABLE eg_marriage_details_audit ALTER COLUMN brideurl TYPE VARCHAR(2000); - ALTER TABLE eg_marriage_details_audit ALTER COLUMN groomurl TYPE VARCHAR(2000); - - ALTER TABLE eg_register_marriage_details ALTER COLUMN brideurl TYPE VARCHAR(2000); - ALTER TABLE eg_register_marriage_details ALTER COLUMN groomurl TYPE VARCHAR(2000); - ALTER TABLE eg_register_marriage_details_audit ALTER COLUMN brideurl TYPE VARCHAR(2000); - ALTER TABLE eg_register_marriage_details_audit ALTER COLUMN groomurl TYPE VARCHAR(2000); \ No newline at end of file From 722218e1f9b7ae88b76dc89d8e36fe970e1f0fbf Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 10 May 2023 23:39:07 +0530 Subject: [PATCH 353/420] comment in workflow for testing --- .../service/MarriageApplicationService.java | 5 +++-- .../web/model/MarriageCorrectionDetails.java | 2 ++ .../java/org/ksmart/marriage/utils/MarriageConstants.java | 3 ++- .../org/ksmart/marriage/workflow/WorkflowIntegrator.java | 8 +++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index b5ecf4f44c6..1b398d537ae 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -68,12 +68,13 @@ public List saveMarriageDetails(MarriageDetailsReque mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + System.out.println("Statusb4workflow"+ request.getMarriageDetails().get(0).getStatus()); if (request.getMarriageDetails().get(0).getIsWorkflow()){ workflowIntegrator.callWorkFlow(request); } request.getMarriageDetails().forEach(marriage->{ - // System.out.println("JSONStatus"+marriage.getStatus()); - // System.out.println("ConstStatus"+MarriageConstants.STATUS_FOR_PAYMENT); + System.out.println("JSONStatus"+marriage.getStatus()); + // System.out.println("ConstStatus"+MarriageConstants.STATUS_FOR_PAYMENT); // if(wfc.getPayment()!= null){ if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ // System.out.println("hienterpayment"); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java index e7f873d4dcb..9c560b58ded 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/web/model/MarriageCorrectionDetails.java @@ -36,6 +36,7 @@ public class MarriageCorrectionDetails { @Size(max = 64) @JsonProperty("applicationNumber") private String applicationNo; + @JsonProperty("applicationDate") private Long applicationDate; @Size(max = 64) @@ -50,6 +51,7 @@ public class MarriageCorrectionDetails { @Size(max = 64) @JsonProperty("registrationno") private String registrationno; + @JsonProperty("registration_date") private Long registrationDate; @Size(max = 64) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index a8b4c05aac6..dcc4a8598ac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -40,7 +40,8 @@ public class MarriageConstants { //mdms tenantId public static final String MDMS_TENANTID = "kl"; //workflow - public static final String BUSINESS_SERVICE_BND = "NewMarriage"; + // public static final String BUSINESS_SERVICE_BND = "NewMarriage"; + public static final String BUSINESS_SERVICE_BND = "CR"; public static final String TENANTIDKEY = "tenantId"; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java index 64fe8d06728..5b019ee3beb 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -77,7 +77,7 @@ public void callWorkFlow(MarriageDetailsRequest request) { JSONArray array = new JSONArray(); for (MarriageApplicationDetails marriageDtl : request.getMarriageDetails()) { String businessServiceFromMDMS=marriageDtl.getBusinessservice(); - // System.out.println("Jasmine-BusinessService"+businessServiceFromMDMS); + System.out.println("Jasmine-BusinessService"+businessServiceFromMDMS); if (businessServiceFromMDMS == null) { businessServiceFromMDMS = MarriageConstants.BUSINESS_SERVICE_BND; } @@ -161,9 +161,11 @@ public void callWorkFlow(MarriageDetailsRequest request) { }); // setting the status back to TL object from wf response - + System.out.println("statusb4"+ request.getMarriageDetails().get(0).getStatus()); request.getMarriageDetails().forEach( + bndObj -> bndObj.setStatus(idStatusMap.get(bndObj.getApplicationNumber()))); + System.out.println("statusafter"+ request.getMarriageDetails().get(0).getStatus()); } @@ -191,7 +193,7 @@ public void callCorrectionWorkFlow(MarriageCorrectionRequest request) { JSONArray array = new JSONArray(); for (MarriageCorrectionDetails marriageDtl : request.getMarriageCorrectionDetails()) { String businessServiceFromMDMS=marriageDtl.getBusinessservice(); - // System.out.println("Jasmine-BusinessService"+businessServiceFromMDMS); + System.out.println("BusinessServiceMarriage"+businessServiceFromMDMS); if (businessServiceFromMDMS == null) { businessServiceFromMDMS = MarriageConstants.BUSINESS_SERVICE_BND; } From 9f232420bf55171475f3d27ad28e7852b0ced840 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 11 May 2023 00:35:50 +0530 Subject: [PATCH 354/420] changes in paymentUpdate service commented status checking --- .../ksmart/marriage/common/services/PaymentUpdateService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index 73be2a35120..22d524aae7b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -98,9 +98,9 @@ public void process(HashMap record) { // System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); if(null!=marriage && marriage.size()==1){ - if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ +// if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ marriage.get(0).setAction(MarriageConstants.ACTION_PAY); - } +// } } MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) .marriageDetails(marriage).build(); From 922a748b15d6426a262bba6a52413a8889fabd44 Mon Sep 17 00:00:00 2001 From: JasmineNazeer <115537272+JasmineNazeer@users.noreply.github.com> Date: Thu, 11 May 2023 07:18:59 +0530 Subject: [PATCH 355/420] Update application.properties --- .../src/main/resources/application.properties | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 0ca5d56a799..6d6e0f8eb10 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -61,8 +61,8 @@ egov.idgen.path=egov-idgen/id/_generate #workflow configurations egov.workflow.path=/egov-workflow-v2/egov-wf/process/_transition -# egov.workflow.host=https://ksmart-dev.lsgkerala.gov.in/ - egov.workflow.host=http://localhost:8280 +egov.workflow.host=https://ksmart-dev.lsgkerala.gov.in/ +# egov.workflow.host=http://localhost:8280 #birth and death idFormat config egov.idgen.marriageapplnum.name=birth_cert.receipt.id @@ -104,8 +104,8 @@ egov.pdf.birthcert.postendpoint=/egov-pdf/download/BIRTHDEATH/birth-certificate? egov.pdf.deathcert.postendpoint=/egov-pdf/download/BIRTHDEATH/death-certificate?tenantId=$tenantId #pdf service path config - egov.pdfservice.host=http://localhost:8080 -#egov.pdfservice.host= https://ksmart-dev.lsgkerala.gov.in +# egov.pdfservice.host=http://localhost:8080 +egov.pdfservice.host= https://ksmart-dev.lsgkerala.gov.in egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certificate&tenantId=$tenantId egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId @@ -139,8 +139,8 @@ decryption.abac.enabled=true #egov-encrypt service configs # egov.enc.host=http://localhost:1234 -egov.enc.host=http://localhost:1234 -# egov.enc.host=https://ksmart-dev.lsgkerala.gov.in +#egov.enc.host=http://localhost:1234 + egov.enc.host=https://ksmart-dev.lsgkerala.gov.in egov.enc.encrypt.endpoint=/egov-enc-service/crypto/v1/_encrypt egov.enc.decrypt.endpoint=/egov-enc-service/crypto/v1/_decrypt From 5a4b92227bad4f493a1c112c0a03baeb3bfb5295 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 11 May 2023 11:18:55 +0530 Subject: [PATCH 356/420] changes in paymentupdateservice --- .../ksmart/marriage/common/services/PaymentUpdateService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index 22d524aae7b..73be2a35120 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -98,9 +98,9 @@ public void process(HashMap record) { // System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); if(null!=marriage && marriage.size()==1){ -// if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ marriage.get(0).setAction(MarriageConstants.ACTION_PAY); -// } + } } MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) .marriageDetails(marriage).build(); From f5c4e82a601df295be09685b0475584a93cd5cf6 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 11 May 2023 13:48:53 +0530 Subject: [PATCH 357/420] workflow updated --- ...dll.sql => V202305111350__marriage_services_create_tables_dll} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename municipal-services/marriage-services/src/main/resources/db/migration/main/{V202305101820__marriage_services_create_tables_dll.sql => V202305111350__marriage_services_create_tables_dll} (100%) diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305101820__marriage_services_create_tables_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll similarity index 100% rename from municipal-services/marriage-services/src/main/resources/db/migration/main/V202305101820__marriage_services_create_tables_dll.sql rename to municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll From a61bda00865af79d021dd7c48baa387b2222c26c Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 11 May 2023 13:52:48 +0530 Subject: [PATCH 358/420] workflow updated --- ...11350__marriage_services_create_tables_dll | 1053 +++++++++++++++++ 1 file changed, 1053 insertions(+) diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll index e69de29bb2d..35b8d4aac0a 100644 --- a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll @@ -0,0 +1,1053 @@ +CREATE TABLE IF NOT EXISTS public.eg_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + houseno_and_name_en character varying(2500) COLLATE pg_catalog."default", + houseno_and_name_ml character varying(2500) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + domcorreflag boolean, + placeidcorrflag boolean, + groomnamecorreflag boolean, + bridenamecorreflag boolean, + groomagecorreflag boolean, + brideagecorreflag boolean, + groomdobcorreflag boolean, + bridedobcorreflag boolean, + groompermanentaddrcorreflag boolean, + bridepermanentaddrcorreflag boolean, + groommothercorreflag boolean, + bridemothercorreflag boolean, + groomfathercorreflag boolean, + bridefathercorreflag boolean, + groomguardiancorreflag boolean, + brideguardiancorreflag boolean, + villageid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + brideurl character varying(2000) COLLATE pg_catalog."default", + groomurl character varying(2000) COLLATE pg_catalog."default", + imageuuid character varying(64) COLLATE pg_catalog."default", + bride_filestoreid character varying(256) COLLATE pg_catalog."default", + groom_filestoreid character varying(256) COLLATE pg_catalog."default", + bride_expired boolean, + groom_expired boolean, + module_code character varying(64) COLLATE pg_catalog."default", + is_backward boolean, + amount bigint, + zonal_office character varying(100) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, applicationnumber) +); + + +CREATE TABLE IF NOT EXISTS public.eg_marriage_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + houseno_and_name_en character varying(2500) COLLATE pg_catalog."default", + houseno_and_name_ml character varying(2500) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + domcorreflag boolean, + placeidcorrflag boolean, + groomnamecorreflag boolean, + bridenamecorreflag boolean, + groomagecorreflag boolean, + brideagecorreflag boolean, + groomdobcorreflag boolean, + bridedobcorreflag boolean, + groompermanentaddrcorreflag boolean, + bridepermanentaddrcorreflag boolean, + groommothercorreflag boolean, + bridemothercorreflag boolean, + groomfathercorreflag boolean, + bridefathercorreflag boolean, + groomguardiancorreflag boolean, + brideguardiancorreflag boolean, + villageid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + brideurl character varying(2000) COLLATE pg_catalog."default", + groomurl character varying(2000) COLLATE pg_catalog."default", + imageuuid character varying(64) COLLATE pg_catalog."default", + bride_filestoreid character varying(256) COLLATE pg_catalog."default", + groom_filestoreid character varying(256) COLLATE pg_catalog."default", + bride_expired boolean, + groom_expired boolean, + module_code character varying(64) COLLATE pg_catalog."default", + is_backward boolean, + amount bigint, + zonal_office character varying(100) COLLATE pg_catalog."default" +); + + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + state_name character varying(1000) COLLATE pg_catalog."default", + district_name character varying(1000) COLLATE pg_catalog."default", + country_name character varying(1000) COLLATE pg_catalog."default", + permanent_tenentid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + state_name character varying(1000) COLLATE pg_catalog."default", + district_name character varying(1000) COLLATE pg_catalog."default", + country_name character varying(1000) COLLATE pg_catalog."default", + permanent_tenentid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + same_as_permanent boolean, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + present_tenentid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + same_as_permanent boolean, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + present_tenentid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + aadharno character varying(200) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no integer, + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + aadharno character varying(200) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no integer, + tenantid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + aadharno character varying(200) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(200) COLLATE pg_catalog."default", + mother_aadharno character varying(200) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living integer, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + aadharno character varying(200) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(200) COLLATE pg_catalog."default", + mother_aadharno character varying(200) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living integer, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_document +( + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + applicationnumber character varying(64) COLLATE pg_catalog."default", + updated_flag integer, + registrationno character varying(64) COLLATE pg_catalog."default", + correction_id character varying(64) COLLATE pg_catalog."default", + correction_field_name character varying(1024) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_document_pkey UNIQUE (id) +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_document_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + applicationnumber character varying(64) COLLATE pg_catalog."default", + updated_flag integer, + registrationno character varying(64) COLLATE pg_catalog."default", + correction_id character varying(64) COLLATE pg_catalog."default", + correction_field_name character varying(1024) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(64) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + housenameno_en character varying(1000) COLLATE pg_catalog."default", + housenameno_ml character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + registration_status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", + is_migrated boolean, + migrated_date bigint, + migrated_marriage_type character varying(64) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + brideurl character varying(2000) COLLATE pg_catalog."default", + groomurl character varying(2000) COLLATE pg_catalog."default", + imageuuid character varying(64) COLLATE pg_catalog."default", + bride_filestoreid character varying(256) COLLATE pg_catalog."default", + groom_filestoreid character varying(256) COLLATE pg_catalog."default", + bride_expired boolean, + groom_expired boolean, + module_code character varying(64) COLLATE pg_catalog."default", + is_backward boolean, + certificateno character varying(64) COLLATE pg_catalog."default", + certificatenumber character varying(64) COLLATE pg_catalog."default", + zonal_office character varying(100) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber, tenantid) +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(64) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + housenameno_en character varying(1000) COLLATE pg_catalog."default", + housenameno_ml character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + registration_status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", + is_migrated boolean, + migrated_date bigint, + migrated_marriage_type character varying(64) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + brideurl character varying(2000) COLLATE pg_catalog."default", + groomurl character varying(2000) COLLATE pg_catalog."default", + imageuuid character varying(64) COLLATE pg_catalog."default", + bride_filestoreid character varying(256) COLLATE pg_catalog."default", + groom_filestoreid character varying(256) COLLATE pg_catalog."default", + bride_expired boolean, + groom_expired boolean, + module_code character varying(64) COLLATE pg_catalog."default", + is_backward boolean, + certificatenumber character varying(64) COLLATE pg_catalog."default", + certificateno character varying(64) COLLATE pg_catalog."default", + zonal_office character varying(100) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document +( + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + applicationnumber character varying(64) COLLATE pg_catalog."default", + updated_flag integer, + registrationno character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid, document_type, document_name, marriageid, bride_groom, active), + CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id) +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document_audit +( + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + applicationnumber character varying(64) COLLATE pg_catalog."default", + updated_flag integer, + registrationno character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + state_name character varying(1000) COLLATE pg_catalog."default", + district_name character varying(1000) COLLATE pg_catalog."default", + country_name character varying(1000) COLLATE pg_catalog."default", + permanent_tenentid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + state_name character varying(1000) COLLATE pg_catalog."default", + district_name character varying(1000) COLLATE pg_catalog."default", + country_name character varying(1000) COLLATE pg_catalog."default", + permanent_tenentid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + same_as_permanent boolean, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + present_tenentid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + same_as_permanent boolean, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + present_tenentid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + aadharno character varying(200) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no integer, + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + aadharno character varying(200) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(200) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no integer, + tenantid character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + aadharno character varying(200) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(200) COLLATE pg_catalog."default", + mother_aadharno character varying(200) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living integer, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + aadharno character varying(200) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(200) COLLATE pg_catalog."default", + mother_aadharno character varying(200) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living integer, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + registrationno character varying(64) COLLATE pg_catalog."default", + registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, + filestoreid character varying(256) COLLATE pg_catalog."default", + status character varying(25) COLLATE pg_catalog."default", + additionaldetail jsonb, + embeddedurl character varying(64) COLLATE pg_catalog."default", + dateofissue bigint, + tenantid character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + count integer, + CONSTRAINT eg_marriage_certificate_request_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_certificate_request_fkey FOREIGN KEY (registrydetailsid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE CASCADE + ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + registrationno character varying(64) COLLATE pg_catalog."default", + registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, + filestoreid character varying(256) COLLATE pg_catalog."default", + status character varying(25) COLLATE pg_catalog."default", + additionaldetail jsonb, + embeddedurl character varying(64) COLLATE pg_catalog."default", + dateofissue bigint, + tenantid character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + count integer +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correction_field_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + condition_code character varying(1024) COLLATE pg_catalog."default", + specific_condition character varying(1024) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_pkey PRIMARY KEY (id) +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correction_field_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + condition_code character varying(1024) COLLATE pg_catalog."default", + specific_condition character varying(1024) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_audit_pkey PRIMARY KEY (id) +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_child +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correctionid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correction_field_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + table_name character varying(1024) COLLATE pg_catalog."default", + column_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + old_value character varying(2500) COLLATE pg_catalog."default" NOT NULL, + new_value character varying(2500) COLLATE pg_catalog."default" NOT NULL, + column_ character varying(1024) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_child_pkey PRIMARY KEY (id) +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_child_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correctionid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correction_field_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + table_name character varying(1024) COLLATE pg_catalog."default", + column_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + old_value character varying(2500) COLLATE pg_catalog."default" NOT NULL, + new_value character varying(2500) COLLATE pg_catalog."default" NOT NULL, + column_ character varying(1024) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_child_audit_pkey PRIMARY KEY (id) +); \ No newline at end of file From 7f48c57de14bf1b40dc082a2d4c1b5f0e721f37d Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 11 May 2023 14:03:02 +0530 Subject: [PATCH 359/420] Commim validation: Father,mother and Guardian validation removed --- .../MarriageApplicationValidator.java | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index c7f7204f50a..c522f3f3681 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -440,20 +440,20 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomInfo.getFathernameMl() + " is invalid"); } - if (StringUtils.isEmpty(groomInfo.getFatherAadharno())) { - throw new CustomException( - "GROOM FATHER AADHAR INVALID ", - "The groom Father Aadhar number " + - groomInfo.getFatherAadharno() - + " is invalid"); - } - if (StringUtils.isEmpty(groomInfo.getMotherAadharno())) { - throw new CustomException( - " GROOM MOTHER AADHAR INVALID ", - "The groom Father Aadhar number " + - groomInfo.getMotherAadharno() - + " is invalid"); - } +// if (StringUtils.isEmpty(groomInfo.getFatherAadharno())) { +// throw new CustomException( +// "GROOM FATHER AADHAR INVALID ", +// "The groom Father Aadhar number " + +// groomInfo.getFatherAadharno() +// + " is invalid"); +// } +// if (StringUtils.isEmpty(groomInfo.getMotherAadharno())) { +// throw new CustomException( +// " GROOM MOTHER AADHAR INVALID ", +// "The groom Father Aadhar number " + +// groomInfo.getMotherAadharno() +// + " is invalid"); +// } if (StringUtils.isEmpty(groomInfo.getMothernameEn())) { throw new CustomException(" GROOM MOTHER NAME ENGLISH ", @@ -469,14 +469,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomInfo.getMothernameMl() + " is invalid"); } - } else { - if (StringUtils.isEmpty(groomInfo.getGuardianAadharno())) { - throw new CustomException( - " GROOM GUARDIAN AADHAR INVALID ", - "The groom Guardian Aadhar number " + - groomInfo.getGuardianAadharno() - + " is invalid"); - } +// } else { +// if (StringUtils.isEmpty(groomInfo.getGuardianAadharno())) { +// throw new CustomException( +// " GROOM GUARDIAN AADHAR INVALID ", +// "The groom Guardian Aadhar number " + +// groomInfo.getGuardianAadharno() +// + " is invalid"); +// } if (StringUtils.isEmpty(groomInfo.getGuardiannameEn())) { throw new CustomException( " GROOM GUARDIAN NAME ENGLISH ", @@ -657,21 +657,21 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideInfo.getFathernameMl() + " is invalid"); } - if (StringUtils.isEmpty(brideInfo.getFatherAadharno())) { - throw new CustomException( - "BRIDE: FATHER AADHAR INVALID ", - "The Father's Aadhar number " + - brideInfo.getFatherAadharno() - + " is invalid"); - } - if (StringUtils.isEmpty(brideInfo.getMotherAadharno())) { - throw new CustomException( - "BRIDE:MOTHER AADHAR INVALID ", - "The mother's Aadhar number " + - brideInfo.getMotherAadharno() - + " is invalid"); - } - +// if (StringUtils.isEmpty(brideInfo.getFatherAadharno())) { +// throw new CustomException( +// "BRIDE: FATHER AADHAR INVALID ", +// "The Father's Aadhar number " + +// brideInfo.getFatherAadharno() +// + " is invalid"); +// } +// if (StringUtils.isEmpty(brideInfo.getMotherAadharno())) { +// throw new CustomException( +// "BRIDE:MOTHER AADHAR INVALID ", +// "The mother's Aadhar number " + +// brideInfo.getMotherAadharno() +// + " is invalid"); +// } +// if (StringUtils.isEmpty(brideInfo.getMothernameEn())) { throw new CustomException(" BRIDE MOTHER NAME ENGLISH ", "The bride Mother Name in english " + @@ -687,13 +687,13 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } } else { - if (StringUtils.isEmpty(brideInfo.getGuardianAadharno())) { - throw new CustomException( - " BRIDE GUARDIAN AADHAR INVALID ", - "The bride Guardian Aadhar number " + - brideInfo.getGuardianAadharno() - + " is invalid"); - } +// if (StringUtils.isEmpty(brideInfo.getGuardianAadharno())) { +// throw new CustomException( +// " BRIDE GUARDIAN AADHAR INVALID ", +// "The bride Guardian Aadhar number " + +// brideInfo.getGuardianAadharno() +// + " is invalid"); +// } if (StringUtils.isEmpty(brideInfo.getGuardiannameEn())) { throw new CustomException( " BRIDE GUARDIAN NAME ENGLISH ", From 6f6a1d3e14036032b368c7233cc2f43d1cd104d9 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 11 May 2023 14:44:26 +0530 Subject: [PATCH 360/420] added file exists check for bride and groom photo url --- .../MarriageRegistryRepository.java | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index d1edd738867..e714748f223 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -30,6 +30,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.web.client.RestTemplate; +import java.net.HttpURLConnection; +import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -311,10 +313,20 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); + if(isImageExists(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath() + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); + }else{ + log.error("PDF_ERROR. Marriage Certificate , Invalid Groom Photo Path!!!"); + throw new CustomException("PDF_ERROR", "Invalid Groom Photo Path!!!" ); + } } if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { + if(isImageExists(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); + }else{ + log.error("PDF_ERROR. Marriage Certificate , Invalid Bride Photo Path!!!"); + throw new CustomException("PDF_ERROR", "Invalid Bride Photo Path!!!" ); + } } setDefaultValuesIfNull(req.getMarriageCertificate().get(0)); @@ -359,6 +371,22 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } + public static boolean isImageExists(String URLName){ + try { + HttpURLConnection.setFollowRedirects(false); + // note : you may also need + // HttpURLConnection.setInstanceFollowRedirects(false) + HttpURLConnection con = + (HttpURLConnection) new URL(URLName).openConnection(); + con.setRequestMethod("HEAD"); + return (con.getResponseCode() == HttpURLConnection.HTTP_OK); + } + catch (Exception e) { + e.printStackTrace(); + return false; + } + } + private void setDefaultValuesIfNull(MarriageCertificate cert){ cert.setAckNo(getDefaultValueIfNull(cert.getAckNo())); cert.setMarriagePlaceFullAddr(getDefaultValueIfNull(cert.getMarriagePlaceFullAddr())); From d6a8a10392b50f67a43dafedaf726d77b72c8612 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Thu, 11 May 2023 14:54:00 +0530 Subject: [PATCH 361/420] corr appln null check --- ...CorrectionApplicationToRegistryMapper.java | 188 +++++----- .../mapper/RegistryToApplicationMapper.java | 341 +++++++++--------- .../service/MarriageCorrectionService.java | 2 + 3 files changed, 274 insertions(+), 257 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java index 664e17fddef..3fbf7c3804d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/CorrectionApplicationToRegistryMapper.java @@ -41,104 +41,108 @@ public MarriageRegistryRequest convert(List registryDet //Marriage Bride Details - //registryDetails.get(0).getBrideDetails().setResidentship(aplnDetails.get(0).getBrideDetails().getResidentship()); - registryDetails.get(0).getBrideDetails().setFirstname_en(aplnDetails.get(0).getBrideDetails().getFirstnameEn()); - registryDetails.get(0).getBrideDetails().setFirstname_ml(aplnDetails.get(0).getBrideDetails().getFirstnameMl()); - registryDetails.get(0).getBrideDetails().setMiddlename_en(aplnDetails.get(0).getBrideDetails().getMiddlenameEn()); - registryDetails.get(0).getBrideDetails().setMiddlename_ml(aplnDetails.get(0).getBrideDetails().getMiddlenameMl()); - registryDetails.get(0).getBrideDetails().setLastname_en(aplnDetails.get(0).getBrideDetails().getLastnameEn()); - registryDetails.get(0).getBrideDetails().setLastname_ml(aplnDetails.get(0).getBrideDetails().getLastnameMl()); - registryDetails.get(0).getBrideDetails().setDateofbirth(aplnDetails.get(0).getBrideDetails().getDateofbirth()); - registryDetails.get(0).getBrideDetails().setAge(aplnDetails.get(0).getBrideDetails().getAge()); - registryDetails.get(0).getBrideDetails().setFathername_en(aplnDetails.get(0).getBrideDetails().getFathernameEn()); - registryDetails.get(0).getBrideDetails().setFathername_ml(aplnDetails.get(0).getBrideDetails().getFathernameMl()); - registryDetails.get(0).getBrideDetails().setMothername_en(aplnDetails.get(0).getBrideDetails().getMothernameEn()); - registryDetails.get(0).getBrideDetails().setMothername_ml(aplnDetails.get(0).getBrideDetails().getMothernameMl()); - registryDetails.get(0).getBrideDetails().setGuardianname_en(aplnDetails.get(0).getBrideDetails().getGuardiannameEn()); - registryDetails.get(0).getBrideDetails().setGuardianname_ml(aplnDetails.get(0).getBrideDetails().getGuardiannameMl()); - //registryDetails.get(0).getBrideDetails().setParent_guardian(aplnDetails.get(0).getBrideDetails().getParentGuardian()); - + if (registryDetails.get(0).getBrideDetails() != null && aplnDetails.get(0).getBrideDetails() != null) { + //registryDetails.get(0).getBrideDetails().setResidentship(aplnDetails.get(0).getBrideDetails().getResidentship()); + registryDetails.get(0).getBrideDetails().setFirstname_en(aplnDetails.get(0).getBrideDetails().getFirstnameEn()); + registryDetails.get(0).getBrideDetails().setFirstname_ml(aplnDetails.get(0).getBrideDetails().getFirstnameMl()); + registryDetails.get(0).getBrideDetails().setMiddlename_en(aplnDetails.get(0).getBrideDetails().getMiddlenameEn()); + registryDetails.get(0).getBrideDetails().setMiddlename_ml(aplnDetails.get(0).getBrideDetails().getMiddlenameMl()); + registryDetails.get(0).getBrideDetails().setLastname_en(aplnDetails.get(0).getBrideDetails().getLastnameEn()); + registryDetails.get(0).getBrideDetails().setLastname_ml(aplnDetails.get(0).getBrideDetails().getLastnameMl()); + registryDetails.get(0).getBrideDetails().setDateofbirth(aplnDetails.get(0).getBrideDetails().getDateofbirth()); + registryDetails.get(0).getBrideDetails().setAge(aplnDetails.get(0).getBrideDetails().getAge()); + registryDetails.get(0).getBrideDetails().setFathername_en(aplnDetails.get(0).getBrideDetails().getFathernameEn()); + registryDetails.get(0).getBrideDetails().setFathername_ml(aplnDetails.get(0).getBrideDetails().getFathernameMl()); + registryDetails.get(0).getBrideDetails().setMothername_en(aplnDetails.get(0).getBrideDetails().getMothernameEn()); + registryDetails.get(0).getBrideDetails().setMothername_ml(aplnDetails.get(0).getBrideDetails().getMothernameMl()); + registryDetails.get(0).getBrideDetails().setGuardianname_en(aplnDetails.get(0).getBrideDetails().getGuardiannameEn()); + registryDetails.get(0).getBrideDetails().setGuardianname_ml(aplnDetails.get(0).getBrideDetails().getGuardiannameMl()); + //registryDetails.get(0).getBrideDetails().setParent_guardian(aplnDetails.get(0).getBrideDetails().getParentGuardian()); + } //Marriage Groom Details - //registryDetails.get(0).getGroomDetails().setResidentship(aplnDetails.get(0).getGroomDetails().getResidentship()); - registryDetails.get(0).getGroomDetails().setFirstname_en(aplnDetails.get(0).getGroomDetails().getFirstnameEn()); - registryDetails.get(0).getGroomDetails().setFirstname_ml(aplnDetails.get(0).getGroomDetails().getFirstnameMl()); - registryDetails.get(0).getGroomDetails().setMiddlename_en(aplnDetails.get(0).getGroomDetails().getMiddlenameEn()); - registryDetails.get(0).getGroomDetails().setMiddlename_ml(aplnDetails.get(0).getGroomDetails().getMiddlenameMl()); - registryDetails.get(0).getGroomDetails().setLastname_en(aplnDetails.get(0).getGroomDetails().getLastnameEn()); - registryDetails.get(0).getGroomDetails().setLastname_ml(aplnDetails.get(0).getGroomDetails().getLastnameMl()); - registryDetails.get(0).getGroomDetails().setDateofbirth(aplnDetails.get(0).getGroomDetails().getDateofbirth()); - registryDetails.get(0).getGroomDetails().setAge(aplnDetails.get(0).getGroomDetails().getAge()); - registryDetails.get(0).getGroomDetails().setFathername_en(aplnDetails.get(0).getGroomDetails().getFathernameEn()); - registryDetails.get(0).getGroomDetails().setFathername_ml(aplnDetails.get(0).getGroomDetails().getFathernameMl()); - registryDetails.get(0).getGroomDetails().setMothername_en(aplnDetails.get(0).getGroomDetails().getMothernameEn()); - registryDetails.get(0).getGroomDetails().setMothername_ml(aplnDetails.get(0).getGroomDetails().getMothernameMl()); - registryDetails.get(0).getGroomDetails().setGuardianname_en(aplnDetails.get(0).getGroomDetails().getGuardiannameEn()); - registryDetails.get(0).getGroomDetails().setGuardianname_ml(aplnDetails.get(0).getGroomDetails().getGuardiannameMl()); - //registryDetails.get(0).getGroomDetails().setParent_guardian(aplnDetails.get(0).getGroomDetails().getParentGuardian()); - + if (registryDetails.get(0).getGroomDetails() != null && aplnDetails.get(0).getGroomDetails() != null) { + //registryDetails.get(0).getGroomDetails().setResidentship(aplnDetails.get(0).getGroomDetails().getResidentship()); + registryDetails.get(0).getGroomDetails().setFirstname_en(aplnDetails.get(0).getGroomDetails().getFirstnameEn()); + registryDetails.get(0).getGroomDetails().setFirstname_ml(aplnDetails.get(0).getGroomDetails().getFirstnameMl()); + registryDetails.get(0).getGroomDetails().setMiddlename_en(aplnDetails.get(0).getGroomDetails().getMiddlenameEn()); + registryDetails.get(0).getGroomDetails().setMiddlename_ml(aplnDetails.get(0).getGroomDetails().getMiddlenameMl()); + registryDetails.get(0).getGroomDetails().setLastname_en(aplnDetails.get(0).getGroomDetails().getLastnameEn()); + registryDetails.get(0).getGroomDetails().setLastname_ml(aplnDetails.get(0).getGroomDetails().getLastnameMl()); + registryDetails.get(0).getGroomDetails().setDateofbirth(aplnDetails.get(0).getGroomDetails().getDateofbirth()); + registryDetails.get(0).getGroomDetails().setAge(aplnDetails.get(0).getGroomDetails().getAge()); + registryDetails.get(0).getGroomDetails().setFathername_en(aplnDetails.get(0).getGroomDetails().getFathernameEn()); + registryDetails.get(0).getGroomDetails().setFathername_ml(aplnDetails.get(0).getGroomDetails().getFathernameMl()); + registryDetails.get(0).getGroomDetails().setMothername_en(aplnDetails.get(0).getGroomDetails().getMothernameEn()); + registryDetails.get(0).getGroomDetails().setMothername_ml(aplnDetails.get(0).getGroomDetails().getMothernameMl()); + registryDetails.get(0).getGroomDetails().setGuardianname_en(aplnDetails.get(0).getGroomDetails().getGuardiannameEn()); + registryDetails.get(0).getGroomDetails().setGuardianname_ml(aplnDetails.get(0).getGroomDetails().getGuardiannameMl()); + //registryDetails.get(0).getGroomDetails().setParent_guardian(aplnDetails.get(0).getGroomDetails().getParentGuardian()); + } //Bride Address details - //registryDetails.get(0).getBrideAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getCountryIdPermanent()); - //registryDetails.get(0).getBrideAddressDetails().setStateIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getStateIdPermanent()); - //registryDetails.get(0).getBrideAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getDistrictIdPermanent()); - //registryDetails.get(0).getBrideAddressDetails().setPoNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPoNoPermanent()); - registryDetails.get(0).getBrideAddressDetails().setLocalityEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getLocalityEnPermanent()); - registryDetails.get(0).getBrideAddressDetails().setLocalityMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getLocalityMlPermanent()); - registryDetails.get(0).getBrideAddressDetails().setStreetNameEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getStreetNameEnPermanent()); - registryDetails.get(0).getBrideAddressDetails().setStreetNameMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getStreetNameMlPermanent()); - registryDetails.get(0).getBrideAddressDetails().setHouseNameNoEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getHouseNameNoEnPermanent()); - registryDetails.get(0).getBrideAddressDetails().setHouseNameNoMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getHouseNameNoMlPermanent()); - //registryDetails.get(0).getBrideAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getBrideAddressDetails().getVillageNamePermanent()); - //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPincode()); - //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName()); - //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage()); - //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaWardNo()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLineoneEn()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLineoneMl()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLinetwoEn()); - registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLinetwoMl()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); - //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - //registryDetails.get(0).getBrideAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - //registryDetails.get(0).getBrideAddressDetails().setPinNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPinNoPermanent()); - + if (registryDetails.get(0).getBrideAddressDetails() != null && aplnDetails.get(0).getBrideAddressDetails() != null) { + //registryDetails.get(0).getBrideAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getCountryIdPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setStateIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getStateIdPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getBrideAddressDetails().getDistrictIdPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setPoNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPoNoPermanent()); + registryDetails.get(0).getBrideAddressDetails().setLocalityEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getLocalityEnPermanent()); + registryDetails.get(0).getBrideAddressDetails().setLocalityMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getLocalityMlPermanent()); + registryDetails.get(0).getBrideAddressDetails().setStreetNameEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getStreetNameEnPermanent()); + registryDetails.get(0).getBrideAddressDetails().setStreetNameMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getStreetNameMlPermanent()); + registryDetails.get(0).getBrideAddressDetails().setHouseNameNoEnPermanent(aplnDetails.get(0).getBrideAddressDetails().getHouseNameNoEnPermanent()); + registryDetails.get(0).getBrideAddressDetails().setHouseNameNoMlPermanent(aplnDetails.get(0).getBrideAddressDetails().getHouseNameNoMlPermanent()); + //registryDetails.get(0).getBrideAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getBrideAddressDetails().getVillageNamePermanent()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrPincode()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrLBName()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaAdrVillage()); + //registryDetails.get(0).getBrideAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getBrideAddressDetails().getPermntInKeralaWardNo()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLineoneEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLineoneMl()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLinetwoEn()); + registryDetails.get(0).getBrideAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOthrIndiaLinetwoMl()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + //registryDetails.get(0).getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + //registryDetails.get(0).getBrideAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + //registryDetails.get(0).getBrideAddressDetails().setPinNoPermanent(aplnDetails.get(0).getBrideAddressDetails().getPinNoPermanent()); + } //Groom Address details - //registryDetails.get(0).getGroomAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getCountryIdPermanent()); - //registryDetails.get(0).getGroomAddressDetails().setStateIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getStateIdPermanent()); - //registryDetails.get(0).getGroomAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getDistrictIdPermanent()); - //registryDetails.get(0).getGroomAddressDetails().setPoNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPoNoPermanent()); - registryDetails.get(0).getGroomAddressDetails().setLocalityEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getLocalityEnPermanent()); - registryDetails.get(0).getGroomAddressDetails().setLocalityMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getLocalityMlPermanent()); - registryDetails.get(0).getGroomAddressDetails().setStreetNameEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getStreetNameEnPermanent()); - registryDetails.get(0).getGroomAddressDetails().setStreetNameMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getStreetNameMlPermanent()); - registryDetails.get(0).getGroomAddressDetails().setHouseNameNoEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getHouseNameNoEnPermanent()); - registryDetails.get(0).getGroomAddressDetails().setHouseNameNoMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getHouseNameNoMlPermanent()); - //registryDetails.get(0).getGroomAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getGroomAddressDetails().getVillageNamePermanent()); - //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPincode()); - //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrLBName()); - //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrVillage()); - //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaWardNo()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); - registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - //registryDetails.get(0).getGroomAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - //registryDetails.get(0).getGroomAddressDetails().setPinNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPinNoPermanent()); - + if (registryDetails.get(0).getGroomAddressDetails() != null && aplnDetails.get(0).getGroomAddressDetails() != null) { + //registryDetails.get(0).getGroomAddressDetails().setCountryIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getCountryIdPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setStateIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getStateIdPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setDistrictIdPermanent(aplnDetails.get(0).getGroomAddressDetails().getDistrictIdPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setPoNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPoNoPermanent()); + registryDetails.get(0).getGroomAddressDetails().setLocalityEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getLocalityEnPermanent()); + registryDetails.get(0).getGroomAddressDetails().setLocalityMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getLocalityMlPermanent()); + registryDetails.get(0).getGroomAddressDetails().setStreetNameEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getStreetNameEnPermanent()); + registryDetails.get(0).getGroomAddressDetails().setStreetNameMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getStreetNameMlPermanent()); + registryDetails.get(0).getGroomAddressDetails().setHouseNameNoEnPermanent(aplnDetails.get(0).getGroomAddressDetails().getHouseNameNoEnPermanent()); + registryDetails.get(0).getGroomAddressDetails().setHouseNameNoMlPermanent(aplnDetails.get(0).getGroomAddressDetails().getHouseNameNoMlPermanent()); + //registryDetails.get(0).getGroomAddressDetails().setVillageNamePermanent(aplnDetails.get(0).getGroomAddressDetails().getVillageNamePermanent()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPostOffice(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrPincode(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrPincode()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrLBName(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrLBName()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaAdrVillage(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaAdrVillage()); + //registryDetails.get(0).getGroomAddressDetails().setPermntInKeralaWardNo(aplnDetails.get(0).getGroomAddressDetails().getPermntInKeralaWardNo()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaTaluk(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLineoneMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); + registryDetails.get(0).getGroomAddressDetails().setPermntOutsideIndiaLinetwoMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + //registryDetails.get(0).getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(aplnDetails.get(0).getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + //registryDetails.get(0).getGroomAddressDetails().setPermanentOutsideIndiaPostCode(aplnDetails.get(0).getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + //registryDetails.get(0).getGroomAddressDetails().setPinNoPermanent(aplnDetails.get(0).getGroomAddressDetails().getPinNoPermanent()); + } marriageRegistryRequest.addMarriageDetails(registryDetails.get(0)); } return marriageRegistryRequest; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java index 32469dfe749..abeb7d827ac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/mapper/RegistryToApplicationMapper.java @@ -15,177 +15,188 @@ public class RegistryToApplicationMapper { public MarriageApplicationDetails convert(List registry){ MarriageApplicationDetails marriageApplicationDetails=new MarriageApplicationDetails(); - marriageApplicationDetails.setBrideDetails(new BrideDetails()); - marriageApplicationDetails.setGroomDetails(new GroomDetails()); - marriageApplicationDetails.setBrideAddressDetails(new BrideAddressDetails()); - marriageApplicationDetails.setGroomAddressDetails(new GroomAddressDetails()); - marriageApplicationDetails.setWitnessDetails(new WitnessDetails()); - MarriageRegistryDetails marriageRegistryDetails=registry.get(0); + if(marriageApplicationDetails != null && registry.get(0) != null) { + marriageApplicationDetails.setBrideDetails(new BrideDetails()); + marriageApplicationDetails.setGroomDetails(new GroomDetails()); + marriageApplicationDetails.setBrideAddressDetails(new BrideAddressDetails()); + marriageApplicationDetails.setGroomAddressDetails(new GroomAddressDetails()); + marriageApplicationDetails.setWitnessDetails(new WitnessDetails()); + MarriageRegistryDetails marriageRegistryDetails = registry.get(0); - //MARRIAGE DETAILS - marriageApplicationDetails.setDateofmarriage(marriageRegistryDetails.getDateofmarriage()); - marriageApplicationDetails.setDistrictid(marriageRegistryDetails.getDistrictid()); - marriageApplicationDetails.setLbtype(marriageRegistryDetails.getLbtype()); - marriageApplicationDetails.setTenantid(marriageRegistryDetails.getTenantid()); - marriageApplicationDetails.setLandmark(marriageRegistryDetails.getLandmark()); - marriageApplicationDetails.setPlacetype(marriageRegistryDetails.getPlacetype()); - marriageApplicationDetails.setPlaceid(marriageRegistryDetails.getPlaceid()); - marriageApplicationDetails.setPlacenameEn(marriageRegistryDetails.getPlacenameEn()); - marriageApplicationDetails.setPlacenameMl(marriageRegistryDetails.getPlacenameMl()); - marriageApplicationDetails.setMarriageHouseNoAndNameEn(marriageRegistryDetails.getMarriageHouseNoAndNameEn()); - marriageApplicationDetails.setMarriageHouseNoAndNameMl(marriageRegistryDetails.getMarriageHouseNoAndNameMl()); - marriageApplicationDetails.setStreetNameEn(marriageRegistryDetails.getStreet_name_en()); - marriageApplicationDetails.setStreetNameMl(marriageRegistryDetails.getStreet_name_ml()); - marriageApplicationDetails.setWardCode(marriageRegistryDetails.getWard_code()); - marriageApplicationDetails.setTalukid(marriageRegistryDetails.getTalukid()); - marriageApplicationDetails.setVillageName(marriageRegistryDetails.getVillage_name()); - marriageApplicationDetails.setMarriageType(marriageRegistryDetails.getMarriage_type()); - marriageApplicationDetails.setOthMarriageType(marriageRegistryDetails.getOth_marriage_type()); - marriageApplicationDetails.setLandmark(marriageRegistryDetails.getLandmark()); - marriageApplicationDetails.setLocalityEn(marriageRegistryDetails.getLocality_en()); - marriageApplicationDetails.setLocalityMl(marriageRegistryDetails.getLocality_ml()); - marriageApplicationDetails.setRegistrationDate(marriageRegistryDetails.getRegistrationDate()); - marriageApplicationDetails.setRegistrationNo(marriageRegistryDetails.getRegistrationno()); - marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukName()); - marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillageId()); + //MARRIAGE DETAILS + marriageApplicationDetails.setDateofmarriage(marriageRegistryDetails.getDateofmarriage()); + marriageApplicationDetails.setDistrictid(marriageRegistryDetails.getDistrictid()); + marriageApplicationDetails.setLbtype(marriageRegistryDetails.getLbtype()); + marriageApplicationDetails.setTenantid(marriageRegistryDetails.getTenantid()); + marriageApplicationDetails.setLandmark(marriageRegistryDetails.getLandmark()); + marriageApplicationDetails.setPlacetype(marriageRegistryDetails.getPlacetype()); + marriageApplicationDetails.setPlaceid(marriageRegistryDetails.getPlaceid()); + marriageApplicationDetails.setPlacenameEn(marriageRegistryDetails.getPlacenameEn()); + marriageApplicationDetails.setPlacenameMl(marriageRegistryDetails.getPlacenameMl()); + marriageApplicationDetails.setMarriageHouseNoAndNameEn(marriageRegistryDetails.getMarriageHouseNoAndNameEn()); + marriageApplicationDetails.setMarriageHouseNoAndNameMl(marriageRegistryDetails.getMarriageHouseNoAndNameMl()); + marriageApplicationDetails.setStreetNameEn(marriageRegistryDetails.getStreet_name_en()); + marriageApplicationDetails.setStreetNameMl(marriageRegistryDetails.getStreet_name_ml()); + marriageApplicationDetails.setWardCode(marriageRegistryDetails.getWard_code()); + marriageApplicationDetails.setTalukid(marriageRegistryDetails.getTalukid()); + marriageApplicationDetails.setVillageName(marriageRegistryDetails.getVillage_name()); + marriageApplicationDetails.setMarriageType(marriageRegistryDetails.getMarriage_type()); + marriageApplicationDetails.setOthMarriageType(marriageRegistryDetails.getOth_marriage_type()); + marriageApplicationDetails.setLandmark(marriageRegistryDetails.getLandmark()); + marriageApplicationDetails.setLocalityEn(marriageRegistryDetails.getLocality_en()); + marriageApplicationDetails.setLocalityMl(marriageRegistryDetails.getLocality_ml()); + marriageApplicationDetails.setRegistrationDate(marriageRegistryDetails.getRegistrationDate()); + marriageApplicationDetails.setRegistrationNo(marriageRegistryDetails.getRegistrationno()); + marriageApplicationDetails.setTalukName(marriageRegistryDetails.getTalukName()); + marriageApplicationDetails.setVillageId(marriageRegistryDetails.getVillageId()); - marriageApplicationDetails.setModuleCode(marriageRegistryDetails.getModuleCode()); - marriageApplicationDetails.getWitnessDetails().setBrideUrl(marriageRegistryDetails.getWitnessDetails().getBrideUrl()); - marriageApplicationDetails.getWitnessDetails().setGroomUrl(marriageRegistryDetails.getWitnessDetails().getGroomUrl()); - marriageApplicationDetails.getWitnessDetails().setImageUuid(marriageRegistryDetails.getWitnessDetails().getImageUuid()); - marriageApplicationDetails.getWitnessDetails().setBrideFilestoreId(marriageRegistryDetails.getWitnessDetails().getBrideFilestoreId()); - marriageApplicationDetails.getWitnessDetails().setGroomFilestoreId(marriageRegistryDetails.getWitnessDetails().getGroomFilestoreId()); - marriageApplicationDetails.getWitnessDetails().setBrideExpired(marriageRegistryDetails.getWitnessDetails().getBrideExpired()); - marriageApplicationDetails.getWitnessDetails().setGroomExpired(marriageRegistryDetails.getWitnessDetails().getGroomExpired()); - marriageApplicationDetails.getWitnessDetails().setIsBackward(marriageRegistryDetails.getWitnessDetails().getIsBackward()); - marriageApplicationDetails.setZonalOffice(marriageRegistryDetails.getZonalOffice()); + marriageApplicationDetails.setModuleCode(marriageRegistryDetails.getModuleCode()); + marriageApplicationDetails.setZonalOffice(marriageRegistryDetails.getZonalOffice()); + if (marriageApplicationDetails.getWitnessDetails() != null && marriageRegistryDetails.getWitnessDetails() != null) { + marriageApplicationDetails.getWitnessDetails().setBrideUrl(marriageRegistryDetails.getWitnessDetails().getBrideUrl()); + marriageApplicationDetails.getWitnessDetails().setGroomUrl(marriageRegistryDetails.getWitnessDetails().getGroomUrl()); + marriageApplicationDetails.getWitnessDetails().setImageUuid(marriageRegistryDetails.getWitnessDetails().getImageUuid()); + marriageApplicationDetails.getWitnessDetails().setBrideFilestoreId(marriageRegistryDetails.getWitnessDetails().getBrideFilestoreId()); + marriageApplicationDetails.getWitnessDetails().setGroomFilestoreId(marriageRegistryDetails.getWitnessDetails().getGroomFilestoreId()); + marriageApplicationDetails.getWitnessDetails().setBrideExpired(marriageRegistryDetails.getWitnessDetails().getBrideExpired()); + marriageApplicationDetails.getWitnessDetails().setGroomExpired(marriageRegistryDetails.getWitnessDetails().getGroomExpired()); + marriageApplicationDetails.getWitnessDetails().setIsBackward(marriageRegistryDetails.getWitnessDetails().getIsBackward()); + } - //BRIDE DETAILS - marriageApplicationDetails.getBrideDetails().setBrideGroom(marriageRegistryDetails.getBrideDetails().getBrideGroom()); - marriageApplicationDetails.getBrideDetails().setResidentship(marriageRegistryDetails.getBrideDetails().getResidentship()); - marriageApplicationDetails.getBrideDetails().setPassportno(marriageRegistryDetails.getBrideDetails().getPassportno()); - marriageApplicationDetails.getBrideDetails().setAadharno(marriageRegistryDetails.getBrideDetails().getAadharno()); - marriageApplicationDetails.getBrideDetails().setSocialsecurityno(marriageRegistryDetails.getBrideDetails().getSocialsecurityno()); - marriageApplicationDetails.getBrideDetails().setFirstnameEn(marriageRegistryDetails.getBrideDetails().getFirstname_en()); - marriageApplicationDetails.getBrideDetails().setFirstnameMl(marriageRegistryDetails.getBrideDetails().getFirstname_ml()); - marriageApplicationDetails.getBrideDetails().setMiddlenameEn(marriageRegistryDetails.getBrideDetails().getMiddlename_en()); - marriageApplicationDetails.getBrideDetails().setMiddlenameMl(marriageRegistryDetails.getBrideDetails().getMiddlename_ml()); - marriageApplicationDetails.getBrideDetails().setLastnameEn(marriageRegistryDetails.getBrideDetails().getLastname_en()); - marriageApplicationDetails.getBrideDetails().setLastnameMl(marriageRegistryDetails.getBrideDetails().getLastname_ml()); - marriageApplicationDetails.getBrideDetails().setMobile(marriageRegistryDetails.getBrideDetails().getMobile()); - marriageApplicationDetails.getBrideDetails().setEmailid(marriageRegistryDetails.getBrideDetails().getEmailid()); - marriageApplicationDetails.getBrideDetails().setGender(marriageRegistryDetails.getBrideDetails().getGender()); - marriageApplicationDetails.getBrideDetails().setDateofbirth(marriageRegistryDetails.getBrideDetails().getDateofbirth()); - marriageApplicationDetails.getBrideDetails().setAge(marriageRegistryDetails.getBrideDetails().getAge()); - marriageApplicationDetails.getBrideDetails().setParentGuardian(marriageRegistryDetails.getBrideDetails().getParent_guardian()); - marriageApplicationDetails.getBrideDetails().setBrideIsSpouseLiving(marriageRegistryDetails.getBrideDetails().getBrideIsSpouseLiving()); - marriageApplicationDetails.getBrideDetails().setBrideNoOfSpouse(marriageRegistryDetails.getBrideDetails().getBrideNoOfSpouse()); - marriageApplicationDetails.getBrideDetails().setFatherAadharno(marriageRegistryDetails.getBrideDetails().getFather_aadharno()); - marriageApplicationDetails.getBrideDetails().setFathernameEn(marriageRegistryDetails.getBrideDetails().getFathername_en()); - marriageApplicationDetails.getBrideDetails().setFathernameMl(marriageRegistryDetails.getBrideDetails().getFathername_ml()); - marriageApplicationDetails.getBrideDetails().setGuardiannameEn(marriageRegistryDetails.getBrideDetails().getGuardianname_en()); - marriageApplicationDetails.getBrideDetails().setGuardiannameMl(marriageRegistryDetails.getBrideDetails().getGuardianname_ml()); - marriageApplicationDetails.getBrideDetails().setGuardianAadharno(marriageRegistryDetails.getBrideDetails().getGuardian_aadharno()); - marriageApplicationDetails.getBrideDetails().setMothernameEn(marriageRegistryDetails.getBrideDetails().getMothername_en()); - marriageApplicationDetails.getBrideDetails().setMothernameMl(marriageRegistryDetails.getBrideDetails().getMothername_ml()); - marriageApplicationDetails.getBrideDetails().setMotherAadharno(marriageRegistryDetails.getBrideDetails().getMother_aadharno()); - marriageApplicationDetails.getBrideDetails().setMaritalstatusid(marriageRegistryDetails.getBrideDetails().getMaritalstatusid()); - marriageApplicationDetails.getBrideDetails().setTenentId(marriageRegistryDetails.getBrideDetails().getTenentId()); + //BRIDE DETAILS + if (marriageApplicationDetails.getBrideDetails() != null && marriageRegistryDetails.getBrideDetails() != null) { + marriageApplicationDetails.getBrideDetails().setBrideGroom(marriageRegistryDetails.getBrideDetails().getBrideGroom()); + marriageApplicationDetails.getBrideDetails().setResidentship(marriageRegistryDetails.getBrideDetails().getResidentship()); + marriageApplicationDetails.getBrideDetails().setPassportno(marriageRegistryDetails.getBrideDetails().getPassportno()); + marriageApplicationDetails.getBrideDetails().setAadharno(marriageRegistryDetails.getBrideDetails().getAadharno()); + marriageApplicationDetails.getBrideDetails().setSocialsecurityno(marriageRegistryDetails.getBrideDetails().getSocialsecurityno()); + marriageApplicationDetails.getBrideDetails().setFirstnameEn(marriageRegistryDetails.getBrideDetails().getFirstname_en()); + marriageApplicationDetails.getBrideDetails().setFirstnameMl(marriageRegistryDetails.getBrideDetails().getFirstname_ml()); + marriageApplicationDetails.getBrideDetails().setMiddlenameEn(marriageRegistryDetails.getBrideDetails().getMiddlename_en()); + marriageApplicationDetails.getBrideDetails().setMiddlenameMl(marriageRegistryDetails.getBrideDetails().getMiddlename_ml()); + marriageApplicationDetails.getBrideDetails().setLastnameEn(marriageRegistryDetails.getBrideDetails().getLastname_en()); + marriageApplicationDetails.getBrideDetails().setLastnameMl(marriageRegistryDetails.getBrideDetails().getLastname_ml()); + marriageApplicationDetails.getBrideDetails().setMobile(marriageRegistryDetails.getBrideDetails().getMobile()); + marriageApplicationDetails.getBrideDetails().setEmailid(marriageRegistryDetails.getBrideDetails().getEmailid()); + marriageApplicationDetails.getBrideDetails().setGender(marriageRegistryDetails.getBrideDetails().getGender()); + marriageApplicationDetails.getBrideDetails().setDateofbirth(marriageRegistryDetails.getBrideDetails().getDateofbirth()); + marriageApplicationDetails.getBrideDetails().setAge(marriageRegistryDetails.getBrideDetails().getAge()); + marriageApplicationDetails.getBrideDetails().setParentGuardian(marriageRegistryDetails.getBrideDetails().getParent_guardian()); + marriageApplicationDetails.getBrideDetails().setBrideIsSpouseLiving(marriageRegistryDetails.getBrideDetails().getBrideIsSpouseLiving()); + marriageApplicationDetails.getBrideDetails().setBrideNoOfSpouse(marriageRegistryDetails.getBrideDetails().getBrideNoOfSpouse()); + marriageApplicationDetails.getBrideDetails().setFatherAadharno(marriageRegistryDetails.getBrideDetails().getFather_aadharno()); + marriageApplicationDetails.getBrideDetails().setFathernameEn(marriageRegistryDetails.getBrideDetails().getFathername_en()); + marriageApplicationDetails.getBrideDetails().setFathernameMl(marriageRegistryDetails.getBrideDetails().getFathername_ml()); + marriageApplicationDetails.getBrideDetails().setGuardiannameEn(marriageRegistryDetails.getBrideDetails().getGuardianname_en()); + marriageApplicationDetails.getBrideDetails().setGuardiannameMl(marriageRegistryDetails.getBrideDetails().getGuardianname_ml()); + marriageApplicationDetails.getBrideDetails().setGuardianAadharno(marriageRegistryDetails.getBrideDetails().getGuardian_aadharno()); + marriageApplicationDetails.getBrideDetails().setMothernameEn(marriageRegistryDetails.getBrideDetails().getMothername_en()); + marriageApplicationDetails.getBrideDetails().setMothernameMl(marriageRegistryDetails.getBrideDetails().getMothername_ml()); + marriageApplicationDetails.getBrideDetails().setMotherAadharno(marriageRegistryDetails.getBrideDetails().getMother_aadharno()); + marriageApplicationDetails.getBrideDetails().setMaritalstatusid(marriageRegistryDetails.getBrideDetails().getMaritalstatusid()); + marriageApplicationDetails.getBrideDetails().setTenentId(marriageRegistryDetails.getBrideDetails().getTenentId()); + } - //GROOM DETAILS - marriageApplicationDetails.getGroomDetails().setBrideGroom(marriageRegistryDetails.getGroomDetails().getBrideGroom()); - marriageApplicationDetails.getGroomDetails().setDateofbirth(marriageRegistryDetails.getGroomDetails().getDateofbirth()); - marriageApplicationDetails.getGroomDetails().setFirstnameEn(marriageRegistryDetails.getGroomDetails().getFirstname_en()); - marriageApplicationDetails.getGroomDetails().setFirstnameMl(marriageRegistryDetails.getGroomDetails().getFirstname_ml()); - marriageApplicationDetails.getGroomDetails().setMiddlenameEn(marriageRegistryDetails.getGroomDetails().getMiddlename_en()); - marriageApplicationDetails.getGroomDetails().setMiddlenameMl(marriageRegistryDetails.getGroomDetails().getMiddlename_ml()); - marriageApplicationDetails.getGroomDetails().setLastnameEn(marriageRegistryDetails.getGroomDetails().getLastname_en()); - marriageApplicationDetails.getGroomDetails().setLastnameMl(marriageRegistryDetails.getGroomDetails().getLastname_ml()); - marriageApplicationDetails.getGroomDetails().setAge(marriageRegistryDetails.getGroomDetails().getAge()); - marriageApplicationDetails.getGroomDetails().setAadharno(marriageRegistryDetails.getGroomDetails().getAadharno()); - marriageApplicationDetails.getGroomDetails().setSocialsecurityno(marriageRegistryDetails.getGroomDetails().getSocialsecurityno()); - marriageApplicationDetails.getGroomDetails().setMobile(marriageRegistryDetails.getGroomDetails().getMobile()); - marriageApplicationDetails.getGroomDetails().setGroomIsSpouseLiving(marriageRegistryDetails.getGroomDetails().getGroomIsSpouseLiving()); - marriageApplicationDetails.getGroomDetails().setGroomNoOfSpouse(marriageRegistryDetails.getGroomDetails().getGroomNoOfSpouse()); - marriageApplicationDetails.getGroomDetails().setEmailid(marriageRegistryDetails.getGroomDetails().getEmailid()); - marriageApplicationDetails.getGroomDetails().setFatherAadharno(marriageRegistryDetails.getGroomDetails().getFather_aadharno()); - marriageApplicationDetails.getGroomDetails().setFathernameEn(marriageRegistryDetails.getGroomDetails().getFathername_en()); - marriageApplicationDetails.getGroomDetails().setFathernameMl(marriageRegistryDetails.getGroomDetails().getFathername_ml()); - marriageApplicationDetails.getGroomDetails().setGuardiannameEn(marriageRegistryDetails.getGroomDetails().getGuardianname_en()); - marriageApplicationDetails.getGroomDetails().setGuardiannameMl(marriageRegistryDetails.getGroomDetails().getGuardianname_ml()); - marriageApplicationDetails.getGroomDetails().setGuardianAadharno(marriageRegistryDetails.getGroomDetails().getGuardian_aadharno()); - marriageApplicationDetails.getGroomDetails().setMothernameEn(marriageRegistryDetails.getGroomDetails().getMothername_en()); - marriageApplicationDetails.getGroomDetails().setMothernameMl(marriageRegistryDetails.getGroomDetails().getMothername_ml()); - marriageApplicationDetails.getGroomDetails().setMotherAadharno(marriageRegistryDetails.getGroomDetails().getMother_aadharno()); - marriageApplicationDetails.getGroomDetails().setGender(marriageRegistryDetails.getGroomDetails().getGender()); - marriageApplicationDetails.getGroomDetails().setMaritalstatusid(marriageRegistryDetails.getGroomDetails().getMaritalstatusid()); - marriageApplicationDetails.getGroomDetails().setParentGuardian(marriageRegistryDetails.getGroomDetails().getParent_guardian()); - marriageApplicationDetails.getGroomDetails().setPassportno(marriageRegistryDetails.getGroomDetails().getPassportno()); - marriageApplicationDetails.getGroomDetails().setResidentship(marriageRegistryDetails.getGroomDetails().getResidentship()); - marriageApplicationDetails.getGroomDetails().setTenentId(marriageRegistryDetails.getGroomDetails().getTenentId()); + //GROOM DETAILS + if (marriageApplicationDetails.getGroomDetails() != null && marriageRegistryDetails.getGroomDetails() != null) { + marriageApplicationDetails.getGroomDetails().setBrideGroom(marriageRegistryDetails.getGroomDetails().getBrideGroom()); + marriageApplicationDetails.getGroomDetails().setDateofbirth(marriageRegistryDetails.getGroomDetails().getDateofbirth()); + marriageApplicationDetails.getGroomDetails().setFirstnameEn(marriageRegistryDetails.getGroomDetails().getFirstname_en()); + marriageApplicationDetails.getGroomDetails().setFirstnameMl(marriageRegistryDetails.getGroomDetails().getFirstname_ml()); + marriageApplicationDetails.getGroomDetails().setMiddlenameEn(marriageRegistryDetails.getGroomDetails().getMiddlename_en()); + marriageApplicationDetails.getGroomDetails().setMiddlenameMl(marriageRegistryDetails.getGroomDetails().getMiddlename_ml()); + marriageApplicationDetails.getGroomDetails().setLastnameEn(marriageRegistryDetails.getGroomDetails().getLastname_en()); + marriageApplicationDetails.getGroomDetails().setLastnameMl(marriageRegistryDetails.getGroomDetails().getLastname_ml()); + marriageApplicationDetails.getGroomDetails().setAge(marriageRegistryDetails.getGroomDetails().getAge()); + marriageApplicationDetails.getGroomDetails().setAadharno(marriageRegistryDetails.getGroomDetails().getAadharno()); + marriageApplicationDetails.getGroomDetails().setSocialsecurityno(marriageRegistryDetails.getGroomDetails().getSocialsecurityno()); + marriageApplicationDetails.getGroomDetails().setMobile(marriageRegistryDetails.getGroomDetails().getMobile()); + marriageApplicationDetails.getGroomDetails().setGroomIsSpouseLiving(marriageRegistryDetails.getGroomDetails().getGroomIsSpouseLiving()); + marriageApplicationDetails.getGroomDetails().setGroomNoOfSpouse(marriageRegistryDetails.getGroomDetails().getGroomNoOfSpouse()); + marriageApplicationDetails.getGroomDetails().setEmailid(marriageRegistryDetails.getGroomDetails().getEmailid()); + marriageApplicationDetails.getGroomDetails().setFatherAadharno(marriageRegistryDetails.getGroomDetails().getFather_aadharno()); + marriageApplicationDetails.getGroomDetails().setFathernameEn(marriageRegistryDetails.getGroomDetails().getFathername_en()); + marriageApplicationDetails.getGroomDetails().setFathernameMl(marriageRegistryDetails.getGroomDetails().getFathername_ml()); + marriageApplicationDetails.getGroomDetails().setGuardiannameEn(marriageRegistryDetails.getGroomDetails().getGuardianname_en()); + marriageApplicationDetails.getGroomDetails().setGuardiannameMl(marriageRegistryDetails.getGroomDetails().getGuardianname_ml()); + marriageApplicationDetails.getGroomDetails().setGuardianAadharno(marriageRegistryDetails.getGroomDetails().getGuardian_aadharno()); + marriageApplicationDetails.getGroomDetails().setMothernameEn(marriageRegistryDetails.getGroomDetails().getMothername_en()); + marriageApplicationDetails.getGroomDetails().setMothernameMl(marriageRegistryDetails.getGroomDetails().getMothername_ml()); + marriageApplicationDetails.getGroomDetails().setMotherAadharno(marriageRegistryDetails.getGroomDetails().getMother_aadharno()); + marriageApplicationDetails.getGroomDetails().setGender(marriageRegistryDetails.getGroomDetails().getGender()); + marriageApplicationDetails.getGroomDetails().setMaritalstatusid(marriageRegistryDetails.getGroomDetails().getMaritalstatusid()); + marriageApplicationDetails.getGroomDetails().setParentGuardian(marriageRegistryDetails.getGroomDetails().getParent_guardian()); + marriageApplicationDetails.getGroomDetails().setPassportno(marriageRegistryDetails.getGroomDetails().getPassportno()); + marriageApplicationDetails.getGroomDetails().setResidentship(marriageRegistryDetails.getGroomDetails().getResidentship()); + marriageApplicationDetails.getGroomDetails().setTenentId(marriageRegistryDetails.getGroomDetails().getTenentId()); + } - //BRIDE ADDRESS DETAILS - marriageApplicationDetails.getBrideAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getCountryIdPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setStateIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getStateIdPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setDistrictIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getDistrictIdPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setPoNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPoNoPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setLocalityEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getLocalityEnPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setLocalityMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getLocalityMlPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setStreetNameEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getStreetNameEnPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setStreetNameMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getStreetNameMlPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setHouseNameNoMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getHouseNameNoMlPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setVillageNamePermanent(marriageRegistryDetails.getBrideAddressDetails().getVillageNamePermanent()); - marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrPostOffice(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); - marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName()); - marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); - marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrVillage()); - marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaWardNo()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); - marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriageApplicationDetails.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); - marriageApplicationDetails.getBrideAddressDetails().setPinNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPinNoPermanent()); - marriageApplicationDetails.getBrideAddressDetails().setTownOrVillagePermanent(marriageRegistryDetails.getBrideAddressDetails().getTownOrVillagePermanent()); - - //GROOM ADDRESS DETAILS - marriageApplicationDetails.getGroomAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getCountryIdPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setStateIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getStateIdPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setDistrictIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getDistrictIdPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setPoNoPermanent(marriageRegistryDetails.getGroomAddressDetails().getPoNoPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setLocalityEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getLocalityEnPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setLocalityMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getLocalityMlPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setStreetNameEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getStreetNameEnPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setStreetNameMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getStreetNameMlPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setHouseNameNoMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getHouseNameNoMlPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setVillageNamePermanent(marriageRegistryDetails.getGroomAddressDetails().getVillageNamePermanent()); - marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrPostOffice(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaWardNo()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); - marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); - marriageApplicationDetails.getGroomAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); - marriageApplicationDetails.getGroomAddressDetails().setPinNoPermanent(marriageRegistryDetails.getGroomAddressDetails().getPinNoPermanent()); - marriageApplicationDetails.getGroomAddressDetails().setTownOrVillagePermanent(marriageRegistryDetails.getGroomAddressDetails().getTownOrVillagePermanent()); + //BRIDE ADDRESS DETAILS + if (marriageApplicationDetails.getBrideAddressDetails() != null && marriageRegistryDetails.getBrideAddressDetails() != null) { + marriageApplicationDetails.getBrideAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getCountryIdPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setStateIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getStateIdPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setDistrictIdPermanent(marriageRegistryDetails.getBrideAddressDetails().getDistrictIdPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setPoNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPoNoPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setLocalityEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getLocalityEnPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setLocalityMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getLocalityMlPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setStreetNameEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getStreetNameEnPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setStreetNameMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getStreetNameMlPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(marriageRegistryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setHouseNameNoMlPermanent(marriageRegistryDetails.getBrideAddressDetails().getHouseNameNoMlPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setVillageNamePermanent(marriageRegistryDetails.getBrideAddressDetails().getVillageNamePermanent()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrPostOffice(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrTaluk()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaAdrVillage()); + marriageApplicationDetails.getBrideAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getBrideAddressDetails().getPermntInKeralaWardNo()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaTaluk()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLineoneMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLinetwoEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOthrIndiaLinetwoMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutsideIndiaLinetwoMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriageApplicationDetails.getBrideAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getBrideAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriageApplicationDetails.getBrideAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getBrideAddressDetails().getPermanentOutsideIndiaPostCode()); + marriageApplicationDetails.getBrideAddressDetails().setPinNoPermanent(marriageRegistryDetails.getBrideAddressDetails().getPinNoPermanent()); + marriageApplicationDetails.getBrideAddressDetails().setTownOrVillagePermanent(marriageRegistryDetails.getBrideAddressDetails().getTownOrVillagePermanent()); + } + //GROOM ADDRESS DETAILS + if (marriageApplicationDetails.getGroomAddressDetails() != null && marriageRegistryDetails.getGroomAddressDetails() != null) { + marriageApplicationDetails.getGroomAddressDetails().setCountryIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getCountryIdPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setStateIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getStateIdPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setDistrictIdPermanent(marriageRegistryDetails.getGroomAddressDetails().getDistrictIdPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setPoNoPermanent(marriageRegistryDetails.getGroomAddressDetails().getPoNoPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setLocalityEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getLocalityEnPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setLocalityMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getLocalityMlPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setStreetNameEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getStreetNameEnPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setStreetNameMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getStreetNameMlPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setHouseNameNoEnPermanent(marriageRegistryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setHouseNameNoMlPermanent(marriageRegistryDetails.getGroomAddressDetails().getHouseNameNoMlPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setVillageNamePermanent(marriageRegistryDetails.getGroomAddressDetails().getVillageNamePermanent()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrPostOffice(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrLBName(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaAdrVillage(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaAdrVillage()); + marriageApplicationDetails.getGroomAddressDetails().setPermntInKeralaWardNo(marriageRegistryDetails.getGroomAddressDetails().getPermntInKeralaWardNo()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaTaluk()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLineoneMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLineoneMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOthrIndiaLinetwoMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutsideIndiaLinetwoMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceEn(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceEn()); + marriageApplicationDetails.getGroomAddressDetails().setPermntOutSideIndiaProvinceMl(marriageRegistryDetails.getGroomAddressDetails().getPermntOutSideIndiaProvinceMl()); + marriageApplicationDetails.getGroomAddressDetails().setPermanentOutsideIndiaPostCode(marriageRegistryDetails.getGroomAddressDetails().getPermanentOutsideIndiaPostCode()); + marriageApplicationDetails.getGroomAddressDetails().setPinNoPermanent(marriageRegistryDetails.getGroomAddressDetails().getPinNoPermanent()); + marriageApplicationDetails.getGroomAddressDetails().setTownOrVillagePermanent(marriageRegistryDetails.getGroomAddressDetails().getTownOrVillagePermanent()); + } + } return marriageApplicationDetails; } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index cadd5a15ff7..454cbad40d0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -170,8 +170,10 @@ public List updateMarriageCorrectionDetails(MarriageC marriageCorrectionMDMSValidator.validateMarriageCorrectionMDMSData(request,mdmsData); String applicationNumber = request.getMarriageCorrectionDetails().get(0).getApplicationNo(); + String registrationNumber = request.getMarriageCorrectionDetails().get(0).getRegistrationno(); MarriageApplicationSearchCriteria criteria = (MarriageApplicationSearchCriteria.builder() .applicationNo(applicationNumber) + .registrationNo(registrationNumber) .build()); List searchResult = applnRepository.getMarriageApplication(criteria, request.getRequestInfo()); correctionValidatorService.validateCorrectionUpdate(request, searchResult); From 81ef177cab8697a8bb80baaa2c0d3ba87265633f Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 11 May 2023 15:59:42 +0530 Subject: [PATCH 362/420] comment in workflow for testing --- .../org/ksmart/marriage/common/consumer/ReceiptConsumer.java | 1 + .../ksmart/marriage/common/services/PaymentUpdateService.java | 2 ++ 2 files changed, 3 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java index 819532c5dac..cd147a55c74 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java @@ -63,6 +63,7 @@ public ReceiptConsumer(PaymentUpdateService paymentUpdateService) { @KafkaListener(topics = {"${kafka.topics.receipt.create}"}) public void listenPayments(final HashMap record) { + System.out.println("Inside kafka payment listner ...................>"); paymentUpdateService.process(record); // paymentNotificationService.process(record); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index 73be2a35120..8cd783dcc8d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -98,7 +98,9 @@ public void process(HashMap record) { // System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); if(null!=marriage && marriage.size()==1){ + System.out.println("Search application size>1...................>"); if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + System.out.println("Inside status -PAY...................>"); marriage.get(0).setAction(MarriageConstants.ACTION_PAY); } } From 94e82161523a78601799c95bd01418de5b18d30d Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 11 May 2023 16:14:56 +0530 Subject: [PATCH 363/420] comment in workflow for testing --- .../validator/MarriageApplicationValidator.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index c522f3f3681..52f6d1ea587 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -469,14 +469,14 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomInfo.getMothernameMl() + " is invalid"); } -// } else { -// if (StringUtils.isEmpty(groomInfo.getGuardianAadharno())) { -// throw new CustomException( -// " GROOM GUARDIAN AADHAR INVALID ", -// "The groom Guardian Aadhar number " + -// groomInfo.getGuardianAadharno() -// + " is invalid"); -// } + } else { + // if (StringUtils.isEmpty(groomInfo.getGuardianAadharno())) { + // throw new CustomException( + // " GROOM GUARDIAN AADHAR INVALID ", + // "The groom Guardian Aadhar number " + + // groomInfo.getGuardianAadharno() + // + " is invalid"); + // } if (StringUtils.isEmpty(groomInfo.getGuardiannameEn())) { throw new CustomException( " GROOM GUARDIAN NAME ENGLISH ", From afc9c593be3004f68b4f5d3aada49db3b29d04c3 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 12 May 2023 11:04:19 +0530 Subject: [PATCH 364/420] yml updated --- .../egov-persister/src/main/resources/marriage.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 0bad44ee811..c4daf8a9158 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -1074,7 +1074,7 @@ serviceMaps: SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, - ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,present_tenentid=? + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=? ,present_tenentid=? WHERE marriageid=? and bride_groom='B' and tenantid=?; @@ -1160,7 +1160,7 @@ serviceMaps: SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, same_as_permanent=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, - ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,present_tenentid + ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,present_tenentid = ? WHERE marriageid=? and bride_groom='G' and tenantid=?; basePath: MarriageDetails.*.GroomAddressDetails @@ -1243,7 +1243,7 @@ serviceMaps: SET housename_no_en=?, housename_no_ml=?, villageid=?, village_name=?, talukid=?, taluk_name=?, ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?,poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, - ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,permanent_tenentid + ot_address2_ml=?, ot_state_region_province_en=?,ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,permanent_tenentid = ? WHERE marriageid=? and bride_groom='B' and tenantid=?; basePath: MarriageDetails.*.BrideAddressDetails jsonMaps: @@ -1324,7 +1324,7 @@ serviceMaps: ward_code=?, locality_en=?, locality_ml=?, street_name_en=?, street_name_ml=?, districtid=?, stateid=?, poid=?, pinno=?, countryid=?, lastmodifiedtime=?, lastmodifiedby=?, poname_en=?, ot_address1_en=?, ot_address1_ml=?, ot_address2_en=?, ot_address2_ml=?, ot_state_region_province_en=?, - ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?,permanent_tenentid + ot_state_region_province_ml=?, ot_zipcode=?, poname_ml=?, city_town_village=?, permanent_tenentid = ? WHERE bride_groom='G' AND marriageid=? and tenantid=?; From de787e56bcb2a22299c46445829ee43d983a137e Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 12 May 2023 11:10:51 +0530 Subject: [PATCH 365/420] yml updated --- .../ksmart/marriage/common/services/PaymentUpdateService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index 8cd783dcc8d..ec1be1df364 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -98,7 +98,7 @@ public void process(HashMap record) { // System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); if(null!=marriage && marriage.size()==1){ - System.out.println("Search application size>1...................>"); + System.out.println("Search application size>1...................>"+marriage.get(0).getStatus()); if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ System.out.println("Inside status -PAY...................>"); marriage.get(0).setAction(MarriageConstants.ACTION_PAY); From c556e78167fa1d2ade5b59cc6724d8308334609c Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 12 May 2023 12:10:37 +0530 Subject: [PATCH 366/420] payment updation --- .../marriage/common/services/PaymentUpdateService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index ec1be1df364..e3dd41aa3e4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -84,7 +84,6 @@ public void process(HashMap record) { try { PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); RequestInfo requestInfo = paymentRequest.getRequestInfo(); - List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); String tenantId = paymentRequest.getPayment().getTenantId(); for (PaymentDetail paymentDetail : paymentDetails) { @@ -99,10 +98,10 @@ public void process(HashMap record) { List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); if(null!=marriage && marriage.size()==1){ System.out.println("Search application size>1...................>"+marriage.get(0).getStatus()); - if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + //if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ System.out.println("Inside status -PAY...................>"); marriage.get(0).setAction(MarriageConstants.ACTION_PAY); - } + //} } MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) .marriageDetails(marriage).build(); From c29376ff222820c490dd2da6434024d16e796997 Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 12 May 2023 23:42:39 +0530 Subject: [PATCH 367/420] changes in imagepath setting for marriage application and registry --- .../enrichment/MarriageDetailsEnrichment.java | 15 +++++++++++++ .../MarriageApplicationRowMapper.java | 17 +++++++++++++++ .../rowmapper/WitnessDetailsRowMapper.java | 5 +++-- .../MarriageRegistryEnrichment.java | 19 ++++++++++++++++- .../MarriageRegistryRepository.java | 16 +++++++------- .../rowmapper/MarriageRegistryRowMapper.java | 21 +++++++++++++++++-- .../rowmapper/WitnessRegistryRowMapper.java | 7 ++++++- 7 files changed, 86 insertions(+), 14 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 2b680c8198c..9f8015811c6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.User; import org.egov.tracer.model.CustomException; @@ -84,6 +85,12 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getWitnessDetails().setSerialNo1(1); marriage.getWitnessDetails().setSerialNo2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); + if(StringUtils.isNotBlank(marriage.getWitnessDetails().getBrideUrl())){ + marriage.getWitnessDetails().setBrideUrl(marriage.getWitnessDetails().getBrideUrl().replaceAll(config.getImageURLStartPath(),"")); + } + if(StringUtils.isNotBlank(marriage.getWitnessDetails().getGroomUrl())){ + marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().replaceAll(config.getImageURLStartPath(),"")); + } } setApplicationNumbers(request); setBrideAddressNull(request); @@ -251,6 +258,14 @@ else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ WitnessDetails witnessDetailsEnc = encryptionDecryptionUtil.encryptObject(witnessDetails, "BndDetail", WitnessDetails.class); witnessDetails.setWitness1AadharNo(witnessDetailsEnc.getWitness1AadharNo()); witnessDetails.setWitness2AadharNo(witnessDetailsEnc.getWitness2AadharNo()); + if(marriage.getWitnessDetails()!=null){ + if(StringUtils.isNotBlank(marriage.getWitnessDetails().getBrideUrl())){ + marriage.getWitnessDetails().setBrideUrl(marriage.getWitnessDetails().getBrideUrl().replaceAll(config.getImageURLStartPath(),"")); + } + if(StringUtils.isNotBlank(marriage.getWitnessDetails().getGroomUrl())){ + marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().replaceAll(config.getImageURLStartPath(),"")); + } + } }); } private void setGroomPresentAddress(MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 77cb2864b4b..2c6d15a91f4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -1,5 +1,7 @@ package org.ksmart.marriage.marriageapplication.repository.rowmapper; +import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; @@ -13,6 +15,11 @@ @Component public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper,DocumentRowMapper{ + private final MarriageApplicationConfiguration marriageApplicationConfiguration; + + public MarriageApplicationRowMapper(MarriageApplicationConfiguration marriageApplicationConfiguration) { + this.marriageApplicationConfiguration = marriageApplicationConfiguration; + } @Override public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null List result = new ArrayList<>(); @@ -65,4 +72,14 @@ public List extractData(ResultSet rs) throws SQLExce return result; } + @Override + public String createFullURL(String url) { + if(StringUtils.isNotBlank(url)){ +// System.out.println("---------------"+url); +// System.out.println("---------------"+marriageApplicationConfiguration.getImageURLStartPath()+url); + return marriageApplicationConfiguration.getImageURLStartPath()+url; + } +// System.out.println("-else--------------"+url); + return url; + } } \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java index 70a8c9b30c9..c4a23f0e7b8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/WitnessDetailsRowMapper.java @@ -39,14 +39,15 @@ default WitnessDetails getWitnessDetails(ResultSet rs) throws SQLException { // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) .tenentId(rs.getString("MD_tenantid")) .brideExpired(rs.getBoolean("MD_bride_expired")) - .brideUrl(rs.getString("MD_brideurl")) + .brideUrl(createFullURL(rs.getString("MD_brideurl"))) .brideFilestoreId(rs.getString("MD_bride_filestoreid")) .groomExpired(rs.getBoolean("MD_groom_expired")) - .groomUrl(rs.getString("MD_groomurl")) + .groomUrl(createFullURL(rs.getString("MD_groomurl"))) .groomFilestoreId(rs.getString("MD_groom_filestoreid")) .imageUuid(rs.getString("MD_imageuuid")) .isBackward(rs.getBoolean("MD_is_backward")) .build(); } + String createFullURL(String url); } \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 65c38c37253..7823f1a68a5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -83,6 +83,12 @@ public void enrichCreate(MarriageRegistryRequest request) { marriage.getWitnessDetails().setSerial_no1(1); marriage.getWitnessDetails().setSerial_no2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); + if(StringUtils.isNotBlank(marriage.getWitnessDetails().getBrideUrl())){ + marriage.getWitnessDetails().setBrideUrl(marriage.getWitnessDetails().getBrideUrl().replaceAll(config.getImageURLStartPath(),"")); + } + if(StringUtils.isNotBlank(marriage.getWitnessDetails().getGroomUrl())){ + marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().replaceAll(config.getImageURLStartPath(),"")); + } } //Added on 09.05.2023 Jasmine if(marriage.getBrideAddressDetails()!=null){ @@ -861,7 +867,18 @@ public void enrichUpdate(MarriageRegistryRequest request) { User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.FALSE); request.getMarriageDetails() - .forEach(marriage -> marriage.setAuditDetails(auditDetails)); + .forEach(marriage -> { + marriage.setAuditDetails(auditDetails); + if(marriage.getWitnessDetails()!=null){ + if(StringUtils.isNotBlank(marriage.getWitnessDetails().getBrideUrl())){ + marriage.getWitnessDetails().setBrideUrl(marriage.getWitnessDetails().getBrideUrl().replaceAll(config.getImageURLStartPath(),"")); + } + if(StringUtils.isNotBlank(marriage.getWitnessDetails().getGroomUrl())){ + marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().replaceAll(config.getImageURLStartPath(),"")); + } + } + + }); } private List getIds(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index e714748f223..a4870777ee8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -187,14 +187,14 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { - //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath() + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); + //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl( req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); }else{ log.info("PDF_ERROR. Marriage Certificate , Groom Photo not found!!!"); throw new CustomException("PDF_ERROR", "Groom Photo not found!!!" ); //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getDefaultPhotoUrl()); } if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { - //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); + //req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); }else{ log.info("PDF_ERROR. Marriage Certificate , Bride Photo not found!!!"); throw new CustomException("PDF_ERROR", "Bride Photo not found!!!" ); @@ -313,17 +313,17 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria } if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { - if(isImageExists(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl(marriageApplicationConfiguration.getImageURLStartPath() + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); - }else{ + if(!isImageExists(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl( req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); +// }else{ log.error("PDF_ERROR. Marriage Certificate , Invalid Groom Photo Path!!!"); throw new CustomException("PDF_ERROR", "Invalid Groom Photo Path!!!" ); } } if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { - if(isImageExists(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { - req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(marriageApplicationConfiguration.getImageURLStartPath()+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); - }else{ + if(!isImageExists(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { +// req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); +// }else{ log.error("PDF_ERROR. Marriage Certificate , Invalid Bride Photo Path!!!"); throw new CustomException("PDF_ERROR", "Invalid Bride Photo Path!!!" ); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java index 4bde70c09b4..9419a598ac2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/MarriageRegistryRowMapper.java @@ -1,5 +1,7 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; +import org.apache.commons.lang3.StringUtils; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; @@ -11,11 +13,16 @@ import java.util.List; @Component -public class MarriageRegistryRowMapper implements ResultSetExtractor>, +public class MarriageRegistryRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideRegistryRowMapper, GroomRegistryRowMapper,GroomRegistryAddressRowMapper,BrideRegistryAddressRowMapper, WitnessRegistryRowMapper { + private final MarriageApplicationConfiguration marriageApplicationConfiguration; + + public MarriageRegistryRowMapper(MarriageApplicationConfiguration marriageApplicationConfiguration) { + this.marriageApplicationConfiguration = marriageApplicationConfiguration; + } @Override public List extractData(ResultSet rs) throws SQLException, DataAccessException { //how to handle null @@ -66,4 +73,14 @@ public List extractData(ResultSet rs) throws SQLExcepti return result; } -} + @Override + public String createFullURL(String url) { + if(StringUtils.isNotBlank(url)){ +// System.out.println("---------------"+url); +// System.out.println("---------------"+marriageApplicationConfiguration.getImageURLStartPath()+url); + return marriageApplicationConfiguration.getImageURLStartPath()+url; + } +// System.out.println("-else--------------"+url); + return url; + } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index 55137d65027..329e4b1af2c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -1,5 +1,6 @@ package org.ksmart.marriage.marriageregistry.repository.rowmapper; +import org.apache.commons.lang3.StringUtils; import org.ksmart.marriage.marriageregistry.web.model.WitnessRegistryDetails; import java.sql.ResultSet; import java.sql.SQLException; @@ -8,6 +9,7 @@ @Component public interface WitnessRegistryRowMapper { + default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLException { return WitnessRegistryDetails.builder() @@ -44,11 +46,14 @@ default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLExcepti .brideUrl(rs.getString("MD_brideurl")) .brideFilestoreId(rs.getString("MD_bride_filestoreid")) .groomExpired(rs.getBoolean("MD_groom_expired")) - .groomUrl(rs.getString("MD_groomurl")) + .groomUrl(createFullURL(rs.getString("MD_groomurl"))) .groomFilestoreId(rs.getString("MD_groom_filestoreid")) .imageUuid(rs.getString("MD_imageuuid")) .isBackward(rs.getBoolean("MD_is_backward")) .build(); } + String createFullURL(String url); + + } \ No newline at end of file From bfb45f079924e42836b91138a79a8d2809febc51 Mon Sep 17 00:00:00 2001 From: binilp Date: Fri, 12 May 2023 23:50:43 +0530 Subject: [PATCH 368/420] changes in imagepath setting --- .../enrichment/MarriageDetailsEnrichment.java | 4 ++-- .../enrichment/MarriageRegistryEnrichment.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 9f8015811c6..8bc29a566c9 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -86,10 +86,10 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.getWitnessDetails().setSerialNo2(2); marriage.getWitnessDetails().setWitnessAuditDetails(auditDetails); if(StringUtils.isNotBlank(marriage.getWitnessDetails().getBrideUrl())){ - marriage.getWitnessDetails().setBrideUrl(marriage.getWitnessDetails().getBrideUrl().replaceAll(config.getImageURLStartPath(),"")); + marriage.getWitnessDetails().setBrideUrl(marriage.getWitnessDetails().getBrideUrl().trim().replaceAll(config.getImageURLStartPath(),"")); } if(StringUtils.isNotBlank(marriage.getWitnessDetails().getGroomUrl())){ - marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().replaceAll(config.getImageURLStartPath(),"")); + marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().trim().replaceAll(config.getImageURLStartPath(),"")); } } setApplicationNumbers(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 7823f1a68a5..71a924237db 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -871,10 +871,10 @@ public void enrichUpdate(MarriageRegistryRequest request) { marriage.setAuditDetails(auditDetails); if(marriage.getWitnessDetails()!=null){ if(StringUtils.isNotBlank(marriage.getWitnessDetails().getBrideUrl())){ - marriage.getWitnessDetails().setBrideUrl(marriage.getWitnessDetails().getBrideUrl().replaceAll(config.getImageURLStartPath(),"")); + marriage.getWitnessDetails().setBrideUrl(marriage.getWitnessDetails().getBrideUrl().trim().replaceAll(config.getImageURLStartPath(),"")); } if(StringUtils.isNotBlank(marriage.getWitnessDetails().getGroomUrl())){ - marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().replaceAll(config.getImageURLStartPath(),"")); + marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().trim().replaceAll(config.getImageURLStartPath(),"")); } } From 158150047f610f2dadeac78d34939f2a5afc0e26 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 13 May 2023 14:50:05 +0530 Subject: [PATCH 369/420] set document activeflag --- .../enrichment/MarriageDetailsEnrichment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 2b680c8198c..458c890aa11 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -151,6 +151,7 @@ else if (brideDetails.getParentGuardian().equals(MarriageConstants.GUARDIAN)){ document.setApplicationNumber(applicationNumber); document.setApplicationType(applicationType); document.setMarriageDocAuditDetails(auditDetails); + document.setActive(true); }); } From fc78a255c3919fefbc97912176679120f4e079ef Mon Sep 17 00:00:00 2001 From: JasmineNazeer <115537272+JasmineNazeer@users.noreply.github.com> Date: Sat, 13 May 2023 15:51:00 +0530 Subject: [PATCH 370/420] Update application.properties --- .../marriage-services/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 6d6e0f8eb10..34f6ff06ce2 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -110,7 +110,7 @@ egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certif egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath -egov.marriage.image.startPoint =https://ikm-rainmaker.s3.ap-south-1.amazonaws.com/crmarriage +egov.marriage.image.startPoint =https://ikm-rainmaker.s3-ap-south-1.amazonaws.com egov.marriage.image.DefaultPhotoUrl = / #view certificate path config From 78080df756a24bb3502ef497c26d1351e3eaec1d Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 13 May 2023 16:03:35 +0530 Subject: [PATCH 371/420] migration updated --- ...__marriage_services_create_tables_dll.sql} | 0 ...00__marriage_services_drop_columns_dll.sql | 34 +++++++++++++++++++ 2 files changed, 34 insertions(+) rename municipal-services/marriage-services/src/main/resources/db/migration/main/{V202305111350__marriage_services_create_tables_dll => V202305111350__marriage_services_create_tables_dll.sql} (100%) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V202305131600__marriage_services_drop_columns_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll.sql similarity index 100% rename from municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll rename to municipal-services/marriage-services/src/main/resources/db/migration/main/V202305111350__marriage_services_create_tables_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305131600__marriage_services_drop_columns_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305131600__marriage_services_drop_columns_dll.sql new file mode 100644 index 00000000000..0bb042330dc --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305131600__marriage_services_drop_columns_dll.sql @@ -0,0 +1,34 @@ +alter table eg_marriage_details drop column IF EXISTS domcorreflag ; +alter table eg_marriage_details drop column IF EXISTS placeidcorrflag ; +alter table eg_marriage_details drop column IF EXISTS groomnamecorreflag ; +alter table eg_marriage_details drop column IF EXISTS bridenamecorreflag ; +alter table eg_marriage_details drop column IF EXISTS groomagecorreflag ; +alter table eg_marriage_details drop column IF EXISTS brideagecorreflag ; +alter table eg_marriage_details drop column IF EXISTS groomdobcorreflag ; +alter table eg_marriage_details drop column IF EXISTS bridedobcorreflag ; +alter table eg_marriage_details drop column IF EXISTS groompermanentaddrcorreflag ; +alter table eg_marriage_details drop column IF EXISTS bridepermanentaddrcorreflag ; +alter table eg_marriage_details drop column IF EXISTS groommothercorreflag ; +alter table eg_marriage_details drop column IF EXISTS bridemothercorreflag ; +alter table eg_marriage_details drop column IF EXISTS groomfathercorreflag ; +alter table eg_marriage_details drop column IF EXISTS bridefathercorreflag ; +alter table eg_marriage_details drop column IF EXISTS groomguardiancorreflag ; +alter table eg_marriage_details drop column IF EXISTS brideguardiancorreflag ; + +alter table eg_marriage_details_audit drop column IF EXISTS domcorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS placeidcorrflag ; +alter table eg_marriage_details_audit drop column IF EXISTS groomnamecorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS bridenamecorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS groomagecorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS brideagecorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS groomdobcorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS bridedobcorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS groompermanentaddrcorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS bridepermanentaddrcorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS groommothercorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS bridemothercorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS groomfathercorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS bridefathercorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS groomguardiancorreflag ; +alter table eg_marriage_details_audit drop column IF EXISTS brideguardiancorreflag ; + From 067f918acf6bc0baeb3b43cadaaddd54a60f0681 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 13 May 2023 18:22:02 +0530 Subject: [PATCH 372/420] set ispermanentFlag --- .../enrichment/MarriageDetailsEnrichment.java | 4 ++++ .../querybuilder/MarriageApplicationQueryBuilder.java | 4 ++-- .../repository/rowmapper/BrideAddressDetailsRowMapper.java | 3 ++- .../repository/rowmapper/GroomAddressDetailsRowMapper.java | 1 + .../web/model/marriage/BrideAddressDetails.java | 4 ++-- .../web/model/marriage/GroomAddressDetails.java | 4 ++-- .../repository/querybuilder/MarriageRegistryQueryBuilder.java | 4 ++-- .../repository/rowmapper/BrideRegistryAddressRowMapper.java | 4 ++-- .../repository/rowmapper/GroomRegistryAddressRowMapper.java | 1 + .../src/main/resources/application.properties | 4 ++-- 10 files changed, 20 insertions(+), 13 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 8d59ca77abb..49d3a43a570 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -91,7 +91,11 @@ public void enrichCreate(MarriageDetailsRequest request) { if(StringUtils.isNotBlank(marriage.getWitnessDetails().getGroomUrl())){ marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().trim().replaceAll(config.getImageURLStartPath(),"")); } + + } + + setApplicationNumbers(request); setBrideAddressNull(request); setGroomAddressNull(request); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 503c6e75f7f..7bf2c20076f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -54,7 +54,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("GPMA.talukid as GPMA_talukid , GPMA.taluk_name as GPMA_taluk_name , GPMA.tenantid as GPMA_tenantid , GPMA.ward_code as GPMA_ward_code,") .append("GPMA.locality_en as GPMA_locality_en,GPMA.locality_ml as GPMA_locality_ml,GPMA.street_name_en as GPMA_street_name_en,GPMA.street_name_ml as GPMA_street_name_ml ,") .append("GPMA.districtid as GPMA_districtid,GPMA.stateid as GPMA_stateid , GPMA.poid as GPMA_poid , GPMA.poname_en as GPMA_poname_en , GPMA.poname_ml as GPMA_poname_ml ,") - .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom , ") + .append("GPMA.pinno as GPMA_pinno , GPMA.countryid as GPMA_countryid ,GPMA.marriageid as GPMA_marriageid , GPMA.bride_groom as GPMA_bride_groom ,GPSA.same_as_permanent as GPSA_same_as_permanent , ") .append("GPMA.ot_address1_en as GPMA_ot_address1_en , GPMA.ot_address1_ml as GPMA_ot_address1_ml , GPMA.ot_address2_en as GPMA_ot_address2_en , ") .append("GPMA.ot_address2_ml as GPMA_ot_address2_ml ,GPMA.ot_state_region_province_en as GPMA_ot_state_region_province_en ,") .append("GPMA.ot_state_region_province_ml as GPMA_ot_state_region_province_ml , GPMA.ot_zipcode as GPMA_ot_zipcode , GPMA.city_town_village as GPMA_city_town_village , GPMA.permanent_tenentid as GPMA_permanent_tenentid,") @@ -63,7 +63,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("BPMA.talukid as BPMA_talukid , BPMA.taluk_name as BPMA_taluk_name , BPMA.tenantid as BPMA_tenantid , BPMA.ward_code as BPMA_ward_code , ") .append("BPMA.locality_en as BPMA_locality_en , BPMA.locality_ml as BPMA_locality_ml , BPMA.street_name_en as BPMA_street_name_en , BPMA.street_name_ml as BPMA_street_name_ml,") .append("BPMA.districtid as BPMA_districtid , BPMA.stateid BPMA_stateid , BPMA.poid as BPMA_poid , BPMA.poname_en as BPMA_poname_en , BPMA.poname_ml as BPMA_poname_ml ,") - .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , BPMA.permanent_tenentid as BPMA_permanent_tenentid,") + .append("BPMA.pinno BPMA_pinno , BPMA.countryid BPMA_countryid , BPMA.marriageid as BPMA_marriageid , BPMA.bride_groom as BPMA_bride_groom , BPSA.same_as_permanent as BPSA_same_as_permanent , BPMA.permanent_tenentid as BPMA_permanent_tenentid,") .append("BPMA.ot_address1_en as BPMA_ot_address1_en , BPMA.ot_address1_ml as BPMA_ot_address1_ml , BPMA.ot_address2_en as BPMA_ot_address2_en , ") .append("BPMA.ot_address2_ml as BPMA_ot_address2_ml , BPMA.ot_state_region_province_en as BPMA_ot_state_region_province_en , ") .append("BPMA.ot_state_region_province_ml as BPMA_ot_state_region_province_ml , BPMA.ot_zipcode as BPMA_ot_zipcode ,BPMA.city_town_village as BPMA_city_town_village ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java index 3615d5901ef..2599f60c0cf 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/BrideAddressDetailsRowMapper.java @@ -78,6 +78,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce .permntOthrIndiaprovinceMl(rs.getString("BPMA_ot_state_region_province_ml")) .outSideIndiaPostCodePermanent(rs.getString("BPMA_ot_zipcode")) .brideGroomPermanent(rs.getString("BPMA_bride_groom")) + .isPermanentAddress(rs.getBoolean("BPSA_same_as_permanent")) .build(); // .presentaddressCountry(rs.getString("GPMA_countryid")) // .presentaddressCountry(rs.getString("BPSA_countryid")) @@ -136,7 +137,7 @@ default BrideAddressDetails getBrideAddressDetails (ResultSet rs) throws SQLExce -// .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) + // .isPermanentAddress(rs.getBoolean("BPMA_same_as_present")) // .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java index 173bb388c03..f8b5acfda76 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/GroomAddressDetailsRowMapper.java @@ -76,6 +76,7 @@ default GroomAddressDetails getGroomAddressDetailsRowMapper (ResultSet rs) throw .permntOthrIndiaprovinceMl(rs.getString("GPMA_ot_state_region_province_ml")) .outSideIndiaPostCodePermanent(rs.getString("GPMA_ot_zipcode")) .brideGroomPermanent(rs.getString("GPMA_bride_groom")) + .isPermanentAddress(rs.getBoolean("GPSA_same_as_permanent")) .build(); // // PRESENT diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index 801366fb628..f2a0734a106 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -429,8 +429,8 @@ public class BrideAddressDetails { @JsonProperty("permanentUuid") private String permanentUuid; - @JsonProperty("isPermanentAddressInt") - private Integer isPermanentAddressInt; + // @JsonProperty("isPermanentAddressInt") + // private Integer isPermanentAddressInt; @JsonProperty("permanentAddrTalukId") private String permanentAddrTalukId ; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 0d6cbf1ccfc..42343e2cd79 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -428,8 +428,8 @@ public class GroomAddressDetails { @JsonProperty("permanentUuid") private String permanentUuid; - @JsonProperty("isPermanentAddressInt") - private Integer isPermanentAddressInt; + // @JsonProperty("isPermanentAddressInt") + // private Integer isPermanentAddressInt; @JsonProperty("permanentAddrTalukId") private String permanentAddrTalukId ; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java index 220ebac09bc..b03c4dd49a6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/querybuilder/MarriageRegistryQueryBuilder.java @@ -75,7 +75,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("GPSA.talukid as GPSA_talukid , GPSA.taluk_name as GPSA_taluk_name , GPSA.tenantid as GPSA_tenantid , GPSA.ward_code as GPSA_ward_code,") .append("GPSA.locality_en as GPSA_locality_en,GPSA.locality_ml as GPSA_locality_ml , GPSA.street_name_en as GPSA_street_name_en , GPSA.street_name_ml as GPSA_street_name_ml , ") .append("GPSA.districtid as GPSA_districtid , GPSA.stateid GPSA_stateid , GPSA.poid as GPSA_poid , GPSA.poname_en as GPSA_poname_en , GPSA.poname_ml as GPSA_poname_ml , ") - .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom , ") + .append("GPSA.pinno GPSA_pinno , GPSA.countryid GPSA_countryid , GPSA.marriageid as GPSA_marriageid , GPSA.bride_groom as GPSA_bride_groom ,GPSA.same_as_permanent as GPSA_same_as_permanent , ") .append("GPSA.ot_address1_en as GPSA_ot_address1_en,GPSA.ot_address1_ml as GPSA_ot_address1_ml , GPSA.ot_address2_en as GPSA_ot_address2_en , ") .append("GPSA.ot_address2_ml as GPSA_ot_address2_ml,GPSA.ot_state_region_province_en as GPSA_ot_state_region_province_en,") .append("GPSA.ot_state_region_province_ml as GPSA_ot_state_region_province_ml, GPSA.ot_zipcode as GPSA_ot_zipcode,") @@ -85,7 +85,7 @@ public class MarriageRegistryQueryBuilder extends BaseMarriageQuery { .append("BPSA.locality_en as BPSA_locality_en , BPSA.locality_ml as BPSA_locality_ml ,") .append("BPSA.street_name_en as BPSA_street_name_en , BPSA.street_name_ml as BPSA_street_name_ml , BPSA.districtid as BPSA_districtid , BPSA.stateid BPSA_stateid ,") .append("BPSA.poid as BPSA_poid,BPSA.poname_en as BPSA_poname_en,BPSA.poname_ml as BPSA_poname_ml,BPSA.pinno BPSA_pinno , BPSA.countryid BPSA_countryid ,") - .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.ot_address1_en as BPSA_ot_address1_en ,") + .append("BPSA.marriageid as BPSA_marriageid , BPSA.bride_groom as BPSA_bride_groom , BPSA.same_as_permanent as BPSA_same_as_permanent , BPSA.ot_address1_en as BPSA_ot_address1_en ,") .append("BPSA.ot_address1_ml as BPSA_ot_address1_ml,BPSA.ot_address2_en as BPSA_ot_address2_en,BPSA.ot_address2_ml as BPSA_ot_address2_ml,") .append("BPSA.ot_state_region_province_en BPSA_ot_state_region_province_en , BPSA.ot_state_region_province_ml as BPSA_ot_state_region_province_ml,BPSA.ot_zipcode as BPSA_ot_zipcode, ") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java index f27ed10e48f..1eb9de23886 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/BrideRegistryAddressRowMapper.java @@ -118,8 +118,8 @@ default BrideRegistryAddressDetails getBrideAddressDetails (ResultSet rs) throws .brideGroomPermanent(rs.getString("BPMA_bride_groom")) -// .isPermanentAddress(rs.getInt("BPMA_same_as_present")==1?true:false) -// .isPermanentAddressInt(rs.getInt("BPMA_same_as_present")) + .isPermanentAddress(rs.getBoolean("BPSA_same_as_permanent")) +// .build(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java index 17c160b8781..70ed05f8703 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/GroomRegistryAddressRowMapper.java @@ -115,6 +115,7 @@ default GroomRegistryAddressDetails getGroomAddressDetails (ResultSet rs) throws .permntOutSideIndiaProvinceMl(rs.getString("GPMA_ot_state_region_province_ml")) .permntOutSideIndiaProvinceEn(rs.getString("GPMA_ot_state_region_province_en")) .brideGroomPermanent(rs.getString("GPMA_bride_groom")) + .isPermanentAddress(rs.getBoolean("GPSA_same_as_permanent")) // .isPermanentAddress(rs.getInt("GPMA_same_as_present")==1?true:false) // .isPermanentAddressInt(rs.getInt("GPMA_same_as_present")) diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 34f6ff06ce2..a8e431950cc 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -139,8 +139,8 @@ decryption.abac.enabled=true #egov-encrypt service configs # egov.enc.host=http://localhost:1234 -#egov.enc.host=http://localhost:1234 - egov.enc.host=https://ksmart-dev.lsgkerala.gov.in +egov.enc.host=http://localhost:1234 +# egov.enc.host=https://ksmart-dev.lsgkerala.gov.in egov.enc.encrypt.endpoint=/egov-enc-service/crypto/v1/_encrypt egov.enc.decrypt.endpoint=/egov-enc-service/crypto/v1/_decrypt From 112f9281cac16e357d747b06c6cfd793011259b0 Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 15 May 2023 11:14:01 +0530 Subject: [PATCH 373/420] added bride url rowmapper changes --- .../repository/rowmapper/WitnessRegistryRowMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java index 329e4b1af2c..d5d52cc2743 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/rowmapper/WitnessRegistryRowMapper.java @@ -43,7 +43,7 @@ default WitnessRegistryDetails getWitnessDetails(ResultSet rs) throws SQLExcepti // .witness2Esigned(Boolean.valueOf(rs.getString("WD2_is_esigned"))) .tenentId(rs.getString("MD_tenantid")) .brideExpired(rs.getBoolean("MD_bride_expired")) - .brideUrl(rs.getString("MD_brideurl")) + .brideUrl(createFullURL(rs.getString("MD_brideurl"))) .brideFilestoreId(rs.getString("MD_bride_filestoreid")) .groomExpired(rs.getBoolean("MD_groom_expired")) .groomUrl(createFullURL(rs.getString("MD_groomurl"))) From af6292db98784ded6ecdef1780fcd205e42c2f22 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 15 May 2023 14:40:08 +0530 Subject: [PATCH 374/420] update poname in registry --- .../marriageregistry/enrichment/MarriageRegistryEnrichment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 71a924237db..7f5a00e7fc4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -919,7 +919,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getGroomAddressDetails().setStreetNameEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrStreetNameEn()); registryDetails.getGroomAddressDetails().setLocalityEnPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLocalityNameEn()); registryDetails.getGroomAddressDetails().setPinNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPincode()); - registryDetails.getGroomAddressDetails().setPoNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); + // registryDetails.getGroomAddressDetails().setPoNoPermanent(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); appendIfNotBlank(registryDetails.getGroomAddressDetails().getHouseNameNoEnPermanent(), groomAddressBuilder, true); From 9d0ea0655f53b04bd1d3e285a326d59b1701e36f Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 15 May 2023 14:43:43 +0530 Subject: [PATCH 375/420] changes in address setting --- .../marriageregistry/enrichment/MarriageRegistryEnrichment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 7f5a00e7fc4..79cfa7f69ef 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -1127,7 +1127,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrStreetNameEn()); registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLocalityNameEn()); registryDetails.getBrideAddressDetails().setPinNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPincode()); - registryDetails.getBrideAddressDetails().setPoNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); +// registryDetails.getBrideAddressDetails().setPoNoPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrPostOffice()); appendIfNotBlank(registryDetails.getBrideAddressDetails().getHouseNameNoEnPermanent(), brideAddressBuilder, true); From efe3cc88a1add6c05269ae863a5e7c6aebe2a8a2 Mon Sep 17 00:00:00 2001 From: binilp Date: Mon, 15 May 2023 17:07:03 +0530 Subject: [PATCH 376/420] changes in marriage certificate data --- .../repository/MarriageRegistryRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index a4870777ee8..0a978f32971 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -163,7 +163,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en())) { groomFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getGroomDetails().getLastname_en().trim()); } - req.getMarriageCertificate().get(0).setGroomFullName(groomFullName.toString()); + req.getMarriageCertificate().get(0).setGroomFullName(StringUtils.upperCase(groomFullName.toString())); }else{ log.info("PDF_ERROR. Marriage Certificate , Groom Details not found!!!"); throw new CustomException("PDF_ERROR", "Groom Details not found!!!" ); @@ -178,7 +178,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en())) { brideFullName.append(" " + req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getBrideDetails().getLastname_en().trim()); } - req.getMarriageCertificate().get(0).setBrideFullName(brideFullName.toString()); + req.getMarriageCertificate().get(0).setBrideFullName(StringUtils.upperCase(brideFullName.toString())); }else{ log.info("PDF_ERROR. Marriage Certificate , Bride Details not found!!!"); throw new CustomException("PDF_ERROR", "Bride Details not found!!!" ); From 3f14f386c217249e83178da2179f718805cefbf9 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 16 May 2023 17:30:12 +0530 Subject: [PATCH 377/420] SubRegistar PlaceType Added --- .../MarriageApplicationRepository.java | 20 ++++++++++++---- .../web/model/MarriageApplicationDetails.java | 5 ++++ .../marriage/utils/MarriageConstants.java | 4 ++++ .../marriage/utils/MarriageMdmsUtil.java | 24 +++++++++++++++++-- 4 files changed, 47 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index b62a282c4f7..5ddd6173870 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -32,6 +32,8 @@ import java.util.ArrayList; import java.util.List; +import static org.ksmart.marriage.utils.MarriageConstants.PLACE_TYPE_REGISTRAR_OFFICE; + @Slf4j @Repository public class MarriageApplicationRepository { @@ -158,11 +160,21 @@ public List searchMarriageDetails(MarriageApplicatio } //Marriage PlaceId if (marriage.getPlaceid() != null) { - String marriagePlaceIdEn = util.getMarriagePlaceIdEn(mdmsDataLocation, marriage.getPlaceid()); - marriage.setMarriagePlaceIdEn(marriagePlaceIdEn); + if(marriage.getPlacetype().equals(PLACE_TYPE_REGISTRAR_OFFICE)){ + String marriagePlaceIdSubRegiEn = util.getMarriagePlaceIdSubRegiEn(mdmsData, marriage.getPlaceid()); + marriage.setMarriagePlaceIdSubRegiEn(marriagePlaceIdSubRegiEn); + + String marriagePlaceIdSubRegiMl = util.getMarriagePlaceIdSubRegiMl(mdmsData, marriage.getPlaceid()); + marriage.setMarriagePlaceIdSubRegiMl(marriagePlaceIdSubRegiMl); + } + else{ + String marriagePlaceIdEn = util.getMarriagePlaceIdEn(mdmsDataLocation, marriage.getPlaceid()); + marriage.setMarriagePlaceIdEn(marriagePlaceIdEn); + + String marriagePlaceIdMl = util.getMarriagePlaceIdMl(mdmsDataLocation, marriage.getPlaceid()); + marriage.setMarriagePlaceIdMl(marriagePlaceIdMl); + } - String marriagePlaceIdMl = util.getMarriagePlaceIdMl(mdmsDataLocation, marriage.getPlaceid()); - marriage.setMarriagePlaceIdMl(marriagePlaceIdMl); } //Marriage TenantId name if (marriage.getTenantid() != null) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 526a3caa8ee..d6fe05bdfa1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -270,5 +270,10 @@ public class MarriageApplicationDetails { private String marriagePlaceIdEn; @JsonProperty("marriagePlaceIdMl") private String marriagePlaceIdMl; + @JsonProperty("marriagePlaceIdSubRegiEn") + private String marriagePlaceIdSubRegiEn; + @JsonProperty("marriagePlaceIdSubRegiMl") + private String marriagePlaceIdSubRegiMl; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index dcc4a8598ac..5c1176d04f3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -154,6 +154,8 @@ public class MarriageConstants { public static final String MARRIAGE_TYPE = "TypeOfMarriage"; + public static final String SUB_REGISTAR_PLACE_TYPE = "SubRegistar"; + public static final String WORKFLOW_STATUS_APPROVED = "APPROVED"; public static final String APPLICATION_NEW = "new"; @@ -215,5 +217,7 @@ public class MarriageConstants { public static final String CR_MDMS_PLACEID_CODE_JSONPATH = "$.MdmsRes.egov-location.MarriagePlace[*].code"; public static final String CR_MDMS_PLACEID_JSONPATH = "$.MdmsRes.egov-location.MarriagePlace[*]"; + public static final String CR_MDMS_PLACESUBREGISTARID_CODE_JSONPATH = "$.MdmsRes.birth-death-service.SubRegistar[*].code"; + public static final String CR_MDMS_PLACESUBREGISTARID_JSONPATH = "$.MdmsRes.birth-death-service.SubRegistar[*]"; public static final String ACTION_PAY = "PAY"; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 12ffb8ff1d8..664a6a4f264 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -903,10 +903,13 @@ private List getBNDSearch() { .build()); crMarriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.MARRIAGE_PLACE_TYPE) - .build()); + .build()); crMarriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.MARRIAGE_TYPE) - .build()); + .build()); + crMarriageMasterDetails + .add(MasterDetail.builder().name(MarriageConstants.SUB_REGISTAR_PLACE_TYPE) + .build()); // Add Module workflow crMarriageMasterDetails.add(MasterDetail.builder() .name(MarriageConstants.CR_MDMS_WORKFLOW_NEW) @@ -1140,6 +1143,19 @@ public String getMarriagePlaceIdMl(Object mdmsData, String placeId) { return index<0?null:names.get(index); } + public String getMarriagePlaceIdSubRegiEn(Object mdmsData, String placeId) { + List tenants = getPlaceIdCodeSubRegi(mdmsData); + int index = tenants.indexOf(placeId); + ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACESUBREGISTARID_JSONPATH+".locationOfOffice"); + return index<0?null:names.get(index); + } + public String getMarriagePlaceIdSubRegiMl(Object mdmsData, String placeId) { + List tenants = getPlaceIdCodeSubRegi(mdmsData); + int index = tenants.indexOf(placeId); + ArrayList names = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACESUBREGISTARID_JSONPATH+".officeLocal"); + return index<0?null:names.get(index); + } + public String getMarriageLbtypeEn(Object mdmsData, String Lbtype) { List tenants = getLBTypeCode(mdmsData); int index = tenants.indexOf(Lbtype); @@ -1176,4 +1192,8 @@ private List getPlaceIdCode(Object mdmsData) { private List getTenantIdCode(Object mdmsData) { return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_TENANTS_CODE_JSONPATH); } + + private List getPlaceIdCodeSubRegi(Object mdmsData) { + return JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_PLACESUBREGISTARID_CODE_JSONPATH); + } } \ No newline at end of file From aa5c890c9d61ac5d4e1795748dcd2bc27a7837fe Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 17 May 2023 14:41:04 +0530 Subject: [PATCH 378/420] set SCST amount --- .../service/MarriageApplicationService.java | 12 ------------ .../MarriageApplicationValidator.java | 18 +++++++++++------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 1b398d537ae..cc92b89d5f6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -68,7 +68,6 @@ public List saveMarriageDetails(MarriageDetailsReque mdmsValidator.validateMarriageMDMSData(request,mdmsData); marriageDetailsEnrichment.enrichCreate(request); producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); - System.out.println("Statusb4workflow"+ request.getMarriageDetails().get(0).getStatus()); if (request.getMarriageDetails().get(0).getIsWorkflow()){ workflowIntegrator.callWorkFlow(request); } @@ -77,7 +76,6 @@ public List saveMarriageDetails(MarriageDetailsReque // System.out.println("ConstStatus"+MarriageConstants.STATUS_FOR_PAYMENT); // if(wfc.getPayment()!= null){ if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ - // System.out.println("hienterpayment"); List demands = new ArrayList<>(); Demand demand = new Demand(); demand.setTenantId(marriage.getTenantid()); @@ -121,16 +119,6 @@ public List updateMarriageDetails(MarriageDetailsReq workflowIntegrator.callWorkFlow(request); } producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); - // request.getMarriageDetails().forEach(marriage->{ - // if(marriage.getStatus() == MarriageConstants.STATUS_FOR_PAYMENT){ - // List demands = new ArrayList<>(); - // Demand demand = new Demand(); - // demand.setTenantId(marriage.getTenantid()); - // demand.setConsumerCode(marriage.getApplicationNumber()); - // demands.add(demand); - // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); - // } - // }); return request.getMarriageDetails(); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 52f6d1ea587..6f49dd0702a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -69,7 +69,8 @@ public void ruleEngineMarriage(MarriageDetailsRequest request, WorkFlowCheck wfc throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Date of birth is required for create request."); } else { - validateDoM(dateOfMarriage, wfCode,applicationType,mdmsdata, wfc); + Boolean isBackward = request.getMarriageDetails().get(0).getWitnessDetails().getIsBackward(); + validateDoM(dateOfMarriage, wfCode,applicationType,mdmsdata, wfc,isBackward); } if (marriageApplication!=null){ marriageApplication.forEach(marriagedtls -> { @@ -102,7 +103,7 @@ public int getDaysDiff(Date dateToCheck) return (int) Math.round(diffDays); } //Jasmine - Date of Marriage 11.04.2023 - private void validateDoM(Long dateOfMarriage, String wfCode, String applicationType,Object mdmsData, WorkFlowCheck wfc) { + private void validateDoM(Long dateOfMarriage, String wfCode, String applicationType,Object mdmsData, WorkFlowCheck wfc ,Boolean isBackward) { Calendar calendar = Calendar.getInstance(); Long currentDate = calendar.getTimeInMillis(); // System.out.println("wfCode"+wfCode); @@ -110,7 +111,7 @@ private void validateDoM(Long dateOfMarriage, String wfCode, String applicationT throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Date of death should be less than or same as current date."); } else { - wfc = checkValidation(mdmsData, dateOfMarriage, wfc); + wfc = checkValidation(mdmsData, dateOfMarriage, wfc ,isBackward); //System.out.println("wfc"+wfc.getWorkflowCode()); if(!wfc.getWorkflowCode().equals(wfCode)) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), @@ -123,13 +124,12 @@ private void validateDoM(Long dateOfMarriage, String wfCode, String applicationT } } // Validate Marriage date MDMS data - public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkFlowCheck wfc) { + public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkFlowCheck wfc ,Boolean isBackward) { // WorkFlowCheck wfc = new WorkFlowCheck(); Calendar calendar = Calendar.getInstance(); Long currentDate = calendar.getTimeInMillis(); List> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); - // System.out.println("mdmswfcode"+wfLists); for (int n = 0; n < wfLists.size(); n++) { String startStr = wfLists.get(n).get("startdateperiod").toString(); String endStr = wfLists.get(n).get("enddateperiod").toString(); @@ -137,12 +137,16 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF Long end = Long.parseLong(endStr); if (end > 0L) { Long comp = currentDate - dateOfMarriage; - System.out.println("datedifference"+comp); + System.out.println("datedifference"+wfLists); if (comp > start && comp <= end){ wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); wfc.setWorkflowCode(wfLists.get(n).get("WorkflowCode").toString()); wfc.setPayment(Boolean.getBoolean(wfLists.get(n).get("payment").toString())); - wfc.setAmount(Integer.parseInt(wfLists.get(n).get("amount").toString())); + if (isBackward){ + wfc.setAmount(Integer.parseInt(wfLists.get(n).get("scstamount").toString())); + }else{ + wfc.setAmount(Integer.parseInt(wfLists.get(n).get("amount").toString())); + } wfc.setActive(Boolean.getBoolean(wfLists.get(n).get("active").toString())); // System.out.println("wfCodetesting"+wfLists.get(n).get("WorkflowCode").toString()); } From e2edd101e2ba8342af027ec8f62fcaa9d0deb7cf Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Wed, 17 May 2023 15:50:11 +0530 Subject: [PATCH 379/420] correction demand set from mdms --- .../service/DemandService.java | 2 +- .../service/MarriageCorrectionService.java | 2 ++ .../MarriageCorrectionMDMSValidator.java | 21 +++++++++++++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java index ccfc9872177..e4f6a892f05 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java @@ -70,7 +70,7 @@ public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkF demand.setPayer(requestInfo.getUserInfo()); demand.setTaxPeriodFrom(System.currentTimeMillis()); demand.setTaxPeriodTo(System.currentTimeMillis()+86400000); - demand.setMinimumAmountPayable(new BigDecimal(10)); + demand.setMinimumAmountPayable(new BigDecimal(wfc.getAmount())); } private ModuleDetail getGLCodeRequest() { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java index 454cbad40d0..3f2e7a3f2d8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/service/MarriageCorrectionService.java @@ -100,8 +100,10 @@ public List createCorrection(MarriageCorrectionReques WorkFlowCheck wfc = new WorkFlowCheck(); marriageCorrectionApplnValidator.validateCorrectionCreate(request); + wfc.setWorkflowCode(request.getMarriageCorrectionDetails().get(0).getWorkflowcode()); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageCorrectionDetails().get(0).getTenantid()); marriageCorrectionMDMSValidator.validateMarriageCorrectionMDMSData(request,mdmsData); + marriageCorrectionMDMSValidator.setMarriageCorrectionAmountFromMDMS(mdmsData,wfc); MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java index cdb45a09f71..8533d921083 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecorrection/validator/MarriageCorrectionMDMSValidator.java @@ -4,15 +4,13 @@ import lombok.extern.slf4j.Slf4j; import org.egov.tracer.model.CustomException; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.WorkFlowCheck; import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.ksmart.marriage.utils.MarriageConstants; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Component @Slf4j @@ -209,4 +207,19 @@ private void validateIfMasterPresent(String[] masterNames, Map> wfLists = JsonPath.read(mdmsData, MarriageConstants.CR_MDMS_MARRIAGE_NEW_WF_JSONPATH + "[*]"); + if(wfLists!=null){ + wfLists.stream().filter(wf->wf.get("WorkflowCode").equals(wfc.getWorkflowCode())).forEach(workFlow->{ + wfc.setApplicationType(workFlow.get("ApplicationType").toString()); + wfc.setPayment(Boolean.getBoolean(workFlow.get("payment").toString())); + wfc.setAmount(Integer.parseInt(workFlow.get("amount").toString())); + wfc.setActive(Boolean.getBoolean(workFlow.get("active").toString())); + }); + } + return wfc; + } } From 7543eba9edcf9abac86e8d2dae1224a3e6ce39f6 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Wed, 17 May 2023 18:26:24 +0530 Subject: [PATCH 380/420] update table after payment --- .../common/consumer/ReceiptConsumer.java | 1 - .../common/enrichment/BaseEnrichment.java | 30 ++++++ .../common/model/common/CommonPay.java | 35 +++++++ .../common/model/common/CommonPayRequest.java | 31 ++++++ .../model/common/CommonPayResponse.java | 25 +++++ .../common/repository/CommonRepository.java | 50 ++++++++++ .../common/services/PaymentUpdateService.java | 41 ++++++-- .../MarriageApplicationConfiguration.java | 4 + .../enrichment/MarriageDetailsEnrichment.java | 96 ++----------------- .../MarriageApplicationRepository.java | 15 +-- .../service/DemandService.java | 5 +- .../service/MarriageApplicationService.java | 48 ++++++---- .../MarriageRegistryRequestService.java | 1 - .../MarriageApplicationValidator.java | 9 +- .../web/model/MarriageApplicationDetails.java | 49 +++++----- .../ksmart/marriage/utils/CommonUtils.java | 74 ++++++++++++++ 16 files changed, 348 insertions(+), 166 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/enrichment/BaseEnrichment.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/CommonRepository.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/CommonUtils.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java index cd147a55c74..819532c5dac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java @@ -63,7 +63,6 @@ public ReceiptConsumer(PaymentUpdateService paymentUpdateService) { @KafkaListener(topics = {"${kafka.topics.receipt.create}"}) public void listenPayments(final HashMap record) { - System.out.println("Inside kafka payment listner ...................>"); paymentUpdateService.process(record); // paymentNotificationService.process(record); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/enrichment/BaseEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/enrichment/BaseEnrichment.java new file mode 100644 index 00000000000..6427d467966 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/enrichment/BaseEnrichment.java @@ -0,0 +1,30 @@ +package org.ksmart.marriage.common.enrichment; + +// import org.ksmart.birth.common.model.AuditDetails; +// import org.ksmart.birth.utils.CommonUtils; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.utils.CommonUtils; + +import java.time.ZoneId; +import java.time.ZonedDateTime; + +public interface BaseEnrichment { + default AuditDetails buildAuditDetails(String by, Boolean create) { + AuditDetails auditDetails; + Long currentTime = CommonUtils.currentDateTime(); + if (create) { + auditDetails = AuditDetails.builder() + .createdBy(by) + .createdTime(currentTime) + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } else { + auditDetails = AuditDetails.builder() + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } + return auditDetails; + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java new file mode 100644 index 00000000000..e1db80e0bc4 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java @@ -0,0 +1,35 @@ +package org.ksmart.marriage.common.model.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; + +import javax.validation.constraints.Size; + +import org.ksmart.marriage.common.model.AuditDetails; + +import java.math.BigDecimal; +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ToString +public class CommonPay { + @Size(max = 64) + @JsonProperty("applicationNumber") + private String applicationNumber; + + private String action; + + private String applicationStatus; + + private Boolean hasPayment; + + @JsonProperty("isPaymentSuccess") + private Boolean isPaymentSuccess; + + private BigDecimal amount = BigDecimal.ZERO; + + @JsonProperty("auditDetails") + private AuditDetails auditDetails; +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java new file mode 100644 index 00000000000..366606941d7 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java @@ -0,0 +1,31 @@ +package org.ksmart.marriage.common.model.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.*; +import org.egov.common.contract.request.RequestInfo; +import javax.validation.Valid; +import javax.validation.constraints.Size; +import java.math.BigDecimal; +import java.util.List; + +@Getter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ToString +public class CommonPayRequest { + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + @JsonProperty("PaymentDetails") + @Valid + private List commonPays; + + public CommonPayRequest addPayment(CommonPay commonPay) { + if (commonPays == null) { + commonPays = null; + } + return this; + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java new file mode 100644 index 00000000000..a081b59d105 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java @@ -0,0 +1,25 @@ +package org.ksmart.marriage.common.model.common; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.egov.common.contract.response.ResponseInfo; + +import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class CommonPayResponse { + @JsonProperty("ResponseInfo") + @Valid + private ResponseInfo responseInfo; + + @JsonProperty("CommonPayRequest") + @Valid + private List payments = new ArrayList<>(); +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/CommonRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/CommonRepository.java new file mode 100644 index 00000000000..3c40d69ac8b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/CommonRepository.java @@ -0,0 +1,50 @@ +package org.ksmart.marriage.common.repository; + +import lombok.extern.slf4j.Slf4j; +import net.logstash.logback.encoder.org.apache.commons.lang.StringUtils; +import org.egov.common.contract.request.RequestInfo; +import org.egov.tracer.model.CustomException; +import org.ksmart.marriage.common.model.common.CommonPay; +import org.ksmart.marriage.common.model.common.CommonPayRequest; +// import org.ksmart.birth.birthcommon.model.common.CommonPay; +// import org.ksmart.birth.birthcommon.model.common.CommonPayRequest; + import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +// import org.ksmart.birth.common.repository.builder.CommonQueryBuilder; +// import org.ksmart.birth.config.BirthConfiguration; +// import org.ksmart.birth.newbirth.enrichment.NewBirthResponseEnrichment; +// import org.ksmart.birth.newbirth.repository.rowmapper.BirthApplicationRowMapper; +// import org.ksmart.birth.utils.enums.ErrorCodes; +// import org.ksmart.birth.web.model.SearchCriteria; +// import org.ksmart.birth.web.model.newbirth.NewBirthApplication; +// import org.ksmart.birth.web.model.newbirth.NewBirthDetailRequest; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import java.util.ArrayList; +import java.util.List; + +@Slf4j +@Repository +public class CommonRepository { + // @Autowired + // CommonQueryBuilder commonQueryBuilder; + + @Autowired + MarriageApplicationConfiguration config; + + private final MarriageProducer producer; + + @Autowired + CommonRepository(MarriageProducer producer){ + this.producer = producer; + } + public List updatePaymentDetails(CommonPayRequest request) { + + producer.push(config.getUpdateMarriagePaymentTopic(), request); + return request.getCommonPays(); + } + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index e3dd41aa3e4..6137ff69a71 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -7,11 +7,16 @@ import org.egov.common.contract.request.RequestInfo; import org.egov.common.contract.request.Role; - +import org.egov.common.contract.request.User; import org.egov.tracer.model.CustomException; import org.json.JSONObject; import org.ksmart.marriage.common.calculation.collections.models.PaymentDetail; import org.ksmart.marriage.common.calculation.collections.models.PaymentRequest; +import org.ksmart.marriage.common.enrichment.BaseEnrichment; +import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.common.model.common.CommonPay; +import org.ksmart.marriage.common.model.common.CommonPayRequest; +import org.ksmart.marriage.common.repository.CommonRepository; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; @@ -32,6 +37,8 @@ import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import java.math.BigDecimal; +import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -40,7 +47,7 @@ // import static org.ksmart.marriage.utils.MarriageConstants; @Service @Slf4j -public class PaymentUpdateService { +public class PaymentUpdateService implements BaseEnrichment { private MarriageApplicationService marriageService; @@ -52,19 +59,23 @@ public class PaymentUpdateService { private MarriageDetailsEnrichment enrichmentService; + private final CommonRepository repository; + // @Autowired // private objectMapper mapper; //private BirthUtils util; public PaymentUpdateService(MarriageApplicationService marriageService,MarriageApplicationConfiguration config, - WorkflowIntegrator wfIntegrator,MarriageDetailsEnrichment enrichmentService) + WorkflowIntegrator wfIntegrator,MarriageDetailsEnrichment enrichmentService , + CommonRepository repository) //BirthUtils util, NewBirthRepository repository,) { this.marriageService=marriageService; this.config=config; this.wfIntegrator=wfIntegrator; this.enrichmentService= enrichmentService; + this.repository=repository; } final String tenantId = "tenantId"; @@ -89,17 +100,11 @@ public void process(HashMap record) { for (PaymentDetail paymentDetail : paymentDetails) { MarriageApplicationSearchCriteria searchCriteria = new MarriageApplicationSearchCriteria(); searchCriteria.setTenantId(tenantId); - searchCriteria.setApplicationNo(paymentDetail.getBill().getConsumerCode()); searchCriteria.setBusinessService(paymentDetail.getBusinessService()); -// System.out.println(" payment detail tenantId:"+tenantId); -// System.out.println(" payment detail tenantId:"+paymentDetail.getBill().getConsumerCode()); -// System.out.println(" payment detail tenantId:"+paymentDetail.getBusinessService()); List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); if(null!=marriage && marriage.size()==1){ - System.out.println("Search application size>1...................>"+marriage.get(0).getStatus()); //if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ - System.out.println("Inside status -PAY...................>"); marriage.get(0).setAction(MarriageConstants.ACTION_PAY); //} } @@ -107,6 +112,24 @@ public void process(HashMap record) { .marriageDetails(marriage).build(); //System.out.println(" payment detail updateRequest:"+updateRequest); wfIntegrator.callWorkFlow(updateRequest); + + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + + // Update marriage table with status initiated + + List commonPays = new ArrayList<>(); + CommonPay pay = new CommonPay(); + pay.setAction("INITIATE"); + pay.setApplicationStatus("INITIATED"); + pay.setHasPayment(true); + pay.setAmount(new BigDecimal(10)); + pay.setIsPaymentSuccess(true); + pay.setApplicationNumber(paymentDetail.getBill().getConsumerCode()); + pay.setAuditDetails(auditDetails); + commonPays.add(pay); + CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); + repository.updatePaymentDetails(paymentReq); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index ec479a1b7f9..29ccc9fe1ef 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -135,4 +135,8 @@ public class MarriageApplicationConfiguration { @Value("${egov.demand.taxheadmastercode}") private String taxHeadMasterCode; + //Payment + @Value("${persister.update.marriage.payment.topic}") + private String updateMarriagePaymentTopic; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 49d3a43a570..0d02d020868 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -91,11 +91,8 @@ public void enrichCreate(MarriageDetailsRequest request) { if(StringUtils.isNotBlank(marriage.getWitnessDetails().getGroomUrl())){ marriage.getWitnessDetails().setGroomUrl(marriage.getWitnessDetails().getGroomUrl().trim().replaceAll(config.getImageURLStartPath(),"")); } - - } - setApplicationNumbers(request); setBrideAddressNull(request); setGroomAddressNull(request); @@ -104,8 +101,6 @@ public void enrichCreate(MarriageDetailsRequest request) { setGroomPermanentAddress(request); setGroomPresentAddress(request); - -//Jasmine 07.04.2023 GroomDetails groomDetails =marriage.getGroomDetails(); GroomDetails groomDetailsEnc = encryptionDecryptionUtil.encryptObject(groomDetails, "BndDetail", GroomDetails.class); groomDetails.setAadharno(groomDetailsEnc.getAadharno()); @@ -181,9 +176,6 @@ public void enrichUpdate(MarriageDetailsRequest request) { String applicationType = marriage.getApplicationtype(); criteria.setApplicationNo(applicationNumber); criteria.setApplicationType(applicationType); - // String registrationNumber = marriage.getRegistrationNo(); - //Jasmine 07.04.2023 - //Updated on 17.04.2023 List marriagedocument = marriage.getMarriageDocuments(); if (marriagedocument!=null){ marriagedocument.forEach(document -> { @@ -509,8 +501,6 @@ private void setBridePresentAddress(MarriageDetailsRequest request) { } } else { - // System.out.println("outsideIndia-"+marriage.getBrideAddressDetails().getPresentaddressCountry()); - // System.out.println("outsideIndia-Province En"+marriage.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn()); marriage.getBrideAddressDetails().setCountryIdPresent(marriage.getBrideAddressDetails().getPresentaddressCountry()); @@ -746,7 +736,6 @@ private void setBrideAddressNull(MarriageDetailsRequest request){ marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceEn(null); marriage.getBrideAddressDetails().setPermntOthrIndiaprovinceMl(null); - marriage.getBrideAddressDetails().setVillageNamePermanent(null); marriage.getBrideAddressDetails().setTownOrVillagePermanent(null); @@ -779,7 +768,6 @@ private void setGroomAddressNull(MarriageDetailsRequest request){ marriage.getGroomAddressDetails().setPresentAddrVillageId(null); - marriage.getGroomAddressDetails().setCountryIdPresent(null); marriage.getGroomAddressDetails().setStateIdPresent(null); marriage.getGroomAddressDetails().setDistrictIdPresent(null); @@ -798,13 +786,10 @@ private void setGroomAddressNull(MarriageDetailsRequest request){ marriage.getGroomAddressDetails().setPresentOthrTalukName(null); marriage.getGroomAddressDetails().setPresentOthPostOfficeEn(null); - marriage.getGroomAddressDetails().setTownOrVillagePresent(null); marriage.getGroomAddressDetails().setVillageNamePresent(null); - marriage.getGroomAddressDetails().setCountryIdPresent(null); - marriage.getGroomAddressDetails().setOutSideIndiaPostCodePresent(null); marriage.getGroomAddressDetails().setPresentOthrIndiaAdressEn(null); @@ -840,9 +825,7 @@ private void setGroomAddressNull(MarriageDetailsRequest request){ marriage.getGroomAddressDetails().setPoNoPermanent(null); marriage.getGroomAddressDetails().setCountryIdPermanent(null); - marriage.getGroomAddressDetails().setStateIdPermanent(null); - marriage.getGroomAddressDetails().setDistrictIdPermanent(null); marriage.getGroomAddressDetails().setLocalityEnPermanent(null); @@ -854,11 +837,9 @@ private void setGroomAddressNull(MarriageDetailsRequest request){ marriage.getGroomAddressDetails().setHouseNameNoEnPermanent(null); marriage.getGroomAddressDetails().setHouseNameNoMlPermanent(null); - marriage.getGroomAddressDetails().setPermntOthrTalukName(null); marriage.getGroomAddressDetails().setPermntOthPostOfficeEn(null); - marriage.getGroomAddressDetails().setPinNoPermanent(null); marriage.getGroomAddressDetails().setTownOrVillagePermanent(null); @@ -866,7 +847,6 @@ private void setGroomAddressNull(MarriageDetailsRequest request){ marriage.getGroomAddressDetails().setCountryIdPermanent(null); - marriage.getGroomAddressDetails().setVillageNamePermanent(null); marriage.getGroomAddressDetails().setTownOrVillagePermanent(null); @@ -883,67 +863,16 @@ private void setGroomAddressNull(MarriageDetailsRequest request){ } ) ; } - // private void setRegistrationNumber(MarriageDetailsRequest request) { - - // RequestInfo requestInfo = request.getRequestInfo(); - // List marriageDetails = request.getMarriageDetails(); - // String tenantId = marriageDetails.get(0) - // .getTenantid(); - - // List filecodes = getIds(requestInfo, - // tenantId, - // config.getGetMarriageRegisNumberName(), - // request.getMarriageDetails().get(0).getApplicationtype(), - // "REG", - // marriageDetails.size()); - // validateFileCodes(filecodes, marriageDetails.size()); - // Long currentTime = Long.valueOf(System.currentTimeMillis()); - // ListIterator itr = filecodes.listIterator(); - // request.getMarriageDetails() - // .forEach(marriage -> { - // // if((marriage.getStatus().equals("APPROVED"))&&(marriage.getAction().equals("APPROVE"))) { - // marriage.setRegistrationno(itr.next()); - // marriage.setRegistrationDate(currentTime); - // // } - // }); - // } - - -// private void setFileNumbers(MarriageDetailsRequest request) { - -// RequestInfo requestInfo = request.getRequestInfo(); -// List marriageDetails = request.getMarriageDetails(); -// String tenantId = marriageDetails.get(0) -// .getTenantid(); -// System.out.println(("request"+request)); - -// List filecodes = getIds(requestInfo, -// tenantId, -// config.getMarriageFileNumberName(), -// request.getMarriageDetails().get(0).getApplicationtype(), -// "FILE", -// marriageDetails.size()); -// validateFileCodes(filecodes, marriageDetails.size()); -// Long currentTime = Long.valueOf(System.currentTimeMillis()); -// ListIterator itr = filecodes.listIterator(); -// request.getMarriageDetails() -// .forEach(marriage -> { -// // marriage.setFileno(itr.next()); -// // marriage.setFile_date(currentTime); -// }); -// } - private void setApplicationNumbers(MarriageDetailsRequest request) { RequestInfo requestInfo = request.getRequestInfo(); List marriageDetails = request.getMarriageDetails(); - String tenantId = marriageDetails.get(0) - .getTenantid(); + String tenantId = marriageDetails.get(0).getTenantid(); List filecodes = getIds(requestInfo, - tenantId, - config.getMarriageApplNumberIdName(), - request.getMarriageDetails().get(0).getModuleCode(), - "ACK", - marriageDetails.size()); + tenantId, + config.getMarriageApplNumberIdName(), + request.getMarriageDetails().get(0).getModuleCode(), + "ACK", + marriageDetails.size()); validateFileCodes(filecodes, marriageDetails.size()); ListIterator itr = filecodes.listIterator(); @@ -968,8 +897,6 @@ public List saveDemand(RequestInfo requestInfo, List demands){ DemandRequest request = new DemandRequest(requestInfo,demands); Object result = serviceRequestRepository.fetchResult(url,request); - // System.out.println("demands"+demands); - // System.out.println("demandresult"+result); DemandResponse response = null; try{ response = mapper.convertValue(result,DemandResponse.class); @@ -979,16 +906,7 @@ public List saveDemand(RequestInfo requestInfo, List demands){ } return response.getDemands(); } -// private void setApplicationNumbers(MarriageDetailsRequest request) { -// Long currentTime = Long.valueOf(System.currentTimeMillis()); -// String id = idGenerator.setIDGeneratorStill(request, MarriageConstants.FUN_MODULE_NEW,MarriageConstants.APP_NUMBER_CAPTION); -// request.getMarriageDetails() -// .forEach(marriage -> { -// marriage.setApplicationnumber(id); -// marriage. -// setDateofreporting(currentTime); -// }); -// } + private List getIds(RequestInfo requestInfo, String tenantId, String idName, String moduleCode, String fnType, int count) { return idGenRepository.getIdList(requestInfo, tenantId, idName, moduleCode, fnType, count); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index 5ddd6173870..fa4ee0e622e 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -42,8 +42,6 @@ public class MarriageApplicationRepository { private final MarriageApplicationRowMapper marriageApplicationRowMapper; private final JdbcTemplate jdbcTemplate; private final MarriageDocumentRowMapper marriagedocumentRowMapper; - // private final MarriagePaymentRowMapper marriagePaymentRowMapper; - @Autowired EncryptionDecryptionUtil encryptionDecryptionUtil; @@ -66,18 +64,7 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat this.marriagedocumentRowMapper = marriagedocumentRowMapper; // this.marriagePaymentRowMapper = marriagePaymentRowMapper; } - //Jasmine 07.05.2023 - // public List searchMarriagePaymentDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { - // List preparedStmtValues = new ArrayList<>(); - // String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); - // if (preparedStmtValues.size() == 0) { - // throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); - // } - // else { - // List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriagePaymentRowMapper); - // return result; - // } - // } + public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java index ccfc9872177..78b39a88628 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/DemandService.java @@ -53,10 +53,10 @@ public class DemandService { public List saveDemandDetails(List demands, RequestInfo requestInfo, WorkFlowCheck wfc) { demands.forEach(demand -> setDemandParamsLateFee(demand, requestInfo, wfc)); - System.out.println("hientersavedemand"); return enrichmentService.saveDemand(requestInfo,demands); } public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkFlowCheck wfc) { + demand.setConsumerType("FEE"); demand.setBusinessService("CR"); ArrayList demandDetails = new ArrayList<>(); @@ -76,8 +76,7 @@ public void setDemandParamsLateFee(Demand demand, RequestInfo requestInfo, WorkF private ModuleDetail getGLCodeRequest() { List masterDetails = new ArrayList<>(); masterDetails.add(MasterDetail.builder().name(TAX_MASTER).build()); - return ModuleDetail.builder().masterDetails(masterDetails) - .moduleName(MarriageConstants.BILLING_SERVICE).build(); + return ModuleDetail.builder().masterDetails(masterDetails).moduleName(MarriageConstants.BILLING_SERVICE).build(); } public void setGLCode(DemandDetail demandDetail, RequestInfo requestInfo) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index cc92b89d5f6..115a19078f5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -62,67 +62,77 @@ public MarriageApplicationService(MarriageProducer producer, MarriageApplication public List saveMarriageDetails(MarriageDetailsRequest request) { WorkFlowCheck wfc = new WorkFlowCheck(); + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + validatorService.ruleEngineMarriage(request, wfc, mdmsData); + validatorService.validateCommonFields( request); + mdmsValidator.validateMarriageMDMSData(request,mdmsData); + marriageDetailsEnrichment.enrichCreate(request); + producer.push(marriageApplicationConfiguration.getSaveMarriageApplicationTopic(), request); + if (request.getMarriageDetails().get(0).getIsWorkflow()){ + workflowIntegrator.callWorkFlow(request); } request.getMarriageDetails().forEach(marriage->{ - System.out.println("JSONStatus"+marriage.getStatus()); - // System.out.println("ConstStatus"+MarriageConstants.STATUS_FOR_PAYMENT); + // if(wfc.getPayment()!= null){ if(marriage.getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + List demands = new ArrayList<>(); + Demand demand = new Demand(); + demand.setTenantId(marriage.getTenantid()); + demand.setConsumerCode(marriage.getApplicationNumber()); + demands.add(demand); - marriage.setDemands(demandService.saveDemandDetails(demands,request.getRequestInfo(), wfc)); - // marriageDetailsEnrichment.saveDemand(request.getRequestInfo(),demands); + + marriage.setDemands(demandService.saveDemandDetails(demands,request.getRequestInfo(), wfc)); } - // } }); - - // request.getDeathCertificateDtls().forEach(death->{ - // if(wfc.getPayment()!= null){ - // if(death.getApplicationStatus().equals(DeathConstants.STATUS_FOR_PAYMENT)){ - // List demands = new ArrayList<>(); - // Demand demand = new Demand(); - // demand.setTenantId(death.getDeathBasicInfo().getTenantId()); - // demand.setConsumerCode(death.getDeathBasicInfo().getDeathACKNo()); - // demands.add(demand); - // death.setDemands(demandService.saveDemandDetails(demands,request.getRequestInfo(), wfc)); - // } - // } - // }); - // producer.push(marriageApplicationConfiguration.getUpdateDemandTopic(), request); return request.getMarriageDetails(); } public List updateMarriageDetails(MarriageDetailsRequest request) { validatorService.validateCommonFields( request); + Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + mdmsValidator.validateMarriageMDMSData(request,mdmsData); + String applicationNumber = request.getMarriageDetails().get(0).getApplicationNumber(); + MarriageApplicationSearchCriteria criteria =(MarriageApplicationSearchCriteria.builder() + .applicationNo(applicationNumber) + .build()); + List searchResult = repository.getMarriageApplication(criteria,request.getRequestInfo()); + validatorService.validateUpdate(request, searchResult); + marriageDetailsEnrichment.enrichUpdate(request); + if (request.getMarriageDetails().get(0).getIsWorkflow()){ + workflowIntegrator.callWorkFlow(request); } producer.push(marriageApplicationConfiguration.getUpdateMarriageApplicationTopic(), request); + return request.getMarriageDetails(); } public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { + return repository.searchMarriageDetails(criteria,requestInfo); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java index 51156884eaa..88148a10803 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageRegistryRequestService.java @@ -68,7 +68,6 @@ public MarriageRegistryRequest createRegistryRequest(MarriageDetailsRequest Marr ObjectMapper mapper = new ObjectMapper(); Object obj = request; mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); - //System.out.println("JasmineRegistryRequest "+ mapper.writeValueAsString(obj)); }catch(Exception e) { log.error("Exception while fetching from searcher: ",e); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index 6f49dd0702a..bde7f38bf0f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -67,7 +67,7 @@ public void ruleEngineMarriage(MarriageDetailsRequest request, WorkFlowCheck wfc } if (dateOfMarriage == null) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), - "Date of birth is required for create request."); + "Date of marriage is required for create request."); } else { Boolean isBackward = request.getMarriageDetails().get(0).getWitnessDetails().getIsBackward(); validateDoM(dateOfMarriage, wfCode,applicationType,mdmsdata, wfc,isBackward); @@ -106,13 +106,11 @@ public int getDaysDiff(Date dateToCheck) private void validateDoM(Long dateOfMarriage, String wfCode, String applicationType,Object mdmsData, WorkFlowCheck wfc ,Boolean isBackward) { Calendar calendar = Calendar.getInstance(); Long currentDate = calendar.getTimeInMillis(); - // System.out.println("wfCode"+wfCode); if (dateOfMarriage > currentDate) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), - "Date of death should be less than or same as current date."); + "Date of marriage should be less than or same as current date."); } else { wfc = checkValidation(mdmsData, dateOfMarriage, wfc ,isBackward); - //System.out.println("wfc"+wfc.getWorkflowCode()); if(!wfc.getWorkflowCode().equals(wfCode)) { throw new CustomException(MARRIAGE_DETAILS_INVALID_CREATE.getCode(), "Workflow code from the application request is wrong."); @@ -125,7 +123,6 @@ private void validateDoM(Long dateOfMarriage, String wfCode, String applicationT } // Validate Marriage date MDMS data public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkFlowCheck wfc ,Boolean isBackward) { - // WorkFlowCheck wfc = new WorkFlowCheck(); Calendar calendar = Calendar.getInstance(); Long currentDate = calendar.getTimeInMillis(); @@ -148,7 +145,6 @@ public WorkFlowCheck checkValidation(Object mdmsData, Long dateOfMarriage, WorkF wfc.setAmount(Integer.parseInt(wfLists.get(n).get("amount").toString())); } wfc.setActive(Boolean.getBoolean(wfLists.get(n).get("active").toString())); - // System.out.println("wfCodetesting"+wfLists.get(n).get("WorkflowCode").toString()); } } } @@ -198,7 +194,6 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriagedtls.getLbtype() + " is invalid"); } - // System.out.println("marriageward" + marriagedtls.getWardCode()); if (StringUtils.isEmpty(marriagedtls.getWardCode())) { throw new CustomException(" WARD INVALID ", "The Ward " + marriagedtls.getWardCode() + " is invalid"); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index d6fe05bdfa1..9810a61541b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -209,7 +209,6 @@ public class MarriageApplicationDetails { private String assignuser; - @Size(max = 128) // @Html private String comment; @@ -222,7 +221,6 @@ public class MarriageApplicationDetails { @Valid private List MarriageDocuments ; - @JsonProperty("Demands") private List demands; @@ -230,48 +228,53 @@ public class MarriageApplicationDetails { private boolean wfdelayedWithinFiveYear ; private boolean wfdelayedAfterFiveYear ; -//Jasmine 03.05.2023 + //Jasmine 03.05.2023 -@JsonProperty("marriageDistrictEn") -private String marriageDistrictEn; + @JsonProperty("marriageDistrictEn") + private String marriageDistrictEn; -@JsonProperty("marriageDistrictMl") -private String marriageDistrictMl; + @JsonProperty("marriageDistrictMl") + private String marriageDistrictMl; -@JsonProperty("marriageLBtypeEn") -private String marriageLBtypeEn; + @JsonProperty("marriageLBtypeEn") + private String marriageLBtypeEn; -@JsonProperty("marriageLBtypeMl") -private String marriageLBtypeMl; + @JsonProperty("marriageLBtypeMl") + private String marriageLBtypeMl; -@JsonProperty("marriageVillageNameEn") -private String marriageVillageNameEn; + @JsonProperty("marriageVillageNameEn") + private String marriageVillageNameEn; -@JsonProperty("marriageVillageNameMl") -private String marriageVillageNameMl; + @JsonProperty("marriageVillageNameMl") + private String marriageVillageNameMl; -@JsonProperty("marriageTalukNameEn") -private String marriageTalukNameEn; + @JsonProperty("marriageTalukNameEn") + private String marriageTalukNameEn; -@JsonProperty("marriageTalukNameMl") -private String marriageTalukNameMl; + @JsonProperty("marriageTalukNameMl") + private String marriageTalukNameMl; -@JsonProperty("marriagePlaceTypenameEn") -private String marriagePlaceTypenameEn; + @JsonProperty("marriagePlaceTypenameEn") + private String marriagePlaceTypenameEn; -@JsonProperty("marriagePlaceTypenameMl") -private String marriagePlaceTypenameMl; + @JsonProperty("marriagePlaceTypenameMl") + private String marriagePlaceTypenameMl; @JsonProperty("marriageWardCodeEn") private String marriageWardCodeEn; + @JsonProperty("marriageWardCodeMl") private String marriageWardCodeMl; + @JsonProperty("marriagePlaceIdEn") private String marriagePlaceIdEn; + @JsonProperty("marriagePlaceIdMl") private String marriagePlaceIdMl; + @JsonProperty("marriagePlaceIdSubRegiEn") private String marriagePlaceIdSubRegiEn; + @JsonProperty("marriagePlaceIdSubRegiMl") private String marriagePlaceIdSubRegiMl; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/CommonUtils.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/CommonUtils.java new file mode 100644 index 00000000000..e991f294375 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/CommonUtils.java @@ -0,0 +1,74 @@ +package org.ksmart.marriage.utils; + +import org.ksmart.marriage.common.model.AuditDetails; +import org.springframework.stereotype.Component; + +import lombok.Getter; +import java.time.*; +import java.time.format.DateTimeFormatter; + +@Component +@Getter +public class CommonUtils { + + public static Long currentDateTime() { + LocalDateTime instance = LocalDateTime.now(ZoneId.of("Asia/Kolkata")); + return instance.atZone(ZoneId.of("Asia/Kolkata")).toInstant().toEpochMilli(); + } + + public static LocalDate currentDate() { + LocalDate instance = LocalDate.now(ZoneId.of("Asia/Kolkata")); + return instance; + } + + +// public static LocalDate currentDate() { +// LocalDate instance = LocalDate.now(ZoneId.of("Asia/Kolkata")); +//// ZoneId zone = ZoneId.of( "Asia/Calcutta") ; +//// ZonedDateTime zdt = ZonedDateTime.now(zone) ; +// return instance; +// } +public static String currentTime() { + LocalTime instance = LocalTime.now(ZoneId.of("Asia/Kolkata")); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("hh:mm a"); + String formattedString = formatter.format(instance); + return formattedString; +} + + public static Long timeStringToLong(LocalDateTime zonedDateTime) { + return zonedDateTime.atZone(ZoneId.of("Asia/Kolkata")).toInstant().toEpochMilli(); + } + public static String timeLongToString(Long time) { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm"); + return formatter.format(LongToDate(time)); + } + + public static String timeLongToStringhh(Long time) { + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("hh:mm a"); + return formatter.format(LongToDate(time)); + } + + public static LocalDateTime LongToDate(Long dateTime) { + LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(dateTime), ZoneId.of("Asia/Kolkata")); + return localDateTime; + } + + public static AuditDetails buildAuditDetails(String by, Boolean create) { + AuditDetails auditDetails; + Long currentTime = currentDateTime(); + if (create) { + auditDetails = AuditDetails.builder() + .createdBy(by) + .createdTime(currentTime) + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } else { + auditDetails = AuditDetails.builder() + .lastModifiedBy(by) + .lastModifiedTime(currentTime) + .build(); + } + return auditDetails; + } +} From 6dc891dc75a00430ddae16d6c539522416e8c7ab Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 18 May 2023 11:06:30 +0530 Subject: [PATCH 381/420] update table after payment --- .../src/main/resources/application.properties | 3 +++ .../V202305181130__marriage_registry_drop_columns_dll.sql | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V202305181130__marriage_registry_drop_columns_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index a8e431950cc..1da2413df46 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -168,4 +168,7 @@ persister.update.marriage.application.correction.topic=correction-update-marriag persister.update.marriage.demand.topic=update-demand-topic +#Payment +persister.update.marriage.payment.topic=update-marriage-application-payment-topic + diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305181130__marriage_registry_drop_columns_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305181130__marriage_registry_drop_columns_dll.sql new file mode 100644 index 00000000000..92acd4ab7c5 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305181130__marriage_registry_drop_columns_dll.sql @@ -0,0 +1,5 @@ +alter table eg_register_marriage_details drop column IF EXISTS application_dtls_id ; +alter table eg_register_marriage_details drop column IF EXISTS application_category ; + +alter table eg_register_marriage_details_audit drop column IF EXISTS application_dtls_id ; +alter table eg_register_marriage_details_audit drop column IF EXISTS application_category ; \ No newline at end of file From 653302b6b482e1987bc80a0a5a5b6d60247850a5 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 18 May 2023 12:35:49 +0530 Subject: [PATCH 382/420] changes in payment --- .../marriage/common/services/PaymentUpdateService.java | 4 ++-- .../org/ksmart/marriage/workflow/WorkflowIntegrator.java | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index 6137ff69a71..d1136a99eab 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -110,9 +110,9 @@ public void process(HashMap record) { } MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) .marriageDetails(marriage).build(); - //System.out.println(" payment detail updateRequest:"+updateRequest); + System.out.println(" payment detail updateRequest before calling workflow --------------:"+updateRequest); wfIntegrator.callWorkFlow(updateRequest); - + System.out.println(" payment detail updateRequest after calling workflow ---------------:"+updateRequest); User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java index 5b019ee3beb..50717a2246b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/workflow/WorkflowIntegrator.java @@ -4,6 +4,8 @@ import java.util.List; import java.util.Map; import java.util.Collections; + +import com.google.gson.Gson; import org.apache.commons.collections4.CollectionUtils; import org.egov.tracer.model.CustomException; import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; @@ -121,8 +123,12 @@ public void callWorkFlow(MarriageDetailsRequest request) { // log.info("workflow integrator request " + workFlowRequest); try { + System.out.println("Workflow request--------"); + System.out.println(new Gson().toJson(workFlowRequest)); response = restTemplate.postForObject(bndConfig.getWfHost().concat(bndConfig.getWfTransitionPath()), workFlowRequest, String.class); + System.out.println("Workflow response--------"); + System.out.println(new Gson().toJson(response)); } catch (HttpClientErrorException e) { /* * extracting message from client error exception @@ -143,7 +149,7 @@ public void callWorkFlow(MarriageDetailsRequest request) { " Exception occured while integrating with workflow : " + e.getMessage()); } - log.info("workflow integrator response " + response); + log.info("workflow integrator response " + new Gson().toJson(response)); /* * on success result from work-flow read the data and set the status back to TL From c972b5f92b6764fb5bef61a2e1ff5ab1cbe25529 Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 18 May 2023 12:40:39 +0530 Subject: [PATCH 383/420] changes in payment --- .../marriage/common/services/PaymentUpdateService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index d1136a99eab..63fabdb3755 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -1,5 +1,6 @@ package org.ksmart.marriage.common.services; import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; import com.jayway.jsonpath.DocumentContext; import com.jayway.jsonpath.JsonPath; @@ -93,6 +94,7 @@ public PaymentUpdateService(MarriageApplicationService marriageService,MarriageA public void process(HashMap record) { ObjectMapper mapper = new ObjectMapper(); try { + System.out.println(" payment records --------------:"+new Gson().toJson(record)); PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); RequestInfo requestInfo = paymentRequest.getRequestInfo(); List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); @@ -110,9 +112,9 @@ public void process(HashMap record) { } MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) .marriageDetails(marriage).build(); - System.out.println(" payment detail updateRequest before calling workflow --------------:"+updateRequest); + System.out.println(" payment detail updateRequest before calling workflow --------------:"+new Gson().toJson(updateRequest)); wfIntegrator.callWorkFlow(updateRequest); - System.out.println(" payment detail updateRequest after calling workflow ---------------:"+updateRequest); + System.out.println(" payment detail updateRequest after calling workflow ---------------:"+new Gson().toJson(updateRequest)); User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); From a0d508a05f89ef80cda6c6528be8d30d9c1b25df Mon Sep 17 00:00:00 2001 From: binilp Date: Thu, 18 May 2023 12:49:29 +0530 Subject: [PATCH 384/420] added topic persister.update.marriage.payment.topic --- .../src/main/resources/marriage.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index c4daf8a9158..e21f96c3b2b 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -1473,6 +1473,24 @@ serviceMaps: - jsonPath: $.PaymentDetails.*.amount - jsonPath: $.PaymentDetails.*.applicationNumber + - version: 1.0 + description: Persists update payment amount workflow details in marriage table + fromTopic: persister.update.marriage.payment.topic + isTransaction: true + queryMaps: + + - query: UPDATE public.eg_marriage_details SET action = ?, status = ?, amount = ? + WHERE applicationnumber = ? ; + basePath: PaymentDetails.* + jsonMaps: + + - jsonPath: $.PaymentDetails.*.action + + - jsonPath: $.PaymentDetails.*.applicationStatus + + - jsonPath: $.PaymentDetails.*.amount + + - jsonPath: $.PaymentDetails.*.applicationNumber From 2becc9daf8be01aafd4858ab0adbc01a6c892afe Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 18 May 2023 14:04:08 +0530 Subject: [PATCH 385/420] update table after payment --- .../common/consumer/ReceiptConsumer.java | 2 +- .../common/model/common/CommonPay.java | 50 ++-- .../common/model/common/CommonPayRequest.java | 52 ++-- .../model/common/CommonPayResponse.java | 44 ++-- .../common/repository/CommonRepository.java | 94 +++---- .../common/services/PaymentUpdateService.java | 232 +++++++++--------- .../model/common/CommonPay.java | 9 +- .../services/PaymentUpdateService.java | 143 +++++++++++ 8 files changed, 387 insertions(+), 239 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java index 819532c5dac..80b9fd09edc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java @@ -19,7 +19,7 @@ //import org.ksmart.marriage.common.contract.EgovPdfResp; import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.common.producer.MarriageProducer; -import org.ksmart.marriage.common.services.PaymentUpdateService; +import org.ksmart.marriage.marriagecommon.services.PaymentUpdateService; //import org.ksmart.birth.config.BirthDeathConfiguration; //import org.ksmart.birth.death.certmodel.DeathCertRequest; //import org.ksmart.birth.death.certmodel.DeathCertificate; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java index e1db80e0bc4..f92b75bf201 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java @@ -1,35 +1,35 @@ -package org.ksmart.marriage.common.model.common; +// package org.ksmart.marriage.common.model.common; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; +// import com.fasterxml.jackson.annotation.JsonProperty; +// import lombok.*; -import javax.validation.constraints.Size; +// import javax.validation.constraints.Size; -import org.ksmart.marriage.common.model.AuditDetails; +// import org.ksmart.marriage.common.model.AuditDetails; -import java.math.BigDecimal; -@Getter -@Setter -@AllArgsConstructor -@NoArgsConstructor -@Builder -@ToString -public class CommonPay { - @Size(max = 64) - @JsonProperty("applicationNumber") - private String applicationNumber; +// import java.math.BigDecimal; +// @Getter +// @Setter +// @AllArgsConstructor +// @NoArgsConstructor +// @Builder +// @ToString +// public class CommonPay { +// @Size(max = 64) +// @JsonProperty("applicationNumber") +// private String applicationNumber; - private String action; +// private String action; - private String applicationStatus; +// private String applicationStatus; - private Boolean hasPayment; +// private Boolean hasPayment; - @JsonProperty("isPaymentSuccess") - private Boolean isPaymentSuccess; +// @JsonProperty("isPaymentSuccess") +// private Boolean isPaymentSuccess; - private BigDecimal amount = BigDecimal.ZERO; +// private BigDecimal amount = BigDecimal.ZERO; - @JsonProperty("auditDetails") - private AuditDetails auditDetails; -} +// @JsonProperty("auditDetails") +// private AuditDetails auditDetails; +// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java index 366606941d7..1b440077b89 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java @@ -1,31 +1,31 @@ -package org.ksmart.marriage.common.model.common; +// package org.ksmart.marriage.common.model.common; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.*; -import org.egov.common.contract.request.RequestInfo; -import javax.validation.Valid; -import javax.validation.constraints.Size; -import java.math.BigDecimal; -import java.util.List; +// import com.fasterxml.jackson.annotation.JsonProperty; +// import lombok.*; +// import org.egov.common.contract.request.RequestInfo; +// import javax.validation.Valid; +// import javax.validation.constraints.Size; +// import java.math.BigDecimal; +// import java.util.List; -@Getter -@AllArgsConstructor -@NoArgsConstructor -@Builder -@ToString -public class CommonPayRequest { - @JsonProperty("RequestInfo") - private RequestInfo requestInfo; +// @Getter +// @AllArgsConstructor +// @NoArgsConstructor +// @Builder +// @ToString +// public class CommonPayRequest { +// @JsonProperty("RequestInfo") +// private RequestInfo requestInfo; - @JsonProperty("PaymentDetails") - @Valid - private List commonPays; +// @JsonProperty("PaymentDetails") +// @Valid +// private List commonPays; - public CommonPayRequest addPayment(CommonPay commonPay) { - if (commonPays == null) { - commonPays = null; - } - return this; - } +// public CommonPayRequest addPayment(CommonPay commonPay) { +// if (commonPays == null) { +// commonPays = null; +// } +// return this; +// } -} +// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java index a081b59d105..aeba4cd392d 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java @@ -1,25 +1,25 @@ -package org.ksmart.marriage.common.model.common; +// package org.ksmart.marriage.common.model.common; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.egov.common.contract.response.ResponseInfo; +// import com.fasterxml.jackson.annotation.JsonProperty; +// import lombok.AllArgsConstructor; +// import lombok.Builder; +// import lombok.Data; +// import lombok.NoArgsConstructor; +// import org.egov.common.contract.response.ResponseInfo; -import javax.validation.Valid; -import java.util.ArrayList; -import java.util.List; -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder -public class CommonPayResponse { - @JsonProperty("ResponseInfo") - @Valid - private ResponseInfo responseInfo; +// import javax.validation.Valid; +// import java.util.ArrayList; +// import java.util.List; +// @Data +// @NoArgsConstructor +// @AllArgsConstructor +// @Builder +// public class CommonPayResponse { +// @JsonProperty("ResponseInfo") +// @Valid +// private ResponseInfo responseInfo; - @JsonProperty("CommonPayRequest") - @Valid - private List payments = new ArrayList<>(); -} +// @JsonProperty("CommonPayRequest") +// @Valid +// private List payments = new ArrayList<>(); +// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/CommonRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/CommonRepository.java index 3c40d69ac8b..513a2f01b35 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/CommonRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/repository/CommonRepository.java @@ -1,50 +1,50 @@ -package org.ksmart.marriage.common.repository; - -import lombok.extern.slf4j.Slf4j; -import net.logstash.logback.encoder.org.apache.commons.lang.StringUtils; -import org.egov.common.contract.request.RequestInfo; -import org.egov.tracer.model.CustomException; -import org.ksmart.marriage.common.model.common.CommonPay; -import org.ksmart.marriage.common.model.common.CommonPayRequest; -// import org.ksmart.birth.birthcommon.model.common.CommonPay; -// import org.ksmart.birth.birthcommon.model.common.CommonPayRequest; - import org.ksmart.marriage.common.producer.MarriageProducer; -import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; -// import org.ksmart.birth.common.repository.builder.CommonQueryBuilder; -// import org.ksmart.birth.config.BirthConfiguration; -// import org.ksmart.birth.newbirth.enrichment.NewBirthResponseEnrichment; -// import org.ksmart.birth.newbirth.repository.rowmapper.BirthApplicationRowMapper; -// import org.ksmart.birth.utils.enums.ErrorCodes; -// import org.ksmart.birth.web.model.SearchCriteria; -// import org.ksmart.birth.web.model.newbirth.NewBirthApplication; -// import org.ksmart.birth.web.model.newbirth.NewBirthDetailRequest; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Repository; - -import java.util.ArrayList; -import java.util.List; - -@Slf4j -@Repository -public class CommonRepository { - // @Autowired - // CommonQueryBuilder commonQueryBuilder; - - @Autowired - MarriageApplicationConfiguration config; - - private final MarriageProducer producer; - - @Autowired - CommonRepository(MarriageProducer producer){ - this.producer = producer; - } - public List updatePaymentDetails(CommonPayRequest request) { +// package org.ksmart.marriage.common.repository; + +// import lombok.extern.slf4j.Slf4j; +// import net.logstash.logback.encoder.org.apache.commons.lang.StringUtils; +// import org.egov.common.contract.request.RequestInfo; +// import org.egov.tracer.model.CustomException; +// import org.ksmart.marriage.common.model.common.CommonPay; +// import org.ksmart.marriage.common.model.common.CommonPayRequest; +// // import org.ksmart.birth.birthcommon.model.common.CommonPay; +// // import org.ksmart.birth.birthcommon.model.common.CommonPayRequest; +// import org.ksmart.marriage.common.producer.MarriageProducer; +// import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +// // import org.ksmart.birth.common.repository.builder.CommonQueryBuilder; +// // import org.ksmart.birth.config.BirthConfiguration; +// // import org.ksmart.birth.newbirth.enrichment.NewBirthResponseEnrichment; +// // import org.ksmart.birth.newbirth.repository.rowmapper.BirthApplicationRowMapper; +// // import org.ksmart.birth.utils.enums.ErrorCodes; +// // import org.ksmart.birth.web.model.SearchCriteria; +// // import org.ksmart.birth.web.model.newbirth.NewBirthApplication; +// // import org.ksmart.birth.web.model.newbirth.NewBirthDetailRequest; +// import org.springframework.beans.factory.annotation.Autowired; +// import org.springframework.jdbc.core.JdbcTemplate; +// import org.springframework.stereotype.Repository; + +// import java.util.ArrayList; +// import java.util.List; + +// @Slf4j +// @Repository +// public class CommonRepository { +// // @Autowired +// // CommonQueryBuilder commonQueryBuilder; + +// @Autowired +// MarriageApplicationConfiguration config; + +// private final MarriageProducer producer; + +// @Autowired +// CommonRepository(MarriageProducer producer){ +// this.producer = producer; +// } +// public List updatePaymentDetails(CommonPayRequest request) { - producer.push(config.getUpdateMarriagePaymentTopic(), request); - return request.getCommonPays(); - } +// producer.push(config.getUpdateMarriagePaymentTopic(), request); +// return request.getCommonPays(); +// } -} +// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java index 6137ff69a71..63759ff4cbd 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/services/PaymentUpdateService.java @@ -1,142 +1,142 @@ -package org.ksmart.marriage.common.services; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.jayway.jsonpath.DocumentContext; -import com.jayway.jsonpath.JsonPath; +// package org.ksmart.marriage.common.services; +// import com.fasterxml.jackson.databind.ObjectMapper; +// import com.jayway.jsonpath.DocumentContext; +// import com.jayway.jsonpath.JsonPath; -import lombok.extern.slf4j.Slf4j; +// import lombok.extern.slf4j.Slf4j; -import org.egov.common.contract.request.RequestInfo; -import org.egov.common.contract.request.Role; -import org.egov.common.contract.request.User; -import org.egov.tracer.model.CustomException; -import org.json.JSONObject; -import org.ksmart.marriage.common.calculation.collections.models.PaymentDetail; -import org.ksmart.marriage.common.calculation.collections.models.PaymentRequest; -import org.ksmart.marriage.common.enrichment.BaseEnrichment; -import org.ksmart.marriage.common.model.AuditDetails; -import org.ksmart.marriage.common.model.common.CommonPay; -import org.ksmart.marriage.common.model.common.CommonPayRequest; -import org.ksmart.marriage.common.repository.CommonRepository; -import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; -import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; -import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; -import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; -//import org.ksmart.marriage.utils.BirthUtils; -//import org.ksmart.marriage.web.model.SearchCriteria; -//import org.ksmart.marriage.web.model.newbirth.NewBirthApplication; -//import org.ksmart.marriage.web.model.newbirth.NewBirthDetailRequest; -import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; -import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +// import org.egov.common.contract.request.RequestInfo; +// import org.egov.common.contract.request.Role; +// import org.egov.common.contract.request.User; +// import org.egov.tracer.model.CustomException; +// import org.json.JSONObject; +// import org.ksmart.marriage.common.calculation.collections.models.PaymentDetail; +// import org.ksmart.marriage.common.calculation.collections.models.PaymentRequest; +// import org.ksmart.marriage.common.enrichment.BaseEnrichment; +// import org.ksmart.marriage.common.model.AuditDetails; +// import org.ksmart.marriage.common.model.common.CommonPay; +// import org.ksmart.marriage.common.model.common.CommonPayRequest; +// import org.ksmart.marriage.common.repository.CommonRepository; +// import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +// import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; +// import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; +// import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; +// //import org.ksmart.marriage.utils.BirthUtils; +// //import org.ksmart.marriage.web.model.SearchCriteria; +// //import org.ksmart.marriage.web.model.newbirth.NewBirthApplication; +// //import org.ksmart.marriage.web.model.newbirth.NewBirthDetailRequest; +// import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +// import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; -import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; -import org.ksmart.marriage.utils.MarriageConstants; -import org.ksmart.marriage.workflow.WorkflowIntegrator; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; +// import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +// import org.ksmart.marriage.utils.MarriageConstants; +// import org.ksmart.marriage.workflow.WorkflowIntegrator; +// import org.springframework.beans.factory.annotation.Autowired; +// import org.springframework.beans.factory.annotation.Qualifier; +// import org.springframework.beans.factory.annotation.Value; +// import org.springframework.stereotype.Service; +// import org.springframework.util.CollectionUtils; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +// import java.math.BigDecimal; +// import java.util.ArrayList; +// import java.util.Collections; +// import java.util.HashMap; +// import java.util.List; +// import java.util.Map; -// import static org.ksmart.marriage.utils.MarriageConstants; -@Service -@Slf4j -public class PaymentUpdateService implements BaseEnrichment { +// // import static org.ksmart.marriage.utils.MarriageConstants; +// @Service +// @Slf4j +// public class PaymentUpdateService implements BaseEnrichment { - private MarriageApplicationService marriageService; +// private MarriageApplicationService marriageService; - private MarriageApplicationConfiguration config; +// private MarriageApplicationConfiguration config; - private MarriageApplicationSearchCriteria searchCriteria; +// private MarriageApplicationSearchCriteria searchCriteria; - private WorkflowIntegrator wfIntegrator; +// private WorkflowIntegrator wfIntegrator; - private MarriageDetailsEnrichment enrichmentService; +// private MarriageDetailsEnrichment enrichmentService; - private final CommonRepository repository; +// private final CommonRepository repository; -// @Autowired -// private objectMapper mapper; +// // @Autowired +// // private objectMapper mapper; - //private BirthUtils util; +// //private BirthUtils util; - public PaymentUpdateService(MarriageApplicationService marriageService,MarriageApplicationConfiguration config, - WorkflowIntegrator wfIntegrator,MarriageDetailsEnrichment enrichmentService , - CommonRepository repository) - //BirthUtils util, NewBirthRepository repository,) - { - this.marriageService=marriageService; - this.config=config; - this.wfIntegrator=wfIntegrator; - this.enrichmentService= enrichmentService; - this.repository=repository; - } +// public PaymentUpdateService(MarriageApplicationService marriageService,MarriageApplicationConfiguration config, +// WorkflowIntegrator wfIntegrator,MarriageDetailsEnrichment enrichmentService , +// CommonRepository repository) +// //BirthUtils util, NewBirthRepository repository,) +// { +// this.marriageService=marriageService; +// this.config=config; +// this.wfIntegrator=wfIntegrator; +// this.enrichmentService= enrichmentService; +// this.repository=repository; +// } - final String tenantId = "tenantId"; +// final String tenantId = "tenantId"; - final String businessService = "businessService"; +// final String businessService = "businessService"; - final String consumerCode = "consumerCode"; +// final String consumerCode = "consumerCode"; - /** - * Process the message from kafka and updates the status to paid - * - * @param record The incoming message from receipt create consumer - */ - public void process(HashMap record) { - ObjectMapper mapper = new ObjectMapper(); - try { - PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); - RequestInfo requestInfo = paymentRequest.getRequestInfo(); - List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); - String tenantId = paymentRequest.getPayment().getTenantId(); - for (PaymentDetail paymentDetail : paymentDetails) { - MarriageApplicationSearchCriteria searchCriteria = new MarriageApplicationSearchCriteria(); - searchCriteria.setTenantId(tenantId); - searchCriteria.setApplicationNo(paymentDetail.getBill().getConsumerCode()); - searchCriteria.setBusinessService(paymentDetail.getBusinessService()); - List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); - if(null!=marriage && marriage.size()==1){ - //if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ - marriage.get(0).setAction(MarriageConstants.ACTION_PAY); - //} - } - MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) - .marriageDetails(marriage).build(); - //System.out.println(" payment detail updateRequest:"+updateRequest); - wfIntegrator.callWorkFlow(updateRequest); +// /** +// * Process the message from kafka and updates the status to paid +// * +// * @param record The incoming message from receipt create consumer +// */ +// public void process(HashMap record) { +// ObjectMapper mapper = new ObjectMapper(); +// try { +// PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); +// RequestInfo requestInfo = paymentRequest.getRequestInfo(); +// List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); +// String tenantId = paymentRequest.getPayment().getTenantId(); +// for (PaymentDetail paymentDetail : paymentDetails) { +// MarriageApplicationSearchCriteria searchCriteria = new MarriageApplicationSearchCriteria(); +// searchCriteria.setTenantId(tenantId); +// searchCriteria.setApplicationNo(paymentDetail.getBill().getConsumerCode()); +// searchCriteria.setBusinessService(paymentDetail.getBusinessService()); +// List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); +// if(null!=marriage && marriage.size()==1){ +// //if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ +// marriage.get(0).setAction(MarriageConstants.ACTION_PAY); +// //} +// } +// MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) +// .marriageDetails(marriage).build(); +// //System.out.println(" payment detail updateRequest:"+updateRequest); +// wfIntegrator.callWorkFlow(updateRequest); - User userInfo = requestInfo.getUserInfo(); - AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); +// User userInfo = requestInfo.getUserInfo(); +// AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); - // Update marriage table with status initiated +// // Update marriage table with status initiated - List commonPays = new ArrayList<>(); - CommonPay pay = new CommonPay(); - pay.setAction("INITIATE"); - pay.setApplicationStatus("INITIATED"); - pay.setHasPayment(true); - pay.setAmount(new BigDecimal(10)); - pay.setIsPaymentSuccess(true); - pay.setApplicationNumber(paymentDetail.getBill().getConsumerCode()); - pay.setAuditDetails(auditDetails); - commonPays.add(pay); - CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); - repository.updatePaymentDetails(paymentReq); - } +// List commonPays = new ArrayList<>(); +// CommonPay pay = new CommonPay(); +// pay.setAction("INITIATE"); +// pay.setApplicationStatus("INITIATED"); +// pay.setHasPayment(true); +// pay.setAmount(new BigDecimal(10)); +// pay.setIsPaymentSuccess(true); +// pay.setApplicationNumber(paymentDetail.getBill().getConsumerCode()); +// pay.setAuditDetails(auditDetails); +// commonPays.add(pay); +// CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); +// repository.updatePaymentDetails(paymentReq); +// } - } catch (Exception e) { - log.error("KAFKA_PROCESS_ERROR", e); - } +// } catch (Exception e) { +// log.error("KAFKA_PROCESS_ERROR", e); +// } - } +// } -} +// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java index 1cf366b23ce..748d0cf8674 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java @@ -4,6 +4,9 @@ import lombok.*; import javax.validation.constraints.Size; + +import org.ksmart.marriage.common.model.AuditDetails; + import java.math.BigDecimal; @Getter @Setter @@ -14,16 +17,18 @@ public class CommonPay { @Size(max = 64) @JsonProperty("applicationNumber") - private String applicationNo; + private String applicationNumber; private String action; private String applicationStatus; private Boolean hasPayment; - @JsonProperty("isPaymentSuccess") private Boolean isPaymentSuccess; private BigDecimal amount = BigDecimal.ZERO; + + @JsonProperty("auditDetails") + private AuditDetails auditDetails; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java new file mode 100644 index 00000000000..8f1e2baf94b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java @@ -0,0 +1,143 @@ +package org.ksmart.marriage.marriagecommon.services; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.jayway.jsonpath.DocumentContext; +import com.jayway.jsonpath.JsonPath; + +import lombok.extern.slf4j.Slf4j; + +import org.egov.common.contract.request.RequestInfo; +import org.egov.common.contract.request.Role; +import org.egov.common.contract.request.User; +import org.egov.tracer.model.CustomException; +import org.json.JSONObject; +import org.ksmart.marriage.common.calculation.collections.models.PaymentDetail; +import org.ksmart.marriage.common.calculation.collections.models.PaymentRequest; +import org.ksmart.marriage.common.enrichment.BaseEnrichment; +import org.ksmart.marriage.common.model.AuditDetails; + +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.enrichment.MarriageDetailsEnrichment; +import org.ksmart.marriage.marriageapplication.repository.MarriageApplicationRepository; +import org.ksmart.marriage.marriageapplication.service.MarriageApplicationService; +//import org.ksmart.marriage.utils.BirthUtils; +//import org.ksmart.marriage.web.model.SearchCriteria; +//import org.ksmart.marriage.web.model.newbirth.NewBirthApplication; +//import org.ksmart.marriage.web.model.newbirth.NewBirthDetailRequest; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecommon.model.common.CommonPay; +import org.ksmart.marriage.marriagecommon.model.common.CommonPayRequest; +import org.ksmart.marriage.marriagecommon.repoisitory.CommonRepository; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; + +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.utils.MarriageConstants; +import org.ksmart.marriage.workflow.WorkflowIntegrator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +// import static org.ksmart.marriage.utils.MarriageConstants; +@Service +@Slf4j +public class PaymentUpdateService implements BaseEnrichment { + + private MarriageApplicationService marriageService; + + private MarriageApplicationConfiguration config; + + private MarriageApplicationSearchCriteria searchCriteria; + + private WorkflowIntegrator wfIntegrator; + + private MarriageDetailsEnrichment enrichmentService; + + private final CommonRepository repository; + +// @Autowired +// private objectMapper mapper; + + //private BirthUtils util; + + public PaymentUpdateService(MarriageApplicationService marriageService,MarriageApplicationConfiguration config, + WorkflowIntegrator wfIntegrator,MarriageDetailsEnrichment enrichmentService , + CommonRepository repository) + //BirthUtils util, NewBirthRepository repository,) + { + this.marriageService=marriageService; + this.config=config; + this.wfIntegrator=wfIntegrator; + this.enrichmentService= enrichmentService; + this.repository=repository; + } + + final String tenantId = "tenantId"; + + final String businessService = "businessService"; + + final String consumerCode = "consumerCode"; + + + /** + * Process the message from kafka and updates the status to paid + * + * @param record The incoming message from receipt create consumer + */ + public void process(HashMap record) { + ObjectMapper mapper = new ObjectMapper(); + try { + PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); + RequestInfo requestInfo = paymentRequest.getRequestInfo(); + List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); + String tenantId = paymentRequest.getPayment().getTenantId(); + for (PaymentDetail paymentDetail : paymentDetails) { + MarriageApplicationSearchCriteria searchCriteria = new MarriageApplicationSearchCriteria(); + searchCriteria.setTenantId(tenantId); + searchCriteria.setApplicationNo(paymentDetail.getBill().getConsumerCode()); + searchCriteria.setBusinessService(paymentDetail.getBusinessService()); + List marriage = marriageService.searchMarriageDetails(searchCriteria,requestInfo); + if(null!=marriage && marriage.size()==1){ + //if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ + marriage.get(0).setAction(MarriageConstants.ACTION_PAY); + //} + } + MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) + .marriageDetails(marriage).build(); + //System.out.println(" payment detail updateRequest:"+updateRequest); + wfIntegrator.callWorkFlow(updateRequest); + + User userInfo = requestInfo.getUserInfo(); + AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); + + // Update marriage table with status initiated + + List commonPays = new ArrayList<>(); + CommonPay pay = new CommonPay(); + pay.setAction("INITIATE"); + pay.setApplicationStatus("INITIATED"); + pay.setHasPayment(true); + pay.setAmount(new BigDecimal(10)); + pay.setIsPaymentSuccess(true); + pay.setApplicationNumber(paymentDetail.getBill().getConsumerCode()); + pay.setAuditDetails(auditDetails); + commonPays.add(pay); + CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); + repository.updatePaymentDetails(paymentReq); + } + + + } catch (Exception e) { + log.error("KAFKA_PROCESS_ERROR", e); + } + + } + +} From 8d45b20e46116afdab6d5e7896f5c977b15f6216 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 18 May 2023 14:05:00 +0530 Subject: [PATCH 386/420] update table after payment --- core-services/egov-persister/src/main/resources/marriage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index c4daf8a9158..51853d5c41d 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -682,7 +682,7 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileStoreId - - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.documentlink + - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.fileURL - jsonPath: $.MarriageDetails.*.MarriageDocuments.*.marriageId From f870e721c59f087ed712284de01bf60c87ce6e1a Mon Sep 17 00:00:00 2001 From: Jasmine Date: Thu, 18 May 2023 17:05:41 +0530 Subject: [PATCH 387/420] set SCST amount --- .../marriagecommon/services/PaymentUpdateService.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java index cf4d500dd59..8d2eebc74ca 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java @@ -111,7 +111,6 @@ public void process(HashMap record) { //if(marriage.get(0).getStatus().equals(MarriageConstants.STATUS_FOR_PAYMENT)){ marriage.get(0).setAction(MarriageConstants.ACTION_PAY); //} - } MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) .marriageDetails(marriage).build(); //System.out.println(" payment detail updateRequest:"+updateRequest); @@ -126,10 +125,10 @@ public void process(HashMap record) { List commonPays = new ArrayList<>(); CommonPay pay = new CommonPay(); - pay.setAction("INITIATE"); - pay.setApplicationStatus("INITIATED"); + pay.setAction(updateRequest.getMarriageDetails().get(0).getAction()); + pay.setApplicationStatus(updateRequest.getMarriageDetails().get(0).getStatus()); pay.setHasPayment(true); - pay.setAmount(new BigDecimal(10)); + pay.setAmount(paymentDetails.get(0).getBill().getBillDetails().get(0).getAmountPaid()); pay.setIsPaymentSuccess(true); pay.setApplicationNumber(paymentDetail.getBill().getConsumerCode()); pay.setAuditDetails(auditDetails); @@ -137,7 +136,7 @@ public void process(HashMap record) { CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); repository.updatePaymentDetails(paymentReq); } - + } } catch (Exception e) { log.error("KAFKA_PROCESS_ERROR", e); From e6efbc3b8da13ee75c62273829469e36672c8fe2 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 19 May 2023 11:26:20 +0530 Subject: [PATCH 388/420] update paymentservice --- .../config/MarriageApplicationConfiguration.java | 6 +++--- .../marriage/marriagecommon/model/common/CommonPay.java | 1 + .../marriagecommon/services/PaymentUpdateService.java | 6 ++++-- .../src/main/resources/application.properties | 8 ++++---- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index 29ccc9fe1ef..e873f2da7d5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -135,8 +135,8 @@ public class MarriageApplicationConfiguration { @Value("${egov.demand.taxheadmastercode}") private String taxHeadMasterCode; - //Payment - @Value("${persister.update.marriage.payment.topic}") - private String updateMarriagePaymentTopic; + // //Payment + // @Value("${persister.update.marriage.payment.topic}") + // private String updateMarriagePaymentTopic; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java index 748d0cf8674..32a98e5a95c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java @@ -24,6 +24,7 @@ public class CommonPay { private String applicationStatus; private Boolean hasPayment; + @JsonProperty("isPaymentSuccess") private Boolean isPaymentSuccess; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java index 8d2eebc74ca..316605fb0c1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java @@ -124,7 +124,8 @@ public void process(HashMap record) { // Update marriage table with status initiated List commonPays = new ArrayList<>(); - CommonPay pay = new CommonPay(); + CommonPay pay = new CommonPay(); + System.out.println("Action after wf1"+updateRequest.getMarriageDetails().get(0).getAction()); pay.setAction(updateRequest.getMarriageDetails().get(0).getAction()); pay.setApplicationStatus(updateRequest.getMarriageDetails().get(0).getStatus()); pay.setHasPayment(true); @@ -134,7 +135,8 @@ public void process(HashMap record) { pay.setAuditDetails(auditDetails); commonPays.add(pay); CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); - repository.updatePaymentDetails(paymentReq); + System.out.println("Action after wf2"+new Gson().toJson(paymentReq)); + repository.updatePaymentDetails(paymentReq); } } diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 1da2413df46..bf79cf022f7 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -139,8 +139,8 @@ decryption.abac.enabled=true #egov-encrypt service configs # egov.enc.host=http://localhost:1234 -egov.enc.host=http://localhost:1234 -# egov.enc.host=https://ksmart-dev.lsgkerala.gov.in +# egov.enc.host=http://localhost:1234 +egov.enc.host=https://ksmart-dev.lsgkerala.gov.in egov.enc.encrypt.endpoint=/egov-enc-service/crypto/v1/_encrypt egov.enc.decrypt.endpoint=/egov-enc-service/crypto/v1/_decrypt @@ -168,7 +168,7 @@ persister.update.marriage.application.correction.topic=correction-update-marriag persister.update.marriage.demand.topic=update-demand-topic -#Payment -persister.update.marriage.payment.topic=update-marriage-application-payment-topic +# #Payment +# persister.update.marriage.payment.topic=update-marriage-application-payment-topic From 3eca7664cd84599a6d08e2ce03510d1afb6b13ce Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 19 May 2023 11:27:42 +0530 Subject: [PATCH 389/420] update paymentservice --- .../src/main/resources/marriage.yml | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 050d47f836a..bf723f8ac99 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -1473,24 +1473,24 @@ serviceMaps: - jsonPath: $.PaymentDetails.*.amount - jsonPath: $.PaymentDetails.*.applicationNumber - - version: 1.0 - description: Persists update payment amount workflow details in marriage table - fromTopic: persister.update.marriage.payment.topic - isTransaction: true - queryMaps: + # - version: 1.0 + # description: Persists update payment amount workflow details in marriage table + # fromTopic: persister.update.marriage.payment.topic + # isTransaction: true + # queryMaps: - - query: UPDATE public.eg_marriage_details SET action = ?, status = ?, amount = ? - WHERE applicationnumber = ? ; - basePath: PaymentDetails.* - jsonMaps: + # - query: UPDATE public.eg_marriage_details SET action = ?, status = ?, amount = ? + # WHERE applicationnumber = ? ; + # basePath: PaymentDetails.* + # jsonMaps: - - jsonPath: $.PaymentDetails.*.action + # - jsonPath: $.PaymentDetails.*.action - - jsonPath: $.PaymentDetails.*.applicationStatus + # - jsonPath: $.PaymentDetails.*.applicationStatus - - jsonPath: $.PaymentDetails.*.amount + # - jsonPath: $.PaymentDetails.*.amount - - jsonPath: $.PaymentDetails.*.applicationNumber + # - jsonPath: $.PaymentDetails.*.applicationNumber From a70641780fa47d2110e6b916cc51b4ac682cf5dd Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 19 May 2023 15:04:24 +0530 Subject: [PATCH 390/420] update paymentservice --- ...202305191415__marriage_add_payment_columns_dll.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V202305191415__marriage_add_payment_columns_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305191415__marriage_add_payment_columns_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305191415__marriage_add_payment_columns_dll.sql new file mode 100644 index 00000000000..ac60831ea53 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305191415__marriage_add_payment_columns_dll.sql @@ -0,0 +1,11 @@ +ALTER TABLE public.eg_marriage_details Add COLUMN if not exists payment_transaction_id character varying(128); + +ALTER TABLE public.eg_marriage_details_audit Add COLUMN if not exists payment_transaction_id character varying(128); + +ALTER TABLE public.eg_marriage_details Add COLUMN if not exists payment_success Boolean; + +ALTER TABLE public.eg_marriage_details_audit Add COLUMN if not exists payment_success Boolean; + +ALTER TABLE public.eg_marriage_details ALTER COLUMN amount TYPE DECIMAL; + +ALTER TABLE public.eg_marriage_details_audit ALTER COLUMN amount TYPE DECIMAL; \ No newline at end of file From feab28eec8610604a49a96c3343e043e930021e1 Mon Sep 17 00:00:00 2001 From: shaijutsikm Date: Fri, 19 May 2023 15:32:59 +0530 Subject: [PATCH 391/420] mrg payment success update in db --- .../egov-persister/src/main/resources/marriage.yml | 8 ++++++-- .../marriage/marriagecommon/model/common/CommonPay.java | 4 +++- .../marriagecommon/services/PaymentUpdateService.java | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index bf723f8ac99..8816ce81735 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -1461,7 +1461,7 @@ serviceMaps: isTransaction: true queryMaps: - - query: UPDATE public.eg_marriage_details SET action = ?, status = ?, amount = ? + - query: UPDATE public.eg_marriage_details SET action = ?, status = ?, amount = ?, payment_transaction_id = ?, payment_success = ? WHERE applicationnumber = ? ; basePath: PaymentDetails.* jsonMaps: @@ -1470,7 +1470,11 @@ serviceMaps: - jsonPath: $.PaymentDetails.*.applicationStatus - - jsonPath: $.PaymentDetails.*.amount + - jsonPath: $.PaymentDetails.*.amount + + - jsonPath: $.PaymentDetails.*.paymentTransactionId + + - jsonPath: $.PaymentDetails.*.isPaymentSuccess - jsonPath: $.PaymentDetails.*.applicationNumber # - version: 1.0 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java index 32a98e5a95c..c03fd318bc0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/common/CommonPay.java @@ -24,7 +24,9 @@ public class CommonPay { private String applicationStatus; private Boolean hasPayment; - + + @JsonProperty("paymentTransactionId") + private String paymentTransactionId; @JsonProperty("isPaymentSuccess") private Boolean isPaymentSuccess; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java index 316605fb0c1..9ef9c7881e7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java @@ -130,6 +130,7 @@ public void process(HashMap record) { pay.setApplicationStatus(updateRequest.getMarriageDetails().get(0).getStatus()); pay.setHasPayment(true); pay.setAmount(paymentDetails.get(0).getBill().getBillDetails().get(0).getAmountPaid()); + pay.setPaymentTransactionId(paymentRequest.getPayment().getTransactionNumber()); pay.setIsPaymentSuccess(true); pay.setApplicationNumber(paymentDetail.getBill().getConsumerCode()); pay.setAuditDetails(auditDetails); From 08f2ab04c12bf9ad7c72d1d530c8d22294557b36 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 17 May 2023 16:19:56 +0530 Subject: [PATCH 392/420] fix --- ...02305171026__marriage_services_NewFeilds_Adding_dll.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V202305171026__marriage_services_NewFeilds_Adding_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305171026__marriage_services_NewFeilds_Adding_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305171026__marriage_services_NewFeilds_Adding_dll.sql new file mode 100644 index 00000000000..5a08fbd538b --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305171026__marriage_services_NewFeilds_Adding_dll.sql @@ -0,0 +1,7 @@ +--ALTER TABLE IF EXISTS public.eg_marriage_document +-- ADD COLUMN IF NOT EXISTS bride_age_proof character varying(64), +-- ADD COLUMN IF NOT EXISTS groom_age_proof character varying(64); +-- +--ALTER TABLE IF EXISTS public.eg_marriage_document_audit +-- ADD COLUMN IF NOT EXISTS bride_age_proof character varying(64), +-- ADD COLUMN IF NOT EXISTS groom_age_proof character varying(64); \ No newline at end of file From 7ebed8be495ec51722e94ad8c6c03f1b5caf9abc Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 22 May 2023 10:51:31 +0530 Subject: [PATCH 393/420] Migration-->Witness address feild size change added --- .../V202305221028__marriage_change_feildSize_columns_dll.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V202305221028__marriage_change_feildSize_columns_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305221028__marriage_change_feildSize_columns_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305221028__marriage_change_feildSize_columns_dll.sql new file mode 100644 index 00000000000..f86ddfb90e6 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305221028__marriage_change_feildSize_columns_dll.sql @@ -0,0 +1,4 @@ +ALTER TABLE IF EXISTS public.eg_marriage_witness_details ALTER COLUMN address_en TYPE VARCHAR(1000); +ALTER TABLE IF EXISTS public.eg_marriage_witness_details_audit ALTER COLUMN address_en TYPE VARCHAR(1000); +ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details ALTER COLUMN address_en TYPE VARCHAR(1000); +ALTER TABLE IF EXISTS public.eg_register_marriage_witness_details_audit ALTER COLUMN address_en TYPE VARCHAR(1000); From 7c49df641797ee1fa748f55c2f1600a4b55dbef9 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 22 May 2023 10:59:31 +0530 Subject: [PATCH 394/420] Witness Address Size Changed in model class --- .../web/model/marriage/WitnessDetails.java | 4 ++-- .../marriageregistry/web/model/WitnessRegistryDetails.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java index b19d03b9c71..8fac6010fb3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/WitnessDetails.java @@ -46,7 +46,7 @@ public class WitnessDetails { @JsonProperty("witness1Age") private Integer witness1Age; - @Size(max = 500) + @Size(max = 1000) @JsonProperty("witness1AddresSEn") private String witness1AddresSEn; @@ -81,7 +81,7 @@ public class WitnessDetails { @JsonProperty("witness2Age") private Integer witness2Age; - @Size(max = 200) + @Size(max = 1000) @JsonProperty("witness2AddresSEn") private String witness2AddresSEn; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java index 7e845f7481c..33204844bf3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/WitnessRegistryDetails.java @@ -50,7 +50,7 @@ public class WitnessRegistryDetails { @JsonProperty("witness1Age") private Integer witness1Age; - @Size(max = 500) + @Size(max = 1000) @JsonProperty("witness1AddresSEn") private String witness1AddresSEn; @@ -86,7 +86,7 @@ public class WitnessRegistryDetails { @JsonProperty("witness2Age") private Integer witness2Age; - @Size(max = 200) + @Size(max = 1000) @JsonProperty("witness2AddresSEn") private String witness2AddresSEn; From c479919eb5f06e19f9eb02fe928153a374dc6e23 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 23 May 2023 11:22:15 +0530 Subject: [PATCH 395/420] PaymentRowMapper Added --- .../MarriageApplicationQueryBuilder.java | 1 + .../rowmapper/MarriageApplicationRowMapper.java | 4 ++-- .../repository/rowmapper/PaymentRowMapper.java | 16 ++++++++++++++++ .../web/model/MarriageApplicationDetails.java | 5 +++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PaymentRowMapper.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 7bf2c20076f..8d9a7982b44 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -23,6 +23,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby , MD.workflowcode as MD_workflowcode, ") .append("MD.applicationNumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code, MD.zonal_office as MD_zonal_office,MD.action as MD_action, MD.status as MD_status,MD.villageid as MD_villageid, MD.taluk_name as MD_taluk_name,") + .append("MD.amount as MD_amount , MD.payment_transaction_id as MD_payment_transaction_id ,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index 2c6d15a91f4..baf45d13519 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -7,13 +7,12 @@ import org.springframework.jdbc.core.ResultSetExtractor; import org.springframework.stereotype.Component; -import javax.swing.text.Document; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; @Component -public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper,DocumentRowMapper{ +public class MarriageApplicationRowMapper implements ResultSetExtractor>, BaseRowMapper,BrideDetailsRowMapper,GroomDetailsRowMapper, BrideAddressDetailsRowMapper, GroomAddressDetailsRowMapper,WitnessDetailsRowMapper,DocumentRowMapper, PaymentRowMapper { private final MarriageApplicationConfiguration marriageApplicationConfiguration; @@ -64,6 +63,7 @@ public List extractData(ResultSet rs) throws SQLExce .witnessDetails(getWitnessDetails(rs)) .brideAddressDetails(getBrideAddressDetails(rs)) .groomAddressDetails(getGroomAddressDetailsRowMapper(rs)) + .commonPay(getPaymentDetails(rs)) //.MarriageDocuments(getMarriageDocument(rs)) .auditDetails(getAuditDetails(rs)) .build()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PaymentRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PaymentRowMapper.java new file mode 100644 index 00000000000..0b1be8c363b --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/PaymentRowMapper.java @@ -0,0 +1,16 @@ +package org.ksmart.marriage.marriageapplication.repository.rowmapper; + +import org.ksmart.marriage.marriagecommon.model.common.CommonPay; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public interface PaymentRowMapper { + default CommonPay getPaymentDetails (ResultSet rs) throws SQLException { + + return CommonPay.builder() + .amount(rs.getBigDecimal("MD_amount")) + .paymentTransactionId(rs.getString("MD_payment_transaction_id")) + .build(); + } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index 9810a61541b..efe9e5065ac 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -5,6 +5,7 @@ import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; import org.ksmart.marriage.marriageapplication.web.model.marriage.*; +import org.ksmart.marriage.marriagecommon.model.common.CommonPay; //import org.ksmart.marriage.common.model.AuditDetails; //import org.ksmart.marriage.common.model.Document; @@ -159,6 +160,10 @@ public class MarriageApplicationDetails { @JsonProperty("WitnessDetails") private WitnessDetails witnessDetails; + + @JsonProperty("CommonPay") + private CommonPay commonPay; + // @JsonProperty("MarriageDocument") // private MarriageDocument marriageDocument; //Workflow 29/03.2023 Jasmine From 480b34ac536849d498dba3d2592022dc8b62073c Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 23 May 2023 14:48:01 +0530 Subject: [PATCH 396/420] added sms for initiated status --- .../marriage-services/.attach_pid32722 | 0 .../common/consumer/ReceiptConsumer.java | 6 +- .../MarriageApplicationConfiguration.java | 24 + .../model/Notification/Action.java | 28 + .../model/Notification/ActionItem.java | 24 + .../model/Notification/Event.java | 50 ++ .../model/Notification/EventDetails.java | 40 ++ .../model/Notification/Recepient.java | 22 + .../model/Notification/Source.java | 31 + .../model/Notification/Status.java | 70 ++ .../services/PaymentUpdateService.java | 3 +- .../MarriageNotificationService.java | 471 +++++++++++++ .../MarriageRegistryRepository.java | 1 + .../model/certmodel/MarriageCertificate.java | 5 + .../marriage/utils/MarriageConstants.java | 31 + .../marriage/utils/NotificationUtil.java | 618 ++++++++++++++++++ .../src/main/resources/application.properties | 14 +- 17 files changed, 1435 insertions(+), 3 deletions(-) create mode 100644 municipal-services/marriage-services/.attach_pid32722 create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Action.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/ActionItem.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Event.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/EventDetails.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Recepient.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Source.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Status.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java diff --git a/municipal-services/marriage-services/.attach_pid32722 b/municipal-services/marriage-services/.attach_pid32722 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java index 80b9fd09edc..b3b34a63643 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java @@ -25,6 +25,7 @@ //import org.ksmart.birth.death.certmodel.DeathCertificate; //import org.ksmart.birth.death.model.EgDeathDtl; //import org.ksmart.birth.death.repository.DeathRepository; +import org.ksmart.marriage.marriagecommon.services.notification.MarriageNotificationService; import org.ksmart.marriage.utils.MarriageConstants; //import org.ksmart.marriage.utils.CommonUtils; import org.egov.common.contract.request.RequestInfo; @@ -51,12 +52,14 @@ public class ReceiptConsumer { private PaymentUpdateService paymentUpdateService; // private PaymentNotificationService paymentNotificationService; + private MarriageNotificationService marriageNotificationService; @Autowired - public ReceiptConsumer(PaymentUpdateService paymentUpdateService) { + public ReceiptConsumer(PaymentUpdateService paymentUpdateService,MarriageNotificationService marriageNotificationService) { this.paymentUpdateService = paymentUpdateService; // this.paymentNotificationService = paymentNotificationService; + this.marriageNotificationService = marriageNotificationService; } @@ -64,6 +67,7 @@ public ReceiptConsumer(PaymentUpdateService paymentUpdateService) { @KafkaListener(topics = {"${kafka.topics.receipt.create}"}) public void listenPayments(final HashMap record) { paymentUpdateService.process(record); + marriageNotificationService.process(record); // paymentNotificationService.process(record); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index e873f2da7d5..c52678cf171 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -135,8 +135,32 @@ public class MarriageApplicationConfiguration { @Value("${egov.demand.taxheadmastercode}") private String taxHeadMasterCode; + @Value("${egov.localization.statelevel}") + private Boolean isLocalizationStateLevel; + + @Value("${kafka.topics.notification.sms}") + private String smsNotifTopic; // //Payment // @Value("${persister.update.marriage.payment.topic}") // private String updateMarriagePaymentTopic; + @Value("${egov.localization.host}") + private String localizationHost; + + @Value("${egov.localization.context.path}") + private String localizationContextPath; + + @Value("${egov.localization.search.endpoint}") + private String localizationSearchEndpoint; + + @Value("${notification.sms.enabled.forMR}") + private Boolean isMRSMSEnabled; + + @Value("${egov.user.event.notification.enabledForMR}") + private Boolean isUserEventsNotificationEnabledForMR; + + @Value("${marriagecert.egov.mdms.url}") + private String marriageCertMDMSURL; + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Action.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Action.java new file mode 100644 index 00000000000..141e6dd080a --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Action.java @@ -0,0 +1,28 @@ +package org.ksmart.marriage.marriagecommon.model.Notification; + +import lombok.*; +import org.springframework.validation.annotation.Validated; + +import javax.validation.constraints.NotNull; +import java.util.List; + +@Validated +@AllArgsConstructor +@EqualsAndHashCode +@Getter +@NoArgsConstructor +@Setter +@ToString +@Builder +public class Action { + + private String tenantId; + + private String id; + + private String eventId; + + @NotNull + private List actionUrls; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/ActionItem.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/ActionItem.java new file mode 100644 index 00000000000..3d9d40f28c3 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/ActionItem.java @@ -0,0 +1,24 @@ +package org.ksmart.marriage.marriagecommon.model.Notification; + +import lombok.*; +import org.springframework.validation.annotation.Validated; + +import javax.validation.constraints.NotNull; + +@Validated +@AllArgsConstructor +@EqualsAndHashCode +@Getter +@NoArgsConstructor +@Setter +@ToString +@Builder +public class ActionItem { + + @NotNull + private String actionUrl; + + @NotNull + private String code; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Event.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Event.java new file mode 100644 index 00000000000..1987f0c75e3 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Event.java @@ -0,0 +1,50 @@ +package org.ksmart.marriage.marriagecommon.model.Notification; + +import lombok.*; +import org.springframework.validation.annotation.Validated; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +@Validated +@AllArgsConstructor +@EqualsAndHashCode +@Getter +@NoArgsConstructor +@Setter +@ToString +@Builder +public class Event { + + @NotNull + private String tenantId; + + private String id; + + private String referenceId; + + @NotNull + private String eventType; + + private String name; + + @NotNull + private String description; + + private Status status; + + @NotNull + private Source source; + + private String postedBy; + + @Valid + @NotNull + private Recepient recepient; + + private Action actions; + + private EventDetails eventDetails; + + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/EventDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/EventDetails.java new file mode 100644 index 00000000000..f8ba41c43b9 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/EventDetails.java @@ -0,0 +1,40 @@ +package org.ksmart.marriage.marriagecommon.model.Notification; + +import lombok.*; +import org.springframework.validation.annotation.Validated; + +import java.math.BigDecimal; + +@Validated +@AllArgsConstructor +@EqualsAndHashCode +@Getter +@NoArgsConstructor +@Setter +@ToString +@Builder +public class EventDetails { + + private String id; + + private String eventId; + + private Long fromDate; + + private Long toDate; + + private BigDecimal latitude; + + private BigDecimal longitude; + + private String address; + + + public boolean isEmpty(EventDetails details) { + if(null == details.getFromDate() || null == details.getToDate() || null == details.getLatitude() || null == details.getLongitude()) { + return true; + } + return false; + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Recepient.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Recepient.java new file mode 100644 index 00000000000..0869628a920 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Recepient.java @@ -0,0 +1,22 @@ +package org.ksmart.marriage.marriagecommon.model.Notification; + +import lombok.*; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +@Validated +@AllArgsConstructor +@EqualsAndHashCode +@Getter +@NoArgsConstructor +@Setter +@ToString +@Builder +public class Recepient { + + private List toRoles; + + private List toUsers; + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Source.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Source.java new file mode 100644 index 00000000000..66f0999c0e0 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Source.java @@ -0,0 +1,31 @@ +package org.ksmart.marriage.marriagecommon.model.Notification; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum Source { + WEBAPP("WEBAPP"), MOBILEAPP("MOBILEAPP"); + + private String value; + + Source(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return name(); + } + + @JsonCreator + public static Source fromValue(String passedValue) { + for (Source obj : Source.values()) { + if (String.valueOf(obj.value).equals(passedValue.toUpperCase())) { + return obj; + } + } + return null; + } + +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Status.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Status.java new file mode 100644 index 00000000000..b6a3a5bb1b0 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/Status.java @@ -0,0 +1,70 @@ +/* + * eGov suite of products aim to improve the internal efficiency,transparency, + * accountability and the service delivery of the government organizations. + * + * Copyright (C) 2016 eGovernments Foundation + * + * The updated version of eGov suite of products as by eGovernments Foundation + * is available at http://www.egovernments.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/ or + * http://www.gnu.org/licenses/gpl.html . + * + * In addition to the terms of the GPL license to be adhered to in using this + * program, the following additional terms are to be complied with: + * + * 1) All versions of this program, verbatim or modified must carry this + * Legal Notice. + * + * 2) Any misrepresentation of the origin of the material is prohibited. It + * is required that all modified versions of this material be marked in + * reasonable ways as different from the original version. + * + * 3) This license does not grant any rights to any user of the program + * with regards to rights under trademark law for use of the trade names + * or trademarks of eGovernments Foundation. + * + * In case of any queries, you can reach eGovernments Foundation at contact@egovernments.org. + */ + +package org.ksmart.marriage.marriagecommon.model.Notification; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum Status { + ACTIVE("ACTIVE"), INACTIVE("INACTIVE"), CANCELLED("CANCELLED"); + + private String value; + + Status(String value) { + this.value = value; + } + + @Override + @JsonValue + public String toString() { + return name(); + } + + @JsonCreator + public static Status fromValue(String passedValue) { + for (Status obj : Status.values()) { + if (String.valueOf(obj.value).equals(passedValue.toUpperCase())) { + return obj; + } + } + return null; + } +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java index 9ef9c7881e7..afae2ab0d6b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java @@ -97,7 +97,7 @@ public void process(HashMap record) { ObjectMapper mapper = new ObjectMapper(); try { PaymentRequest paymentRequest = mapper.convertValue(record, PaymentRequest.class); - System.out.println(" payment records --------------:"+new Gson().toJson(record)); +// System.out.println(" payment records --------------:"+new Gson().toJson(record)); RequestInfo requestInfo = paymentRequest.getRequestInfo(); List paymentDetails = paymentRequest.getPayment().getPaymentDetails(); String tenantId = paymentRequest.getPayment().getTenantId(); @@ -147,4 +147,5 @@ public void process(HashMap record) { } + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java new file mode 100644 index 00000000000..629ca23a1bb --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java @@ -0,0 +1,471 @@ +package org.ksmart.marriage.marriagecommon.services.notification; + + +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.egov.common.contract.request.RequestInfo; +import org.ksmart.marriage.common.calculation.collections.models.PaymentRequest; +import org.ksmart.marriage.common.repository.ServiceRequestRepository; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecommon.model.SMSRequest; +import org.ksmart.marriage.utils.NotificationUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import org.springframework.web.client.RestTemplate; + +import java.util.*; + + +@Slf4j +@Service +public class MarriageNotificationService { + + + private MarriageApplicationConfiguration config; + + private ServiceRequestRepository serviceRequestRepository; + + private NotificationUtil util; + + public static final String businessService_MR = "CR"; + @Value("${egov.mdms.host}") + private String mdmsHost; + + @Value("${egov.mdms.search.endpoint}") + private String mdmsUrl; + + @Autowired + private RestTemplate restTemplate; + + @Autowired + public MarriageNotificationService(MarriageApplicationConfiguration config, ServiceRequestRepository serviceRequestRepository, NotificationUtil util) { + this.config = config; + this.serviceRequestRepository = serviceRequestRepository; + this.util = util; + } + + /** + * Creates and send the sms based on the marriage application + * @param record The Marriageapplication listenend on the kafka topic + */ + public void process(HashMap record) { + ObjectMapper mapper = new ObjectMapper(); + try { + MarriageDetailsRequest request = mapper.convertValue(record, MarriageDetailsRequest.class); + RequestInfo requestInfo = request.getRequestInfo(); + Map mobileNumberToOwner = new HashMap<>(); + String tenantId = request.getMarriageDetails().get(0).getTenantid(); + String action = request.getMarriageDetails().get(0).getAction(); + Map configuredChannelList = new HashMap<>(); +// List configuredChannelNames = Arrays.asList(new String[]{"SMS","EVENT","EMAIL"}); + Set mobileNumbers = new HashSet<>(); + + for(MarriageApplicationDetails marriageApplicationDetails : request.getMarriageDetails()){ + if(marriageApplicationDetails.getGroomDetails().getMobile()!=null){ + mobileNumbers.add(marriageApplicationDetails.getGroomDetails().getMobile().toString()); + } + } + + String businessService = request.getMarriageDetails().isEmpty() ? null : request.getMarriageDetails().get(0).getBusinessservice(); + if (businessService == null) + businessService = businessService_MR; + +// switch (businessService) { +// case businessService_MR: + List smsRequestsTL = new LinkedList<>(); + if (null != config.getIsMRSMSEnabled()) { + if (config.getIsMRSMSEnabled()) { + enrichSMSRequest(request, smsRequestsTL,configuredChannelList); + if (!CollectionUtils.isEmpty(smsRequestsTL)) + util.sendSMS(smsRequestsTL, true); + } + } + +// if (null != config.getIsUserEventsNotificationEnabledForMR()) { +// if (config.getIsUserEventsNotificationEnabledForMR()) { +// EventRequest eventRequest = getEventsForTL(request); +// if (null != eventRequest) +// util.sendEventNotification(eventRequest); +// } +// } +// break; + +// case businessService_BPA: +// configuredChannelList = fetchChannelList(new RequestInfo(), tenantId, "BPAREG", action); +// List smsRequestsBPA = new LinkedList<>(); +// if (null != config.getIsBPASMSEnabled()) { +// if (config.getIsBPASMSEnabled()) { +// enrichSMSRequest(request, smsRequestsBPA,configuredChannelList); +// if (!CollectionUtils.isEmpty(smsRequestsBPA)) +// util.sendSMS(smsRequestsBPA, true); +// } +// } +// if (null != config.getIsUserEventsNotificationEnabledForBPA()) { +// if (config.getIsUserEventsNotificationEnabledForBPA()) { +// EventRequest eventRequest = getEventsForBPA(request, false, null); +// if (null != eventRequest) +// util.sendEventNotification(eventRequest); +// } +// } +// List emailRequestsForBPA = new LinkedList<>(); +// if (null != config.getIsEmailNotificationEnabledForBPA()) { +// if (config.getIsEmailNotificationEnabledForBPA()) { +// Map mapOfPhnoAndEmail = util.fetchUserEmailIds(mobileNumbers, requestInfo, tenantId); +// enrichEmailRequest(request, emailRequestsForBPA, mapOfPhnoAndEmail, configuredChannelList); +// if (!CollectionUtils.isEmpty(emailRequestsForBPA)) +// util.sendEmail(emailRequestsForBPA, config.getIsEmailNotificationEnabledForBPA()); +// } +// } +// break; +// } + } catch (Exception e) { + log.error("KAFKA_PROCESS_ERROR", e); + } + } + + /** + * Enriches the emailRequest with the customized messages + * @param request The MarriageDetailsRequest from kafka topic + * @param emailRequests List of SMSRequests + * @param mapOfPhnoAndEmail Map of Phone Numbers and Emails + * @param configuredChannelList Map of actions mapped to configured channels for BPAREG flow + */ +// +// public void enrichEmailRequest(MarriageDetailsRequest request,List emailRequests, Map mapOfPhnoAndEmail,Map configuredChannelList) { +// String tenantId = request.getLicenses().get(0).getTenantId(); +// +// for(TradeLicense license : request.getLicenses()){ +// String businessService = license.getBusinessService(); +// if (businessService == null) +// businessService = businessService_TL; +// String message = null; +// String applicationType = String.valueOf(license.getApplicationType()); +// if (businessService.equals(businessService_TL)) { +// if(applicationType.equals(APPLICATION_TYPE_RENEWAL)){ +// String localizationMessages = tlRenewalNotificationUtil.getLocalizationMessages(tenantId, request.getRequestInfo()); +// message = tlRenewalNotificationUtil.getEmailCustomizedMsg(request.getRequestInfo(), license, localizationMessages); +// } +// else{ +// String localizationMessages = util.getLocalizationMessages(tenantId, request.getRequestInfo()); +// message = util.getEmailCustomizedMsg(request.getRequestInfo(), license, localizationMessages); +// } +// } +// if(businessService.equals(businessService_DIRECT_RENEWAL) || businessService.equals(businessService_EDIT_RENEWAL)){ +// String localizationMessages = tlRenewalNotificationUtil.getLocalizationMessages(tenantId, request.getRequestInfo()); +// message = tlRenewalNotificationUtil.getEmailCustomizedMsg(request.getRequestInfo(), license, localizationMessages); +// } +// if (businessService.equals(businessService_BPA)) { +// String action = license.getAction(); +// List configuredChannelNames = (List) configuredChannelList.get(action); +// if(!CollectionUtils.isEmpty(configuredChannelNames) && configuredChannelNames.contains(CHANNEL_NAME_EMAIL)) +// { +// String localizationMessages = bpaNotificationUtil.getLocalizationMessages(tenantId, request.getRequestInfo()); +// message = bpaNotificationUtil.getEmailCustomizedMsg(request.getRequestInfo(), license, localizationMessages); +// } +// } +// if(message==null || message == "") continue; +// +// license.getTradeLicenseDetail().getOwners().forEach(owner -> { +// if (owner.getMobileNumber() != null) +// mapOfPhnoAndEmail.put(owner.getMobileNumber(), owner.getEmailId()); +// }); +// emailRequests.addAll(util.createEmailRequest(request.getRequestInfo(),message,mapOfPhnoAndEmail)); +// } +// } + + /** + * Enriches the smsRequest with the customized messages + * @param request The MarriageDetailsRequest from kafka topic + * @param smsRequests List of SMSRequests + * @param configuredChannelList Map of actions mapped to configured channels for this business service for BPAREG flow + */ + private void enrichSMSRequest(MarriageDetailsRequest request,List smsRequests,Map configuredChannelList){ + String tenantId = request.getMarriageDetails().get(0).getTenantid(); + for(MarriageApplicationDetails marriageApplicationDetails : request.getMarriageDetails()) { + String businessService = marriageApplicationDetails.getBusinessservice(); + if (businessService == null) + businessService = businessService_MR; + String message = null; + String applicationType = String.valueOf(marriageApplicationDetails.getApplicationtype()); + if (businessService.equals(businessService_MR)) { +// if (applicationType.equals(APPLICATION_TYPE_RENEWAL)) { +// String localizationMessages = tlRenewalNotificationUtil.getLocalizationMessages(tenantId, request.getRequestInfo()); +// message = tlRenewalNotificationUtil.getCustomizedMsg(request.getRequestInfo(), marriageApplicationDetails, localizationMessages); +// } else { + String localizationMessages = util.getLocalizationMessages(tenantId, request.getRequestInfo()); + message = util.getCustomizedMsg(request.getRequestInfo(), marriageApplicationDetails, localizationMessages); +// } + + } +// if (businessService.equals(businessService_BPA)) { +// String action = marriageApplicationDetails.getAction(); +// List configuredChannelNames = (List) configuredChannelList.get(action); +// if (!CollectionUtils.isEmpty(configuredChannelNames) && configuredChannelNames.contains(CHANNEL_NAME_SMS)) { +// String localizationMessages = bpaNotificationUtil.getLocalizationMessages(tenantId, request.getRequestInfo()); +// message = bpaNotificationUtil.getCustomizedMsg(request.getRequestInfo(), marriageApplicationDetails, localizationMessages); +// } +// } +// if (businessService.equals(businessService_DIRECT_RENEWAL) || businessService.equals(businessService_EDIT_RENEWAL)) { +// String localizationMessages = tlRenewalNotificationUtil.getLocalizationMessages(tenantId, request.getRequestInfo()); +// message = tlRenewalNotificationUtil.getCustomizedMsg(request.getRequestInfo(), marriageApplicationDetails, localizationMessages); +// } + if (message == null) continue; + + Map mobileNumberToOwner = new HashMap<>(); + String groomName = marriageApplicationDetails.getGroomDetails().getFirstnameEn(); + if(StringUtils.isNotBlank(marriageApplicationDetails.getGroomDetails().getMiddlenameEn())){ + groomName=groomName+" "+marriageApplicationDetails.getGroomDetails().getMiddlenameEn(); + } + if(StringUtils.isNotBlank(marriageApplicationDetails.getGroomDetails().getLastnameEn())){ + groomName=groomName+" "+marriageApplicationDetails.getGroomDetails().getLastnameEn(); + } + if (marriageApplicationDetails.getGroomDetails().getMobile() != null) + mobileNumberToOwner.put(marriageApplicationDetails.getGroomDetails().getMobile().toString(),groomName); + smsRequests.addAll(util.createSMSRequest(message, mobileNumberToOwner)); + } + } + + /** + * Creates and registers an event at the egov-user-event service at defined trigger points as that of sms notifs. + * + * Assumption - The MarriageDetailsRequest received will always contain only one MarriageApplicationDetails. + * + * @param request + * @return + */ +// private EventRequest getEventsForTL(MarriageDetailsRequest request) { +// List events = new ArrayList<>(); +// String tenantId = request.getMarriageDetails().get(0).getTenantid(); +// String localizationMessages = util.getLocalizationMessages(tenantId,request.getRequestInfo()); +// for(MarriageApplicationDetails marriageApplicationDetails : request.getMarriageDetails()){ +// String message = null; +//// String applicationType = String.valueOf(marriageApplicationDetails.getApplicationType()); +// String businessService = marriageApplicationDetails.getBusinessservice(); +// if(businessService.equals(businessService_MR)){ +// message = util.getCustomizedMsg(request.getRequestInfo(), marriageApplicationDetails, localizationMessages); +// +// if(message == null) continue; +// Map mobileNumberToOwner = new HashMap<>(); +// +// if(null!=marriageApplicationDetails.getGroomDetails().getMobile()) { +// String groomName = marriageApplicationDetails.getGroomDetails().getFirstnameEn(); +// if(StringUtils.isNotBlank(marriageApplicationDetails.getGroomDetails().getMiddlenameEn())){ +// groomName=groomName+" "+marriageApplicationDetails.getGroomDetails().getMiddlenameEn(); +// } +// if(StringUtils.isNotBlank(marriageApplicationDetails.getGroomDetails().getLastnameEn())){ +// groomName=groomName+" "+marriageApplicationDetails.getGroomDetails().getLastnameEn(); +// } +// mobileNumberToOwner.put(marriageApplicationDetails.getGroomDetails().getMobile().toString(), groomName); +// } +// +// List smsRequests = util.createSMSRequest(message,mobileNumberToOwner); +// Set mobileNumbers = smsRequests.stream().map(SMSRequest :: getMobileNumber).collect(Collectors.toSet()); +// Map mapOfPhnoAndUUIDs = util.fetchUserUUIDs(mobileNumbers, request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); +// if (CollectionUtils.isEmpty(mapOfPhnoAndUUIDs.keySet())) { +// log.info("UUID search failed!"); +// continue; +// } +// Map mobileNumberToMsg = smsRequests.stream().collect(Collectors.toMap(SMSRequest::getMobileNumber, SMSRequest::getMessage)); +// for(String mobile: mobileNumbers) { +// if(null == mapOfPhnoAndUUIDs.get(mobile) || null == mobileNumberToMsg.get(mobile)) { +// log.error("No UUID/SMS for mobile {} skipping event", mobile); +// continue; +// } +// List toUsers = new ArrayList<>(); +// toUsers.add(mapOfPhnoAndUUIDs.get(mobile)); +// Recepient recepient = Recepient.builder().toUsers(toUsers).toRoles(null).build(); +// List payTriggerList = Arrays.asList(config.getPayTriggers().split("[,]")); +// List viewTriggerList = Arrays.asList(config.getViewApplicationTriggers().split("[,]")); +// Action action = null; +// if(payTriggerList.contains(marriageApplicationDetails.getStatus())) { +// List items = new ArrayList<>(); +// String actionLink = config.getPayLink().replace("$mobile", mobile) +// .replace("$applicationNo", marriageApplicationDetails.getApplicationNumber()) +// .replace("$tenantId", marriageApplicationDetails.getTenantid()) +// .replace("$businessService", marriageApplicationDetails.getBusinessservice()); +// actionLink = config.getUiAppHost() + actionLink; +// ActionItem item = ActionItem.builder().actionUrl(actionLink).code(config.getPayCode()).build(); +// items.add(item); +// action = Action.builder().actionUrls(items).build(); +// } +// if(viewTriggerList.contains(marriageApplicationDetails.getStatus())){ +// List items = new ArrayList<>(); +// String actionLink = config.getViewApplicationLink().replace("$mobile", mobile) +// .replace("$applicationNo", marriageApplicationDetails.getApplicationNumber()) +// .replace("$tenantId", marriageApplicationDetails.getTenantid()); +// actionLink = config.getUiAppHost() + actionLink; +// ActionItem item = ActionItem.builder().actionUrl(actionLink).code(config.getViewApplicationCode()).build(); +// items.add(item); +// action = Action.builder().actionUrls(items).build(); +// +// } +// +// +// events.add(Event.builder().tenantId(marriageApplicationDetails.getTenantid()).description(mobileNumberToMsg.get(mobile)) +// .eventType(TLConstants.USREVENTS_EVENT_TYPE).name(TLConstants.USREVENTS_EVENT_NAME) +// .postedBy(TLConstants.USREVENTS_EVENT_POSTEDBY).source(Source.WEBAPP).recepient(recepient) +// .eventDetails(null).actions(action).build()); +// +// } +// } +// if(!CollectionUtils.isEmpty(events)) { +// return EventRequest.builder().requestInfo(request.getRequestInfo()).events(events).build(); +// }else { +// return null; +// } +// +// } + +// public EventRequest getEventsForBPA(MarriageDetailsRequest request, boolean isStatusPaid, String paidMessage) { +// Map configuredChannelList = fetchChannelList(new RequestInfo(), request.getMarriageDetails().get(0).getTenantid(), "BPAREG", request.getMarriageDetails().get(0).getAction()); +// List events = new ArrayList<>(); +// String tenantId = request.getMarriageDetails().get(0).getTenantid(); +// for(MarriageApplicationDetails marriageApplicationDetails : request.getMarriageDetails()){ +// String actionForChannel = marriageApplicationDetails.getAction(); +// List configuredChannelNames = (List) configuredChannelList.get(actionForChannel); +// if (!CollectionUtils.isEmpty(configuredChannelNames) && configuredChannelNames.contains(CHANNEL_NAME_EVENT)) +// { +// String message = null; +// if(isStatusPaid) +// { +// message = paidMessage; +// } +// else { +// String localizationMessages = bpaNotificationUtil.getLocalizationMessages(tenantId,request.getRequestInfo()); +// message = bpaNotificationUtil.getCustomizedMsg(request.getRequestInfo(), marriageApplicationDetails, localizationMessages); +// } +// if(message == null) continue; +// Map mobileNumberToOwner = new HashMap<>(); +// marriageApplicationDetails.getMarriageApplicationDetailsDetail().getOwners().forEach(owner -> { +// if(owner.getMobileNumber()!=null) +// mobileNumberToOwner.put(owner.getMobileNumber(),owner.getName()); +// }); +// List smsRequests = util.createSMSRequest(message,mobileNumberToOwner); +// Set mobileNumbers = smsRequests.stream().map(SMSRequest :: getMobileNumber).collect(Collectors.toSet()); +// Map mapOfPhnoAndUUIDs = util.fetchUserUUIDs(mobileNumbers, request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); +// if (CollectionUtils.isEmpty(mapOfPhnoAndUUIDs.keySet())) { +// log.info("UUID search failed!"); +// continue; +// } +// Map mobileNumberToMsg = smsRequests.stream().collect(Collectors.toMap(SMSRequest::getMobileNumber, SMSRequest::getMessage)); +// for(String mobile: mobileNumbers) { +// if(null == mapOfPhnoAndUUIDs.get(mobile) || null == mobileNumberToMsg.get(mobile)) { +// log.error("No UUID/SMS for mobile {} skipping event", mobile); +// continue; +// } +// List toUsers = new ArrayList<>(); +// toUsers.add(mapOfPhnoAndUUIDs.get(mobile)); +// Recepient recepient = Recepient.builder().toUsers(toUsers).toRoles(null).build(); +// List payTriggerList = Arrays.asList(config.getPayTriggers().split("[,]")); +// Action action = null; +// if(payTriggerList.contains(marriageApplicationDetails.getStatus()) && !isStatusPaid) { +// List items = new ArrayList<>(); +// String actionLink = config.getPayLink().replace("$mobile", mobile) +// .replace("$applicationNo", marriageApplicationDetails.getApplicationNumber()) +// .replace("$tenantId", marriageApplicationDetails.getTenantid()) +// .replace("$businessService", marriageApplicationDetails.getBusinessservice());; +// actionLink = config.getUiAppHost() + actionLink; +// ActionItem item = ActionItem.builder().actionUrl(actionLink).code(config.getPayCode()).build(); +// items.add(item); +// action = Action.builder().actionUrls(items).build(); +// } +// +// +// events.add(Event.builder().tenantId(marriageApplicationDetails.getTenantid()).description(mobileNumberToMsg.get(mobile)) +// .eventType(BPAConstants.USREVENTS_EVENT_TYPE).name(BPAConstants.USREVENTS_EVENT_NAME) +// .postedBy(BPAConstants.USREVENTS_EVENT_POSTEDBY).source(Source.WEBAPP).recepient(recepient) +// .eventDetails(null).actions(action).build()); +// +// }} +// } +// if(!CollectionUtils.isEmpty(events)) { +// return EventRequest.builder().requestInfo(request.getRequestInfo()).events(events).build(); +// }else { +// return null; +// } +// +// } +// +// +// +// +// +// /** +// * Fetches Channel List based on the module name and action. +// * +// * @param requestInfo +// * @param tenantId +// * @param moduleName +// * @param action +// * @return Map of actions and its channel List +// */ +// public Map fetchChannelList(RequestInfo requestInfo, String tenantId, String moduleName, String action){ +// +// List> masterData = new ArrayList<>(); +// Map map = new HashMap<>(); +// +// StringBuilder uri = new StringBuilder(); +// uri.append(mdmsHost).append(mdmsUrl); +// +// if(StringUtils.isEmpty(tenantId)) +// return map; +// MdmsCriteriaReq mdmsCriteriaReq = getMdmsRequestForChannelList(requestInfo, tenantId.split("\\.")[0]); +// +// Filter masterDataFilter = filter( +// where(MODULENAME).is(moduleName) +// ); +// +// try { +// Object response = restTemplate.postForObject(uri.toString(), mdmsCriteriaReq, Map.class); +// masterData = JsonPath.parse(response).read("$.MdmsRes.Channel.channelList[?]", masterDataFilter); +// }catch(Exception e) { +// log.error("Exception while fetching workflow states to ignore: ",e); +// } +// +// +// for(Map obj: masterData) +// { +// map.put(obj.get(ACTION),obj.get(CHANNEL_NAMES)); +// } +// return map; +// } +// +// /** +// * Return MDMS Criteria Request +// * * +// * @param requestInfo +// * @param tenantId +// * @return MdmsCriteriaReq +// */ +// +// private MdmsCriteriaReq getMdmsRequestForChannelList(RequestInfo requestInfo, String tenantId){ +// MasterDetail masterDetail = new MasterDetail(); +// masterDetail.setName(CHANNEL_LIST); +// List masterDetailList = new ArrayList<>(); +// masterDetailList.add(masterDetail); +// +// ModuleDetail moduleDetail = new ModuleDetail(); +// moduleDetail.setMasterDetails(masterDetailList); +// moduleDetail.setModuleName(CHANNEL); +// List moduleDetailList = new ArrayList<>(); +// moduleDetailList.add(moduleDetail); +// +// MdmsCriteria mdmsCriteria = new MdmsCriteria(); +// mdmsCriteria.setTenantId(tenantId); +// mdmsCriteria.setModuleDetails(moduleDetailList); +// +// MdmsCriteriaReq mdmsCriteriaReq = new MdmsCriteriaReq(); +// mdmsCriteriaReq.setMdmsCriteria(mdmsCriteria); +// mdmsCriteriaReq.setRequestInfo(requestInfo); +// +// return mdmsCriteriaReq; +// } + + + +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 0a978f32971..57295aa2bae 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -343,6 +343,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria String marriageCertPath = StringUtils.replace(marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(), "$tenantId", tenantId); String pdfFinalPath = uiHost + marriageCertPath; try { + req.getMarriageCertificate().get(0).setMdmsBasePath(marriageApplicationConfiguration.getMarriageCertMDMSURL()); MarriageCertPdfResponse response = restTemplate.postForObject(pdfFinalPath, req, MarriageCertPdfResponse.class);//Creating PDF if (response != null && CollectionUtils.isEmpty(response.getFilestoreIds())) { log.error("EMPTY_FILESTORE_IDS_FROM_PDF_SERVICE. Marriage Certificate , Error in generating PDF. No file store id found from pdf service!!!"); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java index 0abaa6447d0..7746d80cf30 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/certmodel/MarriageCertificate.java @@ -6,6 +6,7 @@ import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.marriageregistry.web.model.MarriageRegistryDetails; +import org.springframework.beans.factory.annotation.Value; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @@ -290,6 +291,10 @@ public String toString() { @JsonProperty("modulecode") private String modulecode; +// @Value("${marriagecert.egov.mdms.url}") + @JsonProperty("mdmsBasePath") + private String mdmsBasePath; + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 5c1176d04f3..a14ce1a6830 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -1,5 +1,9 @@ package org.ksmart.marriage.utils; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + public class MarriageConstants { public static final String TENANTS = "tenants"; public static final String TENANT_MODULE_NAME = "tenant"; @@ -220,4 +224,31 @@ public class MarriageConstants { public static final String CR_MDMS_PLACESUBREGISTARID_CODE_JSONPATH = "$.MdmsRes.birth-death-service.SubRegistar[*].code"; public static final String CR_MDMS_PLACESUBREGISTARID_JSONPATH = "$.MdmsRes.birth-death-service.SubRegistar[*]"; public static final String ACTION_PAY = "PAY"; + + public static final String ACTION_STATUS_INITIATED = "INITIATE_INITIATED"; + + public static final String ACTION_STATUS_APPROVED = "PAY_APPROVED"; + + public static final String ACTION_STATUS_APPLIED = "APPLIED"; + + public static final String ACTION_STATUS_REJECTED = "REJECT_REJECTED"; + + public static final String NOTIFICATION_INITIATED = "cr.en.counter.approved"; + public static final String NOTIFICATION_APPLIED = "cr.en.counter.approved"; + + public static final String NOTIFICATION_APPROVED = "cr.en.counter.approved"; + + public static final String NOTIFICATION_REJECTED = "cr.en.counter.approved"; + public static final String NOTIFICATION_LOCALE = "en_IN"; + + public static final String MODULE = "rainmaker-cr"; + + public static final List NOTIFICATION_CODES = Collections.unmodifiableList(Arrays.asList( + NOTIFICATION_INITIATED, + NOTIFICATION_APPLIED, + NOTIFICATION_APPROVED, NOTIFICATION_REJECTED)); + public static final String NOTIF_OWNER_NAME_KEY = "{OWNER_NAME}"; + + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java new file mode 100644 index 00000000000..b79411cee3f --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java @@ -0,0 +1,618 @@ +package org.ksmart.marriage.utils; + +import com.jayway.jsonpath.JsonPath; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; + +import org.apache.kafka.common.protocol.types.Field; +import org.egov.common.contract.request.RequestInfo; +import org.json.JSONObject; +import org.ksmart.marriage.common.producer.MarriageProducer; +import org.ksmart.marriage.common.repository.ServiceRequestRepository; +import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; +import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecommon.model.SMSRequest; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; +import org.springframework.web.client.RestTemplate; + +import java.math.BigDecimal; +import java.util.*; + +import static org.ksmart.marriage.utils.MarriageConstants.*; + +@Component +@Slf4j +public class NotificationUtil { + + private MarriageApplicationConfiguration config; + + private ServiceRequestRepository serviceRequestRepository; + + private MarriageProducer producer; + + private RestTemplate restTemplate; + +// private CalculationService calculationService; + + @Autowired + public NotificationUtil(MarriageApplicationConfiguration config, ServiceRequestRepository serviceRequestRepository, MarriageProducer producer, RestTemplate restTemplate) { + this.config = config; + this.serviceRequestRepository = serviceRequestRepository; + this.producer = producer; + this.restTemplate = restTemplate; +// this.calculationService = calculationService; + } + + + final String receiptNumberKey = "receiptNumber"; + + final String amountPaidKey = "amountPaid"; + + /** + * Creates customized message based on marriage application + * + * @param marriageApplication + * The marriage application for which message is to be sent + * @param localizationMessage + * The messages from localization + * @return customized message based on marriage application + */ + public String getCustomizedMsg(RequestInfo requestInfo, MarriageApplicationDetails marriageApplication, String localizationMessage) { +// MarriageApplicationDetails marriageApplication= marriageDetailsRequest.getMarriageDetails().get(0); + String message = null, messageTemplate; + String ACTION_STATUS = marriageApplication.getAction() + "_" + marriageApplication.getStatus(); + switch (ACTION_STATUS) { + + case ACTION_STATUS_INITIATED: + messageTemplate = getMessageTemplate(NOTIFICATION_INITIATED, localizationMessage); + message = getInitiatedMsg(marriageApplication, messageTemplate); + break; + + case ACTION_STATUS_APPLIED: + messageTemplate = getMessageTemplate(NOTIFICATION_APPLIED, localizationMessage); + message = getAppliedMsg(marriageApplication, messageTemplate); + break; + + /* + * case ACTION_STATUS_PAID : messageTemplate = + * getMessageTemplate(TLConstants.NOTIFICATION_PAID,localizationMessage); + * message = getApprovalPendingMsg(marriageApplication,messageTemplate); break; + */ + + case ACTION_STATUS_APPROVED: + BigDecimal amountToBePaid = BigDecimal.valueOf(0);//getAmountToBePaid(requestInfo, marriageApplication); + messageTemplate = getMessageTemplate(NOTIFICATION_APPROVED, localizationMessage); + message = getApprovedMsg(marriageApplication, amountToBePaid, messageTemplate); + break; + + case ACTION_STATUS_REJECTED: + messageTemplate = getMessageTemplate(NOTIFICATION_REJECTED, localizationMessage); + message = getRejectedMsg(marriageApplication, messageTemplate); + break; + +// case ACTION_STATUS_FIELDINSPECTION: +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_FIELD_INSPECTION, localizationMessage); +// message = getFieldInspectionMsg(marriageApplication, messageTemplate); +// break; +// +// case ACTION_STATUS_PENDINGAPPROVAL: +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_PENDING_APPROVAL, localizationMessage); +// message = getPendingApprovalMsg(marriageApplication, messageTemplate); +// break; +// +// case ACTION_SENDBACKTOCITIZEN_FIELDINSPECTION: +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_SENDBACK_CITIZEN, localizationMessage); +// message = getCitizenSendBack(marriageApplication, messageTemplate); +// break; +// +// case ACTION_FORWARD_CITIZENACTIONREQUIRED: +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_FORWARD_CITIZEN, localizationMessage); +// message = getCitizenForward(marriageApplication, messageTemplate); +// break; + +// case ACTION_CANCEL_CANCELLED: +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_CANCELLED, localizationMessage); +// message = getCancelledMsg(marriageApplication, messageTemplate); +// break; +// +// case ACTION_STATUS_EXPIRED: +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_EXPIRED, localizationMessage); +// message = getExpiredMsg(requestInfo,marriageApplication, messageTemplate); +// break; +// +// case ACTION_STATUS_MANUAL_EXPIRED: +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_MANUAL_EXPIRED, localizationMessage); +// message = getExpiredMsg(requestInfo,marriageApplication, messageTemplate); +// break; + + } + + return message; + } + + + /** + * Replaces placeholders from message template + * * + * @param marriageApplication + * The marriageApplication for which message is to be sent + * @param messageTemplate + * The messages from localization + * @return customized message with replaced placeholders + * */ +// private String getReplacedMessage(marriageApplication marriageApplication, String messageTemplate) { +// String message = messageTemplate.replace("YYYY", marriageApplication.getBusinessService()); +// message = message.replace("ZZZZ", marriageApplication.getApplicationNumber()); +// +// if (message.contains("RRRR")) { +// message = message.replace("RRRR", marriageApplication.getmarriageApplicationNumber()); +// } +// message = message.replace("XYZ", capitalize(marriageApplication.getTenantId().split("\\.")[1])); +// message = message.replace("{PORTAL_LINK}",config.getUiAppHost()); +// +// //CCC - Designaion configurable according to ULB +// // message = message.replace("CCC",""); +// return message; +// } + + /** + * Extracts message for the specific code + * + * @param notificationCode + * The code for which message is required + * @param localizationMessage + * The localization messages + * @return message for the specific code + */ + private String getMessageTemplate(String notificationCode, String localizationMessage) { + String path = "$..messages[?(@.code==\"{}\")].message"; + path = path.replace("{}", notificationCode); + String message = null; + try { + Object messageObj = JsonPath.parse(localizationMessage).read(path); + message = ((ArrayList) messageObj).get(0); + } catch (Exception e) { + log.warn("Fetching from localization failed", e); + } + return message; + } + + /** + * Returns the uri for the localization call + * + * @param tenantId + * TenantId of the propertyRequest + * @return The uri for localization search call + */ + public StringBuilder getUri(String tenantId, RequestInfo requestInfo) { + + if (config.getIsLocalizationStateLevel()) + tenantId = tenantId.split("\\.")[0]; + + String locale = NOTIFICATION_LOCALE; + if (!StringUtils.isEmpty(requestInfo.getMsgId()) && requestInfo.getMsgId().split("|").length >= 2) + locale = requestInfo.getMsgId().split("\\|")[1]; + + StringBuilder uri = new StringBuilder(); + uri.append(config.getLocalizationHost()).append(config.getLocalizationContextPath()) + .append(config.getLocalizationSearchEndpoint()).append("?").append("locale=").append(locale) + .append("&tenantId=").append(tenantId).append("&module=").append(MODULE) + .append("&codes=").append(StringUtils.join(NOTIFICATION_CODES,',')); + + return uri; + } + + /** + * Fetches messages from localization service + * + * @param tenantId + * tenantId of the marriageApplication + * @param requestInfo + * The requestInfo of the request + * @return Localization messages for the module + */ + public String getLocalizationMessages(String tenantId, RequestInfo requestInfo) { + LinkedHashMap responseMap = (LinkedHashMap) serviceRequestRepository.fetchResult(getUri(tenantId, requestInfo), + requestInfo); + String jsonString = new JSONObject(responseMap).toString(); + return jsonString; + } + + /** + * Creates customized message for initiate + * + * @param marriageApplication + * tenantId of the marriageApplication + * @param message + * Message from localization for initiate + * @return customized message for initiate + */ + private String getInitiatedMsg(MarriageApplicationDetails marriageApplication, String message) { + //String groomfullname = getFullName(marriageApplication.getGroomDetails().getFirstnameEn(),marriageApplication.getGroomDetails().getMiddlenameEn(),marriageApplication.getGroomDetails().getLastnameEn()); +// message = message.replace("{1}",groomfullname); + + message = message.replace("{2}", "Marriage"); + message = message.replace("{3}", marriageApplication.getApplicationNumber()); + + return message; + } + + private String getFullName(String firstname, String middleName, String lastName){ + StringBuilder fullName = new StringBuilder(); + fullName.append(firstname.trim()); + if (StringUtils.isNotBlank(middleName)) { + fullName.append(" " + middleName.trim()); + } + if (StringUtils.isNotBlank(lastName)) { + fullName.append(" " + lastName.trim()); + } + return fullName.toString(); + } + + /** + * Creates customized message for apply + * + * @param marriageApplication + * tenantId of the marriageApplication + * @param message + * Message from localization for apply + * @return customized message for apply + */ + private String getAppliedMsg(MarriageApplicationDetails marriageApplication, String message) { +// String groomfullname = getFullName(marriageApplication.getGroomDetails().getFirstnameEn(),marriageApplication.getGroomDetails().getMiddlenameEn(),marriageApplication.getGroomDetails().getLastnameEn()); +// message = message.replace("{1}",groomfullname); + + message = message.replace("{2}", "Marriage"); + message = message.replace("{3}", marriageApplication.getApplicationNumber()); + return message; + } + + + + /** + * Creates customized message for approved + * + * @param marriageApplication + * tenantId of the marriageApplication + * @param message + * Message from localization for approved + * @return customized message for approved + */ + private String getApprovedMsg(MarriageApplicationDetails marriageApplication, BigDecimal amountToBePaid, String message) { +// String groomfullname = getFullName(marriageApplication.getGroomDetails().getFirstnameEn(),marriageApplication.getGroomDetails().getMiddlenameEn(),marriageApplication.getGroomDetails().getLastnameEn()); +// message = message.replace("{1}",groomfullname); + + message = message.replace("{2}", "Marriage"); + message = message.replace("{3}", marriageApplication.getApplicationNumber()); + //String UIHost = config.getUiAppHost(); + +// String paymentPath = config.getPayLinkSMS(); +// paymentPath = paymentPath.replace("$consumercode",marriageApplication.getApplicationNumber()); +// paymentPath = paymentPath.replace("$tenantId",marriageApplication.getTenantId()); +// paymentPath = paymentPath.replace("$businessservice",businessService_TL); +// +// String finalPath = UIHost + paymentPath; +// +// message = message.replace(PAYMENT_LINK_PLACEHOLDER,getShortenedUrl(finalPath)); + return message; + } + + /** + * Creates customized message for rejected + * + * @param marriageApplication + * tenantId of the marriageApplication + * @param message + * Message from localization for rejected + * @return customized message for rejected + */ + private String getRejectedMsg(MarriageApplicationDetails marriageApplication, String message) { + // message = message.replace("{1}",); +// String groomfullname = getFullName(marriageApplication.getGroomDetails().getFirstnameEn(),marriageApplication.getGroomDetails().getMiddlenameEn(),marriageApplication.getGroomDetails().getLastnameEn()); +// message = message.replace("{1}",groomfullname); + + message = message.replace("{2}", "Marriage"); + message = message.replace("{3}", marriageApplication.getApplicationNumber()); + return message; + } + + + /** + * Send the SMSRequest on the SMSNotification kafka topic + * + * @param smsRequestList + * The list of SMSRequest to be sent + */ + public void sendSMS(List smsRequestList, boolean isSMSEnabled) { + if (isSMSEnabled) { + if (CollectionUtils.isEmpty(smsRequestList)) { + log.info("Messages from localization couldn't be fetched!"); + }else { + for (SMSRequest smsRequest : smsRequestList) { + producer.push(config.getSmsNotifTopic(), smsRequest); + log.info("SMS SENT!"); + } + } + } + } +// +// /** +// * Creates email request for the each owners +// * +// * @param message +// * The message for the specific marriageApplication +// * @param mobileNumberToEmailId +// * Map of mobileNumber to Email Ids +// * @return List of EmailRequest +// */ +// public List createEmailRequest(RequestInfo requestInfo,String message, Map mobileNumberToEmailId) { +// +// List emailRequest = new LinkedList<>(); +// for (Map.Entry entryset : mobileNumberToEmailId.entrySet()) { +// String customizedMsg = message.replace("XXXX",entryset.getValue()); +// customizedMsg = customizedMsg.replace("{MOBILE_NUMBER}",entryset.getKey()); +// +// String subject = customizedMsg.substring(customizedMsg.indexOf("

")+4,customizedMsg.indexOf("

")); +// String body = customizedMsg.substring(customizedMsg.indexOf("")+4); +// Email emailobj = Email.builder().emailTo(Collections.singleton(entryset.getValue())).isHTML(true).body(body).subject(subject).build(); +// EmailRequest email = new EmailRequest(requestInfo,emailobj); +// emailRequest.add(email); +// } +// return emailRequest; +// } +// +// +// +// /** +// * Send the EmailRequest on the EmailNotification kafka topic +// * +// * @param emailRequestList +// * The list of EmailRequest to be sent +// */ +// public void sendEmail(List emailRequestList, boolean isEmailEnabled) { +// if (isEmailEnabled) { +// if (CollectionUtils.isEmpty(emailRequestList)) +// log.info("Messages from localization couldn't be fetched!"); +// for (EmailRequest emailRequest : emailRequestList) { +// producer.push(config.getEmailNotifTopic(), emailRequest); +// log.info("EMAIL notification sent!"); +// } +// } +// } +// +// /** +// * Fetches the amount to be paid from getBill API +// * +// * @param requestInfo +// * The RequestInfo of the request +// * @param marriageApplication +// * The marriageApplication object for which +// * @return +// */ +// BigDecimal getAmountToBePaid(RequestInfo requestInfo, marriageApplication marriageApplication) { +// +// LinkedHashMap responseMap = (LinkedHashMap) serviceRequestRepository.fetchResult(getBillUri(marriageApplication), +// new RequestInfoWrapper(requestInfo)); +// String jsonString = new JSONObject(responseMap).toString(); +// +// BigDecimal amountToBePaid = null; +// try { +// Object obj = JsonPath.parse(jsonString).read(BILL_AMOUNT_JSONPATH); +// amountToBePaid = new BigDecimal(obj.toString()); +// } catch (Exception e) { +// throw new CustomException("PARSING ERROR", +// "Failed to parse the response using jsonPath: " + BILL_AMOUNT_JSONPATH); +// } +// return amountToBePaid; +// } +// +// /** +// * Creates the uri for getBill by adding query params from the marriageApplication +// * +// * @param marriageApplication +// * The marriageApplication for which getBill has to be called +// * @return The uri for the getBill +// */ +// private StringBuilder getBillUri(marriageApplication marriageApplication) { +// StringBuilder builder = new StringBuilder(config.getBillingHost()); +// builder.append(config.getFetchBillEndpoint()); +// builder.append("?tenantId="); +// builder.append(marriageApplication.getTenantId()); +// builder.append("&consumerCode="); +// builder.append(marriageApplication.getApplicationNumber()); +// builder.append("&businessService="); +// builder.append(marriageApplication.getBusinessService()); +// return builder; +// } +// + /** + * Creates sms request for the each owners + * + * @param message + * The message for the specific marriageApplication + * @param mobileNumberToOwnerName + * Map of mobileNumber to OwnerName + * @return List of SMSRequest + */ + public List createSMSRequest(String message, Map mobileNumberToOwnerName) { + List smsRequest = new LinkedList<>(); + for (Map.Entry entryset : mobileNumberToOwnerName.entrySet()) { + String customizedMsg = message.replace("{1}", entryset.getValue()); + customizedMsg = customizedMsg.replace(NOTIF_OWNER_NAME_KEY, entryset.getValue()); + smsRequest.add(new SMSRequest(entryset.getKey(), customizedMsg)); + } + return smsRequest; + } +// +// public String getCustomizedMsg(Difference diff, marriageApplication marriageApplication, String localizationMessage) { +// String message = null, messageTemplate; +// // StringBuilder finalMessage = new StringBuilder(); +// +// /* +// * if(!CollectionUtils.isEmpty(diff.getFieldsChanged())){ messageTemplate = +// * getMessageTemplate(TLConstants.NOTIFICATION_FIELD_CHANGED,localizationMessage +// * ); message = getEditMsg(marriageApplication,diff.getFieldsChanged(),messageTemplate); +// * finalMessage.append(message); } +// * +// * if(!CollectionUtils.isEmpty(diff.getClassesAdded())){ messageTemplate = +// * getMessageTemplate(TLConstants.NOTIFICATION_OBJECT_ADDED,localizationMessage) +// * ; message = getEditMsg(marriageApplication,diff.getClassesAdded(),messageTemplate); +// * finalMessage.append(message); } +// * +// * if(!CollectionUtils.isEmpty(diff.getClassesRemoved())){ messageTemplate = +// * getMessageTemplate(TLConstants.NOTIFICATION_OBJECT_REMOVED, +// * localizationMessage); message = +// * getEditMsg(marriageApplication,diff.getClassesRemoved(),messageTemplate); +// * finalMessage.append(message); } +// */ +// String applicationType = String.valueOf(marriageApplication.getApplicationType()); +// if(applicationType.equals(APPLICATION_TYPE_RENEWAL)){ +// if (!CollectionUtils.isEmpty(diff.getFieldsChanged()) || !CollectionUtils.isEmpty(diff.getClassesAdded()) +// || !CollectionUtils.isEmpty(diff.getClassesRemoved())) { +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_OBJECT_RENEW_MODIFIED, localizationMessage); +// if (messageTemplate == null) +// messageTemplate = DEFAULT_OBJECT_RENEWAL_MODIFIED_MSG; +// message = getEditMsg(marriageApplication, messageTemplate); +// } +// +// } +// else{ +// if (!CollectionUtils.isEmpty(diff.getFieldsChanged()) || !CollectionUtils.isEmpty(diff.getClassesAdded()) +// || !CollectionUtils.isEmpty(diff.getClassesRemoved())) { +// messageTemplate = getMessageTemplate(TLConstants.NOTIFICATION_OBJECT_MODIFIED, localizationMessage); +// if (messageTemplate == null) +// messageTemplate = DEFAULT_OBJECT_MODIFIED_MSG; +// message = getEditMsg(marriageApplication, messageTemplate); +// } +// } +// +// +// +// return message; +// } +// +// /** +// * Creates customized message for field chnaged +// * +// * @param message +// * Message from localization for field change +// * @return customized message for field change +// */ +// private String getEditMsg(marriageApplication marriageApplication, List list, String message) { +// message = message.replace("{APPLICATION_NUMBER}", marriageApplication.getApplicationNumber()); +// message = message.replace("{FIELDS}", StringUtils.join(list, ",")); +// return message; +// } +// +// private String getEditMsg(marriageApplication marriageApplication, String message) { +// message = message.replace("{APPLICATION_NUMBER}", marriageApplication.getApplicationNumber()); +// return message; +// } +// +// /** +// * Pushes the event request to Kafka Queue. +// * +// * @param request +// */ +// public void sendEventNotification(EventRequest request) { +// producer.push(config.getSaveUserEventsTopic(), request); +// } +// +// +// /** +// * Method to shortent the url +// * returns the same url if shortening fails +// * @param url +// */ +// public String getShortenedUrl(String url){ +// +// HashMap body = new HashMap<>(); +// body.put("url",url); +// StringBuilder builder = new StringBuilder(config.getUrlShortnerHost()); +// builder.append(config.getUrlShortnerEndpoint()); +// String res = restTemplate.postForObject(builder.toString(), body, String.class); +// +// if(StringUtils.isEmpty(res)){ +// log.error("URL_SHORTENING_ERROR","Unable to shorten url: "+url); ; +// return url; +// } +// else return res; +// } +// +// /** +// * Fetches Email Ids of CITIZENs based on the phone number. +// * +// * @param mobileNumbers +// * @param requestInfo +// * @param tenantId +// * @return Map of mobileNumber to Email Ids +// */ +// public Map fetchUserEmailIds(Set mobileNumbers, RequestInfo requestInfo, String tenantId) { +// Map mapOfPhnoAndEmailIds = new HashMap<>(); +// StringBuilder uri = new StringBuilder(); +// uri.append(config.getUserHost()).append(config.getUserSearchEndpoint()); +// Map userSearchRequest = new HashMap<>(); +// userSearchRequest.put("RequestInfo", requestInfo); +// userSearchRequest.put("tenantId", tenantId); +// userSearchRequest.put("userType", "CITIZEN"); +// for(String mobileNo: mobileNumbers) { +// userSearchRequest.put("userName", mobileNo); +// try { +// Object user = serviceRequestRepository.fetchResult(uri, userSearchRequest); +// if(null != user) { +// if(JsonPath.read(user, "$.user[0].emailId")!=null) { +// String email = JsonPath.read(user, "$.user[0].emailId"); +// mapOfPhnoAndEmailIds.put(mobileNo, email); +// } +// }else { +// log.error("Service returned null while fetching user for username - "+mobileNo); +// } +// }catch(Exception e) { +// log.error("Exception while fetching user for username - "+mobileNo); +// log.error("Exception trace: ",e); +// continue; +// } +// } +// return mapOfPhnoAndEmailIds; +// } +// +// +// /** +// * Fetches UUIDs of CITIZENs based on the phone number. +// * +// * @param mobileNumbers +// * @param requestInfo +// * @param tenantId +// * @return +// */ +// public Map fetchUserUUIDs(Set mobileNumbers, RequestInfo requestInfo, String tenantId) { +// Map mapOfPhnoAndUUIDs = new HashMap<>(); +// StringBuilder uri = new StringBuilder(); +// uri.append(config.getUserHost()).append(config.getUserSearchEndpoint()); +// Map userSearchRequest = new HashMap<>(); +// userSearchRequest.put("RequestInfo", requestInfo); +// userSearchRequest.put("tenantId", tenantId); +// userSearchRequest.put("userType", "CITIZEN"); +// for(String mobileNo: mobileNumbers) { +// userSearchRequest.put("userName", mobileNo); +// try { +// Object user = serviceRequestRepository.fetchResult(uri, userSearchRequest); +// if(null != user) { +// String uuid = JsonPath.read(user, "$.user[0].uuid"); +// mapOfPhnoAndUUIDs.put(mobileNo, uuid); +// }else { +// log.error("Service returned null while fetching user for username - "+mobileNo); +// } +// }catch(Exception e) { +// log.error("Exception while fetching user for username - "+mobileNo); +// log.error("Exception trace: ",e); +// continue; +// } +// } +// return mapOfPhnoAndUUIDs; +// } + +} diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index bf79cf022f7..3c375249712 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -90,6 +90,7 @@ egov.mdms.search.endpoint=/egov-mdms-service/v1/_search #egov.mdms.master.name=FileServiceSubtype egov.mdms.module.name=birth-death-service +marriagecert.egov.mdms.url=https://ksmart-dev.lsgkerala.gov.in/egov-mdms-service/v1/_get #billing-service egov.billingservice.host=https://ksmart-dev.lsgkerala.gov.in/ egov.demand.create.endpoint=/billing-service/demand/_create @@ -139,7 +140,7 @@ decryption.abac.enabled=true #egov-encrypt service configs # egov.enc.host=http://localhost:1234 -# egov.enc.host=http://localhost:1234 +# egov.enc.host=http://localhost:1234 egov.enc.host=https://ksmart-dev.lsgkerala.gov.in egov.enc.encrypt.endpoint=/egov-enc-service/crypto/v1/_encrypt egov.enc.decrypt.endpoint=/egov-enc-service/crypto/v1/_decrypt @@ -171,4 +172,15 @@ persister.update.marriage.demand.topic=update-demand-topic # #Payment # persister.update.marriage.payment.topic=update-marriage-application-payment-topic +#Localization config +egov.localization.host=https://ksmart-dev.lsgkerala.gov.in/ +egov.localization.workDir.path=/localization/messages/v1 +egov.localization.context.path=/localization/messages/v1 +egov.localization.search.endpoint=/_search +egov.localization.statelevel=true + +notification.sms.enabled.forMR=true +egov.user.event.notification.enabledForMR=true +kafka.topics.notification.sms=egov.core.notification.sms + From 9cf2bbd8d0f3fbddf3bc055be58b8a86f89a9327 Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 23 May 2023 15:29:01 +0530 Subject: [PATCH 397/420] changes in sms --- .../common/consumer/MarriageConsumer.java | 37 +++++++++++++++++++ .../common/consumer/ReceiptConsumer.java | 2 +- .../services/PaymentUpdateService.java | 29 +++++++++------ .../MarriageNotificationService.java | 9 ++--- 4 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java new file mode 100644 index 00000000000..0542787eeec --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java @@ -0,0 +1,37 @@ +package org.ksmart.marriage.common.consumer; + +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecommon.services.notification.MarriageNotificationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.kafka.annotation.KafkaListener; +import org.springframework.kafka.support.KafkaHeaders; +import org.springframework.messaging.handler.annotation.Header; +import org.springframework.stereotype.Component; + +import java.util.HashMap; + +@Slf4j +@Component +public class MarriageConsumer { + + private MarriageNotificationService marriageNotificationService; + @Autowired + public MarriageConsumer(MarriageNotificationService marriageNotificationService ) { + this.marriageNotificationService=marriageNotificationService; + } + + @KafkaListener(topics = {"${persister.save.marriage.application.topic}","${persister.update.marriage.application.topic}"}) + public void listen(final HashMap record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) { + ObjectMapper mapper = new ObjectMapper(); + MarriageDetailsRequest request = new MarriageDetailsRequest(); + try { + request = mapper.convertValue(record, MarriageDetailsRequest.class); + } catch (final Exception e) { + log.error("Error while listening to value: " + record + " on topic: " + topic + ": " + e); + } + + marriageNotificationService.process(request); + } +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java index b3b34a63643..860c39a1c48 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/ReceiptConsumer.java @@ -67,7 +67,7 @@ public ReceiptConsumer(PaymentUpdateService paymentUpdateService,MarriageNotific @KafkaListener(topics = {"${kafka.topics.receipt.create}"}) public void listenPayments(final HashMap record) { paymentUpdateService.process(record); - marriageNotificationService.process(record); +// marriageNotificationService.process(record); // paymentNotificationService.process(record); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java index afae2ab0d6b..df2bfd51f54 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java @@ -32,6 +32,7 @@ import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; +import org.ksmart.marriage.marriagecommon.services.notification.MarriageNotificationService; import org.ksmart.marriage.utils.MarriageConstants; import org.ksmart.marriage.workflow.WorkflowIntegrator; import org.springframework.beans.factory.annotation.Autowired; @@ -63,6 +64,7 @@ public class PaymentUpdateService implements BaseEnrichment { private MarriageDetailsEnrichment enrichmentService; private final CommonRepository repository; + private MarriageNotificationService marriageNotificationService; // @Autowired // private objectMapper mapper; @@ -71,7 +73,7 @@ public class PaymentUpdateService implements BaseEnrichment { public PaymentUpdateService(MarriageApplicationService marriageService,MarriageApplicationConfiguration config, WorkflowIntegrator wfIntegrator,MarriageDetailsEnrichment enrichmentService , - CommonRepository repository) + CommonRepository repository,MarriageNotificationService marriageNotificationService) //BirthUtils util, NewBirthRepository repository,) { this.marriageService=marriageService; @@ -79,6 +81,7 @@ public PaymentUpdateService(MarriageApplicationService marriageService,MarriageA this.wfIntegrator=wfIntegrator; this.enrichmentService= enrichmentService; this.repository=repository; + this.marriageNotificationService=marriageNotificationService; } final String tenantId = "tenantId"; @@ -86,11 +89,11 @@ public PaymentUpdateService(MarriageApplicationService marriageService,MarriageA final String businessService = "businessService"; final String consumerCode = "consumerCode"; - - + + /** * Process the message from kafka and updates the status to paid - * + * * @param record The incoming message from receipt create consumer */ public void process(HashMap record) { @@ -120,24 +123,26 @@ public void process(HashMap record) { User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); - + // Update marriage table with status initiated - + List commonPays = new ArrayList<>(); - CommonPay pay = new CommonPay(); - System.out.println("Action after wf1"+updateRequest.getMarriageDetails().get(0).getAction()); + CommonPay pay = new CommonPay(); + System.out.println("Action after wf1"+updateRequest.getMarriageDetails().get(0).getAction()); pay.setAction(updateRequest.getMarriageDetails().get(0).getAction()); pay.setApplicationStatus(updateRequest.getMarriageDetails().get(0).getStatus()); pay.setHasPayment(true); pay.setAmount(paymentDetails.get(0).getBill().getBillDetails().get(0).getAmountPaid()); pay.setPaymentTransactionId(paymentRequest.getPayment().getTransactionNumber()); - pay.setIsPaymentSuccess(true); + pay.setIsPaymentSuccess(true); pay.setApplicationNumber(paymentDetail.getBill().getConsumerCode()); pay.setAuditDetails(auditDetails); - commonPays.add(pay); - CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); - System.out.println("Action after wf2"+new Gson().toJson(paymentReq)); + commonPays.add(pay); + CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); + System.out.println("Action after wf2"+new Gson().toJson(paymentReq)); repository.updatePaymentDetails(paymentReq); + + marriageNotificationService.process(updateRequest); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java index 629ca23a1bb..4f6551f7cc0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java @@ -32,7 +32,7 @@ public class MarriageNotificationService { private NotificationUtil util; - public static final String businessService_MR = "CR"; + public static final String businessService_MR = "MR"; @Value("${egov.mdms.host}") private String mdmsHost; @@ -51,12 +51,11 @@ public MarriageNotificationService(MarriageApplicationConfiguration config, Serv /** * Creates and send the sms based on the marriage application - * @param record The Marriageapplication listenend on the kafka topic + * @param request The Marriageapplication listenend on the kafka topic */ - public void process(HashMap record) { - ObjectMapper mapper = new ObjectMapper(); + public void process(MarriageDetailsRequest request) { try { - MarriageDetailsRequest request = mapper.convertValue(record, MarriageDetailsRequest.class); + RequestInfo requestInfo = request.getRequestInfo(); Map mobileNumberToOwner = new HashMap<>(); String tenantId = request.getMarriageDetails().get(0).getTenantid(); From 6e02051e9d40cacff22bce2c4f5bc7982bd0f5d9 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 23 May 2023 15:32:17 +0530 Subject: [PATCH 398/420] update paymentservice --- .../common/model/common/CommonPay.java | 35 ----------------- .../common/model/common/CommonPayRequest.java | 31 --------------- .../model/common/CommonPayResponse.java | 25 ------------ .../controller/CommonController.java | 20 +++++----- .../services/CommonService.java | 38 +++++++++---------- .../services/PaymentUpdateService.java | 9 ++--- 6 files changed, 32 insertions(+), 126 deletions(-) delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java delete mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java deleted file mode 100644 index f92b75bf201..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPay.java +++ /dev/null @@ -1,35 +0,0 @@ -// package org.ksmart.marriage.common.model.common; - -// import com.fasterxml.jackson.annotation.JsonProperty; -// import lombok.*; - -// import javax.validation.constraints.Size; - -// import org.ksmart.marriage.common.model.AuditDetails; - -// import java.math.BigDecimal; -// @Getter -// @Setter -// @AllArgsConstructor -// @NoArgsConstructor -// @Builder -// @ToString -// public class CommonPay { -// @Size(max = 64) -// @JsonProperty("applicationNumber") -// private String applicationNumber; - -// private String action; - -// private String applicationStatus; - -// private Boolean hasPayment; - -// @JsonProperty("isPaymentSuccess") -// private Boolean isPaymentSuccess; - -// private BigDecimal amount = BigDecimal.ZERO; - -// @JsonProperty("auditDetails") -// private AuditDetails auditDetails; -// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java deleted file mode 100644 index 1b440077b89..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayRequest.java +++ /dev/null @@ -1,31 +0,0 @@ -// package org.ksmart.marriage.common.model.common; - -// import com.fasterxml.jackson.annotation.JsonProperty; -// import lombok.*; -// import org.egov.common.contract.request.RequestInfo; -// import javax.validation.Valid; -// import javax.validation.constraints.Size; -// import java.math.BigDecimal; -// import java.util.List; - -// @Getter -// @AllArgsConstructor -// @NoArgsConstructor -// @Builder -// @ToString -// public class CommonPayRequest { -// @JsonProperty("RequestInfo") -// private RequestInfo requestInfo; - -// @JsonProperty("PaymentDetails") -// @Valid -// private List commonPays; - -// public CommonPayRequest addPayment(CommonPay commonPay) { -// if (commonPays == null) { -// commonPays = null; -// } -// return this; -// } - -// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java deleted file mode 100644 index aeba4cd392d..00000000000 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/model/common/CommonPayResponse.java +++ /dev/null @@ -1,25 +0,0 @@ -// package org.ksmart.marriage.common.model.common; - -// import com.fasterxml.jackson.annotation.JsonProperty; -// import lombok.AllArgsConstructor; -// import lombok.Builder; -// import lombok.Data; -// import lombok.NoArgsConstructor; -// import org.egov.common.contract.response.ResponseInfo; - -// import javax.validation.Valid; -// import java.util.ArrayList; -// import java.util.List; -// @Data -// @NoArgsConstructor -// @AllArgsConstructor -// @Builder -// public class CommonPayResponse { -// @JsonProperty("ResponseInfo") -// @Valid -// private ResponseInfo responseInfo; - -// @JsonProperty("CommonPayRequest") -// @Valid -// private List payments = new ArrayList<>(); -// } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/controller/CommonController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/controller/CommonController.java index 18d98904658..7d366428ccc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/controller/CommonController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/controller/CommonController.java @@ -29,15 +29,15 @@ public class CommonController { this.responseInfoFactory = responseInfoFactory; } - @PostMapping(value = {"/updatepaywf"}) - public ResponseEntity updatePaymentWorkflow(@RequestBody CommonPayRequest request) { - List paymentDetails=commonService.updatePaymentWorkflow(request); - CommonPayResponse response= CommonPayResponse.builder() - .payments(paymentDetails) - .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), - true)) - .build(); - return new ResponseEntity<>(response, HttpStatus.OK); - } + // @PostMapping(value = {"/updatepaywf"}) + // public ResponseEntity updatePaymentWorkflow(@RequestBody CommonPayRequest request) { + // List paymentDetails=commonService.updatePaymentWorkflow(request); + // CommonPayResponse response= CommonPayResponse.builder() + // .payments(paymentDetails) + // .responseInfo(responseInfoFactory.createResponseInfoFromRequestInfo(request.getRequestInfo(), + // true)) + // .build(); + // return new ResponseEntity<>(response, HttpStatus.OK); + // } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonService.java index b226b546855..e5b3cbea492 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/CommonService.java @@ -36,23 +36,23 @@ public class CommonService { } - public List updatePaymentWorkflow(CommonPayRequest request) { - List commonPays = request.getCommonPays(); - List commonPayList = new ArrayList<>(); - for (CommonPay birth : commonPays) { - if (birth.getApplicationStatus().equals(STATUS_FOR_PAYMENT) && birth.getIsPaymentSuccess()) { - birth.setAction("INITIATE"); - birth.setApplicationStatus("INITIATED"); - birth.setHasPayment(true); - birth.setAmount(new BigDecimal(10)); - commonPayList = repository.updatePaymentDetails(request); - } else if(birth.getApplicationStatus().equals(STATUS_FOR_PAYMENT) && !birth.getIsPaymentSuccess()){ - birth.setAction(""); - birth.setApplicationStatus("STATUS_FOR_PAYMENT"); - birth.setHasPayment(true); - birth.setAmount(new BigDecimal(0)); - } - } - return commonPayList; - } + // public List updatePaymentWorkflow(CommonPayRequest request) { + // List commonPays = request.getCommonPays(); + // List commonPayList = new ArrayList<>(); + // for (CommonPay birth : commonPays) { + // if (birth.getApplicationStatus().equals(STATUS_FOR_PAYMENT) && birth.getIsPaymentSuccess()) { + // birth.setAction("INITIATE"); + // birth.setApplicationStatus("INITIATED"); + // birth.setHasPayment(true); + // birth.setAmount(new BigDecimal(10)); + // commonPayList = repository.updatePaymentDetails(request); + // } else if(birth.getApplicationStatus().equals(STATUS_FOR_PAYMENT) && !birth.getIsPaymentSuccess()){ + // birth.setAction(""); + // birth.setApplicationStatus("STATUS_FOR_PAYMENT"); + // birth.setHasPayment(true); + // birth.setAmount(new BigDecimal(0)); + // } + // } + // return commonPayList; + // } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java index afae2ab0d6b..962414526d2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java @@ -114,9 +114,8 @@ public void process(HashMap record) { MarriageDetailsRequest updateRequest = MarriageDetailsRequest.builder().requestInfo(requestInfo) .marriageDetails(marriage).build(); //System.out.println(" payment detail updateRequest:"+updateRequest); - System.out.println(" payment detail updateRequest before calling workflow --------------:"+new Gson().toJson(updateRequest)); wfIntegrator.callWorkFlow(updateRequest); - System.out.println(" payment detail updateRequest after calling workflow ---------------:"+new Gson().toJson(updateRequest)); + // System.out.println(" payment detail updateRequest after calling workflow ---------------:"+new Gson().toJson(updateRequest)); User userInfo = requestInfo.getUserInfo(); AuditDetails auditDetails = buildAuditDetails(userInfo.getUuid(), Boolean.TRUE); @@ -124,8 +123,7 @@ public void process(HashMap record) { // Update marriage table with status initiated List commonPays = new ArrayList<>(); - CommonPay pay = new CommonPay(); - System.out.println("Action after wf1"+updateRequest.getMarriageDetails().get(0).getAction()); + CommonPay pay = new CommonPay(); pay.setAction(updateRequest.getMarriageDetails().get(0).getAction()); pay.setApplicationStatus(updateRequest.getMarriageDetails().get(0).getStatus()); pay.setHasPayment(true); @@ -135,8 +133,7 @@ public void process(HashMap record) { pay.setApplicationNumber(paymentDetail.getBill().getConsumerCode()); pay.setAuditDetails(auditDetails); commonPays.add(pay); - CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); - System.out.println("Action after wf2"+new Gson().toJson(paymentReq)); + CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); repository.updatePaymentDetails(paymentReq); } } From 320552472114b628927aea098ba38a9525fedfb1 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Tue, 23 May 2023 15:57:09 +0530 Subject: [PATCH 399/420] added log in sms --- .../common/consumer/MarriageConsumer.java | 1 + .../MarriageNotificationService.java | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java index 0542787eeec..18f9fc26e38 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java @@ -26,6 +26,7 @@ public MarriageConsumer(MarriageNotificationService marriageNotificationService public void listen(final HashMap record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) { ObjectMapper mapper = new ObjectMapper(); MarriageDetailsRequest request = new MarriageDetailsRequest(); + System.out.println("Inside kafka listner topic for notificaton.................."); try { request = mapper.convertValue(record, MarriageDetailsRequest.class); } catch (final Exception e) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java index 4f6551f7cc0..4c631ccc655 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.egov.common.contract.request.RequestInfo; @@ -32,7 +33,7 @@ public class MarriageNotificationService { private NotificationUtil util; - public static final String businessService_MR = "MR"; + public static final String businessService_MR = "CR"; @Value("${egov.mdms.host}") private String mdmsHost; @@ -55,11 +56,12 @@ public MarriageNotificationService(MarriageApplicationConfiguration config, Serv */ public void process(MarriageDetailsRequest request) { try { - + System.out.println("Inside process for notificaton.................."); + System.out.println(new Gson().toJson(request)); RequestInfo requestInfo = request.getRequestInfo(); - Map mobileNumberToOwner = new HashMap<>(); - String tenantId = request.getMarriageDetails().get(0).getTenantid(); - String action = request.getMarriageDetails().get(0).getAction(); +// Map mobileNumberToOwner = new HashMap<>(); +// String tenantId = request.getMarriageDetails().get(0).getTenantid(); +// String action = request.getMarriageDetails().get(0).getAction(); Map configuredChannelList = new HashMap<>(); // List configuredChannelNames = Arrays.asList(new String[]{"SMS","EVENT","EMAIL"}); Set mobileNumbers = new HashSet<>(); @@ -73,13 +75,15 @@ public void process(MarriageDetailsRequest request) { String businessService = request.getMarriageDetails().isEmpty() ? null : request.getMarriageDetails().get(0).getBusinessservice(); if (businessService == null) businessService = businessService_MR; - + System.out.println(businessService); // switch (businessService) { // case businessService_MR: List smsRequestsTL = new LinkedList<>(); + System.out.println("config.getIsMRSMSEnabled() ===="+config.getIsMRSMSEnabled()); if (null != config.getIsMRSMSEnabled()) { if (config.getIsMRSMSEnabled()) { enrichSMSRequest(request, smsRequestsTL,configuredChannelList); + System.out.println(" smsRequestsTL ===="+new Gson().toJson(smsRequestsTL)); if (!CollectionUtils.isEmpty(smsRequestsTL)) util.sendSMS(smsRequestsTL, true); } @@ -227,6 +231,7 @@ private void enrichSMSRequest(MarriageDetailsRequest request,List sm mobileNumberToOwner.put(marriageApplicationDetails.getGroomDetails().getMobile().toString(),groomName); smsRequests.addAll(util.createSMSRequest(message, mobileNumberToOwner)); } + System.out.println(" end of enrichSMSRequest ===="); } /** From 3e48b100eed07e94ead4d54af66a173b98d5b6f2 Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 23 May 2023 16:40:27 +0530 Subject: [PATCH 400/420] changes in sms --- .../marriage/utils/MarriageConstants.java | 4 ++-- .../marriage/utils/NotificationUtil.java | 20 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index a14ce1a6830..0394237365a 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -225,9 +225,9 @@ public class MarriageConstants { public static final String CR_MDMS_PLACESUBREGISTARID_JSONPATH = "$.MdmsRes.birth-death-service.SubRegistar[*]"; public static final String ACTION_PAY = "PAY"; - public static final String ACTION_STATUS_INITIATED = "INITIATE_INITIATED"; + public static final String ACTION_STATUS_INITIATED = "PAY_INITIATED"; - public static final String ACTION_STATUS_APPROVED = "PAY_APPROVED"; + public static final String ACTION_STATUS_APPROVED = "APPROVE_APPROVED"; public static final String ACTION_STATUS_APPLIED = "APPLIED"; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java index b79411cee3f..a8620bc0233 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java @@ -67,14 +67,16 @@ public String getCustomizedMsg(RequestInfo requestInfo, MarriageApplicationDetai switch (ACTION_STATUS) { case ACTION_STATUS_INITIATED: + System.out.println(" inside action pay status initiated"); messageTemplate = getMessageTemplate(NOTIFICATION_INITIATED, localizationMessage); message = getInitiatedMsg(marriageApplication, messageTemplate); break; case ACTION_STATUS_APPLIED: - messageTemplate = getMessageTemplate(NOTIFICATION_APPLIED, localizationMessage); - message = getAppliedMsg(marriageApplication, messageTemplate); - break; + System.out.println(" inside action applied status applied"); + messageTemplate = getMessageTemplate(NOTIFICATION_APPLIED, localizationMessage); + message = getAppliedMsg(marriageApplication, messageTemplate); + break; /* * case ACTION_STATUS_PAID : messageTemplate = @@ -83,10 +85,11 @@ public String getCustomizedMsg(RequestInfo requestInfo, MarriageApplicationDetai */ case ACTION_STATUS_APPROVED: - BigDecimal amountToBePaid = BigDecimal.valueOf(0);//getAmountToBePaid(requestInfo, marriageApplication); - messageTemplate = getMessageTemplate(NOTIFICATION_APPROVED, localizationMessage); - message = getApprovedMsg(marriageApplication, amountToBePaid, messageTemplate); - break; + System.out.println(" inside action approve status approved"); + BigDecimal amountToBePaid = BigDecimal.valueOf(0);//getAmountToBePaid(requestInfo, marriageApplication); + messageTemplate = getMessageTemplate(NOTIFICATION_APPROVED, localizationMessage); + message = getApprovedMsg(marriageApplication, amountToBePaid, messageTemplate); + break; case ACTION_STATUS_REJECTED: messageTemplate = getMessageTemplate(NOTIFICATION_REJECTED, localizationMessage); @@ -201,7 +204,7 @@ public StringBuilder getUri(String tenantId, RequestInfo requestInfo) { .append(config.getLocalizationSearchEndpoint()).append("?").append("locale=").append(locale) .append("&tenantId=").append(tenantId).append("&module=").append(MODULE) .append("&codes=").append(StringUtils.join(NOTIFICATION_CODES,',')); - + System.out.println("localization uri ====== "+uri); return uri; } @@ -218,6 +221,7 @@ public String getLocalizationMessages(String tenantId, RequestInfo requestInfo) LinkedHashMap responseMap = (LinkedHashMap) serviceRequestRepository.fetchResult(getUri(tenantId, requestInfo), requestInfo); String jsonString = new JSONObject(responseMap).toString(); + System.out.println("getLocalizationMessages ===============>"+jsonString); return jsonString; } From 838a84271af247efe6b6558222fe87b6cd67f74c Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 23 May 2023 17:08:33 +0530 Subject: [PATCH 401/420] added bride for sms --- .../MarriageNotificationService.java | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java index 4c631ccc655..134fc695861 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java @@ -220,15 +220,26 @@ private void enrichSMSRequest(MarriageDetailsRequest request,List sm if (message == null) continue; Map mobileNumberToOwner = new HashMap<>(); - String groomName = marriageApplicationDetails.getGroomDetails().getFirstnameEn(); - if(StringUtils.isNotBlank(marriageApplicationDetails.getGroomDetails().getMiddlenameEn())){ - groomName=groomName+" "+marriageApplicationDetails.getGroomDetails().getMiddlenameEn(); + if (marriageApplicationDetails.getGroomDetails().getMobile() != null) { + String groomName = marriageApplicationDetails.getGroomDetails().getFirstnameEn(); + if(StringUtils.isNotBlank(marriageApplicationDetails.getGroomDetails().getMiddlenameEn())){ + groomName=groomName+" "+marriageApplicationDetails.getGroomDetails().getMiddlenameEn(); + } + if(StringUtils.isNotBlank(marriageApplicationDetails.getGroomDetails().getLastnameEn())){ + groomName=groomName+" "+marriageApplicationDetails.getGroomDetails().getLastnameEn(); + } + mobileNumberToOwner.put(marriageApplicationDetails.getGroomDetails().getMobile().toString(), groomName); } - if(StringUtils.isNotBlank(marriageApplicationDetails.getGroomDetails().getLastnameEn())){ - groomName=groomName+" "+marriageApplicationDetails.getGroomDetails().getLastnameEn(); + if (marriageApplicationDetails.getBrideDetails().getMobile() != null) { + String brideName = marriageApplicationDetails.getBrideDetails().getFirstnameEn(); + if(StringUtils.isNotBlank(marriageApplicationDetails.getBrideDetails().getMiddlenameEn())){ + brideName=brideName+" "+marriageApplicationDetails.getBrideDetails().getMiddlenameEn(); + } + if(StringUtils.isNotBlank(marriageApplicationDetails.getBrideDetails().getLastnameEn())){ + brideName=brideName+" "+marriageApplicationDetails.getBrideDetails().getLastnameEn(); + } + mobileNumberToOwner.put(marriageApplicationDetails.getBrideDetails().getMobile().toString(), brideName); } - if (marriageApplicationDetails.getGroomDetails().getMobile() != null) - mobileNumberToOwner.put(marriageApplicationDetails.getGroomDetails().getMobile().toString(),groomName); smsRequests.addAll(util.createSMSRequest(message, mobileNumberToOwner)); } System.out.println(" end of enrichSMSRequest ===="); From e89b8ce13c0449bbe6f7f39f0a77c4fd46b48166 Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 24 May 2023 12:35:22 +0530 Subject: [PATCH 402/420] changes in sms added correction msg --- .../common/consumer/MarriageConsumer.java | 17 ++++++++++- .../services/PaymentUpdateService.java | 2 +- .../MarriageNotificationService.java | 28 ++++++++++--------- 3 files changed, 32 insertions(+), 15 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java index 18f9fc26e38..fb4ea9ba5d7 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/common/consumer/MarriageConsumer.java @@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; import org.ksmart.marriage.marriagecommon.services.notification.MarriageNotificationService; +import org.ksmart.marriage.marriagecorrection.web.model.MarriageCorrectionRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.kafka.support.KafkaHeaders; @@ -33,6 +34,20 @@ public void listen(final HashMap record, @Header(KafkaHeaders.RE log.error("Error while listening to value: " + record + " on topic: " + topic + ": " + e); } - marriageNotificationService.process(request); + marriageNotificationService.process(request.getRequestInfo(),request.getMarriageDetails()); + } + + @KafkaListener(topics = {"${persister.save.marriage.correction.topic}","${persister.update.marriage.application.correction.topic}"}) + public void listenCorrection(final HashMap record, @Header(KafkaHeaders.RECEIVED_TOPIC) String topic) { + ObjectMapper mapper = new ObjectMapper(); + MarriageCorrectionRequest request = new MarriageCorrectionRequest(); + System.out.println("Inside kafka listner correction topic for notificaton.................."); + try { + request = mapper.convertValue(record, MarriageCorrectionRequest.class); + } catch (final Exception e) { + log.error("Error while listening to value: " + record + " on topic: " + topic + ": " + e); + } + + marriageNotificationService.process(request.getRequestInfo(),request.getMarriageDetails()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java index dd16813339b..34613f817fa 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/PaymentUpdateService.java @@ -139,7 +139,7 @@ public void process(HashMap record) { CommonPayRequest paymentReq =CommonPayRequest.builder().requestInfo(requestInfo).commonPays(commonPays).build(); repository.updatePaymentDetails(paymentReq); - marriageNotificationService.process(updateRequest); + marriageNotificationService.process(updateRequest.getRequestInfo(),updateRequest.getMarriageDetails()); } } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java index 134fc695861..9c1c72503c5 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java @@ -52,13 +52,14 @@ public MarriageNotificationService(MarriageApplicationConfiguration config, Serv /** * Creates and send the sms based on the marriage application - * @param request The Marriageapplication listenend on the kafka topic + * @param requestInfo + * @param marriageDetails The Marriageapplication listenend on the kafka topic */ - public void process(MarriageDetailsRequest request) { + public void process(RequestInfo requestInfo,List marriageDetails) { try { System.out.println("Inside process for notificaton.................."); - System.out.println(new Gson().toJson(request)); - RequestInfo requestInfo = request.getRequestInfo(); + System.out.println(new Gson().toJson(marriageDetails)); +// RequestInfo requestInfo = request.getRequestInfo(); // Map mobileNumberToOwner = new HashMap<>(); // String tenantId = request.getMarriageDetails().get(0).getTenantid(); // String action = request.getMarriageDetails().get(0).getAction(); @@ -66,13 +67,13 @@ public void process(MarriageDetailsRequest request) { // List configuredChannelNames = Arrays.asList(new String[]{"SMS","EVENT","EMAIL"}); Set mobileNumbers = new HashSet<>(); - for(MarriageApplicationDetails marriageApplicationDetails : request.getMarriageDetails()){ + for(MarriageApplicationDetails marriageApplicationDetails : marriageDetails){ if(marriageApplicationDetails.getGroomDetails().getMobile()!=null){ mobileNumbers.add(marriageApplicationDetails.getGroomDetails().getMobile().toString()); } } - String businessService = request.getMarriageDetails().isEmpty() ? null : request.getMarriageDetails().get(0).getBusinessservice(); + String businessService = marriageDetails.isEmpty() ? null : marriageDetails.get(0).getBusinessservice(); if (businessService == null) businessService = businessService_MR; System.out.println(businessService); @@ -82,7 +83,7 @@ public void process(MarriageDetailsRequest request) { System.out.println("config.getIsMRSMSEnabled() ===="+config.getIsMRSMSEnabled()); if (null != config.getIsMRSMSEnabled()) { if (config.getIsMRSMSEnabled()) { - enrichSMSRequest(request, smsRequestsTL,configuredChannelList); + enrichSMSRequest( requestInfo, marriageDetails, smsRequestsTL,configuredChannelList); System.out.println(" smsRequestsTL ===="+new Gson().toJson(smsRequestsTL)); if (!CollectionUtils.isEmpty(smsRequestsTL)) util.sendSMS(smsRequestsTL, true); @@ -183,13 +184,14 @@ public void process(MarriageDetailsRequest request) { /** * Enriches the smsRequest with the customized messages - * @param request The MarriageDetailsRequest from kafka topic + * @param requestInfo + * @param marriageDetails The MarriageDetailsRequest from kafka topic * @param smsRequests List of SMSRequests * @param configuredChannelList Map of actions mapped to configured channels for this business service for BPAREG flow */ - private void enrichSMSRequest(MarriageDetailsRequest request,List smsRequests,Map configuredChannelList){ - String tenantId = request.getMarriageDetails().get(0).getTenantid(); - for(MarriageApplicationDetails marriageApplicationDetails : request.getMarriageDetails()) { + private void enrichSMSRequest(RequestInfo requestInfo,List marriageDetails,List smsRequests,Map configuredChannelList){ + String tenantId = marriageDetails.get(0).getTenantid(); + for(MarriageApplicationDetails marriageApplicationDetails : marriageDetails) { String businessService = marriageApplicationDetails.getBusinessservice(); if (businessService == null) businessService = businessService_MR; @@ -200,8 +202,8 @@ private void enrichSMSRequest(MarriageDetailsRequest request,List sm // String localizationMessages = tlRenewalNotificationUtil.getLocalizationMessages(tenantId, request.getRequestInfo()); // message = tlRenewalNotificationUtil.getCustomizedMsg(request.getRequestInfo(), marriageApplicationDetails, localizationMessages); // } else { - String localizationMessages = util.getLocalizationMessages(tenantId, request.getRequestInfo()); - message = util.getCustomizedMsg(request.getRequestInfo(), marriageApplicationDetails, localizationMessages); + String localizationMessages = util.getLocalizationMessages(tenantId, requestInfo); + message = util.getCustomizedMsg(requestInfo, marriageApplicationDetails, localizationMessages); // } } From 19756bf375024a440a89c735d3897bae32852d37 Mon Sep 17 00:00:00 2001 From: binilp Date: Wed, 24 May 2023 15:13:04 +0530 Subject: [PATCH 403/420] changes in NRI address setting for certificate --- .../MarriageRegistryEnrichment.java | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 79cfa7f69ef..d156eac6df8 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -1013,7 +1013,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg // } } else { - return setGroomNRIAddressForCertificate(req,registryDetails); + return setGroomOutSideInAddressForCertificate(req,registryDetails); // Object mdmsGroomAddressData = util.mDMSCallGetAddress(req // , registryDetails.getGroomAddressDetails().getPermntInKeralaAdrLBName() @@ -1057,7 +1057,7 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg } - public String setGroomNRIAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { + public String setGroomOutSideInAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { StringBuilder groomAddressBuilder = new StringBuilder(); if (registryDetails.getGroomAddressDetails() != null) { if (StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermtaddressCountry())&&!registryDetails.getGroomAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { @@ -1078,7 +1078,8 @@ public String setGroomNRIAddressForCertificate(RequestInfo req,MarriageRegistryD return groomAddressBuilder.toString(); } - public String setBrideNRIAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { + + public String setBrideOutSideInAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { StringBuilder brideAddressBuilder = new StringBuilder(); if (registryDetails.getBrideAddressDetails() != null) { if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermtaddressCountry())&&!registryDetails.getBrideAddressDetails().getPermtaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { @@ -1098,6 +1099,40 @@ public String setBrideNRIAddressForCertificate(RequestInfo req,MarriageRegistryD } return brideAddressBuilder.toString(); } + public String setGroomNRIAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { + StringBuilder groomAddressBuilder = new StringBuilder(); + if (registryDetails.getGroomAddressDetails() != null) { + if (StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPresentaddressCountry())&&!registryDetails.getGroomAddressDetails().getPresentaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + Map> mdmsCountryMap = util.mDMSCallGetCountry(req, registryDetails.getGroomAddressDetails().getPresentaddressCountry()); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPresentOutSideIndiaAdressEn(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPresentOutSideIndiaAdressEnB(), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPresentOutSideIndiaProvinceEn(), groomAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), groomAddressBuilder, true); + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPresentOutSideIndiaPostCode(), groomAddressBuilder, false); + } + } + if(StringUtils.isNotBlank(groomAddressBuilder.toString()) && ((Character) groomAddressBuilder.toString().charAt(groomAddressBuilder.toString().length()-1)).equals(',')){ + return groomAddressBuilder.toString().substring(0, groomAddressBuilder.toString().length()-1); + } + return groomAddressBuilder.toString(); + } + public String setBrideNRIAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { + StringBuilder brideAddressBuilder = new StringBuilder(); + if (registryDetails.getBrideAddressDetails() != null) { + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPresentaddressCountry())&&!registryDetails.getBrideAddressDetails().getPresentaddressCountry().equals(MarriageConstants.COUNTRY_CODE)) { + Map> mdmsCountryMap = util.mDMSCallGetCountry(req, registryDetails.getBrideAddressDetails().getPresentaddressCountry()); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPresentOutSideIndiaAdressEn(), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPresentOutSideIndiaAdressEnB(), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPresentOutSideIndiaProvinceEn(), brideAddressBuilder, true); + appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), brideAddressBuilder, true); + appendIfNotBlank(registryDetails.getBrideAddressDetails().getPresentOutSideIndiaPostCode(), brideAddressBuilder, false); + } + } + if(StringUtils.isNotBlank(brideAddressBuilder.toString()) && ((Character) brideAddressBuilder.toString().charAt(brideAddressBuilder.toString().length()-1)).equals(',')){ + return brideAddressBuilder.toString().substring(0, brideAddressBuilder.toString().length()-1); + } + return brideAddressBuilder.toString(); + } public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageRegistryDetails registryDetails) { StringBuilder brideAddressBuilder = new StringBuilder(); @@ -1210,7 +1245,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg } else { - return setBrideNRIAddressForCertificate(req,registryDetails); + return setBrideOutSideInAddressForCertificate(req,registryDetails); // Object mdmsBrideAddressData = util.mDMSCallGetAddress(req // , registryDetails.getBrideAddressDetails().getPermntInKeralaAdrLBName() // , registryDetails.getBrideAddressDetails().getDistrictIdPermanent() From 9a0acaac8a9979665f5cb28eada1c6a06c8595e9 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 23 May 2023 15:30:48 +0530 Subject: [PATCH 404/420] new Migration Added --- ...26__marriage_new_migration_columns_dll.sql | 1024 +++++++++++++++++ 1 file changed, 1024 insertions(+) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V202305231326__marriage_new_migration_columns_dll.sql diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305231326__marriage_new_migration_columns_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305231326__marriage_new_migration_columns_dll.sql new file mode 100644 index 00000000000..03e79024d87 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305231326__marriage_new_migration_columns_dll.sql @@ -0,0 +1,1024 @@ +CREATE TABLE IF NOT EXISTS public.eg_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + houseno_and_name_en character varying(2500) COLLATE pg_catalog."default", + houseno_and_name_ml character varying(2500) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + brideurl character varying(2000) COLLATE pg_catalog."default", + groomurl character varying(2000) COLLATE pg_catalog."default", + imageuuid character varying(64) COLLATE pg_catalog."default", + bride_filestoreid character varying(256) COLLATE pg_catalog."default", + groom_filestoreid character varying(256) COLLATE pg_catalog."default", + bride_expired boolean, + groom_expired boolean, + module_code character varying(64) COLLATE pg_catalog."default", + is_backward boolean, + amount numeric, + zonal_office character varying(100) COLLATE pg_catalog."default", + payment_transaction_id character varying(128) COLLATE pg_catalog."default", + payment_success boolean, + CONSTRAINT eg_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber), + CONSTRAINT eg_marriage_place_details_registrationno_fkey UNIQUE (registrationno, applicationnumber) +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(1000) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + houseno_and_name_en character varying(2500) COLLATE pg_catalog."default", + houseno_and_name_ml character varying(2500) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" NOT NULL, + businessservice character varying(64) COLLATE pg_catalog."default" NOT NULL, + workflowcode character varying(64) COLLATE pg_catalog."default" NOT NULL, + applicationnumber character varying(64) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + action character varying(64) COLLATE pg_catalog."default", + status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + brideurl character varying(2000) COLLATE pg_catalog."default", + groomurl character varying(2000) COLLATE pg_catalog."default", + imageuuid character varying(64) COLLATE pg_catalog."default", + bride_filestoreid character varying(256) COLLATE pg_catalog."default", + groom_filestoreid character varying(256) COLLATE pg_catalog."default", + bride_expired boolean, + groom_expired boolean, + module_code character varying(64) COLLATE pg_catalog."default", + is_backward boolean, + amount numeric, + zonal_office character varying(100) COLLATE pg_catalog."default", + payment_transaction_id character varying(128) COLLATE pg_catalog."default", + payment_success boolean +); + + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + state_name character varying(1000) COLLATE pg_catalog."default", + district_name character varying(1000) COLLATE pg_catalog."default", + country_name character varying(1000) COLLATE pg_catalog."default", + permanent_tenentid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + + +CREATE TABLE IF NOT EXISTS public.eg_marriage_permanent_address_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + state_name character varying(1000) COLLATE pg_catalog."default", + district_name character varying(1000) COLLATE pg_catalog."default", + country_name character varying(1000) COLLATE pg_catalog."default", + permanent_tenentid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + same_as_permanent boolean, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + present_tenentid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_present_address_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_no_en character varying(2500) COLLATE pg_catalog."default", + housename_no_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + same_as_permanent boolean, + tenantid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + present_tenentid character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + aadharno character varying(200) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(1000) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no integer, + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_witness_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + aadharno character varying(200) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(1000) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no integer, + tenantid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + aadharno character varying(200) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(200) COLLATE pg_catalog."default", + mother_aadharno character varying(200) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living integer, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_bride_groom_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + aadharno character varying(200) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(200) COLLATE pg_catalog."default", + mother_aadharno character varying(200) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living integer, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_document +( + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + applicationnumber character varying(64) COLLATE pg_catalog."default", + updated_flag integer, + registrationno character varying(64) COLLATE pg_catalog."default", + correction_id character varying(64) COLLATE pg_catalog."default", + correction_field_name character varying(1024) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_marriage_document_pkey UNIQUE (id) +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_document_audit +( + operation character(1) COLLATE pg_catalog."default" NOT NULL, + stamp timestamp without time zone NOT NULL, + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + applicationnumber character varying(64) COLLATE pg_catalog."default", + updated_flag integer, + registrationno character varying(64) COLLATE pg_catalog."default", + correction_id character varying(64) COLLATE pg_catalog."default", + correction_field_name character varying(1024) COLLATE pg_catalog."default", + applicationtype character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(64) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + housenameno_en character varying(1000) COLLATE pg_catalog."default", + housenameno_ml character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + registration_status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", + is_migrated boolean, + migrated_date bigint, + migrated_marriage_type character varying(64) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + brideurl character varying(2000) COLLATE pg_catalog."default", + groomurl character varying(2000) COLLATE pg_catalog."default", + imageuuid character varying(64) COLLATE pg_catalog."default", + bride_filestoreid character varying(256) COLLATE pg_catalog."default", + groom_filestoreid character varying(256) COLLATE pg_catalog."default", + bride_expired boolean, + groom_expired boolean, + module_code character varying(64) COLLATE pg_catalog."default", + is_backward boolean, + zonal_office character varying(100) COLLATE pg_catalog."default", + certificateno character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_place_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_place_details_applicationnumber_fkey UNIQUE (applicationnumber, tenantid) +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + dateofmarriage bigint, + dateofreporting bigint, + districtid character varying(64) COLLATE pg_catalog."default", + lbtype character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + placetype character varying(64) COLLATE pg_catalog."default", + placeid character varying(64) COLLATE pg_catalog."default", + placename_en character varying(1000) COLLATE pg_catalog."default", + placename_ml character varying(1000) COLLATE pg_catalog."default", + housenameno_en character varying(1000) COLLATE pg_catalog."default", + housenameno_ml character varying(1000) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(1000) COLLATE pg_catalog."default", + street_name_ml character varying(1000) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + village_name character varying(64) COLLATE pg_catalog."default", + marriage_type character varying(64) COLLATE pg_catalog."default", + oth_marriage_type character varying(200) COLLATE pg_catalog."default", + landmark character varying(1000) COLLATE pg_catalog."default", + registrationno character varying(64) COLLATE pg_catalog."default", + registration_date bigint, + registration_status character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + applicationnumber character varying(64) COLLATE pg_catalog."default", + is_migrated boolean, + migrated_date bigint, + migrated_marriage_type character varying(64) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + brideurl character varying(2000) COLLATE pg_catalog."default", + groomurl character varying(2000) COLLATE pg_catalog."default", + imageuuid character varying(64) COLLATE pg_catalog."default", + bride_filestoreid character varying(256) COLLATE pg_catalog."default", + groom_filestoreid character varying(256) COLLATE pg_catalog."default", + bride_expired boolean, + groom_expired boolean, + module_code character varying(64) COLLATE pg_catalog."default", + is_backward boolean, + zonal_office character varying(100) COLLATE pg_catalog."default", + certificateno character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document +( + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + applicationnumber character varying(64) COLLATE pg_catalog."default", + updated_flag integer, + registrationno character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_document_fkey PRIMARY KEY (tenantid, document_type, document_name, marriageid, bride_groom, active), + CONSTRAINT eg_register_marriage_document_pkey UNIQUE (id) +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_document_audit +( + id character varying(128) COLLATE pg_catalog."default", + tenantid character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_name character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_type character varying(128) COLLATE pg_catalog."default" NOT NULL, + document_description character varying(140) COLLATE pg_catalog."default", + filestoreid character varying(1024) COLLATE pg_catalog."default", + document_link character varying(1024) COLLATE pg_catalog."default", + file_type character varying(20) COLLATE pg_catalog."default", + file_size bigint, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + active boolean NOT NULL, + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + applicationnumber character varying(64) COLLATE pg_catalog."default", + updated_flag integer, + registrationno character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + state_name character varying(1000) COLLATE pg_catalog."default", + district_name character varying(1000) COLLATE pg_catalog."default", + country_name character varying(1000) COLLATE pg_catalog."default", + permanent_tenentid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_permanent_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_permanent_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_permanent_address_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + state_name character varying(1000) COLLATE pg_catalog."default", + district_name character varying(1000) COLLATE pg_catalog."default", + country_name character varying(1000) COLLATE pg_catalog."default", + permanent_tenentid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + same_as_permanent boolean, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + present_tenentid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_present_address_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_present_address_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_present_address_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + housename_en character varying(2500) COLLATE pg_catalog."default", + housename_ml character varying(2500) COLLATE pg_catalog."default", + villageid character varying(64) COLLATE pg_catalog."default", + village_name character varying(1000) COLLATE pg_catalog."default", + talukid character varying(64) COLLATE pg_catalog."default", + taluk_name character varying(1000) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + ward_code character varying(64) COLLATE pg_catalog."default", + locality_en character varying(1000) COLLATE pg_catalog."default", + locality_ml character varying(1000) COLLATE pg_catalog."default", + street_name_en character varying(2000) COLLATE pg_catalog."default", + street_name_ml character varying(2000) COLLATE pg_catalog."default", + districtid character varying(64) COLLATE pg_catalog."default", + stateid character varying(64) COLLATE pg_catalog."default", + poid character varying(64) COLLATE pg_catalog."default", + poname_en character varying(64) COLLATE pg_catalog."default", + poname_ml character varying(64) COLLATE pg_catalog."default", + pinno character varying(10) COLLATE pg_catalog."default", + countryid character varying(64) COLLATE pg_catalog."default", + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + same_as_permanent boolean, + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + ot_address1_en character varying(2500) COLLATE pg_catalog."default", + ot_address1_ml character varying(2500) COLLATE pg_catalog."default", + ot_address2_en character varying(2500) COLLATE pg_catalog."default", + ot_address2_ml character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_en character varying(2500) COLLATE pg_catalog."default", + ot_state_region_province_ml character varying(2500) COLLATE pg_catalog."default", + ot_zipcode character varying(10) COLLATE pg_catalog."default", + city_town_village character varying(1000) COLLATE pg_catalog."default", + present_tenentid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + aadharno character varying(200) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(1000) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no integer, + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_witness_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_witness_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_witness_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + aadharno character varying(200) COLLATE pg_catalog."default", + name_en character varying(200) COLLATE pg_catalog."default", + name_ml character varying(200) COLLATE pg_catalog."default", + age integer, + address_en character varying(1000) COLLATE pg_catalog."default", + address_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + is_esigned boolean, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + serial_no integer, + tenantid character varying(64) COLLATE pg_catalog."default" +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + aadharno character varying(200) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(200) COLLATE pg_catalog."default", + mother_aadharno character varying(200) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living integer, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default", + CONSTRAINT eg_register_marriage_bride_details_pkey PRIMARY KEY (id), + CONSTRAINT eg_register_marriage_bride_details_fkey FOREIGN KEY (marriageid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE NO ACTION + ON DELETE NO ACTION +); + +CREATE TABLE IF NOT EXISTS public.eg_register_marriage_bride_groom_details_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + residentship character varying(64) COLLATE pg_catalog."default", + aadharno character varying(200) COLLATE pg_catalog."default", + passportno character varying(1000) COLLATE pg_catalog."default", + socialsecurityno character varying(64) COLLATE pg_catalog."default", + firstname_en character varying(200) COLLATE pg_catalog."default", + middlename_en character varying(200) COLLATE pg_catalog."default", + lastname_en character varying(200) COLLATE pg_catalog."default", + firstname_ml character varying(200) COLLATE pg_catalog."default", + middlename_ml character varying(200) COLLATE pg_catalog."default", + lastname_ml character varying(200) COLLATE pg_catalog."default", + mobile bigint, + emailid character varying(300) COLLATE pg_catalog."default", + gender character varying(20) COLLATE pg_catalog."default", + dateofbirth bigint, + age integer, + parent_guardian character varying(64) COLLATE pg_catalog."default", + fathername_en character varying(200) COLLATE pg_catalog."default", + mothername_en character varying(200) COLLATE pg_catalog."default", + fathername_ml character varying(200) COLLATE pg_catalog."default", + mothername_ml character varying(200) COLLATE pg_catalog."default", + father_aadharno character varying(200) COLLATE pg_catalog."default", + mother_aadharno character varying(200) COLLATE pg_catalog."default", + guardianname_en character varying(200) COLLATE pg_catalog."default", + guardianname_ml character varying(200) COLLATE pg_catalog."default", + guardian_aadharno character varying(200) COLLATE pg_catalog."default", + maritalstatusid character varying(64) COLLATE pg_catalog."default", + is_spouse_living boolean, + no_of_spouse_living integer, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + bride_groom character varying(64) COLLATE pg_catalog."default" NOT NULL, + mig_chvackno character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + tenantid character varying(64) COLLATE pg_catalog."default" +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + registrationno character varying(64) COLLATE pg_catalog."default", + registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, + filestoreid character varying(256) COLLATE pg_catalog."default", + status character varying(25) COLLATE pg_catalog."default", + additionaldetail jsonb, + embeddedurl character varying(64) COLLATE pg_catalog."default", + dateofissue bigint, + tenantid character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + count integer, + CONSTRAINT eg_marriage_certificate_request_pkey PRIMARY KEY (id), + CONSTRAINT eg_marriage_certificate_request_fkey FOREIGN KEY (registrydetailsid) + REFERENCES public.eg_register_marriage_details (id) MATCH SIMPLE + ON UPDATE CASCADE + ON DELETE CASCADE +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_certificate_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + registrationno character varying(64) COLLATE pg_catalog."default", + registrydetailsid character varying(64) COLLATE pg_catalog."default" NOT NULL, + filestoreid character varying(256) COLLATE pg_catalog."default", + status character varying(25) COLLATE pg_catalog."default", + additionaldetail jsonb, + embeddedurl character varying(64) COLLATE pg_catalog."default", + dateofissue bigint, + tenantid character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedtime bigint, + createdby character varying(64) COLLATE pg_catalog."default", + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + count integer +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correction_field_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + condition_code character varying(1024) COLLATE pg_catalog."default", + specific_condition character varying(1024) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_pkey PRIMARY KEY (id) +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correction_field_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + condition_code character varying(1024) COLLATE pg_catalog."default", + specific_condition character varying(1024) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_audit_pkey PRIMARY KEY (id) +); +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_child +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correctionid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correction_field_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + table_name character varying(1024) COLLATE pg_catalog."default", + column_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + old_value character varying(2500) COLLATE pg_catalog."default" NOT NULL, + new_value character varying(2500) COLLATE pg_catalog."default" NOT NULL, + column_ character varying(1024) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_child_pkey PRIMARY KEY (id) +); + +CREATE TABLE IF NOT EXISTS public.eg_marriage_correction_child_audit +( + id character varying(64) COLLATE pg_catalog."default" NOT NULL, + marriageid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correctionid character varying(64) COLLATE pg_catalog."default" NOT NULL, + correction_field_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + table_name character varying(1024) COLLATE pg_catalog."default", + column_name character varying(1024) COLLATE pg_catalog."default" NOT NULL, + old_value character varying(2500) COLLATE pg_catalog."default" NOT NULL, + new_value character varying(2500) COLLATE pg_catalog."default" NOT NULL, + column_ character varying(1024) COLLATE pg_catalog."default", + createdby character varying(64) COLLATE pg_catalog."default", + createdtime bigint, + lastmodifiedby character varying(64) COLLATE pg_catalog."default", + lastmodifiedtime bigint, + CONSTRAINT eg_marriage_correction_child_audit_pkey PRIMARY KEY (id) +); \ No newline at end of file From 6ac67e9eaaaa13280de100879cfae4c835be23a1 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Thu, 25 May 2023 11:16:37 +0530 Subject: [PATCH 405/420] MarriageApplicationSearchQuery Createdby Added --- .../src/main/resources/marriage.yml | 6 ++++-- .../enrichment/MarriageDetailsEnrichment.java | 1 + .../MarriageApplicationRepository.java | 4 ++-- .../MarriageApplicationQueryBuilder.java | 16 ++++++++-------- .../rowmapper/MarriageApplicationRowMapper.java | 1 + .../web/model/MarriageApplicationDetails.java | 4 ++++ .../MarriageApplicationSearchCriteria.java | 3 +++ ...124__marriage_new_feildAdding_columns_dll.sql | 5 +++++ 8 files changed, 28 insertions(+), 12 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/resources/db/migration/main/V202305241124__marriage_new_feildAdding_columns_dll.sql diff --git a/core-services/egov-persister/src/main/resources/marriage.yml b/core-services/egov-persister/src/main/resources/marriage.yml index 8816ce81735..f28963e1011 100644 --- a/core-services/egov-persister/src/main/resources/marriage.yml +++ b/core-services/egov-persister/src/main/resources/marriage.yml @@ -10,8 +10,8 @@ serviceMaps: id, dateofmarriage, dateofreporting, districtid, lbtype, tenantid, placetype, placeid, placename_en, placename_ml, houseno_and_name_en, houseno_and_name_ml, street_name_en, street_name_ml, ward_code, talukid, village_name, marriage_type, oth_marriage_type, landmark, locality_en, locality_ml, applicationtype, businessservice, workflowcode, applicationnumber, registrationNo, registration_date, action, status, createdtime, createdby, - lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward,zonal_office) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,? ,?, ?, ?, ?,? ); + lastmodifiedtime, lastmodifiedby,module_code,brideurl, groomurl, imageuuid, bride_filestoreid, groom_filestoreid, bride_expired, groom_expired, is_backward,zonal_office,user_id) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,? ,?, ?, ?, ?,? ,?); basePath: MarriageDetails.* jsonMaps: - jsonPath: $.MarriageDetails.*.id @@ -102,6 +102,8 @@ serviceMaps: - jsonPath: $.MarriageDetails.*.zonalOffice + - jsonPath: $.MarriageDetails.*.userId + - query: INSERT INTO public.eg_marriage_bride_groom_details( id, residentship, aadharno, passportno, socialsecurityno, firstname_en, firstname_ml, middlename_en, middlename_ml, lastname_en, lastname_ml, mobile, emailid, gender, dateofbirth, age, parent_guardian, fathername_en, fathername_ml, mothername_en, mothername_ml, father_aadharno, diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 0d02d020868..29850ee1998 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -70,6 +70,7 @@ public void enrichCreate(MarriageDetailsRequest request) { request.getMarriageDetails().forEach(marriage -> { marriage.setId(UUID.randomUUID().toString()); marriage.setAuditDetails(auditDetails); + marriage.setUserId(String.valueOf(requestInfo.getUserInfo().getId())); if(marriage.getBrideDetails()!=null){ marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index fa4ee0e622e..96ba1c12353 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -67,7 +67,7 @@ public MarriageApplicationRepository(MarriageProducer producer, MarriageApplicat public List searchMarriageDetails(MarriageApplicationSearchCriteria criteria,RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE,requestInfo); if (preparedStmtValues.size() == 0) { throw new CustomException(ErrorCodes.NOT_FOUND.getCode(), "No result found."); } else { @@ -1255,7 +1255,7 @@ public List getDocumentSearchDetails(MarriageApplicationSearch public List getMarriageApplication(MarriageApplicationSearchCriteria criteria, RequestInfo requestInfo) { List preparedStmtValues = new ArrayList<>(); - String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE); + String query = marriageQueryBuilder.getMarriageApplicationSearchQuery(criteria, preparedStmtValues, Boolean.FALSE,requestInfo); List result = jdbcTemplate.query(query, preparedStmtValues.toArray(), marriageApplicationRowMapper); return result; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index 8d9a7982b44..fa22ff1807f 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -1,8 +1,8 @@ package org.ksmart.marriage.marriageapplication.repository.querybuilder; - - -//import org.ksmart.marriage.common.repository.builder.CommonQueryBuilder; +import org.egov.common.contract.request.RequestInfo; +import org.ksmart.marriage.common.model.AuditDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; @@ -10,9 +10,6 @@ import java.util.List; @Component public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { -// @Autowired -// CommonQueryBuilder commonQueryBuilder; - private static final String QUERY = new StringBuilder() .append("SELECT MD.id as MD_id , MD.dateofmarriage as MD_dateofmarriage ,MD.dateofreporting as MD_dateofreporting , MD.districtid as MD_districtid , ") .append("MD.lbtype as MD_lbtype , MD.tenantid as MD_tenantid , MD.placetype as MD_placetype , MD.placeid as MD_placeid ,") @@ -23,7 +20,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .append("MD.createdtime as MD_createdtime , MD.createdby as MD_createdby , MD.lastmodifiedtime as MD_lastmodifiedtime , MD.lastmodifiedby as MD_lastmodifiedby , MD.workflowcode as MD_workflowcode, ") .append("MD.applicationNumber as MD_applicationnumber ,MD.brideurl as MD_brideurl,MD.groomurl as MD_groomurl ,MD.imageuuid as MD_imageuuid ,MD.bride_filestoreid as MD_bride_filestoreid ,MD.groom_filestoreid as MD_groom_filestoreid ,") .append("MD.bride_expired as MD_bride_expired , MD.groom_expired as MD_groom_expired ,MD.is_backward as MD_is_backward,MD.module_code as MD_module_code, MD.zonal_office as MD_zonal_office,MD.action as MD_action, MD.status as MD_status,MD.villageid as MD_villageid, MD.taluk_name as MD_taluk_name,") - .append("MD.amount as MD_amount , MD.payment_transaction_id as MD_payment_transaction_id ,") + .append("MD.amount as MD_amount , MD.payment_transaction_id as MD_payment_transaction_id , MD.user_id as MD_user_id,") .append("GD.id as GD_id , GD.residentship as GD_residentship , GD.aadharno as GD_aadharno , GD.passportno as GD_passportno ,") .append("GD.socialsecurityno as GD_socialsecurityno , GD.firstname_en as GD_firstname_en , GD.middlename_en as GD_middlename_en , GD.lastname_en as GD_lastname_en ,") @@ -121,7 +118,7 @@ public class MarriageApplicationQueryBuilder extends BaseMarriageQueryBuilder { .toString(); public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteria criteria, - @NotNull List preparedStmtValues, Boolean isCount) { + @NotNull List preparedStmtValues, Boolean isCount,RequestInfo requestInfo) { StringBuilder query = new StringBuilder(QUERY); StringBuilder orderBy = new StringBuilder(); @@ -132,6 +129,9 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri addFilter("MD.registrationno", criteria.getRegistrationNo(), query, preparedStmtValues); addFilter("BD.aadharno", criteria.getBrideAdharNo(), query, preparedStmtValues); addFilterDate("MD.dateofmarriage", criteria.getMarriageDOM(), query, preparedStmtValues); + if(requestInfo.getUserInfo().getUuid() != null){ + addFilter("MD.createdby", criteria.getUuid(), query, preparedStmtValues); + } if (criteria.getBrideFirstnameEn() != null){ //addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); addLikeFilter("LOWER(BD.firstname_en)", criteria.getBrideFirstnameEn(), query, preparedStmtValues); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java index baf45d13519..48cebb3b761 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/rowmapper/MarriageApplicationRowMapper.java @@ -57,6 +57,7 @@ public List extractData(ResultSet rs) throws SQLExce .status(rs.getString("MD_status")) .villageId(rs.getString("MD_villageid")) .talukName(rs.getString("MD_taluk_name")) + .userId(rs.getString("MD_user_id")) // .status(rs.getString("MD_registration_status")) .brideDetails(getBrideDetails(rs)) .groomDetails(getGroomDetails(rs)) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index efe9e5065ac..bbdec206794 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -27,6 +27,10 @@ public class MarriageApplicationDetails { @JsonProperty("id") private String id; + @Size(max = 64) + @JsonProperty("userId") + private String userId; + @JsonProperty("marriageDOM") private Long dateofmarriage; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java index 7fc92875b70..6bbf4d80006 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/MarriageApplicationSearchCriteria.java @@ -38,6 +38,9 @@ public class MarriageApplicationSearchCriteria { @JsonProperty("businessService") private String businessService; + @JsonProperty("uuid") + private String uuid; + //Groom @JsonProperty("groomFirstnameEn") private String groomFirstnameEn; diff --git a/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305241124__marriage_new_feildAdding_columns_dll.sql b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305241124__marriage_new_feildAdding_columns_dll.sql new file mode 100644 index 00000000000..662f1299f36 --- /dev/null +++ b/municipal-services/marriage-services/src/main/resources/db/migration/main/V202305241124__marriage_new_feildAdding_columns_dll.sql @@ -0,0 +1,5 @@ +ALTER TABLE IF EXISTS public.eg_marriage_details + ADD COLUMN IF NOT EXISTS user_id character varying(64) COLLATE pg_catalog."default"; + +ALTER TABLE IF EXISTS public.eg_marriage_details_audit + ADD COLUMN IF NOT EXISTS user_id character varying(64) COLLATE pg_catalog."default"; \ No newline at end of file From a0313eb1aa2691f5331573587f5f3fe328c4b011 Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 30 May 2023 11:21:07 +0530 Subject: [PATCH 406/420] changes in marriage certificate address --- .../MarriageApplicationConfiguration.java | 9 +++ .../model/Notification/EventRequest.java | 74 ++++++++++++++++++ .../MarriageNotificationService.java | 28 +++---- .../MarriageRegistryRepository.java | 78 +++++++++++-------- .../marriage/utils/MarriageConstants.java | 1 + .../marriage/utils/NotificationUtil.java | 68 ++++++++-------- .../src/main/resources/application.properties | 5 +- 7 files changed, 181 insertions(+), 82 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/EventRequest.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java index c52678cf171..1c60f3fe8d3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/config/MarriageApplicationConfiguration.java @@ -98,6 +98,9 @@ public class MarriageApplicationConfiguration { @Value("${egov.pdf.marriagecert.createEndPoint}") private String egovPdfMarriageEndPoint; + @Value("${egov.pdf.marriagecerthindu.createEndPoint}") + private String egovPdfMarriageHinduEndPoint; + @Value("${egov.pdf.marriagecert.postendpoint}") private String saveMarriageCertEndpoint; @@ -162,5 +165,11 @@ public class MarriageApplicationConfiguration { @Value("${marriagecert.egov.mdms.url}") private String marriageCertMDMSURL; + @Value("${egov.user.host}") + private String userHost; + @Value("${egov.user.search.path}") + private String userSearchEndpoint; + + } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/EventRequest.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/EventRequest.java new file mode 100644 index 00000000000..2ac723834a2 --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/model/Notification/EventRequest.java @@ -0,0 +1,74 @@ +/* + * eGov suite of products aim to improve the internal efficiency,transparency, + * accountability and the service delivery of the government organizations. + * + * Copyright (C) 2016 eGovernments Foundation + * + * The updated version of eGov suite of products as by eGovernments Foundation + * is available at http://www.egovernments.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see http://www.gnu.org/licenses/ or + * http://www.gnu.org/licenses/gpl.html . + * + * In addition to the terms of the GPL license to be adhered to in using this + * program, the following additional terms are to be complied with: + * + * 1) All versions of this program, verbatim or modified must carry this + * Legal Notice. + * + * 2) Any misrepresentation of the origin of the material is prohibited. It + * is required that all modified versions of this material be marked in + * reasonable ways as different from the original version. + * + * 3) This license does not grant any rights to any user of the program + * with regards to rights under trademark law for use of the trade names + * or trademarks of eGovernments Foundation. + * + * In case of any queries, you can reach eGovernments Foundation at contact@egovernments.org. + */ + +package org.ksmart.marriage.marriagecommon.model.Notification; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.egov.common.contract.request.RequestInfo; +import org.springframework.validation.annotation.Validated; + +import javax.validation.Valid; +import javax.validation.constraints.NotNull; +import java.util.List; + +@Validated +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) +public class EventRequest { + + @NotNull + @JsonProperty("RequestInfo") + private RequestInfo requestInfo; + + @NotNull + @Valid + @JsonProperty("events") + private List events; + + +} \ No newline at end of file diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java index 9c1c72503c5..f03746fd101 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriagecommon/services/notification/MarriageNotificationService.java @@ -11,6 +11,7 @@ import org.ksmart.marriage.marriageapplication.config.MarriageApplicationConfiguration; import org.ksmart.marriage.marriageapplication.web.model.MarriageApplicationDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.ksmart.marriage.marriagecommon.model.Notification.*; import org.ksmart.marriage.marriagecommon.model.SMSRequest; import org.ksmart.marriage.utils.NotificationUtil; import org.springframework.beans.factory.annotation.Autowired; @@ -20,6 +21,7 @@ import org.springframework.web.client.RestTemplate; import java.util.*; +import java.util.stream.Collectors; @Slf4j @@ -255,7 +257,7 @@ private void enrichSMSRequest(RequestInfo requestInfo,List events = new ArrayList<>(); // String tenantId = request.getMarriageDetails().get(0).getTenantid(); // String localizationMessages = util.getLocalizationMessages(tenantId,request.getRequestInfo()); @@ -296,20 +298,20 @@ private void enrichSMSRequest(RequestInfo requestInfo,List toUsers = new ArrayList<>(); // toUsers.add(mapOfPhnoAndUUIDs.get(mobile)); // Recepient recepient = Recepient.builder().toUsers(toUsers).toRoles(null).build(); -// List payTriggerList = Arrays.asList(config.getPayTriggers().split("[,]")); +// //List payTriggerList = Arrays.asList(config.getPayTriggers().split("[,]")); // List viewTriggerList = Arrays.asList(config.getViewApplicationTriggers().split("[,]")); // Action action = null; -// if(payTriggerList.contains(marriageApplicationDetails.getStatus())) { -// List items = new ArrayList<>(); -// String actionLink = config.getPayLink().replace("$mobile", mobile) -// .replace("$applicationNo", marriageApplicationDetails.getApplicationNumber()) -// .replace("$tenantId", marriageApplicationDetails.getTenantid()) -// .replace("$businessService", marriageApplicationDetails.getBusinessservice()); -// actionLink = config.getUiAppHost() + actionLink; -// ActionItem item = ActionItem.builder().actionUrl(actionLink).code(config.getPayCode()).build(); -// items.add(item); -// action = Action.builder().actionUrls(items).build(); -// } +//// if(payTriggerList.contains(marriageApplicationDetails.getStatus())) { +//// List items = new ArrayList<>(); +//// String actionLink = config.getPayLink().replace("$mobile", mobile) +//// .replace("$applicationNo", marriageApplicationDetails.getApplicationNumber()) +//// .replace("$tenantId", marriageApplicationDetails.getTenantid()) +//// .replace("$businessService", marriageApplicationDetails.getBusinessservice()); +//// actionLink = config.getUiAppHost() + actionLink; +//// ActionItem item = ActionItem.builder().actionUrl(actionLink).code(config.getPayCode()).build(); +//// items.add(item); +//// action = Action.builder().actionUrls(items).build(); +//// } // if(viewTriggerList.contains(marriageApplicationDetails.getStatus())){ // List items = new ArrayList<>(); // String actionLink = config.getViewApplicationLink().replace("$mobile", mobile) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 57295aa2bae..9c6cb2abdd3 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -208,20 +208,20 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if(null!=req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype()) { //Setting Marriage Place Address------------------------------------------------------------------------------------------ StringBuilder marriageAddr = new StringBuilder(); - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype())) { + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype())) { if (req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacetype() .equals(MarriageConstants.PLACE_TYPE_HOUSE)) { - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn() + ","); + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriageHouseNoAndNameEn() + ", "); } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en() + ","); + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en() + ", "); } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en() + ","); + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en() + ", "); } - if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark() + ","); + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark() + ", "); } Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); @@ -264,22 +264,22 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria MarriageConstants.PLACE_OTHER))) { if (!StringUtils.isEmpty( req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn() + ","); + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getPlacenameEn() + ", "); } if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en() + ","); + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLocality_en() + ", "); } if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en() + ","); + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getStreet_name_en() + ", "); } if (!StringUtils.isEmpty(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark())) { - marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark() + ","); + marriageAddr.append(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getLandmark() + ", "); } Map> mdmsCountryMap = util.mDMSCallGetCountry(req.getRequestInfo(), MarriageConstants.COUNTRY_CODE); util.appendIfNotBlank(getValueFromMap(MarriageConstants.COUNTRY, mdmsCountryMap), marriageAddr, false); } - req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(StringUtils.isNotBlank(marriageAddr.toString())?marriageAddr.toString():MarriageConstants.NOT_RECORDED); + req.getMarriageCertificate().get(0).setMarriagePlaceFullAddr(StringUtils.isNotBlank(marriageAddr.toString())?StringUtils.upperCase(marriageAddr.toString()):MarriageConstants.NOT_RECORDED); } }else{ log.info("PDF_ERROR. Marriage Certificate , Marriage Place Type is Empty.. Cannot Generate Certificate!!!"); @@ -288,46 +288,56 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria String groomAddr = marriageRegistryEnrichment.setGroomPermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); if (StringUtils.isNotBlank(groomAddr)){ - req.getMarriageCertificate().get(0).setGroomPermntFullAddr(groomAddr); + req.getMarriageCertificate().get(0).setGroomPermntFullAddr(StringUtils.upperCase(groomAddr)); }else{ req.getMarriageCertificate().get(0).setGroomPermntFullAddr(MarriageConstants.NOT_RECORDED); } String brideAddr = marriageRegistryEnrichment.setBridePermanentAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); if (StringUtils.isNotBlank(brideAddr)) { - req.getMarriageCertificate().get(0).setBridePermntFullAddr(brideAddr); + req.getMarriageCertificate().get(0).setBridePermntFullAddr(StringUtils.upperCase(brideAddr)); }else{ req.getMarriageCertificate().get(0).setBridePermntFullAddr(MarriageConstants.NOT_RECORDED); } //Setting groom NRI address - if (StringUtils.isNotBlank(marriageRegistryEnrichment.setGroomNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))){ - req.getMarriageCertificate().get(0).setGroomNRIAddress(marriageRegistryEnrichment.setGroomNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + String groomNRIAddr = marriageRegistryEnrichment.setGroomNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); + if (StringUtils.isNotBlank(groomNRIAddr)){ + req.getMarriageCertificate().get(0).setGroomNRIAddress(StringUtils.upperCase(groomNRIAddr)); }else{ req.getMarriageCertificate().get(0).setGroomNRIAddress(MarriageConstants.NOT_RECORDED); } //Setting bride NRI address - if (StringUtils.isNotBlank(marriageRegistryEnrichment.setBrideNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()))){ - req.getMarriageCertificate().get(0).setBrideNRIAddress(marriageRegistryEnrichment.setBrideNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails())); + String brideNRIAddr =marriageRegistryEnrichment.setBrideNRIAddressForCertificate(req.getRequestInfo(), req.getMarriageCertificate().get(0).getMarriageRegistryDetails()); + if (StringUtils.isNotBlank(brideNRIAddr)){ + req.getMarriageCertificate().get(0).setBrideNRIAddress(StringUtils.upperCase(brideNRIAddr)); }else{ req.getMarriageCertificate().get(0).setBrideNRIAddress(MarriageConstants.NOT_RECORDED); } - - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { - if(!isImageExists(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { + Boolean isHinduMarriage; +// if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriage_type())&&req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getMarriage_type().equals(MarriageConstants.MARRIAGE_TYPE_HINDU)){ +// isHinduMarriage = true; +// } else { + isHinduMarriage = false; //TODO add field for hindumarriage then change the commented code +// } + if(!isHinduMarriage) { + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { + if (!isImageExists(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl( req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); // }else{ - log.error("PDF_ERROR. Marriage Certificate , Invalid Groom Photo Path!!!"); - throw new CustomException("PDF_ERROR", "Invalid Groom Photo Path!!!" ); - } - } - if(StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { - if(!isImageExists(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { + log.error("PDF_ERROR. Marriage Certificate , Invalid Groom Photo Path!!!"); + throw new CustomException("PDF_ERROR", "Invalid Groom Photo Path!!!"); + } + } + + if (StringUtils.isNotBlank(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { + if (!isImageExists(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl())) { // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setBrideUrl(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getBrideUrl()); // }else{ - log.error("PDF_ERROR. Marriage Certificate , Invalid Bride Photo Path!!!"); - throw new CustomException("PDF_ERROR", "Invalid Bride Photo Path!!!" ); - } - } + log.error("PDF_ERROR. Marriage Certificate , Invalid Bride Photo Path!!!"); + throw new CustomException("PDF_ERROR", "Invalid Bride Photo Path!!!"); + } + } + } setDefaultValuesIfNull(req.getMarriageCertificate().get(0)); marriageCertPDFRequest.getMarriageCertificate().forEach(cert->{ @@ -340,7 +350,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria marriageCertPDFRequest.getMarriageCertificate().forEach(cert -> { String uiHost = marriageApplicationConfiguration.getEgovPdfHost(); String tenantId = cert.getMarriageRegistryDetails().getTenantid().split("\\.")[0]; - String marriageCertPath = StringUtils.replace(marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(), "$tenantId", tenantId); + String marriageCertPath = StringUtils.replace(isHinduMarriage?marriageApplicationConfiguration.getEgovPdfMarriageHinduEndPoint():marriageApplicationConfiguration.getEgovPdfMarriageEndPoint(), "$tenantId", tenantId); String pdfFinalPath = uiHost + marriageCertPath; try { req.getMarriageCertificate().get(0).setMdmsBasePath(marriageApplicationConfiguration.getMarriageCertMDMSURL()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 0394237365a..818f2df0991 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -249,6 +249,7 @@ public class MarriageConstants { NOTIFICATION_APPROVED, NOTIFICATION_REJECTED)); public static final String NOTIF_OWNER_NAME_KEY = "{OWNER_NAME}"; + public static final String MARRIAGE_TYPE_HINDU = "MARRIAGE_TYPE_HINDU"; } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java index a8620bc0233..6f29293dff2 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/NotificationUtil.java @@ -584,39 +584,39 @@ public List createSMSRequest(String message, Map mob // } // // -// /** -// * Fetches UUIDs of CITIZENs based on the phone number. -// * -// * @param mobileNumbers -// * @param requestInfo -// * @param tenantId -// * @return -// */ -// public Map fetchUserUUIDs(Set mobileNumbers, RequestInfo requestInfo, String tenantId) { -// Map mapOfPhnoAndUUIDs = new HashMap<>(); -// StringBuilder uri = new StringBuilder(); -// uri.append(config.getUserHost()).append(config.getUserSearchEndpoint()); -// Map userSearchRequest = new HashMap<>(); -// userSearchRequest.put("RequestInfo", requestInfo); -// userSearchRequest.put("tenantId", tenantId); -// userSearchRequest.put("userType", "CITIZEN"); -// for(String mobileNo: mobileNumbers) { -// userSearchRequest.put("userName", mobileNo); -// try { -// Object user = serviceRequestRepository.fetchResult(uri, userSearchRequest); -// if(null != user) { -// String uuid = JsonPath.read(user, "$.user[0].uuid"); -// mapOfPhnoAndUUIDs.put(mobileNo, uuid); -// }else { -// log.error("Service returned null while fetching user for username - "+mobileNo); -// } -// }catch(Exception e) { -// log.error("Exception while fetching user for username - "+mobileNo); -// log.error("Exception trace: ",e); -// continue; -// } -// } -// return mapOfPhnoAndUUIDs; -// } + /** + * Fetches UUIDs of CITIZENs based on the phone number. + * + * @param mobileNumbers + * @param requestInfo + * @param tenantId + * @return + */ + public Map fetchUserUUIDs(Set mobileNumbers, RequestInfo requestInfo, String tenantId) { + Map mapOfPhnoAndUUIDs = new HashMap<>(); + StringBuilder uri = new StringBuilder(); + uri.append(config.getUserHost()).append(config.getUserSearchEndpoint()); + Map userSearchRequest = new HashMap<>(); + userSearchRequest.put("RequestInfo", requestInfo); + userSearchRequest.put("tenantId", tenantId); + userSearchRequest.put("userType", "CITIZEN"); + for(String mobileNo: mobileNumbers) { + userSearchRequest.put("userName", mobileNo); + try { + Object user = serviceRequestRepository.fetchResult(uri, userSearchRequest); + if(null != user) { + String uuid = JsonPath.read(user, "$.user[0].uuid"); + mapOfPhnoAndUUIDs.put(mobileNo, uuid); + }else { + log.error("Service returned null while fetching user for username - "+mobileNo); + } + }catch(Exception e) { + log.error("Exception while fetching user for username - "+mobileNo); + log.error("Exception trace: ",e); + continue; + } + } + return mapOfPhnoAndUUIDs; + } } diff --git a/municipal-services/marriage-services/src/main/resources/application.properties b/municipal-services/marriage-services/src/main/resources/application.properties index 3c375249712..9424db365e4 100644 --- a/municipal-services/marriage-services/src/main/resources/application.properties +++ b/municipal-services/marriage-services/src/main/resources/application.properties @@ -108,6 +108,7 @@ egov.pdf.deathcert.postendpoint=/egov-pdf/download/BIRTHDEATH/death-certificate? # egov.pdfservice.host=http://localhost:8080 egov.pdfservice.host= https://ksmart-dev.lsgkerala.gov.in egov.pdf.marriagecert.createEndPoint=/pdf-service/v1/_create?key=marriage-certificate&tenantId=$tenantId +egov.pdf.marriagecerthindu.createEndPoint=/pdf-service/v1/_create?key=hindumarriage-certificate&tenantId=$tenantId egov.pdf.birthcert.createEndPoint=/pdf-service/v1/_create?key=birth-certificate&tenantId=$tenantId egov.pdf.deathcert.createEndPoint=/pdf-service/v1/_create?key=death-certificate&tenantId=$tenantId #imagePath @@ -183,4 +184,6 @@ notification.sms.enabled.forMR=true egov.user.event.notification.enabledForMR=true kafka.topics.notification.sms=egov.core.notification.sms - +#User config +egov.user.host=http://localhost:8081/ +egov.user.search.path=/user/_search From 52ed107bd44c5ae151ce68e2d654f57aa63ae23c Mon Sep 17 00:00:00 2001 From: binilp Date: Tue, 30 May 2023 11:35:21 +0530 Subject: [PATCH 407/420] changes in address --- .../main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 664a6a4f264..c245f8f81af 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -714,7 +714,7 @@ public StringBuilder appendIfNotBlank(String v,StringBuilder s,boolean addSemico if(StringUtils.isNotBlank(v)){ s.append(v); if(addSemicolon){ - s.append(","); + s.append(", "); } } return s; From d8aa6fb32485a47ed96790d0accc6c97f04ccd3c Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 30 May 2023 11:17:50 +0530 Subject: [PATCH 408/420] certificate--->p --- .../enrichment/MarriageDetailsEnrichment.java | 1 + .../enrichment/MarriageRegistryEnrichment.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 29850ee1998..4551210a719 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -71,6 +71,7 @@ public void enrichCreate(MarriageDetailsRequest request) { marriage.setId(UUID.randomUUID().toString()); marriage.setAuditDetails(auditDetails); marriage.setUserId(String.valueOf(requestInfo.getUserInfo().getId())); +// marriage.setStatus("PENDINGPAYMENT"); if(marriage.getBrideDetails()!=null){ marriage.getBrideDetails().setBrideId((UUID.randomUUID().toString())); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index d156eac6df8..5de5b49ab13 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -928,7 +928,8 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent(), groomAddressBuilder, true); + + appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent().concat(".PO"), groomAddressBuilder, true); if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict())){ appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); } From 870527cca7c6afa7c6971f3e7972bd69934ce566 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Tue, 30 May 2023 12:42:30 +0530 Subject: [PATCH 409/420] certificate--->PO added --- .../enrichment/MarriageRegistryEnrichment.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java index 5de5b49ab13..459e99d6969 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/enrichment/MarriageRegistryEnrichment.java @@ -928,8 +928,9 @@ public String setGroomPermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getGroomAddressDetails().getLocalityEnPermanent(), groomAddressBuilder, true); - - appendIfNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent().concat(".PO"), groomAddressBuilder, true); + if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPoNoPermanent())){ + appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE.concat(" P O"), mdmsGroomAddressMap), groomAddressBuilder, true); + } if(StringUtils.isNotBlank(registryDetails.getGroomAddressDetails().getPermntInKeralaAdrDistrict())){ appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsGroomAddressMap), groomAddressBuilder, true); } @@ -1156,7 +1157,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap)); registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); - registryDetails.getBrideAddressDetails().setPoNoPermanent(null); + registryDetails.getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsBrideAddressMap)); // registryDetails.getBrideAddressDetails().setVillageNamePermanent(getValueFromMap(MarriageConstants.VILLAGE,mdmsGroomAddressMap)); // registryDetails.getBrideAddressDetails().setPermntInKeralaAdrTaluk(getValueFromMap(MarriageConstants.TALUK,mdmsGroomAddressMap)); registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrHouseNameEn()); @@ -1172,6 +1173,10 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg appendIfNotBlank(registryDetails.getBrideAddressDetails().getLocalityEnPermanent(), brideAddressBuilder, true); + if(StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPoNoPermanent())){ + appendIfNotBlank(getValueFromMap(MarriageConstants.POSTOFFICE.concat(" P O"), mdmsBrideAddressMap), brideAddressBuilder, true); + } + if (StringUtils.isNotBlank(registryDetails.getBrideAddressDetails().getPermntInKeralaAdrDistrict())) { appendIfNotBlank(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap), brideAddressBuilder, true); } else { @@ -1206,7 +1211,7 @@ public String setBridePermanentAddressForCertificate(RequestInfo req,MarriageReg registryDetails.getBrideAddressDetails().setDistrictIdPermanent(getValueFromMap(MarriageConstants.DISTRICT, mdmsBrideAddressMap)); registryDetails.getBrideAddressDetails().setStateIdPermanent(getValueFromMap(MarriageConstants.STATE, mdmsBrideAddressMap)); registryDetails.getBrideAddressDetails().setCountryIdPermanent(getValueFromMap(MarriageConstants.COUNTRY, mdmsBrideAddressMap)); - registryDetails.getBrideAddressDetails().setPoNoPermanent(getValueFromMap(MarriageConstants.POSTOFFICE, mdmsBrideAddressMap)); + registryDetails.getBrideAddressDetails().setPoNoPermanent(null); registryDetails.getBrideAddressDetails().setHouseNameNoEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaHouseNameEn()); registryDetails.getBrideAddressDetails().setStreetNameEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaStreetNameEn()); registryDetails.getBrideAddressDetails().setLocalityEnPermanent(registryDetails.getBrideAddressDetails().getPermntOutsideKeralaLocalityNameEn()); From dcbd5ee7dfc567724944c3aa42c0eb3780ae3a36 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 31 May 2023 13:06:23 +0530 Subject: [PATCH 410/420] addFilter -- lastModified Added --- .../querybuilder/MarriageApplicationQueryBuilder.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java index fa22ff1807f..88ab5c7c093 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/querybuilder/MarriageApplicationQueryBuilder.java @@ -132,6 +132,9 @@ public String getMarriageApplicationSearchQuery(MarriageApplicationSearchCriteri if(requestInfo.getUserInfo().getUuid() != null){ addFilter("MD.createdby", criteria.getUuid(), query, preparedStmtValues); } + if(requestInfo.getUserInfo().getUuid() != null){ + addFilter("MD.lastmodifiedby", criteria.getUuid(), query, preparedStmtValues); + } if (criteria.getBrideFirstnameEn() != null){ //addFilterString("BD.firstname_en", criteria.getBrideFirstnameEn(), query, preparedStmtValues); addLikeFilter("LOWER(BD.firstname_en)", criteria.getBrideFirstnameEn(), query, preparedStmtValues); From 5d1c089a065f3dc4341e371c9c6e444b938d0c1c Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 31 May 2023 15:40:26 +0530 Subject: [PATCH 411/420] Missing Code Added in MarriageRegistry --- .../marriageregistry/service/MarriageRegistryService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index c06581cb165..93ad0db16c0 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -107,7 +107,11 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req marriageCertificate.setYear(datestr); MarriageCertPDFRequest marriageCertPDFRequest = MarriageCertPDFRequest.builder().requestInfo(requestInfo).marriageCertificate(Arrays.asList(marriageCertificate)).build(); long currentDate=System.currentTimeMillis(); - marriageCertificate.setDateofissue(currentDate); + long dateOfIssue = 0l; + if(null!=marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails()&&null!=marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getAuditDetails()){ + dateOfIssue=marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getAuditDetails().getLastModifiedTime()!=null?marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getAuditDetails().getLastModifiedTime() : marriageCertPDFRequest.getMarriageCertificate().get(0).getMarriageRegistryDetails().getAuditDetails().getCreatedTime(); + } + marriageCertificate.setDateofissue(dateOfIssue!=0l?dateOfIssue:currentDate); String strDate=null; String dodInWords = null; if(marriageCertificate.getDateofissue() != null){ From 2db885a1d78eda1b6250838870f8fee263bffed4 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 5 Jun 2023 10:37:49 +0530 Subject: [PATCH 412/420] searchcriteria name change --- .../MarriageApplicationRepository.java | 356 +----------------- .../model/MarriageRegistrySearchCriteria.java | 2 +- .../marriage/utils/MarriageMdmsUtil.java | 5 +- 3 files changed, 4 insertions(+), 359 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java index fa4ee0e622e..c64a76f84b4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/repository/MarriageApplicationRepository.java @@ -844,361 +844,7 @@ public List searchMarriageDetails(MarriageApplicatio } } -/*******END************** */ - - // //Groom Present Address TenantId name - // if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { - // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); - - // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); - // } - // //Groom Permanent Address TenantId name - // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { - // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); - - // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); - // } - -//GROOM ADDRESS DETAILS - // if (marriage.getGroomAddressDetails().getCountryIdPresent()!=null && marriage.getGroomAddressDetails().getStateIdPresent()!=null){ - // //GROOM-INSIDE INDIA - // System.out.println("InsideCountry and state!=null"); - // if (marriage.getGroomAddressDetails().getCountryIdPresent().equals(MarriageConstants.COUNTRY_CODE)){ - // System.out.println("InsideCountry!=null"+marriage.getGroomAddressDetails().getCountryIdPresent()); - // //GROOM-INSIDE KERALA-PRESENT - // if (marriage.getGroomAddressDetails().getStateIdPresent().equals(MarriageConstants.STATE_CODE_SMALL)){ - // System.out.println("Insidestate!=null"+marriage.getGroomAddressDetails().getStateIdPresent()); - // //GROOM-PRESENT-INSIDE INDIA-INSIDE KERALA - // marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); - - // if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { - // String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); - // marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - - // String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); - // marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); - // } - // //GROOM-PRESENT-STATE - // marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); - // if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { - // String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); - // marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); - - // String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); - // marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); - // } - // //GROOM-PRESENT-DISTRICT - // marriage.getGroomAddressDetails().setPresentInsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPresent()); - // if (marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict() != null) { - // String presentInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictEn(presentInKeralaDistNameEn); - - // String presentInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaDistrict()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaDistrictMl(presentInKeralaDistNameMl); - // } - // // GROOM-PRESENT-TALUK - - // if (marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk() != null) { - // String presentInsideKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaTalukEn(presentInsideKeralaTalukEn); - - // String presentInsideKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaTaluk()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaTalukMl(presentInsideKeralaTalukMl); - // } - // //GROOM-PRESENT-VILLAGE - // if (marriage.getGroomAddressDetails().getPresentInsideKeralaVillage() != null) { - // String presntInsKeralaVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaVillageEn(presntInsKeralaVillageEn); - - // String presntInsKeralaVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaVillage()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaVillageMl(presntInsKeralaVillageMl); - // } - // //GROOM-PRESENT -WARD - // if (marriage.getGroomAddressDetails().getPresentWardNo() != null) { - // String presentWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); - // marriage.getGroomAddressDetails().setPresentWardNoEn(presentWardNoEn); - - // String presentWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPresentWardNo()); - // marriage.getGroomAddressDetails().setPresentWardNoMl(presentWardNoMl); - // } - // //GROOM-PRESENT-POST OFFICE - // if (marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice() != null) { - // String presentInsideKeralaPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeEn(presentInsideKeralaPostOfficeEn); - - // String presentInsideKeralaPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaPostOffice()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaPostOfficeMl(presentInsideKeralaPostOfficeMl); - // } - // //GROOM- Present Address TenantId name - // if (marriage.getGroomAddressDetails().getPresentInsideKeralaLBName() != null) { - // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameEn(tenantIdEn); - - // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPresentInsideKeralaLBName()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaLBNameMl(tenantIdMl); - // } - - // marriage.getGroomAddressDetails().setPresentInsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPresent()); - - // marriage.getGroomAddressDetails().setPresentInsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPresent()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPresent()); - - // marriage.getGroomAddressDetails().setPresentInsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); - // marriage.getGroomAddressDetails().setPresentInsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); - - // marriage.getGroomAddressDetails().setPresentInsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); - - - // } - // //GROOM-OUTSIDE KERALA-PRESENT - // else{ - // //GROOM-PRESENT-COUNTRY - // marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); - // if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { - // String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); - // marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - - // String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); - // marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); - // } - // //GROOM-PRESENT-STATE - // marriage.getGroomAddressDetails().setPresentaddressStateName(marriage.getGroomAddressDetails().getStateIdPresent()); - // if (marriage.getGroomAddressDetails().getPresentaddressStateName() != null) { - // String presentaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); - // marriage.getGroomAddressDetails().setPresentaddressStateNameEn(presentaddressStateNameEn); - - // String presentaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressStateName()); - // marriage.getGroomAddressDetails().setPresentaddressStateNameMl(presentaddressStateNameMl); - // } - - // //GROOM-PRESENT-OUTSIDE KERALA-DISTRICT - // marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrict(marriage.getGroomAddressDetails().getDistrictIdPresent()); - // if (marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict() != null) { - // String presentOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); - // marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictEn(presentOutKeralaDistNameEn); - - // String presentOutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentOutsideKeralaDistrict()); - // marriage.getGroomAddressDetails().setPresentOutsideKeralaDistrictMl(presentOutKeralaDistNameMl); - // } - // marriage.getGroomAddressDetails().setPresentOutsideKeralaVillageorTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); - - // marriage.getGroomAddressDetails().setPresentOutsideKeralaCityVilgeNameEn(marriage.getGroomAddressDetails().getVillageNamePresent()); - // marriage.getGroomAddressDetails().setPresentOutsideKeralaTalukName(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - - // marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPresent()); - // marriage.getGroomAddressDetails().setPresentOutsideKeralaLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPresent()); - - // marriage.getGroomAddressDetails().setPresentOutsideKeralaStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPresent()); - // marriage.getGroomAddressDetails().setPresentOutsideKeralaStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPresent()); - - // marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPresent()); - // marriage.getGroomAddressDetails().setPresentOutsideKeralaHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPresent()); - - // marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeEn()); - // marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPermntOutsideKeralaPostOfficeMl()); - // marriage.getGroomAddressDetails().setPresentOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPresent()); - - // } - // } - // //GROOM-OUTSIDE INDIA - // else{ - // //GROOM-PRESENT-OUTSIDE COUNTRY - // marriage.getGroomAddressDetails().setPresentaddressCountry(marriage.getGroomAddressDetails().getCountryIdPresent()); - // if (marriage.getGroomAddressDetails().getPresentaddressCountry() != null) { - // String presentaddressCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); - // marriage.getGroomAddressDetails().setPresentaddressCountryNameEn(presentaddressCountryNameEn); - - // String presentaddressCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPresentaddressCountry()); - // marriage.getGroomAddressDetails().setPresentaddressCountryNameMl(presentaddressCountryNameMl); - // } - // marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePresent()); - // marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePresent()); - - // marriage.getGroomAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePresent()); - - // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEn()); - // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMl()); - - // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressEnB()); - // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPresentOthrIndiaAdressMlB()); - - // marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceEn()); - // marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPresentOthrIndiaProvinceMl()); - // } - // } - // // GROOM-PERMANENT ADDRESS DETAILS - // if (marriage.getGroomAddressDetails().getCountryIdPermanent()!=null && marriage.getGroomAddressDetails().getStateIdPermanent()!=null){ - // //GROOM-INSIDE INDIA - // if (marriage.getGroomAddressDetails().getCountryIdPermanent().equals(MarriageConstants.COUNTRY_CODE)){ - // //GROOM-INSIDE KERALA-PERMANENT - // if (marriage.getGroomAddressDetails().getStateIdPermanent().equals(MarriageConstants.STATE_CODE_SMALL)){ - // //GROOM-PERMANENT-COUNTRY - // marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); - // if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { - // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - // } - // //GROOM-PERMANENT-STATE - // marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); - // if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { - // String permtaddressStateNameEn = util.getStateNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - // marriage.getGroomAddressDetails().setPermtaddressStateNameEn(permtaddressStateNameEn); - - // String permtaddressStateNameMl = util.getStateNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - // marriage.getGroomAddressDetails().setPermtaddressStateNameMl(permtaddressStateNameMl); - // } - // //GROOM-PERMANENT-DISTRICT - // marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); - // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict() != null) { - // String prmtInKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictEn(prmtInKeralaDistNameEn); - - // String prmtInKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrDistrict()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrictMl(prmtInKeralaDistNameMl); - // } - // //GROOM-PERMANENT-TALUK - // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk() != null) { - // String prmtInKeralaTalukEn = util.getTalukNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukEn(prmtInKeralaTalukEn); - - // String prmtInKeralaTalukMl = util.getTalukNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrTaluk()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrTalukMl(prmtInKeralaTalukMl); - // } - // //GROOM-PERMANENT-VILLAGE - // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage() != null) { - // String permntInKeralaAdrVillageEn = util.getVillageNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageEn(permntInKeralaAdrVillageEn); - - // String permntInKeralaAdrVillageMl = util.getVillageNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrVillage()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrVillageMl(permntInKeralaAdrVillageMl); - // } - // //GROOM-PERMANENT-POSTOFFICE - // marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOffice(marriage.getGroomAddressDetails().getPoNoPermanent()); - // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice() != null) { - // String permntInKeralaAdrPostOfficeEn = util.getPONameEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeEn(permntInKeralaAdrPostOfficeEn); - - // String permntInKeralaAdrPostOfficeMl = util.getPONameMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrPostOffice()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrPostOfficeMl(permntInKeralaAdrPostOfficeMl); - // } - // //GROOM-PERMANENT-WARD - // if (marriage.getGroomAddressDetails().getPermntInKeralaWardNo() != null) { - // String prmttWardNoEn = util.getWardNameEn(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); - // marriage.getGroomAddressDetails().setPrmttWardNoEn(prmttWardNoEn); - - // String prmttWardNoMl = util.getWardNameMl(mdmsDataLocation, marriage.getGroomAddressDetails().getPermntInKeralaWardNo()); - // marriage.getGroomAddressDetails().setPrmttWardNoMl(prmttWardNoMl); - // } - - // //GROOM- Permanent Address TenantId name - // if (marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName() != null) { - // String tenantIdEn = util.getMarriageTenantEn(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameEn(tenantIdEn); - - // String tenantIdMl = util.getMarriageTenantMl(mdmsData, marriage.getGroomAddressDetails().getPermntInKeralaAdrLBName()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLBNameMl(tenantIdMl); - // } - - - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); - - // marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); - - // marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); - - // marriage.getGroomAddressDetails().setPermntInKeralaAdrPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); - - // } - // //GROOM-PERMANENT-INSIDE INDIA-OUTSIDE KERALA - // else{ - // //GROOM-PERMANENT-COUNTRY - // marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); - // if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { - // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - - // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - // } - // //GROOM-PERMANENT-STATE - // marriage.getGroomAddressDetails().setPermtaddressStateName(marriage.getGroomAddressDetails().getStateIdPermanent()); - // if (marriage.getGroomAddressDetails().getPermtaddressStateName() != null) { - // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressStateName()); - // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - // } - // //GROOM-PERMANENT-DISTRICT - // marriage.getGroomAddressDetails().setPermntInKeralaAdrDistrict(marriage.getGroomAddressDetails().getDistrictIdPermanent()); - // if (marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict() != null) { - // String prmtOutKeralaDistNameEn = util.getDistrictNameEn(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - // marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictEn(prmtOutKeralaDistNameEn); - - // String prmtoutKeralaDistNameMl = util.getDistrictNameMl(mdmsData, marriage.getGroomAddressDetails().getPermntOutsideKeralaDistrict()); - // marriage.getGroomAddressDetails().setPermntOutsideKeralaDistrictMl(prmtoutKeralaDistNameMl); - // } - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameEn(marriage.getGroomAddressDetails().getLocalityEnPermanent()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrLocalityNameMl(marriage.getGroomAddressDetails().getLocalityMlPermanent()); - - // marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameEn(marriage.getGroomAddressDetails().getStreetNameEnPermanent()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrStreetNameMl(marriage.getGroomAddressDetails().getStreetNameMlPermanent()); - - // marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameEn(marriage.getGroomAddressDetails().getHouseNameNoEnPermanent()); - // marriage.getGroomAddressDetails().setPermntInKeralaAdrHouseNameMl(marriage.getGroomAddressDetails().getHouseNameNoMlPermanent()); - - // marriage.getGroomAddressDetails().setPermntOutsideKeralaVillageorTwon(marriage.getGroomAddressDetails().getVillageNamePermanent()); - // marriage.getGroomAddressDetails().setPermntOutsideKeralaTaluk(marriage.getGroomAddressDetails().getPresentOutsideKeralaTalukName()); - - // // marriage.getGroomAddressDetails().setPermntOutsideKeralaCityVilgeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); - // marriage.getGroomAddressDetails().setPermntOutsideKeralaPincode(marriage.getGroomAddressDetails().getPinNoPermanent()); - - // marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeEn(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); - // marriage.getGroomAddressDetails().setPermntOutsideKeralaPostOfficeMl(marriage.getGroomAddressDetails().getPinNoPermanent()); - - // } - // } - // //GROOM-PERMANENT-OUTSIDE INDIA - // else{ - - // marriage.getGroomAddressDetails().setPermtaddressCountry(marriage.getGroomAddressDetails().getCountryIdPermanent()); - // if (marriage.getGroomAddressDetails().getPermtaddressCountry() != null) { - // String permanentAddrCountryNameEn = util.getCountryNameEn(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - // marriage.getGroomAddressDetails().setPermanentAddrCountryNameEn(permanentAddrCountryNameEn); - - - - // String permanentAddrCountryNameMl = util.getCountryNameMl(mdmsData, marriage.getGroomAddressDetails().getPermtaddressCountry()); - // marriage.getGroomAddressDetails().setPermanentAddrCountryNameMl(permanentAddrCountryNameMl); - // } - // marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsVillage(marriage.getGroomAddressDetails().getVillageNamePermanent()); - // marriage.getGroomAddressDetails().setPresentOutSideIndiaadrsCityTown(marriage.getGroomAddressDetails().getTownOrVillagePermanent()); - - // marriage.getGroomAddressDetails().setPresentOutSideIndiaPostCode(marriage.getGroomAddressDetails().getOutSideIndiaPostCodePermanent()); - - // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEn(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneEn()); - // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMl(marriage.getGroomAddressDetails().getPermntOthrIndiaLineoneMl()); - - // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressEnB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoEn()); - // marriage.getGroomAddressDetails().setPresentOutSideIndiaAdressMlB(marriage.getGroomAddressDetails().getPermntOthrIndiaLinetwoMl()); - - // marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceEn(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceEn()); - // marriage.getGroomAddressDetails().setPresentOutSideIndiaProvinceMl(marriage.getGroomAddressDetails().getPermntOthrIndiaprovinceMl()); - - // } - // } +/*******END************** */ GroomDetails groomDetails = marriage.getGroomDetails(); GroomDetails groomDetailsDec = encryptionDecryptionUtil.decryptObject(groomDetails, "BndDetail", GroomDetails.class, requestInfo); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java index efe42401a9d..179cef8c174 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/web/model/MarriageRegistrySearchCriteria.java @@ -21,7 +21,7 @@ public class MarriageRegistrySearchCriteria { @JsonProperty("id") private String id; - @JsonProperty("applicationNumber") + @JsonProperty("applicationNo") private String applicationNumber; @JsonProperty("registrationNo") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java index 664a6a4f264..708bfd55837 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageMdmsUtil.java @@ -150,12 +150,11 @@ private ModuleDetail getCommonMastersRequest() { final String filterCodeReligion = "$.[?(@.active==true)].code"; marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.RELIGION).filter(filterCodeReligion).build()); - //Religion + //PostOffice final String filterCodePostOffice = "$.[?(@.active==true)].code"; marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); - ModuleDetail marriageModuleDtls = ModuleDetail.builder().masterDetails(marriageMasterDetails) .moduleName(MarriageConstants.COMMON_MASTER_MODULE_NAME).build(); @@ -227,7 +226,7 @@ private List getAddressRequest(String district .add(MasterDetail.builder().name(MarriageConstants.POSTOFFICE).filter(filterCodePostOffice).build()); } if(null!=village) { - final String filterCodeVillage = "$.[?(@.code=='" + village + "')].name"; + final String filterCodeVillage = "$.villageList.[?(@.code=='" + village + "')].name"; marriageMasterDetails .add(MasterDetail.builder().name(MarriageConstants.VILLAGE).filter(filterCodeVillage).build()); } From 27d84aac5c0ba0b821822e4d2b1610eec11e7a7c Mon Sep 17 00:00:00 2001 From: Jasmine Date: Fri, 16 Jun 2023 17:02:28 +0530 Subject: [PATCH 413/420] validations in model for unit testing --- .../enrichment/MarriageDetailsEnrichment.java | 3 - .../service/MarriageApplicationService.java | 4 + .../MarriageApplicationValidator.java | 363 ++++++++---------- .../MarriageApplicationController.java | 3 +- .../controller/MarriageBaseController.java | 117 ++++++ .../web/model/MarriageApplicationDetails.java | 107 ++++-- .../web/model/marriage/BrideDetails.java | 109 +++++- .../MarriageRegistryRepository.java | 1 + .../service/MarriageRegistryService.java | 5 - .../marriage/utils/MarriageConstants.java | 22 ++ 10 files changed, 473 insertions(+), 261 deletions(-) create mode 100644 municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageBaseController.java diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java index 4551210a719..60cf2e928e6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/enrichment/MarriageDetailsEnrichment.java @@ -642,7 +642,6 @@ private void setBrideAddressNull(MarriageDetailsRequest request){ marriage.getBrideAddressDetails().setPinNoPresent(null); marriage.getBrideAddressDetails().setPoNoPresent(null); - marriage.getBrideAddressDetails().setCountryIdPresent(null); marriage.getBrideAddressDetails().setStateIdPresent(null); @@ -665,7 +664,6 @@ private void setBrideAddressNull(MarriageDetailsRequest request){ marriage.getBrideAddressDetails().setTownOrVillagePresent(null); marriage.getBrideAddressDetails().setVillageNamePresent(null); - marriage.getBrideAddressDetails().setCountryIdPresent(null); marriage.getBrideAddressDetails().setPresentOthrIndiaAdressEn(null); @@ -718,7 +716,6 @@ private void setBrideAddressNull(MarriageDetailsRequest request){ marriage.getBrideAddressDetails().setHouseNameNoEnPermanent(null); marriage.getBrideAddressDetails().setHouseNameNoMlPermanent(null); - marriage.getBrideAddressDetails().setPermntOthrTalukName(null); marriage.getBrideAddressDetails().setPermntOthPostOfficeEn(null); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java index 115a19078f5..d78d4ad1600 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/service/MarriageApplicationService.java @@ -102,10 +102,14 @@ public List saveMarriageDetails(MarriageDetailsReque public List updateMarriageDetails(MarriageDetailsRequest request) { + // WorkFlowCheck wfc = new WorkFlowCheck(); + validatorService.validateCommonFields( request); Object mdmsData = util.mDMSCall(request.getRequestInfo(), request.getMarriageDetails().get(0).getTenantid()); + // validatorService.ruleEngineMarriage(request, wfc, mdmsData); + mdmsValidator.validateMarriageMDMSData(request,mdmsData); String applicationNumber = request.getMarriageDetails().get(0).getApplicationNumber(); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java index bde7f38bf0f..a21b16a66fc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/validator/MarriageApplicationValidator.java @@ -10,6 +10,7 @@ import java.util.LinkedHashMap; import java.util.List; import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.ObjectUtils.Null; import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideAddressDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.BrideDetails; import org.ksmart.marriage.marriageapplication.web.model.marriage.GroomAddressDetails; @@ -55,7 +56,7 @@ public void validateUpdate(MarriageDetailsRequest request, List 0L) { Long comp = currentDate - dateOfMarriage; - System.out.println("datedifference"+wfLists); + // System.out.println("datedifference"+wfLists); if (comp > start && comp <= end){ wfc.setApplicationType(wfLists.get(n).get("ApplicationType").toString()); wfc.setWorkflowCode(wfLists.get(n).get("WorkflowCode").toString()); @@ -157,15 +158,10 @@ public void validateCommonFields(MarriageDetailsRequest request) { marriageApplication .forEach(marriagedtls -> { GroomDetails groomInfo = marriagedtls.getGroomDetails(); - GroomAddressDetails groomaddressInfo = marriagedtls - .getGroomAddressDetails(); + GroomAddressDetails groomaddressInfo = marriagedtls.getGroomAddressDetails(); BrideDetails brideInfo = marriagedtls.getBrideDetails(); - BrideAddressDetails brideaddressInfo = marriagedtls - .getBrideAddressDetails(); + BrideAddressDetails brideaddressInfo = marriagedtls.getBrideAddressDetails(); WitnessDetails witnessDtls = marriagedtls.getWitnessDetails(); - - System.out.println("marriagedate" + marriagedtls.getDateofmarriage()); - if (marriagedtls.getDateofmarriage() <= 0) { throw new CustomException(" DATE OF MARRIAGE INVALID ", "The Date of marriage " + @@ -244,10 +240,9 @@ public void validateCommonFields(MarriageDetailsRequest request) { } - if (marriagedtls.getPlacetype() - .equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) - || marriagedtls.getPlacetype() - .equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER)) + if (marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_RELIGIOUS_INSTITUTION) + || marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_MANDAPAM_OTHER) + || marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_REGISTRAR_OFFICE)) { if (StringUtils.isEmpty( @@ -304,10 +299,10 @@ public void validateCommonFields(MarriageDetailsRequest request) { } - if (marriagedtls.getPlacetype().equals( - MarriageConstants.PLACE_TYPE_PRIVATE_PLACE) || - (marriagedtls.getPlacetype().equals( - MarriageConstants.PLACE_TYPE_PUBLIC_PLACE))) { + if (marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_PRIVATE_PLACE) + || (marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_TYPE_PUBLIC_PLACE)) + || (marriagedtls.getPlacetype().equals(MarriageConstants.PLACE_OTHER)) + ) { if (StringUtils.isEmpty( marriagedtls.getPlacenameEn())) { throw new CustomException( @@ -431,7 +426,6 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } if (StringUtils.isEmpty(groomInfo.getFathernameMl())) { - // System.out.println("groomfather" + groomInfo.getFathernameMl()); throw new CustomException( " GROOM FATHER NAME MALAYALAM ", "The groom Father Name in malayalam " @@ -439,20 +433,6 @@ public void validateCommonFields(MarriageDetailsRequest request) { groomInfo.getFathernameMl() + " is invalid"); } -// if (StringUtils.isEmpty(groomInfo.getFatherAadharno())) { -// throw new CustomException( -// "GROOM FATHER AADHAR INVALID ", -// "The groom Father Aadhar number " + -// groomInfo.getFatherAadharno() -// + " is invalid"); -// } -// if (StringUtils.isEmpty(groomInfo.getMotherAadharno())) { -// throw new CustomException( -// " GROOM MOTHER AADHAR INVALID ", -// "The groom Father Aadhar number " + -// groomInfo.getMotherAadharno() -// + " is invalid"); -// } if (StringUtils.isEmpty(groomInfo.getMothernameEn())) { throw new CustomException(" GROOM MOTHER NAME ENGLISH ", @@ -469,13 +449,6 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } } else { - // if (StringUtils.isEmpty(groomInfo.getGuardianAadharno())) { - // throw new CustomException( - // " GROOM GUARDIAN AADHAR INVALID ", - // "The groom Guardian Aadhar number " + - // groomInfo.getGuardianAadharno() - // + " is invalid"); - // } if (StringUtils.isEmpty(groomInfo.getGuardiannameEn())) { throw new CustomException( " GROOM GUARDIAN NAME ENGLISH ", @@ -656,21 +629,6 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideInfo.getFathernameMl() + " is invalid"); } -// if (StringUtils.isEmpty(brideInfo.getFatherAadharno())) { -// throw new CustomException( -// "BRIDE: FATHER AADHAR INVALID ", -// "The Father's Aadhar number " + -// brideInfo.getFatherAadharno() -// + " is invalid"); -// } -// if (StringUtils.isEmpty(brideInfo.getMotherAadharno())) { -// throw new CustomException( -// "BRIDE:MOTHER AADHAR INVALID ", -// "The mother's Aadhar number " + -// brideInfo.getMotherAadharno() -// + " is invalid"); -// } -// if (StringUtils.isEmpty(brideInfo.getMothernameEn())) { throw new CustomException(" BRIDE MOTHER NAME ENGLISH ", "The bride Mother Name in english " + @@ -686,13 +644,6 @@ public void validateCommonFields(MarriageDetailsRequest request) { + " is invalid"); } } else { -// if (StringUtils.isEmpty(brideInfo.getGuardianAadharno())) { -// throw new CustomException( -// " BRIDE GUARDIAN AADHAR INVALID ", -// "The bride Guardian Aadhar number " + -// brideInfo.getGuardianAadharno() -// + " is invalid"); -// } if (StringUtils.isEmpty(brideInfo.getGuardiannameEn())) { throw new CustomException( " BRIDE GUARDIAN NAME ENGLISH ", @@ -781,117 +732,113 @@ public void validateCommonFields(MarriageDetailsRequest request) { // } // groom permanent address start - - if (groomaddressInfo.getPermtaddressCountry() - .equals(MarriageConstants.ADDRESS_INDIA)) { - if (StringUtils.isEmpty( - groomaddressInfo.getPermtaddressStateName())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS: STATE INVALID ", - "The State " + - groomaddressInfo.getPermtaddressStateName() - + " is invalid"); - } else { - if (groomaddressInfo.getPermtaddressStateName() - .equals(MarriageConstants.ADDRESS_KERALA)) { - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrDistrict())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: DISTRICT INVALID ", - "The District " + - groomaddressInfo.getPermntInKeralaAdrDistrict() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrTaluk())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: TALUK INVALID ", - "The Taluk " + - groomaddressInfo.getPermntInKeralaAdrTaluk() - + " is invalid"); - } - - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrVillage())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: VILLAGE INVALID ", - "The Village " + - groomaddressInfo.getPermntInKeralaAdrVillage() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrLBName())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALBODY NAME INVALID ", - "The Localbody Name " - + - groomaddressInfo.getPermntInKeralaAdrLBName() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaWardNo())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: WARD INVALID ", - "The Ward " + - groomaddressInfo.getPermntInKeralaWardNo() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrPostOffice())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", - "The Postoffice " + - groomaddressInfo.getPermntInKeralaAdrPostOffice() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrPincode())) { - - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: PINCODE INVALID ", - "The Pincode " + - groomaddressInfo.getPermntInKeralaAdrPincode() - + " is invalid"); - } - // if (StringUtils.isEmpty(groomaddressInfo - // .getPermntInKeralaAdrLocalityNameEn())) { - // throw new CustomException( - // "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", - // "The Locality English " - // + - // groomaddressInfo.getPermntInKeralaAdrLocalityNameEn() - // + " is invalid"); - // } - // if (StringUtils.isEmpty(groomaddressInfo - // .getPermntInKeralaAdrLocalityNameMl())) { - // throw new CustomException( - // "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", - // "The Locality Malayalam " - // + - // groomaddressInfo.getPermntInKeralaAdrLocalityNameMl() - // + " is invalid"); - // } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrHouseNameEn())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: HOUSE NAME ENGLISH INVALID ", - "The House Name English " - + - groomaddressInfo.getPermntInKeralaAdrHouseNameEn() - + " is invalid"); - } - if (StringUtils.isEmpty(groomaddressInfo - .getPermntInKeralaAdrHouseNameMl())) { - throw new CustomException( - "GROOM PERMANENT ADDRESS INSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", - "The House Name Malayalam " - + - groomaddressInfo.getPermntInKeralaAdrHouseNameMl() - + " is invalid"); - } - - } - /// *****************permanent outside kerala address + if (StringUtils.isEmpty(groomaddressInfo.getPermtaddressCountry())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS: COUNTRY INVALID ", + "The Country name " + groomaddressInfo.getPermtaddressCountry()+ " is invalid"); + } else { + if (groomaddressInfo.getPermtaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty(groomaddressInfo.getPermtaddressStateName())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS: STATE INVALID ", + "The State " + groomaddressInfo.getPermtaddressStateName() + " is invalid"); + } else { + if (groomaddressInfo.getPermtaddressStateName().equals(MarriageConstants.ADDRESS_KERALA)) { + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrDistrict())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: DISTRICT INVALID ", + "The District " + + groomaddressInfo.getPermntInKeralaAdrDistrict() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrTaluk())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: TALUK INVALID ", + "The Taluk " + + groomaddressInfo.getPermntInKeralaAdrTaluk() + + " is invalid"); + } + + if (StringUtils.isEmpty(groomaddressInfo.getPermntInKeralaAdrVillage())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: VILLAGE INVALID ", + "The Village " + + groomaddressInfo.getPermntInKeralaAdrVillage() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrLBName())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALBODY NAME INVALID ", + "The Localbody Name " + + + groomaddressInfo.getPermntInKeralaAdrLBName() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaWardNo())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: WARD INVALID ", + "The Ward " + + groomaddressInfo.getPermntInKeralaWardNo() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrPostOffice())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: POSTOFFICE INVALID ", + "The Postoffice " + + groomaddressInfo.getPermntInKeralaAdrPostOffice() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrPincode())) { + + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: PINCODE INVALID ", + "The Pincode " + + groomaddressInfo.getPermntInKeralaAdrPincode() + + " is invalid"); + } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntInKeralaAdrLocalityNameEn())) { + // throw new CustomException( + // "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME ENGLISH IS INVALID ", + // "The Locality English " + // + + // groomaddressInfo.getPermntInKeralaAdrLocalityNameEn() + // + " is invalid"); + // } + // if (StringUtils.isEmpty(groomaddressInfo + // .getPermntInKeralaAdrLocalityNameMl())) { + // throw new CustomException( + // "GROOM PERMANENT ADDRESS INSIDE KERALA: LOCALITY NAME MALAYALAM IS INVALID ", + // "The Locality Malayalam " + // + + // groomaddressInfo.getPermntInKeralaAdrLocalityNameMl() + // + " is invalid"); + // } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrHouseNameEn())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: HOUSE NAME ENGLISH INVALID ", + "The House Name English " + + + groomaddressInfo.getPermntInKeralaAdrHouseNameEn() + + " is invalid"); + } + if (StringUtils.isEmpty(groomaddressInfo + .getPermntInKeralaAdrHouseNameMl())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS INSIDE KERALA: HOUSE NAME MALAYALAM INVALID ", + "The House Name Malayalam " + + + groomaddressInfo.getPermntInKeralaAdrHouseNameMl() + + " is invalid"); + } + + } + /// *****************permanent outside kerala address /// *****************************************/ else { if (StringUtils.isEmpty(groomaddressInfo @@ -914,9 +861,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { .getPermntOutsideKeralaVillageorTown())) { throw new CustomException( "GROOM PERMANENT ADDRESS OUTSIDE KERALA: VILLAGE INVALID ", - "The Village " + - groomaddressInfo.getPermntOutsideKeralaVillageorTown() - + " is invalid"); + "The Village " +groomaddressInfo.getPermntOutsideKeralaVillageorTown()+ " is invalid"); } if (StringUtils.isEmpty(groomaddressInfo @@ -1065,8 +1010,17 @@ public void validateCommonFields(MarriageDetailsRequest request) { // } } - // groom permanent address end - // groom present address start + } + // groom permanent address end + // groom present address start + if (StringUtils.isEmpty(groomaddressInfo.getPresentaddressCountry())) { + throw new CustomException( + "GROOM PERMANENT ADDRESS: COUNTRY INVALID ", + "The Country name " + groomaddressInfo.getPresentaddressCountry()+ " is invalid"); + } + else + { + if (groomaddressInfo.getPresentaddressCountry() .equals(MarriageConstants.ADDRESS_INDIA)) { if (StringUtils.isEmpty(groomaddressInfo @@ -1350,17 +1304,18 @@ public void validateCommonFields(MarriageDetailsRequest request) { // } } + } // groom present address end // bride permanent address start - - if (brideaddressInfo.getPermtaddressCountry() - .equals(MarriageConstants.ADDRESS_INDIA)) { - if (StringUtils.isEmpty( - brideaddressInfo.getPermtaddressStateName())) { + if (StringUtils.isEmpty(brideaddressInfo.getPermtaddressCountry())) { + throw new CustomException( + " BRIDE PERMANENT ADDRESS : COUNTRY INVALID ", + "The COUNTRY " +brideaddressInfo.getPermtaddressCountry()+ " is invalid"); + }else{ + if (brideaddressInfo.getPermtaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { + if (StringUtils.isEmpty(brideaddressInfo.getPermtaddressStateName())) { throw new CustomException(" STATE INVALID ", - "The State " + - brideaddressInfo.getPermtaddressStateName() - + " is invalid"); + "The State " + brideaddressInfo.getPermtaddressStateName()+ " is invalid"); } else { if (brideaddressInfo.getPermtaddressStateName() .equals(MarriageConstants.ADDRESS_KERALA)) { @@ -1393,10 +1348,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { .getPermntInKeralaAdrLBName())) { throw new CustomException( " BRIDE PERMANENT ADDRESS INSIDE KERALA: LOCALBODY NAME INVALID ", - "The Localbody Name " - + - brideaddressInfo.getPermntInKeralaAdrLBName() - + " is invalid"); + "The Localbody Name " + brideaddressInfo.getPermntInKeralaAdrLBName() + " is invalid"); } if (StringUtils.isEmpty(brideaddressInfo .getPermntInKeralaWardNo())) { @@ -1635,17 +1587,20 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } - // bride permanent address end - // bride present address start - if (brideaddressInfo.getPresentaddressCountry() - .equals(MarriageConstants.ADDRESS_INDIA)) { + } + // bride permanent address end + // bride present address start + if (StringUtils.isEmpty(brideaddressInfo.getPresentaddressCountry())) { + throw new CustomException(" BRIDE PRESENT ADDRESS : COUNTRY INVALID ","The Country " + brideaddressInfo.getPresentaddressCountry()+ " is invalid"); + } + else + { + if (brideaddressInfo.getPresentaddressCountry().equals(MarriageConstants.ADDRESS_INDIA)) { if (StringUtils.isEmpty(brideaddressInfo .getPresentaddressStateName())) { - throw new CustomException( + throw new CustomException( " BRIDE PRESENT ADDRESS : STATE INVALID ", - "The State " + - brideaddressInfo.getPresentaddressStateName() - + " is invalid"); + "The State " +brideaddressInfo.getPresentaddressStateName() + " is invalid"); } else { if (brideaddressInfo.getPresentaddressStateName() .equals(MarriageConstants.ADDRESS_KERALA)) { @@ -1699,14 +1654,11 @@ public void validateCommonFields(MarriageDetailsRequest request) { brideaddressInfo.getPresentInsideKeralaPostOffice() + " is invalid"); } - if (StringUtils.isEmpty(brideaddressInfo - .getPresentInsideKeralaPincode())) { + if (StringUtils.isEmpty(brideaddressInfo.getPresentInsideKeralaPincode())) { throw new CustomException( - "BRIDE PRESENT ADDRESS INSIDE KERALA: PINCODE INVALID ", - - "The Pincode " + - brideaddressInfo.getPresentInsideKeralaPincode() - + " is invalid"); + "BRIDE PRESENT ADDRESS INSIDE KERALA: PINCODE INVALID ","The Pincode " + + brideaddressInfo.getPresentInsideKeralaPincode() + + " is invalid"); } // if (StringUtils.isEmpty(brideaddressInfo // .getPresentInsideKeralaLocalityNameEn())) { @@ -1746,7 +1698,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { } } - else { + else { if (StringUtils.isEmpty(brideaddressInfo .getPresentOutsideKeralaDistrict())) { throw new CustomException( @@ -1912,6 +1864,7 @@ public void validateCommonFields(MarriageDetailsRequest request) { // } } + } // witness1 if (StringUtils.isEmpty(witnessDtls.getWitness1AadharNo())) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java index a0b133a6c6c..fcdb85dbc5b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageApplicationController.java @@ -28,7 +28,7 @@ @RestController @RequestMapping("/v1/marriagedetails") -public class MarriageApplicationController { +public class MarriageApplicationController implements MarriageApplicationBaseController { private final MarriageApplicationService MarriageService; private final ResponseInfoFactory responseInfoFactory; private final MarriageRegistryRequestService marriageRegistryRequestService; @@ -47,6 +47,7 @@ public MarriageApplicationController(MarriageApplicationService MarriageService, this.marriageRegistryService = marriageRegistryService; this.repository = repository; } + @Override @PostMapping(value = {"/_createmarriage"}) public ResponseEntity saveMarriageDetails(@RequestBody MarriageDetailsRequest request) { diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageBaseController.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageBaseController.java new file mode 100644 index 00000000000..77cea624c1d --- /dev/null +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/controller/MarriageBaseController.java @@ -0,0 +1,117 @@ +package org.ksmart.marriage.marriageapplication.web.controller; + +import javax.validation.Valid; + +// import org.egov.filemgmnt.util.FMConstants; +// import org.egov.filemgmnt.web.models.RequestInfoWrapper; +// import org.egov.filemgmnt.web.models.arisingfile.ArisingFileRequest; +// import org.egov.filemgmnt.web.models.arisingfile.ArisingFileResponse; +// import org.egov.filemgmnt.web.models.arisingfile.ArisingFileSearchCriteria; +// import org.egov.filemgmnt.web.models.arisingfile.ArisingFileSearchResponse; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationResponse; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageApplicationSearchCriteria; +import org.ksmart.marriage.marriageapplication.web.model.marriage.MarriageDetailsRequest; +import org.egov.tracer.model.ErrorRes; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.tags.Tag; + +@Tag(name = "Marriage Application") +@Validated +interface MarriageApplicationBaseController { + + @Operation(summary = "Create Marriage Application.", + description = "", + requestBody = @RequestBody(content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = MarriageDetailsRequest.class)), + required = true), + responses = { + @ApiResponse(responseCode = "200", + description = "Marriage application created successfully", + content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = MarriageApplicationResponse.class))), + @ApiResponse(responseCode = "400", + description = "Bad marriage application service request", + content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, + schema = @Schema(implementation = ErrorRes.class))) }) + ResponseEntity saveMarriageDetails(@Valid MarriageDetailsRequest request); + +// @Operation(summary = "Update arising file.", +// description = "", +// requestBody = @RequestBody(content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, +// schema = @Schema(implementation = ArisingFileRequest.class)), +// required = true), +// responses = { +// @ApiResponse(responseCode = "200", +// description = "Arising file updated successfully", +// content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, +// schema = @Schema(implementation = ArisingFileResponse.class))), +// @ApiResponse(responseCode = "400", +// description = "Bad arising file service request", +// content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, +// schema = @Schema(implementation = ErrorRes.class))) }) +// ResponseEntity update(@Valid ArisingFileRequest request); + + // @Operation(summary = "Search arising files with the given query parameters.", + // description = "", + // requestBody = @RequestBody(content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, + // schema = @Schema(implementation = RequestInfoWrapper.class)), + // required = true), + // parameters = { + // @Parameter(in = ParameterIn.QUERY, + // name = "tenantId", + // required = true, + // allowEmptyValue = false, + // description = "Tenant identification number", + // schema = @Schema(type = "string", + // pattern = FMConstants.PATTERN_TENANT, + // accessMode = Schema.AccessMode.READ_ONLY)), + // @Parameter(in = ParameterIn.QUERY, + // name = "fileCode", + // required = false, + // allowEmptyValue = true, + // description = "File code", + // schema = @Schema(type = "string", accessMode = Schema.AccessMode.READ_ONLY)), + // @Parameter(in = ParameterIn.QUERY, + // name = "fromDate", + // required = false, + // allowEmptyValue = true, + // description = "Arising file date, search from", + // schema = @Schema(type = "integer", + // format = "int64", + // accessMode = Schema.AccessMode.READ_ONLY)), + // @Parameter(in = ParameterIn.QUERY, + // name = "toDate", + // required = false, + // allowEmptyValue = true, + // description = "Arising file date, search to", + // schema = @Schema(type = "integer", + // format = "int64", + // accessMode = Schema.AccessMode.READ_ONLY)), + // @Parameter(in = ParameterIn.QUERY, + // name = "fileStatus", + // required = false, + // allowEmptyValue = true, + // description = "File status", + // schema = @Schema(type = "string", accessMode = Schema.AccessMode.READ_ONLY)) }, + // responses = { + // @ApiResponse(responseCode = "200", + // description = "Arising file(s) retrieved successfully", + // content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, + // schema = @Schema(implementation = ArisingFileSearchResponse.class))), + // @ApiResponse(responseCode = "400", + // description = "Bad arising file search request", + // content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, + // schema = @Schema(implementation = ErrorRes.class))) }) + // ResponseEntity search(@Valid RequestInfoWrapper request, + // @Valid ArisingFileSearchCriteria searchCriteria); +} diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java index bbdec206794..2cec785d0a1 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/MarriageApplicationDetails.java @@ -6,15 +6,24 @@ import org.ksmart.marriage.marriageapplication.web.model.Demand.Demand; import org.ksmart.marriage.marriageapplication.web.model.marriage.*; import org.ksmart.marriage.marriagecommon.model.common.CommonPay; +import io.swagger.v3.oas.annotations.media.Schema; +import org.ksmart.marriage.utils.MarriageConstants; +import org.springframework.validation.annotation.Validated; //import org.ksmart.marriage.common.model.AuditDetails; //import org.ksmart.marriage.common.model.Document; +import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; +import javax.validation.constraints.Positive; import javax.validation.constraints.Size; import java.util.List; import javax.swing.text.Document; import javax.validation.Valid; +@Schema(description = "An Object holds the data for marriage registration submitted by the user") +@Validated + @Getter @Setter @AllArgsConstructor @@ -22,8 +31,8 @@ @Builder public class MarriageApplicationDetails { - @NotNull - @Size(max = 64) + // @Schema(type = "string", format = "uuid", description = "File id") + // @Size(max = 64, message = "Marriage id length cannot exceed 64 characters") @JsonProperty("id") private String id; @@ -31,92 +40,133 @@ public class MarriageApplicationDetails { @JsonProperty("userId") private String userId; + @Schema(type = "integer", format = "int64", description = "Marriage date") + @NotNull(message = "Date of Marriage is required-Testing") + @Positive(message = "Invalid Marriage date") @JsonProperty("marriageDOM") private Long dateofmarriage; + @Schema(type = "integer", format = "int64", description = "Marriage registration date") + @NotNull(message = "Date of Marriage registration is required") + @Positive(message = "Invalid Marriage registration date") @JsonProperty("marriageDOR") private Long dateofreporting; - @Size(max = 64) + @Schema(type = "string", description = "District Name") + @NotBlank(message = "District Name is required") + @Size(max = 64, message = "District Name length cannot exceed 64 characters") @JsonProperty("marriageDistrictid") private String districtid; - @Size(max = 64) + @Schema(type = "string", description = "Localbody Type") + @NotBlank(message = "LB type is required") + @Size(max = 64, message = "Length of LB type cannot exceed 64 characters") @JsonProperty("marriageLBtype") private String lbtype; - @Size(max = 64) + @Schema(type = "string", description = "Tenant identification number", example = "kl.cochin") + @NotBlank(message = "Tenant identification number is required") + @Size(max = 64, message = "Tenant identification number length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_TENANT, + message = "Invalid tenant identification number format, eg: kl.cochin") @JsonProperty("marriageTenantid") private String tenantid; + @JsonProperty("marriageTenantIdEn") private String marriageTenantIdEn; @JsonProperty("marriageTenantIdMl") private String marriageTenantIdMl; - @Size(max = 64) + @Schema(type = "string", description = "Marriage Registration Place Type") + @NotBlank(message = "Marriage Registration Place Type is required") + @Size(max = 64, message = "Marriage Registration Place Type length cannot exceed 64 characters") @JsonProperty("marriagePlacetype") private String placetype; - @Size(max = 200) + @Schema(type = "string", description = "Marriage place type") + @Size(max = 200, message = "Marriage place type length cannot exceed 200 characters") @JsonProperty("placetypeEn") private String placetypeEn; - @Size(max = 200) + @Schema(type = "string", description = "Marriage place type malayalam") + @Size(max = 200, message = "Marriage place type malayalam length cannot exceed 200 characters") @JsonProperty("placetypeMl") private String placetypeMl; - @Size(max = 1000) + @Schema(type = "string", description = "Marriage place type") + @Size(max = 1000, message = "Marriage place Name length cannot exceed 1000 characters") @JsonProperty("marriagePlacenameEn") private String placenameEn; - @Size(max = 1000) + @Schema(type = "string", description = "Marriage place type") + @Size(max = 1000) //, message = "Marriage place Name malayalam length cannot exceed 1000 characters") @JsonProperty("marriagePlacenameMl") private String placenameMl; - @Size(max = 64) + @Schema(type = "string", description = "Ward number") + @NotBlank(message = "Ward number is required") + @Size(max = 64, message = "Ward number length cannot exceed 64 characters") @JsonProperty("marriageWardCode") private String wardCode; - - @Size(max = 1000) + // @NotNull(message = "StreetName is required") + @Schema(type = "string", description = "Marriage place street name") + @Size(max = 1000, message = "Marriage place street name length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, + message = "Invalid street name format,it must be in English") @JsonProperty("marriageStreetEn") private String streetNameEn; - @Size(max = 1000) + // @NotNull(message = "StreetName is required") + @Schema(type = "string", description = "Marriage place street name") + @Size(max = 1000, message = "Marriage place street name length cannot exceed 1000 characters") + //@Pattern(regexp = MarriageConstants.PATTERN_MALAYALAM, + // message = "Invalid street name format,it must be in Malayalam") @JsonProperty("marriageStreetMl") private String streetNameMl; - @Size(max = 64) + @Schema(type = "string", description = "Taluk Name") + @NotBlank(message = "Taluk Name is required") + @Size(max = 64, message = "Taluk Name length cannot exceed 64 characters") @JsonProperty("marriageTalukID") private String talukid; - @Size(max = 64) + @Schema(type = "string", description = "Village Name") + @NotBlank(message = "Village Name is required") + @Size(max = 64, message = "Village Name length cannot exceed 64 characters") @JsonProperty("marriageVillageName") private String villageName; - @Size(max = 1000) + @Schema(type = "string", description = "Marriage place landmark") + @Size(max = 1000, message = "Marriage place landmark length cannot exceed 1000 characters") @JsonProperty("marriageLandmark") private String landmark; - @Size(max = 1000) + @Schema(type = "string", description = "Marriage place locality") + @Size(max = 1000, message = "Marriage place locality length cannot exceed 1000 characters") @JsonProperty("marriageLocalityEn") private String localityEn; - @Size(max = 1000) + @Schema(type = "string", description = "Marriage place locality") + @Size(max = 1000) //, message = "Marriage place locality length cannot exceed 1000 characters") @JsonProperty("marriageLocalityMl") private String localityMl; - @Size(max = 64) + @NotNull(message = "Marriage Type is required") + @Schema(type = "string", description = "Marriage type") + @Size(max = 64, message = "Marriage type length cannot exceed 64 characters") @JsonProperty("marriageType") private String marriageType; - @Size(max = 200) + @Schema(type = "string", description = "Marriage type") + @Size(max = 200, message = "Marriage type length cannot exceed 200 characters") @JsonProperty("marriageTypeEn") private String marriageTypeEn; - @Size(max = 200) + @Schema(type = "string", description = "Marriage type") + @Size(max = 200) // message = "Marriage type malayalam length cannot exceed 200 characters") @JsonProperty("marriageTypeMl") private String marriageTypeMl; @@ -131,14 +181,18 @@ public class MarriageApplicationDetails { @JsonProperty("registrationDate") private Long registrationDate; - @Size(max = 1000) + @Schema(type = "string", description = "Marriage place Name") + @Size(max = 1000, message = "Marriage Place Name length cannot exceed 1000 characters") @JsonProperty("placeid") private String placeid; - @Size(max = 2500) + @Schema(type = "string", description = "House No & Name") + @Size(max = 2500, message = "House No & Name length cannot exceed 2500 characters") @JsonProperty("marriageHouseNoAndNameEn") private String marriageHouseNoAndNameEn; - @Size(max = 2500) + + @Schema(type = "string", description = "House No & Name") + @Size(max = 2500) //, message = "House No & Name malayalam length cannot exceed 2500 characters") @JsonProperty("marriageHouseNoAndNameMl") private String marriageHouseNoAndNameMl; @@ -164,7 +218,6 @@ public class MarriageApplicationDetails { @JsonProperty("WitnessDetails") private WitnessDetails witnessDetails; - @JsonProperty("CommonPay") private CommonPay commonPay; @@ -234,7 +287,9 @@ public class MarriageApplicationDetails { private List demands; private boolean wfnormalRegn ; + private boolean wfdelayedWithinFiveYear ; + private boolean wfdelayedAfterFiveYear ; //Jasmine 03.05.2023 diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java index 726a56acee6..557698ab5fc 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java @@ -1,10 +1,15 @@ package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.utils.MarriageConstants; +import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; @Getter @Setter @@ -13,14 +18,22 @@ @Builder public class BrideDetails { - @Size(max = 64) + @Schema(type = "string", format = "uuid", description = "Bride Details Id") + @Size(max = 64, message = "BRIDE DETAILS :Bride id length cannot exceed 64 characters") @JsonProperty("brideId") private String brideId; + @NotNull @Size(max = 64) + @NotBlank(message = "BRIDE DETAILS :BrideGroom field is required") @JsonProperty("brideGroom") private String brideGroom; - @Size(max = 64) + + @Schema(type = "string", description = "Tenant identification number", example = "kl.cochin") + @NotBlank(message = "BRIDE DETAILS :Tenant identification number is required") + @Size(max = 64, message = "BRIDE DETAILS :Tenant identification number length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_TENANT, + message = "BRIDE DETAILS :Invalid tenant identification number format, eg: kl.cochin") @JsonProperty("tenentId") private String tenentId; @@ -28,52 +41,80 @@ public class BrideDetails { @JsonProperty("marriageid") private String marriageid; + @NotNull @Size(max = 64) + @NotBlank(message = "BRIDE DETAILS :Residentship is required") @JsonProperty("brideResidentShip") private String residentship; - @Size(max = 15) + @Schema(type = "string", description = "Aadhaar number") + // @NotBlank(message = "Aadhaar number is required") + @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") @JsonProperty("brideAadharNo") private String aadharno; - @Size(max = 1000) + @Schema(type = "string", description = "Passport number") + // @NotBlank(message = "Aadhaar number is required") + @Size(min=8,max=8, message = "BRIDE DETAILS :Passport number must be an 8 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_PASSPORT, message = "BRIDE DETAILS :Invalid Passport number") @JsonProperty("bridePassportNo") private String passportno; - @Size(max = 64) + @Schema(type = "string", description = "Social Security Number") + @Size(min=9,max=9, message = "BRIDE DETAILS :Social Security Number must be a 9 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_SSN, message = "BRIDE DETAILS :Invalid Social Security Number") @JsonProperty("brideSocialSecurityNo") private String socialsecurityno; - @Size(max = 200) + @Schema(type = "string", description = "First name") + @NotBlank(message = "BRIDE DETAILS :First name is required") + @Size(max = 100, message = "BRIDE DETAILS :First name length cannot exceed 100 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid first name") @JsonProperty("brideFirstnameEn") private String firstnameEn; - @Size(max = 200) + + @Schema(type = "string", description = "First name") + @NotBlank(message = "BRIDE DETAILS :First name in malayalam is required") + @Size(max = 100)//, message = "First name length cannot exceed 100 characters") + // @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid first name") @JsonProperty("brideFirstnameMl") private String firstnameMl; - @Size(max = 200) + + @Schema(type = "string", description = "Bride's Middle name ") + @Size(max = 64, message = "BRIDE DETAILS :Middle name length cannot exceed 64 characters") @JsonProperty("brideMiddlenameEn") private String middlenameEn; - @Size(max = 200) + + @Schema(type = "string", description = "Bride's Middle name malayalam") + @Size(max = 64)//, message = "Middle name in malayalam length cannot exceed 64 characters") @JsonProperty("brideMiddlenameMl") private String middlenameMl; - @Size(max = 200) + @Schema(type = "string", description = "Bride's last name ") + @Size(max = 64, message = "BRIDE DETAILS :Last name length cannot exceed 64 characters") @JsonProperty("brideLastnameEn") private String lastnameEn; - @Size(max = 200) + @Schema(type = "string", description = "Bride's Last name malayalam") + @Size(max = 64)//, message = "Last name in malayalam length cannot exceed 64 characters") @JsonProperty("brideLastnameMl") private String lastnameMl; - + @Schema(type = "string", description = "Mobile number") + @NotBlank(message = "BRIDE DETAILS :Mobile number is required") + @Size(min = 10, max = 10, message = "BRIDE DETAILS :Invalid mobile number") + @Pattern(regexp = MarriageConstants.PATTERN_MOBILE, message = "BRIDE DETAILS :Invalid mobile number") @JsonProperty("brideMobile") private Long mobile; - - @Size(max = 10) + @Schema(type = "string", description = "Email") + // @NotBlank(message = "BRIDE DETAILS :Mobile number is required") + @Size(min = 10, max = 10, message = "BRIDE DETAILS :Invalid Email Id") + @Pattern(regexp = MarriageConstants.PATTERN_MOBILE, message = "BRIDE DETAILS :Invalid Email Id") @JsonProperty("brideEmailid") private String emailid; @@ -81,6 +122,7 @@ public class BrideDetails { @JsonProperty("brideGender") private String gender; + @Schema(type = "integer",description = "Bride's Date of birth", format = "int64") @JsonProperty("brideDOB") private long dateofbirth; @@ -91,46 +133,71 @@ public class BrideDetails { @JsonProperty("brideParentGuardian") private String parentGuardian; - @Size(max = 200) + @Schema(type = "string", description = "Name of Father") + @Size(max = 200, message = "First name length of Bride's father cannot exceed 200 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("brideFathernameEn") private String fathernameEn; + @Schema(type = "string", description = "Name of Father in malayalam") @Size(max = 200) + // @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("brideFathernameMl") private String fathernameMl; - @Size(max = 200) + + @Schema(type = "string", description = "Name of Mother") + @Size(max = 200, message = "Name length of Bride's mother cannot exceed 200 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("brideMothernameEn") private String mothernameEn; + @Schema(type = "string", description = "Name of Mother in malayalam") @Size(max = 200) + // @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("brideMothernameMl") private String mothernameMl; - @Size(max = 15) + @Schema(type = "string", description = "Aadhaar number") + // @NotBlank(message = "Aadhaar number is required") + @Size(min = 12, max = 12, message = "Aadhaar number of Brides's father must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "Invalid aadhaar number") @JsonProperty("brideFatherAadharNo") private String fatherAadharno; - @Size(max = 15) + @Schema(type = "string", description = "Aadhaar number") + // @NotBlank(message = "Aadhaar number is required") + @Size(min = 12, max = 12, message = "Aadhaar number of Brides's mother must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "Invalid aadhaar number") @JsonProperty("brideMotherAadharNo") private String motherAadharno; - @Size(max = 200) + @Schema(type = "string", description = "Name of Guardian in malayalam") + @Size(max = 200, message = "Name length of Bride's guardian cannot exceed 200 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("brideGuardiannameEn") private String guardiannameEn; + @Schema(type = "string", description = "Name of Guardian in malayalam") @Size(max = 200) + // @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("brideGuardiannameMl") private String guardiannameMl; - @Size(max = 15) + @Schema(type = "string", description = "Aadhaar number") + // @NotBlank(message = "Aadhaar number is required") + @Size(min = 12, max = 12, message = "Aadhaar number of Brides's guardian must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "Invalid aadhaar number") @JsonProperty("brideGuardianAadharNo") private String guardianAadharno; - @Size(max = 64) + @Schema(type = "string", description = "Marital Status") + @NotBlank(message = "Marital Status is required") + @Size(min = 64, message = "Marital Statusof Bride cannot exceed 64 characters") @JsonProperty("brideMaritalstatusID") private String maritalstatusid; + @JsonProperty("brideIsSpouseLiving") private Boolean brideIsSpouseLiving; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java index 9c6cb2abdd3..d80ebd8dcad 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/repository/MarriageRegistryRepository.java @@ -324,6 +324,7 @@ public MarriageCertPdfResponse saveMarriageCertPdf(MarriageCertPDFRequest marria if (!isImageExists(req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl())) { // req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().setGroomUrl( req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); // }else{ + System.out.println("CheckgroomUrl"+req.getMarriageCertificate().get(0).getMarriageRegistryDetails().getWitnessDetails().getGroomUrl()); log.error("PDF_ERROR. Marriage Certificate , Invalid Groom Photo Path!!!"); throw new CustomException("PDF_ERROR", "Invalid Groom Photo Path!!!"); } diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java index 93ad0db16c0..e1c8b5ddea4 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageregistry/service/MarriageRegistryService.java @@ -126,7 +126,6 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req log.error("DateToWords conversion error. threw an Exception: ",e); } } - marriageCertificate.setEmbeddedUrl(marriageCertPDFRequest.getMarriageCertificate().get(0).getEmbeddedUrl()); MarriageCertPdfResponse pdfResp = repository.saveMarriageCertPdf(marriageCertPDFRequest); marriageCertificate.setFilestoreid(pdfResp.getFilestoreIds().get(0)); @@ -154,7 +153,6 @@ public MarriageCertificate download(MarriageRegistrySearchCriteria criteria, Req } } - public List searchCertificate(MarriageRegistrySearchCriteria criteria,RequestInfo requestInfo) { List obj = repository.searchMarriageRegistry(criteria,requestInfo); if(null!=obj&&obj.size()>0) { @@ -163,9 +161,6 @@ public List searchCertificate(MarriageRegistrySearchCriteri throw new CustomException("MARRIAGE REGISTRY DATA NOT FOUND", " Marriage Registry data not found"); } } - - - public List updateMarriageRegistry(MarriageCorrectionRequest request) { MarriageRegistrySearchCriteria criteria = new MarriageRegistrySearchCriteria(); criteria.setRegistrationNo(request.getMarriageCorrectionDetails().get(0).getRegistrationno()); diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 818f2df0991..f70c8cf9b00 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -5,6 +5,26 @@ import java.util.List; public class MarriageConstants { + + // Patterns for constraint validations + public static final String PATTERN_NAME = "^[^\\\\$\\\"<>?\\\\\\\\~`!@#$%^()+={}\\\\[\\\\]*,:;“”‘’]*$"; + public static final String PATTERN_AADHAAR = "^[1-9][0-9]{11}$"; + public static final String PATTERN_MOBILE = "^[1-9][0-9]{9,14}$"; + public static final String PATTERN_TENANT = "^kl\\.[a-z]+$"; + public static final String PATTERN_PINCODE = "^[1-9][0-9]{5}$"; + public static final String PATTERN_YEAR = "^[1-9][0-9]{3}$"; + public static final String PATTERN_MODULE_CODE = "^[A-Z]+$"; + public static final String PATTERN_ENGLISH = "^[()_?a-zA-Z0-9-]+$;"; + public static final String PATTERN_PASSPORT = "^[A-PR-WY][1-9]\\d\\s?\\d{4}[1-9]$"; + public static final String PATTERN_SSN = "^(?!666|000|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0{4})\\d{4}$"; + public static final String PATTERN_EMAIL = "^(?=.{1,64}@)[\\p{L}0-9_-]+(\\.[\\p{L}0-9_-]+)*@[^-][\\p{L}0-9-]+(\\.[\\p{L}0-9-]+)*(\\.[\\p{L}]{2,})$"; + + + + // public static final String PATTERN_MALAYALAM = "U+0D00–U+0D7F"; + //public static final String PATTERN_MALAYALAM = "(?:\P{M}\p{M}*)+"; + + public static final String TENANTS = "tenants"; public static final String TENANT_MODULE_NAME = "tenant"; public static final String CR_MDMS_MARRIAGETYPE = "MarriagePlaceType"; @@ -115,6 +135,7 @@ public class MarriageConstants { public static final String PLACE_TYPE_PUBLIC_PLACE = "PUBLIC_PLACE"; + public static final String ADDRESS_INDIA = "COUNTRY_INDIA"; @@ -159,6 +180,7 @@ public class MarriageConstants { public static final String MARRIAGE_TYPE = "TypeOfMarriage"; public static final String SUB_REGISTAR_PLACE_TYPE = "SubRegistar"; + public static final String WORKFLOW_STATUS_APPROVED = "APPROVED"; From db1eacb62d8b59d290adfb33f1f5417ac491e7af Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 17 Jun 2023 11:34:07 +0530 Subject: [PATCH 414/420] validations in model for unit testing --- .../web/model/marriage/BrideDetails.java | 49 ++++++++++--------- .../web/model/marriage/GroomDetails.java | 36 ++++++++++++-- .../marriage/utils/MarriageConstants.java | 2 +- 3 files changed, 59 insertions(+), 28 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java index 557698ab5fc..d34abe96a07 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java @@ -48,14 +48,12 @@ public class BrideDetails { private String residentship; @Schema(type = "string", description = "Aadhaar number") - // @NotBlank(message = "Aadhaar number is required") @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") @JsonProperty("brideAadharNo") private String aadharno; @Schema(type = "string", description = "Passport number") - // @NotBlank(message = "Aadhaar number is required") @Size(min=8,max=8, message = "BRIDE DETAILS :Passport number must be an 8 digit number") @Pattern(regexp = MarriageConstants.PATTERN_PASSPORT, message = "BRIDE DETAILS :Invalid Passport number") @JsonProperty("bridePassportNo") @@ -90,7 +88,7 @@ public class BrideDetails { @Schema(type = "string", description = "Bride's Middle name malayalam") - @Size(max = 64)//, message = "Middle name in malayalam length cannot exceed 64 characters") + @Size(max = 64)//, message =```````````````````````````````````````````````````````````````````````````````````````````````` @JsonProperty("brideMiddlenameMl") private String middlenameMl; @@ -100,7 +98,7 @@ public class BrideDetails { private String lastnameEn; @Schema(type = "string", description = "Bride's Last name malayalam") - @Size(max = 64)//, message = "Last name in malayalam length cannot exceed 64 characters") + @Size(max = 64) @JsonProperty("brideLastnameMl") private String lastnameMl; @@ -112,13 +110,14 @@ public class BrideDetails { private Long mobile; @Schema(type = "string", description = "Email") - // @NotBlank(message = "BRIDE DETAILS :Mobile number is required") @Size(min = 10, max = 10, message = "BRIDE DETAILS :Invalid Email Id") - @Pattern(regexp = MarriageConstants.PATTERN_MOBILE, message = "BRIDE DETAILS :Invalid Email Id") + @Pattern(regexp = MarriageConstants.PATTERN_EMAIL, message = "BRIDE DETAILS :Invalid Email Id") @JsonProperty("brideEmailid") private String emailid; - @Size(max = 20) + @Schema(type = "string", description = "Email") + @NotBlank(message = "BRIDE DETAILS :Gender is required") + @Size(max = 20, message = "BRIDE DETAILS :length cannot exceed 64 characters") @JsonProperty("brideGender") private String gender; @@ -126,10 +125,16 @@ public class BrideDetails { @JsonProperty("brideDOB") private long dateofbirth; + + @Schema(type = "integer", description = "Age") + @Size(min = 2, max = 3, message = "BRIDE DETAILS :Invalid age") + @Pattern(regexp = MarriageConstants.PATTERN_AGE, message = "BRIDE DETAILS :Invalid Age") @JsonProperty("brideAge") private Integer age; - @Size(max = 64) + @Schema(type = "string", description = "Parent or Guardian") + @Size(max = 64, message = "BRIDE DETAILS:Parent/guardian flag cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid Parent or Guardian") @JsonProperty("brideParentGuardian") private String parentGuardian; @@ -147,7 +152,7 @@ public class BrideDetails { @Schema(type = "string", description = "Name of Mother") - @Size(max = 200, message = "Name length of Bride's mother cannot exceed 200 characters") + @Size(max = 200, message = "BRIDE DETAILS: Length of Mother's name cannot exceed 200 characters") @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("brideMothernameEn") private String mothernameEn; @@ -159,22 +164,20 @@ public class BrideDetails { private String mothernameMl; @Schema(type = "string", description = "Aadhaar number") - // @NotBlank(message = "Aadhaar number is required") - @Size(min = 12, max = 12, message = "Aadhaar number of Brides's father must be a 12 digit number") + @Size(min = 12, max = 12, message = "BRIDE DETAILS:Aadhaar number of father must be a 12 digit number") @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "Invalid aadhaar number") @JsonProperty("brideFatherAadharNo") private String fatherAadharno; @Schema(type = "string", description = "Aadhaar number") - // @NotBlank(message = "Aadhaar number is required") - @Size(min = 12, max = 12, message = "Aadhaar number of Brides's mother must be a 12 digit number") + @Size(min = 12, max = 12, message = "BRIDE DETAILS:Aadhaar number of mother must be a 12 digit number") @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "Invalid aadhaar number") @JsonProperty("brideMotherAadharNo") private String motherAadharno; - @Schema(type = "string", description = "Name of Guardian in malayalam") - @Size(max = 200, message = "Name length of Bride's guardian cannot exceed 200 characters") - @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") + @Schema(type = "string", description = "Name of Guardian") + @Size(max = 200, message = "BRIDE DETAILS:Name length of guardian cannot exceed 200 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "BRIDE DETAILS:Invalid name of guardian") @JsonProperty("brideGuardiannameEn") private String guardiannameEn; @@ -185,22 +188,24 @@ public class BrideDetails { private String guardiannameMl; @Schema(type = "string", description = "Aadhaar number") - // @NotBlank(message = "Aadhaar number is required") - @Size(min = 12, max = 12, message = "Aadhaar number of Brides's guardian must be a 12 digit number") - @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "Invalid aadhaar number") + @Size(min = 12, max = 12, message = "BRIDE DETAILS:Aadhaar number of guardian must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS:Invalid aadhaar number of guardian") @JsonProperty("brideGuardianAadharNo") private String guardianAadharno; @Schema(type = "string", description = "Marital Status") - @NotBlank(message = "Marital Status is required") - @Size(min = 64, message = "Marital Statusof Bride cannot exceed 64 characters") + @NotBlank(message = "BRIDE DETAILS:Marital Status is required") + @Size(min = 64, message = "BRIDE DETAILS:Marital Status cannot exceed 64 characters") @JsonProperty("brideMaritalstatusID") private String maritalstatusid; - + @Schema(type = "boolean", description = "Is spouseliving") @JsonProperty("brideIsSpouseLiving") private Boolean brideIsSpouseLiving; + @Schema(type = "integer", description = "No: of Spouse") + @Size(max = 2,message = "BRIDE DETAILS :Invalid No: of Spouse") + @Pattern(regexp = MarriageConstants.PATTERN_AGE, message = "BRIDE DETAILS :Invalid No: of Spouse") @JsonProperty("brideNoOfSpouse") private Integer brideNoOfSpouse; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java index 38f812f8b22..cd609acf649 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java @@ -2,10 +2,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import org.ksmart.marriage.common.model.AuditDetails; +import org.ksmart.marriage.utils.MarriageConstants; +import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; +import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; @Getter @Setter @@ -13,11 +17,17 @@ @NoArgsConstructor @Builder public class GroomDetails { - @Size(max = 64) + + @Schema(type = "string", format = "uuid", description = "Bride Details Id") + @Size(max = 64, message = "GROOM DETAILS :Groom id length cannot exceed 64 characters") @JsonProperty("groomId") private String groomId; - @Size(max = 64) + @Schema(type = "string", description = "Tenant identification number", example = "kl.cochin") + @NotBlank(message = "GROOM DETAILS :Tenant identification number is required") + @Size(max = 64, message = "GROOM DETAILS :Tenant identification number length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_TENANT, + message = "GROOM DETAILS :Invalid tenant identification number format, eg: kl.cochin") @JsonProperty("tenentId") private String tenentId; @@ -34,7 +44,9 @@ public class GroomDetails { @JsonProperty("groomResidentShip") private String residentship; - @Size(max = 15) + @Schema(type = "string", description = "Aadhaar number") + @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") @JsonProperty("groomAadharNo") private String aadharno; @@ -108,29 +120,43 @@ public class GroomDetails { @JsonProperty("groomMothernameMl") private String mothernameMl; - @Size(max = 15) + @Schema(type = "string", description = "Aadhaar number") + @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") @JsonProperty("groomFatherAadharNo") private String fatherAadharno; - @Size(max = 15) + + @Schema(type = "string", description = "Aadhaar number") + @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") @JsonProperty("groomMotherAadharNo") private String motherAadharno; + @Size(max = 200) @JsonProperty("groomGuardiannameEn") private String guardiannameEn; + @Size(max = 200) @JsonProperty("groomGuardiannameMl") private String guardiannameMl; @Size(max = 15) + + @Schema(type = "string", description = "Aadhaar number") + @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") @JsonProperty("groomGuardianAadharNo") private String guardianAadharno; @Size(max = 64) @JsonProperty("groomMaritalstatusID") private String maritalstatusid; + @JsonProperty("groomIsSpouseLiving") private Boolean groomIsSpouseLiving; + @JsonProperty("groomNoOfSpouse") private Integer groomNoOfSpouse; + @JsonProperty("auditDetails") private AuditDetails auditDetails; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index f70c8cf9b00..6ab653fa03b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -17,9 +17,9 @@ public class MarriageConstants { public static final String PATTERN_ENGLISH = "^[()_?a-zA-Z0-9-]+$;"; public static final String PATTERN_PASSPORT = "^[A-PR-WY][1-9]\\d\\s?\\d{4}[1-9]$"; public static final String PATTERN_SSN = "^(?!666|000|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0{4})\\d{4}$"; + public static final String PATTERN_AGE ="^(?:[1-9][0-9]?|1[01][0-9]|120)$"; public static final String PATTERN_EMAIL = "^(?=.{1,64}@)[\\p{L}0-9_-]+(\\.[\\p{L}0-9_-]+)*@[^-][\\p{L}0-9-]+(\\.[\\p{L}0-9-]+)*(\\.[\\p{L}]{2,})$"; - // public static final String PATTERN_MALAYALAM = "U+0D00–U+0D7F"; //public static final String PATTERN_MALAYALAM = "(?:\P{M}\p{M}*)+"; From 6eeafd3076b6017ac376da35937e91e8905cc1a4 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Sat, 17 Jun 2023 14:58:34 +0530 Subject: [PATCH 415/420] validation of groom Details:Model Class Added --- municipal-services/marriage-services/pom.xml | 14 ++- .../web/model/marriage/GroomDetails.java | 99 ++++++++++++++----- 2 files changed, 85 insertions(+), 28 deletions(-) diff --git a/municipal-services/marriage-services/pom.xml b/municipal-services/marriage-services/pom.xml index 3dd79f86bea..de9c2bcd9ee 100644 --- a/municipal-services/marriage-services/pom.xml +++ b/municipal-services/marriage-services/pom.xml @@ -30,6 +30,11 @@ org.springframework.boot spring-boot-starter-web + + io.swagger + swagger-core + 1.5.18 + org.springframework.boot spring-boot-starter-jdbc @@ -82,18 +87,23 @@ io.springfox springfox-swagger2 - 2.7.0 + 3.0.0 io.springfox springfox-swagger-ui - 2.7.0 + 3.0.0 com.google.guava guava 27.0-jre + + com.sun.xml.bind + jaxb-impl + 2.3.1 + diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java index cd609acf649..88b83bd7c80 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java @@ -18,7 +18,7 @@ @Builder public class GroomDetails { - @Schema(type = "string", format = "uuid", description = "Bride Details Id") + @Schema(type = "string", format = "uuid", description = "Groom Details Id") @Size(max = 64, message = "GROOM DETAILS :Groom id length cannot exceed 64 characters") @JsonProperty("groomId") private String groomId; @@ -33,6 +33,8 @@ public class GroomDetails { @NotNull @Size(max = 64) + @NotBlank(message = "GROOM DETAILS :BrideGroom field is required") + @Size(max = 64) @JsonProperty("brideGroom") private String brideGroom; @@ -40,120 +42,165 @@ public class GroomDetails { @JsonProperty("marriageid") private String marriageid; + @NotNull + @Size(max = 64) + @NotBlank(message = "GROOM DETAILS :Residentship is required") @Size(max = 64) @JsonProperty("groomResidentShip") private String residentship; @Schema(type = "string", description = "Aadhaar number") - @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") - @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") + @Size(min = 12, max = 12, message = "GROOM DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "GROOM DETAILS :Invalid aadhaar number") @JsonProperty("groomAadharNo") private String aadharno; - @Size(max = 1000) + @Schema(type = "string", description = "Passport number") + @Size(min=8,max=8, message = "GROOM DETAILS :Passport number must be an 8 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_PASSPORT, message = "GROOM DETAILS :Invalid Passport number") @JsonProperty("groomPassportNo") private String passportno; - @Size(max = 64) + @Schema(type = "string", description = "Social Security Number") + @Size(min=9,max=9, message = "GROOM DETAILS :Social Security Number must be a 9 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_SSN, message = "GROOM DETAILS :Invalid Social Security Number") @JsonProperty("groomSocialSecurityNo") private String socialsecurityno; - @Size(max = 200) + @Schema(type = "string", description = "Groom's First name") + @NotBlank(message = "GROOM DETAILS :First name is required") + @Size(max = 100, message = "GROOM DETAILS :First name length cannot exceed 100 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid first name") @JsonProperty("groomFirstnameEn") private String firstnameEn; - @Size(max = 200) + @Schema(type = "string", description = "Groom's First name") + @NotBlank(message = "GROOM DETAILS :First name in malayalam is required") + @Size(max = 100) @JsonProperty("groomFirstnameMl") private String firstnameMl; + @Schema(type = "string", description = "Groom's Middle name ") + @Size(max = 64, message = "GROOM DETAILS :Middle name length cannot exceed 64 characters") @Size(max = 200) @JsonProperty("groomMiddlenameEn") private String middlenameEn; - @Size(max = 200) + @Schema(type = "string", description = "Groom's Middle name malayalam") + @Size(max = 100) @JsonProperty("groomMiddlenameMl") private String middlenameMl; - @Size(max = 200) + @Schema(type = "string", description = "Groom's last name ") + @Size(max = 64, message = "GROOM DETAILS :Last name length cannot exceed 64 characters") @JsonProperty("groomLastnameEn") private String lastnameEn; - @Size(max = 200) + @Schema(type = "string", description = "Groom's Last name malayalam") + @Size(max = 64) @JsonProperty("groomLastnameMl") private String lastnameMl; - + @Schema(type = "string", description = "Mobile number") + @NotBlank(message = "GROOM DETAILS :Mobile number is required") + @Size(min = 10, max = 10, message = "GROOM DETAILS :mobile number length cannot exceed 10 digit") + @Pattern(regexp = MarriageConstants.PATTERN_MOBILE, message = "GROOM DETAILS :Invalid mobile number") @JsonProperty("groomMobile") private Long mobile; - @Size(max = 300) + @Schema(type = "string", description = "Email") + @Size(min = 10, max = 10, message = "GROOM DETAILS :Invalid Email Id") + @Pattern(regexp = MarriageConstants.PATTERN_EMAIL, message = "GROOM DETAILS :Invalid Email Id") @JsonProperty("groomEmailid") private String emailid; - @Size(max = 20) + @Schema(type = "string", description = "Email") + @NotBlank(message = "GROOM DETAILS :Gender is required") + @Size(max = 20, message = "GROOM DETAILS :length cannot exceed 64 characters") @JsonProperty("groomGender") private String gender; + @Schema(type = "integer",description = "Groom's Date of birth", format = "int64") @JsonProperty("groomDOB") private long dateofbirth; + @Schema(type = "integer", description = "Age") + @Size(min = 2, max = 3, message = "GROOM DETAILS :Invalid age") + @Pattern(regexp = MarriageConstants.PATTERN_AGE, message = "GROOM DETAILS :Invalid Age") @JsonProperty("groomAge") private Integer age; - @Size(max = 64) + @Schema(type = "string", description = "Parent or Guardian") + @Size(max = 64, message = "GROOM DETAILS:Parent/guardian flag cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid Parent or Guardian") @JsonProperty("groomParentGuardian") private String parentGuardian; - @Size(max = 200) + @Schema(type = "string", description = "Name of Father") + @Size(max = 200, message = "First name length of Groom's father cannot exceed 200 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("groomFathernameEn") private String fathernameEn; + @Schema(type = "string", description = "Name of Father in malayalam") @Size(max = 200) @JsonProperty("groomFathernameMl") private String fathernameMl; - @Size(max = 200) + @Schema(type = "string", description = "Name of Mother") + @Size(max = 200, message = "GROOM DETAILS: Length of Mother's name cannot exceed 200 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "Invalid name") @JsonProperty("groomMothernameEn") private String mothernameEn; - + + @Schema(type = "string", description = "Name of Mother in malayalam") @Size(max = 200) @JsonProperty("groomMothernameMl") private String mothernameMl; @Schema(type = "string", description = "Aadhaar number") - @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") - @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") + @Size(min = 12, max = 12, message = "GROOM DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "GROOM DETAILS :Invalid aadhaar number") @JsonProperty("groomFatherAadharNo") private String fatherAadharno; @Schema(type = "string", description = "Aadhaar number") - @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") - @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") + @Size(min = 12, max = 12, message = "GROOM DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "GROOM DETAILS :Invalid aadhaar number") @JsonProperty("groomMotherAadharNo") private String motherAadharno; - @Size(max = 200) + @Schema(type = "string", description = "Name of Guardian") + @Size(max = 200, message = "GROOM DETAILS:Name length of guardian cannot exceed 200 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME, message = "GROOM DETAILS:Invalid name of guardian") @JsonProperty("groomGuardiannameEn") private String guardiannameEn; - + + @Schema(type = "string", description = "Name of Guardian in malayalam") @Size(max = 200) @JsonProperty("groomGuardiannameMl") private String guardiannameMl; @Size(max = 15) @Schema(type = "string", description = "Aadhaar number") - @Size(min = 12, max = 12, message = "BRIDE DETAILS :Aadhaar number must be a 12 digit number") - @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "BRIDE DETAILS :Invalid aadhaar number") + @Size(min = 12, max = 12, message = "GROOM DETAILS :Aadhaar number must be a 12 digit number") + @Pattern(regexp = MarriageConstants.PATTERN_AADHAAR, message = "GROOM DETAILS :Invalid aadhaar number") @JsonProperty("groomGuardianAadharNo") private String guardianAadharno; - @Size(max = 64) + @Schema(type = "string", description = "Marital Status") + @NotBlank(message = "GROOM DETAILS:Marital Status is required") + @Size(min = 64, message = "GROOM DETAILS:Marital Status cannot exceed 64 characters") @JsonProperty("groomMaritalstatusID") private String maritalstatusid; + @Schema(type = "boolean", description = "Is spouseliving") @JsonProperty("groomIsSpouseLiving") private Boolean groomIsSpouseLiving; + @Schema(type = "integer", description = "No: of Spouse") + @Size(max = 2,message = "GROOM DETAILS :Invalid No: of Spouse") + @Pattern(regexp = MarriageConstants.PATTERN_AGE, message = "GROOM DETAILS :Invalid No: of Spouse") @JsonProperty("groomNoOfSpouse") private Integer groomNoOfSpouse; From b8b29ecd1dd24258da4c632bee4e7fedc9c79a53 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Sat, 17 Jun 2023 16:23:47 +0530 Subject: [PATCH 416/420] validations in model for unit testing --- .../model/marriage/BrideAddressDetails.java | 145 ++++++++++++++---- .../marriage/utils/MarriageConstants.java | 2 +- 2 files changed, 115 insertions(+), 32 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index f2a0734a106..cc63af1f068 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -1,9 +1,15 @@ package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; + +import org.ksmart.marriage.utils.MarriageConstants; @Getter @Setter @AllArgsConstructor @@ -11,51 +17,77 @@ @Builder public class BrideAddressDetails { - @Size(max = 64) + @Schema(type = "string", description = "Present country") + @NotBlank(message = "BRIDE ADDRESS :Present country is required") + @Size(max = 64, message = "BRIDE ADDRESS: Present country length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present country") @JsonProperty("presentaddressCountry") private String presentaddressCountry; - @Size(max = 64) + @Schema(type = "string", description = "Present State") + // @NotBlank(message = "BRIDE ADDRESS :Present state is required") + @Size(max = 64, message = "BRIDE ADDRESS: Present state length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present state") @JsonProperty("presentaddressStateName") private String presentaddressStateName; - @Size(max = 64) + @Schema(type = "string", description = "Localbody Name") + @Size(max = 64, message = "BRIDE ADDRESS:Present LB length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present LB") @JsonProperty("presentInsideKeralaLBName") private String presentInsideKeralaLBName; - @Size(max = 64) + @Schema(type = "string", description = "District") + @Size(max = 64, message = "BRIDE ADDRESS:Present district length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present district") @JsonProperty("presentInsideKeralaDistrict") private String presentInsideKeralaDistrict; - @Size(max = 64) + @Schema(type = "string", description = "Taluk Name") + @Size(max = 64, message = "BRIDE ADDRESS:Present Taluk length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Taluk") @JsonProperty("presentInsideKeralaTaluk") private String presentInsideKeralaTaluk; - @Size(max = 64) + @Schema(type = "string", description ="Village Name") + @Size(max = 64, message = "BRIDE ADDRESS:Present village length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present LB") @JsonProperty("presentInsideKeralaVillage") private String presentInsideKeralaVillage; - @Size(max = 1000) + @Schema(type = "string", description = "Locality Name") + @Size(max = 1000, message = "BRIDE ADDRESS:Present Locality length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Locality") @JsonProperty("presentInsideKeralaLocalityNameEn") private String presentInsideKeralaLocalityNameEn; - @Size(max = 2000) + @Schema(type = "string", description = "Street Name") + @Size(max = 2000, message = "BRIDE ADDRESS:Present street name length cannot exceed 2000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present street name") @JsonProperty("presentInsideKeralaStreetNameEn") private String presentInsideKeralaStreetNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "House Name") + @Size(max = 2500, message = "BRIDE ADDRESS:Present House Name length cannot exceed 2500 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present House Name") @JsonProperty("presentInsideKeralaHouseNameEn") private String presentInsideKeralaHouseNameEn; - @Size(max = 1000) + @Schema(type = "string", description = "Locality Name in malayalam") + @Size(max = 1000)//, message = "BRIDE ADDRESS:Invalid Present Locality Name in malayalam length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present Locality Name in malayalam") @JsonProperty("presentInsideKeralaLocalityNameMl") private String presentInsideKeralaLocalityNameMl; - @Size(max = 2000) + @Schema(type = "string", description = "Street Name in malayalam") + @Size(max = 2000)//, message = "BRIDE ADDRESS:Street Name in malayalam length cannot exceed 2000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present Street Name in malayalam") @JsonProperty("presentInsideKeralaStreetNameMl") private String presentInsideKeralaStreetNameMl; - @Size(max = 2500) + @Schema(type = "string", description = "House Name in malayalam") + @Size(max = 2500 )//, message = "BRIDE ADDRESS:Invalid Present House Name in malayalam") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present House Name in malayalam") @JsonProperty("presentInsideKeralaHouseNameMl") private String presentInsideKeralaHouseNameMl; @@ -63,106 +95,157 @@ public class BrideAddressDetails { @JsonProperty("presentInsideKeralaPincode") private String presentInsideKeralaPincode; - @Size(max = 64) + @Schema(type = "string", description = "PostOffice Name") + @Size(max = 64, message = "BRIDE ADDRESS:Present Postoffice Name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Postoffice Name") @JsonProperty("presentInsideKeralaPostOffice") private String presentInsideKeralaPostOffice; - @Size(max = 64) + @Schema(type = "string", description = "Ward Number") + @Size(max = 64, message = "BRIDE ADDRESS:Invalid Present Ward Number length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Ward Number") @JsonProperty("presentWardNo") private String presentWardNo; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala District") + @Size(max = 64, message = "BRIDE ADDRESS:Outside Kerala District length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside Kerala District") @JsonProperty("presentOutsideKeralaDistrict") private String presentOutsideKeralaDistrict; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Taluk") + @Size(max = 250, message = "BRIDE ADDRESS:Outside Kerala Taluk length cannot exceed 250 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside Kerala Taluk") @JsonProperty("presentOutsideKeralaTaluk") private String presentOutsideKeralaTalukName; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Village/Town") + @Size(max = 64, message = "BRIDE ADDRESS:Outside Kerala Village/Town length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside Kerala Village/Town") @JsonProperty("presentOutsideKeralaVillage") private String presentOutsideKeralaVillageorTown; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Village Name") + @Size(max = 250, message = "BRIDE ADDRESS:Outside Kerala Village name length cannot exceed 250 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside Kerala Village Name") @JsonProperty("presentOutsideKeralaCityVilgeEn") private String presentOutsideKeralaCityVilgeNameEn; - @Size(max = 64) + @Schema(type = "string", description = "Pincode") + @Size(min = 6, max = 6, message = "Invalid pincode") + @Pattern(regexp = MarriageConstants.PATTERN_PINCODE, message = "Invalid pincode") @JsonProperty("presentOutsideKeralaPincode") private String presentOutsideKeralaPincode; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala Postoffice Name") + @Size(max = 64, message = "BRIDE ADDRESS:Outside Kerala Postoffice name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside Kerala Postoffice Name") @JsonProperty("presentOutsideKeralaPostOfficeEn") private String presentOutsideKeralaPostOfficeEn; - @Size(max = 64) + + @Schema(type = "string", description = "Outside Kerala Postoffice Name in malayalam") + @Size(max = 64)//, message = "BRIDE ADDRESS:"Invalid Present LB") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present Outside Kerala Postoffice Name in malayalam") @JsonProperty("presentOutsideKeralaPostOfficeMl") private String presentOutsideKeralaPostOfficeMl; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Locality Name") + @Size(max = 1000, message = "BRIDE ADDRESS:Outside Kerala Locality name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside Kerala Locality Name") @JsonProperty("presentOutsideKeralaLocalityNameEn") private String presentOutsideKeralaLocalityNameEn; - @Size(max = 2000) + @Schema(type = "string", description = "Outside Kerala Street Name") + @Size(max = 64, message = "BRIDE ADDRESS:Outside Kerala street name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside Kerala Street Name") @JsonProperty("presentOutsideKeralaStreetNameEn") private String presentOutsideKeralaStreetNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "Outside Kerala House Name") + @Size(max = 2500, message = "BRIDE ADDRESS:Outside Kerala House Name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside Kerala House Name") @JsonProperty("presentOutsideKeralaHouseNameEn") private String presentOutsideKeralaHouseNameEn; @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala locality in malayalam") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Outside Kerala locality in malayalam") @JsonProperty("presentOutsideKeralaLocalityNameMl") private String presentOutsideKeralaLocalityNameMl; + @Schema(type = "string", description = "Outside Kerala StreetName in malayalam") @Size(max = 2000) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present Outside Kerala StreetName in malayalam") @JsonProperty("presentOutsideKeralaStreetNameMl") private String presentOutsideKeralaStreetNameMl; + @Schema(type = "string", description = "Outside Kerala Housename in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present Outside Kerala Housename in malayalam") @JsonProperty("presentOutsideKeralaHouseNameMl") private String presentOutsideKeralaHouseNameMl; - @Size(max = 2500) + @Schema(type = "string", description = "Outside India Address-1") + @Size(max = 2500, message = "BRIDE ADDRESS:Present Outside India Address-1 cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside India Address-1") @JsonProperty("presentOutSideIndiaAdressEn") private String presentOutSideIndiaAdressEn; + @Schema(type = "string", description = "Outside India Address-1 in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present Outside India Address-1 in malayalam") @JsonProperty("presentOutSideIndiaAdressMl") private String presentOutSideIndiaAdressMl; - @Size(max = 2500) + @Schema(type = "string", description = "Outside India Address-2") + @Size(max = 2500, message = "BRIDE ADDRESS:Present Outside India Address-2 cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside India Address-2") @JsonProperty("presentOutSideIndiaAdressEnB") private String presentOutSideIndiaAdressEnB; + @Schema(type = "string", description = "Outside India Address-2 in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present Outside India Address-2 in malayalam") @JsonProperty("presentOutSideIndiaAdressMlB") private String presentOutSideIndiaAdressMlB; - @Size(max = 2500) + @Schema(type = "string", description = "Province") + @Size(max = 2500, message = "BRIDE ADDRESS:Present Province cannot exceed 2500 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Province") @JsonProperty("presentOutSideIndiaProvinceEn") private String presentOutSideIndiaProvinceEn; + @Schema(type = "string", description = "Outside India Locality in malayalam") @Size(max = 1000) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Present Outside India Locality") @JsonProperty("presentOutSideIndiaLocalityMl") private String presentOutSideIndiaLocalityMl; + @Schema(type = "string", description = "Province in Malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Province in Malayalam ") @JsonProperty("presentOutSideIndiaProvinceMl") private String presentOutSideIndiaProvinceMl; - @Size(max = 64) @JsonProperty("presentOutSideCountry") private String presentOutSideCountry; - @Size(max = 1000) + @Schema(type = "string", description = "Outside India Village Name") + @Size(max = 1000, message = "BRIDE ADDRESS: Present Outside India Village Name cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside India Village Name") @JsonProperty("presentOutSideIndiaadrsVillage") private String presentOutSideIndiaadrsVillage; - @Size(max = 64) + @Schema(type = "string", description = "OutsideIndia City/Town") + @Size(max = 64, message = "BRIDE ADDRESS: Present OutsideIndia City/Town cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present OutsideIndia City/Town") @JsonProperty("presentOutSideIndiaadrsCityTown") private String presentOutSideIndiaadrsCityTown; - @Size(max = 10) + + @Schema(type = "string", description = "Outside India PostalCode") + @Size(max = 10, message = "BRIDE ADDRESS:Present Outside India PostalCode cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Present Outside India PostalCode") @JsonProperty("presentOutSideIndiaPostCode") private String presentOutSideIndiaPostCode; diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java index 6ab653fa03b..2fcd8cdd49c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/utils/MarriageConstants.java @@ -19,7 +19,7 @@ public class MarriageConstants { public static final String PATTERN_SSN = "^(?!666|000|9\\d{2})\\d{3}-(?!00)\\d{2}-(?!0{4})\\d{4}$"; public static final String PATTERN_AGE ="^(?:[1-9][0-9]?|1[01][0-9]|120)$"; public static final String PATTERN_EMAIL = "^(?=.{1,64}@)[\\p{L}0-9_-]+(\\.[\\p{L}0-9_-]+)*@[^-][\\p{L}0-9-]+(\\.[\\p{L}0-9-]+)*(\\.[\\p{L}]{2,})$"; - + public static final String PATTERN_NAME_ML = "^[\\u0D02\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3E-\\u0D43\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D60\\u0D61\\u0D66-\\u0D6F][0-9]*$"; // public static final String PATTERN_MALAYALAM = "U+0D00–U+0D7F"; //public static final String PATTERN_MALAYALAM = "(?:\P{M}\p{M}*)+"; From c48ac59f0b8e918e247022a72958151a79a718b5 Mon Sep 17 00:00:00 2001 From: Jasmine Date: Mon, 19 Jun 2023 11:39:05 +0530 Subject: [PATCH 417/420] validations in model for unit testing --- .../model/marriage/BrideAddressDetails.java | 154 +++++++++++++----- 1 file changed, 115 insertions(+), 39 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java index cc63af1f068..fa9facdecc6 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideAddressDetails.java @@ -91,7 +91,9 @@ public class BrideAddressDetails { @JsonProperty("presentInsideKeralaHouseNameMl") private String presentInsideKeralaHouseNameMl; - @Size(max = 10) + @Schema(type = "string", description = "Pincode") + @Size(min = 6, max = 6, message = "Invalid pincode") + @Pattern(regexp = MarriageConstants.PATTERN_PINCODE, message = "Invalid pincode") @JsonProperty("presentInsideKeralaPincode") private String presentInsideKeralaPincode; @@ -350,154 +352,231 @@ public class BrideAddressDetails { private String outSideIndiaPostCodePresent; ////Permanant + @JsonProperty("isPermanentAddress") private Boolean isPermanentAddress; - @Size(max = 1000) + @Schema(type = "string", description = "Permanent country") + @NotBlank(message = "BRIDE ADDRESS :Permanent country is required") + @Size(max = 64, message = "BRIDE ADDRESS: Permanent country length cannot exceed 64 characters") @JsonProperty("permtaddressCountry") private String permtaddressCountry; - @Size(max = 64) + @Schema(type = "string", description = "Permanent State") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent state") @JsonProperty("permtaddressStateName") private String permtaddressStateName; - @Size(max = 64) + @Schema(type = "string", description = "Localbody Name") + @Size(max = 64, message = "BRIDE ADDRESS:Permanent LB length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent LB") @JsonProperty("permntInKeralaAdrLBName") private String permntInKeralaAdrLBName; - @Size(max = 64) + @Schema(type = "string", description = "District") + @Size(max = 64, message = "BRIDE ADDRESS:Permanent district length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent district") @JsonProperty("permntInKeralaAdrDistrict") private String permntInKeralaAdrDistrict; - @Size(max = 64) + @Schema(type = "string", description ="Village Name") + @Size(max = 64, message = "BRIDE ADDRESS:Permanent village length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent LB") @JsonProperty("permntOutsideKeralaCityVilgeEn") private String permntOutsideKeralaCityVilgeEn; - @Size(max = 64) + @Schema(type = "string", description = "Taluk Name") + @Size(max = 64, message = "BRIDE ADDRESS:Permanent Taluk length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Taluk") @JsonProperty("permntInKeralaAdrTaluk") private String permntInKeralaAdrTaluk; - @Size(max = 64) + + @Schema(type = "string", description ="Village Name") + @Size(max = 64, message = "BRIDE ADDRESS:Permanent village length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent LB") @JsonProperty("permntInKeralaAdrVillage") private String permntInKeralaAdrVillage; - @Size(max = 2500) - @JsonProperty("permntOutSideIndiaprovinceMl") - private String permntOutSideIndiaProvinceMl; - - @Size(max = 2500) - @JsonProperty("permntOutSideIndiaprovinceEn") - private String permntOutSideIndiaProvinceEn; - @Size(max = 1000) + @Schema(type = "string", description = "Locality Name") + @Size(max = 1000, message = "BRIDE ADDRESS:Permanent Locality length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Locality") @JsonProperty("permntInKeralaAdrLocalityNameEn") private String permntInKeralaAdrLocalityNameEn; - @Size(max = 2000) + @Schema(type = "string", description = "Street Name") + @Size(max = 2000, message = "BRIDE ADDRESS:Permanent street name length cannot exceed 2000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent street name") @JsonProperty("permntInKeralaAdrStreetNameEn") private String permntInKeralaAdrStreetNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "House Name") + @Size(max = 2500, message = "BRIDE ADDRESS:Permanent House Name length cannot exceed 2500 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent House Name") @JsonProperty("permntInKeralaAdrHouseNameEn") private String permntInKeralaAdrHouseNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "Locality Name in malayalam") + @Size(max = 1000)//, message = "BRIDE ADDRESS:Invalid Permanent Locality Name in malayalam length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Permanent Locality Name in malayalam") @JsonProperty("permntInKeralaAdrLocalityNameMl") private String permntInKeralaAdrLocalityNameMl; - @Size(max = 2500) + @Schema(type = "string", description = "Street Name in malayalam") + @Size(max = 2000)//, message = "BRIDE ADDRESS:Street Name in malayalam length cannot exceed 2000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Permanent Street Name in malayalam") @JsonProperty("permntInKeralaAdrStreetNameMl") private String permntInKeralaAdrStreetNameMl; - @Size(max = 2500) + @Schema(type = "string", description = "House Name in malayalam") + @Size(max = 2500 )//, message = "BRIDE ADDRESS:Invalid Permanent House Name in malayalam") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Permanent House Name in malayalam") @JsonProperty("permntInKeralaAdrHouseNameMl") private String permntInKeralaAdrHouseNameMl; - @Size(max = 64) + @Schema(type = "string", description = "Pincode") + @Size(min = 6, max = 6, message = "Invalid pincode") + @Pattern(regexp = MarriageConstants.PATTERN_PINCODE, message = "Invalid pincode") @JsonProperty("permntInKeralaAdrPincode") private String permntInKeralaAdrPincode; - @Size(max = 64) + @Schema(type = "string", description = "PostOffice Name") + @Size(max = 64, message = "BRIDE ADDRESS:Permanent Postoffice Name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Postoffice Name") @JsonProperty("permntInKeralaAdrPostOffice") private String permntInKeralaAdrPostOffice; - @Size(max = 64) + @Schema(type = "string", description = "Ward Number") + @Size(max = 64, message = "BRIDE ADDRESS:Invalid Permanent Ward Number length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Ward Number") @JsonProperty("permntInKeralaWardNo") private String permntInKeralaWardNo; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala District") + @Size(max = 64, message = "BRIDE ADDRESS:Outside Kerala District length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala District") @JsonProperty("permntOutsideKeralaDistrict") private String permntOutsideKeralaDistrict; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Taluk") + @Size(max = 250, message = "BRIDE ADDRESS:Outside Kerala Taluk length cannot exceed 250 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala Taluk") @JsonProperty("permntOutsideKeralaTaluk") private String permntOutsideKeralaTaluk; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Village/Town") + @Size(max = 64, message = "BRIDE ADDRESS:Outside Kerala Village/Town length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala Village/Town") @JsonProperty("permntOutsideKeralaVillage") private String permntOutsideKeralaVillageorTown; - @Size(max = 64) + @Schema(type = "string", description = "Pincode") + @Size(min = 6, max = 6, message = "Invalid pincode") + @Pattern(regexp = MarriageConstants.PATTERN_PINCODE, message = "Invalid pincode") @JsonProperty("permntOutsideKeralaPincode") private String permntOutsideKeralaPincode; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Locality Name") + @Size(max = 1000, message = "BRIDE ADDRESS:Outside Kerala Locality name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala Locality Name") @JsonProperty("permntOutsideKeralaLocalityNameEn") private String permntOutsideKeralaLocalityNameEn; - @Size(max = 2000) + @Schema(type = "string", description = "Outside Kerala Street Name") + @Size(max = 64, message = "BRIDE ADDRESS:Outside Kerala street name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala Street Name") @JsonProperty("permntOutsideKeralaStreetNameEn") private String permntOutsideKeralaStreetNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "Outside Kerala House Name") + @Size(max = 2500, message = "BRIDE ADDRESS:Outside Kerala House Name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala House Name") @JsonProperty("permntOutsideKeralaHouseNameEn") private String permntOutsideKeralaHouseNameEn; @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala locality in malayalam") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Outside Kerala locality in malayalam") @JsonProperty("permntOutsideKeralaLocalityNameMl") private String permntOutsideKeralaLocalityNameMl; + @Schema(type = "string", description = "Outside Kerala StreetName in malayalam") @Size(max = 2000) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala StreetName in malayalam") @JsonProperty("permntOutsideKeralaStreetNameMl") private String permntOutsideKeralaStreetNameMl; + @Schema(type = "string", description = "Outside Kerala Housename in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala Housename in malayalam") @JsonProperty("permntOutsideKeralaHouseNameMl") private String permntOutsideKeralaHouseNameMl; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala Postoffice Name") + @Size(max = 64, message = "BRIDE ADDRESS:Outside Kerala Postoffice name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala Postoffice Name") @JsonProperty("permntOutsideKeralaPostOfficeEn") private String permntOutsideKeralaPostOfficeEn; + @Schema(type = "string", description = "Outside Kerala Postoffice Name in malayalam") @Size(max = 64) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Permanent Outside Kerala Postoffice Name in malayalam") @JsonProperty("permntOutsideKeralaPostOfficeMl") private String permntOutsideKeralaPostOfficeMl; - @Size(max = 2500) + @Schema(type = "string", description = "Outside India Address-1") + @Size(max = 2500, message = "BRIDE ADDRESS:Permanent Outside India Address-1 cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside India Address-1") @JsonProperty("permntOutsideIndiaLineoneEn") private String permntOutsideIndiaLineoneEn; + @Schema(type = "string", description = "Outside India Address-1 in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Permanent Outside India Address-1 in malayalam") @JsonProperty("permntOutsideIndiaLineoneMl") private String permntOutsideIndiaLineoneMl; - @Size(max = 2500) + @Schema(type = "string", description = "Outside India Address-2") + @Size(max = 2500, message = "BRIDE ADDRESS:Permanent Outside India Address-2 cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside India Address-2") @JsonProperty("permntOutsideIndiaLinetwoEn") private String permntOutsideIndiaLinetwoEn; + @Schema(type = "string", description = "Outside India Address-2 in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Permanent Outside India Address-2 in malayalam") @JsonProperty("permntOutsideIndiaLinetwoMl") private String permntOutsideIndiaLinetwoMl; - @Size(max = 1000) + @Schema(type = "string", description = "Province") + @Size(max = 2500, message = "BRIDE ADDRESS:Permanent Province cannot exceed 2500 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Province") + @JsonProperty("permntOutSideIndiaprovinceEn") + private String permntOutSideIndiaProvinceEn; + + @Schema(type = "string", description = "Province in Malayalam") + @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "BRIDE ADDRESS:Invalid Province in Malayalam ") + @JsonProperty("permntOutSideIndiaprovinceMl") + private String permntOutSideIndiaProvinceMl; + + @Schema(type = "string", description = "Outside India Village Name") + @Size(max = 1000, message = "BRIDE ADDRESS: Permanent Outside India Village Name cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside India Village Name") @JsonProperty("permntOutsideIndiaVillage") private String permntOutsideIndiaVillage; - @Size(max = 1000) + @Schema(type = "string", description = "OutsideIndia City/Town") + @Size(max = 64, message = "BRIDE ADDRESS: Permanent OutsideIndia City/Town cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent OutsideIndia City/Town") @JsonProperty("permntOutsideIndiaCityTown") private String permntOutsideIndiaCityTown; + @Schema(type = "string", description = "Outside India PostalCode") + @Size(max = 10, message = "BRIDE ADDRESS:Permanent Outside India PostalCode cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "BRIDE ADDRESS:Invalid Permanent Outside India PostalCode") @JsonProperty("permanentOutsideIndiaPostCode") private String permanentOutsideIndiaPostCode; @@ -512,9 +591,6 @@ public class BrideAddressDetails { @JsonProperty("permanentUuid") private String permanentUuid; - // @JsonProperty("isPermanentAddressInt") - // private Integer isPermanentAddressInt; - @JsonProperty("permanentAddrTalukId") private String permanentAddrTalukId ; From da80afdc62b6f7ae0ff6eafd6387070b31c1cf91 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 19 Jun 2023 15:00:37 +0530 Subject: [PATCH 418/420] model class feild validations : GroomAddressDetails --- .../model/marriage/GroomAddressDetails.java | 145 ++++++++++++++---- 1 file changed, 114 insertions(+), 31 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 42343e2cd79..5bae9c83f4c 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -1,8 +1,12 @@ package org.ksmart.marriage.marriageapplication.web.model.marriage; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; +import org.ksmart.marriage.utils.MarriageConstants; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Pattern; import javax.validation.constraints.Size; @Getter @Setter @@ -11,143 +15,215 @@ @Builder public class GroomAddressDetails { - @Size(max = 64) + @Schema(type = "string", description = "Present country") + @NotBlank(message = "GROOM ADDRESS :Present country is required") + @Size(max = 64, message = "GROOM ADDRESS: Present country length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present country") @JsonProperty("presentaddressCountry") private String presentaddressCountry; - @Size(max = 64) + @Schema(type = "string", description = "Present State") + @Size(max = 64, message = "GROOM ADDRESS: Present state length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present state") @JsonProperty("presentaddressStateName") private String presentaddressStateName; - @Size(max = 64) + @Schema(type = "string", description = "Localbody Name") + @Size(max = 64, message = "GROOM ADDRESS:Present LB length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present LB") @JsonProperty("presentInsideKeralaLBName") private String presentInsideKeralaLBName; - @Size(max = 64) + @Schema(type = "string", description = "District") + @Size(max = 64, message = "GROOM ADDRESS:Present district length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present district") @JsonProperty("presentInsideKeralaDistrict") private String presentInsideKeralaDistrict; - @Size(max = 64) + @Schema(type = "string", description = "Taluk Name") + @Size(max = 64, message = "GROOM ADDRESS:Present Taluk length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Taluk") @JsonProperty("presentInsideKeralaTaluk") private String presentInsideKeralaTaluk; - @Size(max = 64) + @Schema(type = "string", description ="Village Name") + @Size(max = 64, message = "GROOM ADDRESS:Present village length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present LB") @JsonProperty("presentInsideKeralaVillage") private String presentInsideKeralaVillage; - @Size(max = 1000) + @Schema(type = "string", description = "Locality Name") + @Size(max = 1000, message = "GROOM ADDRESS:Present Locality length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Locality") @JsonProperty("presentInsideKeralaLocalityNameEn") private String presentInsideKeralaLocalityNameEn; - @Size(max = 2000) + @Schema(type = "string", description = "Street Name") + @Size(max = 2000, message = "GROOM ADDRESS:Present street name length cannot exceed 2000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present street name") @JsonProperty("presentInsideKeralaStreetNameEn") private String presentInsideKeralaStreetNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "House Name") + @Size(max = 2500, message = "GROOM ADDRESS:Present House Name length cannot exceed 2500 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present House Name") @JsonProperty("presentInsideKeralaHouseNameEn") private String presentInsideKeralaHouseNameEn; - @Size(max = 1000) + @Schema(type = "string", description = "Locality Name in malayalam") + @Size(max = 1000)//, message = "GROOM ADDRESS:Invalid Present Locality Name in malayalam length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present Locality Name in malayalam") @JsonProperty("presentInsideKeralaLocalityNameMl") private String presentInsideKeralaLocalityNameMl; - @Size(max = 2000) + @Schema(type = "string", description = "Street Name in malayalam") + @Size(max = 2000)//, message = "GROOM ADDRESS:Street Name in malayalam length cannot exceed 2000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present Street Name in malayalam") @JsonProperty("presentInsideKeralaStreetNameMl") private String presentInsideKeralaStreetNameMl; - @Size(max = 2500) + @Schema(type = "string", description = "House Name in malayalam") + @Size(max = 2500 )//, message = "GROOM ADDRESS:Invalid Present House Name in malayalam") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present House Name in malayalam") @JsonProperty("presentInsideKeralaHouseNameMl") private String presentInsideKeralaHouseNameMl; - @Size(max = 10) + @Schema(type = "string", description = "Pincode") + @Size(min = 6, max = 6, message = "Invalid pincode") + @Pattern(regexp = MarriageConstants.PATTERN_PINCODE, message = "Invalid pincode") @JsonProperty("presentInsideKeralaPincode") private String presentInsideKeralaPincode; - @Size(max = 64) + @Schema(type = "string", description = "PostOffice Name") + @Size(max = 64, message = "GROOM ADDRESS:Present Postoffice Name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Postoffice Name") @JsonProperty("presentInsideKeralaPostOffice") private String presentInsideKeralaPostOffice; - @Size(max = 64) + @Schema(type = "string", description = "Ward Number") + @Size(max = 64, message = "GROOM ADDRESS:Invalid Present Ward Number length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Ward Number") @JsonProperty("presentWardNo") private String presentWardNo; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala District") + @Size(max = 64, message = "GROOM ADDRESS:Outside Kerala District length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside Kerala District") @JsonProperty("presentOutsideKeralaDistrict") private String presentOutsideKeralaDistrict; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Taluk") + @Size(max = 250, message = "GROOM ADDRESS:Outside Kerala Taluk length cannot exceed 250 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside Kerala Taluk") @JsonProperty("presentOutsideKeralaTaluk") private String presentOutsideKeralaTalukName; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Village/Town") + @Size(max = 64, message = "GROOM ADDRESS:Outside Kerala Village/Town length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside Kerala Village/Town") @JsonProperty("presentOutsideKeralaVillage") private String presentOutsideKeralaVillageorTown; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Village Name") + @Size(max = 250, message = "GROOM ADDRESS:Outside Kerala Village name length cannot exceed 250 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside Kerala Village Name") @JsonProperty("presentOutsideKeralaCityVilgeEn") private String presentOutsideKeralaCityVilgeNameEn; - @Size(max = 64) + @Schema(type = "string", description = "Pincode") + @Size(min = 6, max = 6, message = "Invalid pincode") + @Pattern(regexp = MarriageConstants.PATTERN_PINCODE, message = "Invalid pincode") @JsonProperty("presentOutsideKeralaPincode") private String presentOutsideKeralaPincode; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala Postoffice Name") + @Size(max = 64, message = "GROOM ADDRESS:Outside Kerala Postoffice name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside Kerala Postoffice Name") @JsonProperty("presentOutsideKeralaPostOfficeEn") private String presentOutsideKeralaPostOfficeEn; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala Postoffice Name in malayalam") + @Size(max = 64)//, message = "GROOM ADDRESS:"Invalid Present LB") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present Outside Kerala Postoffice Name in malayalam") @JsonProperty("presentOutsideKeralaPostOfficeMl") private String presentOutsideKeralaPostOfficeMl; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Locality Name") + @Size(max = 1000, message = "GROOM ADDRESS:Outside Kerala Locality name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside Kerala Locality Name") @JsonProperty("presentOutsideKeralaLocalityNameEn") private String presentOutsideKeralaLocalityNameEn; - @Size(max = 2000) + @Schema(type = "string", description = "Outside Kerala Street Name") + @Size(max = 64, message = "GROOM ADDRESS:Outside Kerala street name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside Kerala Street Name") @JsonProperty("presentOutsideKeralaStreetNameEn") private String presentOutsideKeralaStreetNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "Outside Kerala House Name") + @Size(max = 2500, message = "GROOM ADDRESS:Outside Kerala House Name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside Kerala House Name") @JsonProperty("presentOutsideKeralaHouseNameEn") private String presentOutsideKeralaHouseNameEn; @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala locality in malayalam") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Outside Kerala locality in malayalam") @JsonProperty("presentOutsideKeralaLocalityNameMl") private String presentOutsideKeralaLocalityNameMl; + @Schema(type = "string", description = "Outside Kerala StreetName in malayalam") @Size(max = 2000) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present Outside Kerala StreetName in malayalam") @JsonProperty("presentOutsideKeralaStreetNameMl") private String presentOutsideKeralaStreetNameMl; + @Schema(type = "string", description = "Outside Kerala Housename in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present Outside Kerala Housename in malayalam") @JsonProperty("presentOutsideKeralaHouseNameMl") private String presentOutsideKeralaHouseNameMl; - @Size(max = 2500) + @Schema(type = "string", description = "Outside India Address-1") + @Size(max = 2500, message = "GROOM ADDRESS:Present Outside India Address-1 cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside India Address-1") @JsonProperty("presentOutSideIndiaAdressEn") private String presentOutSideIndiaAdressEn; + @Schema(type = "string", description = "Outside India Address-2 in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present Outside India Address-2 in malayalam") @JsonProperty("presentOutSideIndiaAdressMl") private String presentOutSideIndiaAdressMl; - @Size(max = 2500) + @Schema(type = "string", description = "Outside India Address-2") + @Size(max = 2500, message = "GROOM ADDRESS:Present Outside India Address-2 cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside India Address-2") @JsonProperty("presentOutSideIndiaAdressEnB") private String presentOutSideIndiaAdressEnB; + @Schema(type = "string", description = "Outside India Address-2 in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present Outside India Address-2 in malayalam") @JsonProperty("presentOutSideIndiaAdressMlB") private String presentOutSideIndiaAdressMlB; - @Size(max = 2500) + + @Schema(type = "string", description = "Province") + @Size(max = 2500, message = "GROOM ADDRESS:Present Province cannot exceed 2500 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Province") @JsonProperty("presentOutSideIndiaProvinceEn") private String presentOutSideIndiaProvinceEn; + @Schema(type = "string", description = "Outside India Locality in malayalam") @Size(max = 1000) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Present Outside India Locality") @JsonProperty("presentOutSideIndiaLocalityMl") private String presentOutSideIndiaLocalityMl; + @Schema(type = "string", description = "Province in Malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Province in Malayalam ") @JsonProperty("presentOutSideIndiaProvinceMl") private String presentOutSideIndiaProvinceMl; @@ -155,14 +231,21 @@ public class GroomAddressDetails { @JsonProperty("presentOutSideCountry") private String presentOutSideCountry; - @Size(max = 1000) + @Schema(type = "string", description = "Outside India Village Name") + @Size(max = 1000, message = "GROOM ADDRESS: Present Outside India Village Name cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside India Village Name") @JsonProperty("presentOutSideIndiaadrsVillage") private String presentOutSideIndiaadrsVillage; - @Size(max = 64) + @Schema(type = "string", description = "OutsideIndia City/Town") + @Size(max = 64, message = "GROOM ADDRESS: Present OutsideIndia City/Town cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present OutsideIndia City/Town") @JsonProperty("presentOutSideIndiaadrsCityTown") private String presentOutSideIndiaadrsCityTown; - @Size(max = 10) + + @Schema(type = "string", description = "Outside India PostalCode") + @Size(max = 10, message = "GROOM ADDRESS:Present Outside India PostalCode cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Present Outside India PostalCode") @JsonProperty("presentOutSideIndiaPostCode") private String presentOutSideIndiaPostCode; ////Db Fields////// From c60f2620ec4510f3ae6db1ccb9d64ce216b59bc9 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Mon, 19 Jun 2023 15:35:54 +0530 Subject: [PATCH 419/420] model class validation :GroomAddressDetail --- .../model/marriage/GroomAddressDetails.java | 152 +++++++++++++----- 1 file changed, 112 insertions(+), 40 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java index 5bae9c83f4c..4f91d2a875b 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomAddressDetails.java @@ -351,158 +351,230 @@ public class GroomAddressDetails { @JsonProperty("isPermanentAddress") private Boolean isPermanentAddress; - @Size(max = 1000) + @Schema(type = "string", description = "Permanent country") + @NotBlank(message = "GROOM ADDRESS :Permanent country is required") + @Size(max = 64, message = "GROOM ADDRESS: Permanent country length cannot exceed 64 characters") @JsonProperty("permtaddressCountry") private String permtaddressCountry; - @Size(max = 64) + @Schema(type = "string", description = "Permanent State") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent state") @JsonProperty("permtaddressStateName") private String permtaddressStateName; - @Size(max = 64) + @Schema(type = "string", description = "Localbody Name") + @Size(max = 64, message = "GROOM ADDRESS:Permanent LB length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent LB") @JsonProperty("permntInKeralaAdrLBName") private String permntInKeralaAdrLBName; - @Size(max = 64) + @Schema(type = "string", description = "District") + @Size(max = 64, message = "GROOM ADDRESS:Permanent district length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent district") @JsonProperty("permntInKeralaAdrDistrict") private String permntInKeralaAdrDistrict; - @Size(max = 64) + @Schema(type = "string", description ="Village Name") + @Size(max = 64, message = "GROOM ADDRESS:Permanent village length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent LB") @JsonProperty("permntOutsideKeralaCityVilgeEn") private String permntOutsideKeralaCityVilgeEn; - @Size(max = 64) + @Schema(type = "string", description = "Taluk Name") + @Size(max = 64, message = "GROOM ADDRESS:Permanent Taluk length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Taluk") @JsonProperty("permntInKeralaAdrTaluk") private String permntInKeralaAdrTaluk; - @Size(max = 64) + + @Schema(type = "string", description ="Village Name") + @Size(max = 64, message = "GROOM ADDRESS:Permanent village length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent LB") @JsonProperty("permntInKeralaAdrVillage") private String permntInKeralaAdrVillage; - @Size(max = 2500) - @JsonProperty("permntOutSideIndiaprovinceMl") - private String permntOutSideIndiaProvinceMl; - - @Size(max = 2500) - @JsonProperty("permntOutSideIndiaProvinceEn") - private String permntOutSideIndiaProvinceEn; - @Size(max = 1000) + @Schema(type = "string", description = "Locality Name") + @Size(max = 1000, message = "GROOM ADDRESS:Permanent Locality length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Locality") @JsonProperty("permntInKeralaAdrLocalityNameEn") private String permntInKeralaAdrLocalityNameEn; - @Size(max = 2000) + @Schema(type = "string", description = "Street Name") + @Size(max = 2000, message = "GROOM ADDRESS:Permanent street name length cannot exceed 2000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent street name") @JsonProperty("permntInKeralaAdrStreetNameEn") private String permntInKeralaAdrStreetNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "House Name") + @Size(max = 2500, message = "GROOM ADDRESS:Permanent House Name length cannot exceed 2500 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent House Name") @JsonProperty("permntInKeralaAdrHouseNameEn") private String permntInKeralaAdrHouseNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "Locality Name in malayalam") + @Size(max = 1000)//, message = "GROOM ADDRESS:Invalid Permanent Locality Name in malayalam length cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Permanent Locality Name in malayalam") @JsonProperty("permntInKeralaAdrLocalityNameMl") private String permntInKeralaAdrLocalityNameMl; - @Size(max = 2500) + @Schema(type = "string", description = "Street Name in malayalam") + @Size(max = 2000)//, message = "GROOM ADDRESS:Street Name in malayalam length cannot exceed 2000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Permanent Street Name in malayalam") @JsonProperty("permntInKeralaAdrStreetNameMl") private String permntInKeralaAdrStreetNameMl; - @Size(max = 2500) + @Schema(type = "string", description = "House Name in malayalam") + @Size(max = 2500 )//, message = "GROOM ADDRESS:Invalid Permanent House Name in malayalam") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Permanent House Name in malayalam") @JsonProperty("permntInKeralaAdrHouseNameMl") private String permntInKeralaAdrHouseNameMl; - @Size(max = 64) + @Schema(type = "string", description = "Pincode") + @Size(min = 6, max = 6, message = "Invalid pincode") + @Pattern(regexp = MarriageConstants.PATTERN_PINCODE, message = "Invalid pincode") @JsonProperty("permntInKeralaAdrPincode") private String permntInKeralaAdrPincode; - @Size(max = 64) + @Schema(type = "string", description = "PostOffice Name") + @Size(max = 64, message = "GROOM ADDRESS:Permanent Postoffice Name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Postoffice Name") @JsonProperty("permntInKeralaAdrPostOffice") private String permntInKeralaAdrPostOffice; - @Size(max = 64) + @Schema(type = "string", description = "Ward Number") + @Size(max = 64, message = "GROOM ADDRESS:Invalid Permanent Ward Number length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Ward Number") @JsonProperty("permntInKeralaWardNo") private String permntInKeralaWardNo; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala District") + @Size(max = 64, message = "GROOM ADDRESS:Outside Kerala District length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala District") @JsonProperty("permntOutsideKeralaDistrict") private String permntOutsideKeralaDistrict; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Taluk") + @Size(max = 250, message = "GROOM ADDRESS:Outside Kerala Taluk length cannot exceed 250 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala Taluk") @JsonProperty("permntOutsideKeralaTaluk") private String permntOutsideKeralaTaluk; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Village/Town") + @Size(max = 64, message = "GROOM ADDRESS:Outside Kerala Village/Town length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala Village/Town") @JsonProperty("permntOutsideKeralaVillage") private String permntOutsideKeralaVillageorTown; - @Size(max = 64) + @Schema(type = "string", description = "Pincode") + @Size(min = 6, max = 6, message = "Invalid pincode") + @Pattern(regexp = MarriageConstants.PATTERN_PINCODE, message = "Invalid pincode") @JsonProperty("permntOutsideKeralaPincode") private String permntOutsideKeralaPincode; - @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala Locality Name") + @Size(max = 1000, message = "GROOM ADDRESS:Outside Kerala Locality name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala Locality Name") @JsonProperty("permntOutsideKeralaLocalityNameEn") private String permntOutsideKeralaLocalityNameEn; - @Size(max = 2000) + @Schema(type = "string", description = "Outside Kerala Street Name") + @Size(max = 64, message = "GROOM ADDRESS:Outside Kerala street name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala Street Name") @JsonProperty("permntOutsideKeralaStreetNameEn") private String permntOutsideKeralaStreetNameEn; - @Size(max = 2500) + @Schema(type = "string", description = "Outside Kerala House Name") + @Size(max = 2500, message = "GROOM ADDRESS:Outside Kerala House Name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala House Name") @JsonProperty("permntOutsideKeralaHouseNameEn") private String permntOutsideKeralaHouseNameEn; @Size(max = 1000) + @Schema(type = "string", description = "Outside Kerala locality in malayalam") + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Outside Kerala locality in malayalam") @JsonProperty("permntOutsideKeralaLocalityNameMl") private String permntOutsideKeralaLocalityNameMl; + @Schema(type = "string", description = "Outside Kerala StreetName in malayalam") @Size(max = 2000) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala StreetName in malayalam") @JsonProperty("permntOutsideKeralaStreetNameMl") private String permntOutsideKeralaStreetNameMl; + @Schema(type = "string", description = "Outside Kerala Housename in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala Housename in malayalam") @JsonProperty("permntOutsideKeralaHouseNameMl") private String permntOutsideKeralaHouseNameMl; - @Size(max = 64) + @Schema(type = "string", description = "Outside Kerala Postoffice Name") + @Size(max = 64, message = "GROOM ADDRESS:Outside Kerala Postoffice name length cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala Postoffice Name") @JsonProperty("permntOutsideKeralaPostOfficeEn") private String permntOutsideKeralaPostOfficeEn; + @Schema(type = "string", description = "Outside Kerala Postoffice Name in malayalam") @Size(max = 64) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Permanent Outside Kerala Postoffice Name in malayalam") @JsonProperty("permntOutsideKeralaPostOfficeMl") private String permntOutsideKeralaPostOfficeMl; - @Size(max = 2500) + @Schema(type = "string", description = "Outside India Address-1") + @Size(max = 2500, message = "GROOM ADDRESS:Permanent Outside India Address-1 cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside India Address-1") @JsonProperty("permntOutsideIndiaLineoneEn") private String permntOutsideIndiaLineoneEn; + @Schema(type = "string", description = "Outside India Address-1 in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Permanent Outside India Address-1 in malayalam") @JsonProperty("permntOutsideIndiaLineoneMl") private String permntOutsideIndiaLineoneMl; - @Size(max = 2500) + @Schema(type = "string", description = "Outside India Address-2") + @Size(max = 2500, message = "GROOM ADDRESS:Permanent Outside India Address-2 cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside India Address-2") @JsonProperty("permntOutsideIndiaLinetwoEn") private String permntOutsideIndiaLinetwoEn; + @Schema(type = "string", description = "Outside India Address-2 in malayalam") @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Permanent Outside India Address-2 in malayalam") @JsonProperty("permntOutsideIndiaLinetwoMl") private String permntOutsideIndiaLinetwoMl; - @Size(max = 1000) + @Schema(type = "string", description = "Province") + @Size(max = 2500, message = "GROOM ADDRESS:Permanent Province cannot exceed 2500 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Province") + @JsonProperty("permntOutSideIndiaprovinceEn") + private String permntOutSideIndiaProvinceEn; + + @Schema(type = "string", description = "Province in Malayalam") + @Size(max = 2500) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "GROOM ADDRESS:Invalid Province in Malayalam ") + @JsonProperty("permntOutSideIndiaprovinceMl") + private String permntOutSideIndiaProvinceMl; + + @Schema(type = "string", description = "Outside India Village Name") + @Size(max = 1000, message = "GROOM ADDRESS: Permanent Outside India Village Name cannot exceed 1000 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside India Village Name") @JsonProperty("permntOutsideIndiaVillage") private String permntOutsideIndiaVillage; - @Size(max = 1000) + @Schema(type = "string", description = "OutsideIndia City/Town") + @Size(max = 64, message = "GROOM ADDRESS: Permanent OutsideIndia City/Town cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent OutsideIndia City/Town") @JsonProperty("permntOutsideIndiaCityTown") private String permntOutsideIndiaCityTown; - @Size(max = 10) + + @Schema(type = "string", description = "Outside India PostalCode") + @Size(max = 10, message = "GROOM ADDRESS:Permanent Outside India PostalCode cannot exceed 64 characters") + @Pattern(regexp = MarriageConstants.PATTERN_ENGLISH, message = "GROOM ADDRESS:Invalid Permanent Outside India PostalCode") @JsonProperty("permanentOutsideIndiaPostCode") private String permanentOutsideIndiaPostCode; - @Size(max = 64) - @JsonProperty("permntOutsideIndiaCountry") - private String permntOutsideIndiaCountry; - ////Db Fields////// From e1c921a9b76149062ec2921925c35fa41bcb06e9 Mon Sep 17 00:00:00 2001 From: Neenuikm Date: Wed, 21 Jun 2023 10:45:04 +0530 Subject: [PATCH 420/420] model class validation --- .../web/model/marriage/BrideDetails.java | 2 +- .../web/model/marriage/GroomDetails.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java index d34abe96a07..05c2adcd725 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/BrideDetails.java @@ -115,7 +115,7 @@ public class BrideDetails { @JsonProperty("brideEmailid") private String emailid; - @Schema(type = "string", description = "Email") + @Schema(type = "string", description = "Gender") @NotBlank(message = "BRIDE DETAILS :Gender is required") @Size(max = 20, message = "BRIDE DETAILS :length cannot exceed 64 characters") @JsonProperty("brideGender") diff --git a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java index 88b83bd7c80..93bdfdbd745 100644 --- a/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java +++ b/municipal-services/marriage-services/src/main/java/org/ksmart/marriage/marriageapplication/web/model/marriage/GroomDetails.java @@ -26,8 +26,7 @@ public class GroomDetails { @Schema(type = "string", description = "Tenant identification number", example = "kl.cochin") @NotBlank(message = "GROOM DETAILS :Tenant identification number is required") @Size(max = 64, message = "GROOM DETAILS :Tenant identification number length cannot exceed 64 characters") - @Pattern(regexp = MarriageConstants.PATTERN_TENANT, - message = "GROOM DETAILS :Invalid tenant identification number format, eg: kl.cochin") + @Pattern(regexp = MarriageConstants.PATTERN_TENANT,message = "GROOM DETAILS :Invalid tenant identification number format, eg: kl.cochin") @JsonProperty("tenentId") private String tenentId; @@ -77,6 +76,7 @@ public class GroomDetails { @Schema(type = "string", description = "Groom's First name") @NotBlank(message = "GROOM DETAILS :First name in malayalam is required") @Size(max = 100) + @Pattern(regexp = MarriageConstants.PATTERN_NAME_ML, message = "Invalid first name") @JsonProperty("groomFirstnameMl") private String firstnameMl; @@ -114,7 +114,7 @@ public class GroomDetails { @JsonProperty("groomEmailid") private String emailid; - @Schema(type = "string", description = "Email") + @Schema(type = "string", description = "Gender") @NotBlank(message = "GROOM DETAILS :Gender is required") @Size(max = 20, message = "GROOM DETAILS :length cannot exceed 64 characters") @JsonProperty("groomGender")